From 5edd1277d206e7039c5af1320957154714092b6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Wed, 22 Jan 2025 17:56:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A3=80=E6=B5=8B=E5=91=98?= =?UTF-8?q?=E5=B7=A5=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inspection/PartnerManagement/index.vue | 2 +- src/views/inspection/staff/api/staff.js | 144 ++++ src/views/inspection/staff/index.vue | 755 ++++++++++++++++++ src/views/inspection/staff/profile/index.vue | 100 +++ .../inspection/staff/profile/resetPwd.vue | 71 ++ .../inspection/staff/profile/userAvatar.vue | 171 ++++ .../inspection/staff/profile/userInfo.vue | 75 ++ .../inspection/staff/profile/userSocial.vue | 100 +++ 8 files changed, 1417 insertions(+), 1 deletion(-) create mode 100644 src/views/inspection/staff/api/staff.js create mode 100644 src/views/inspection/staff/index.vue create mode 100644 src/views/inspection/staff/profile/index.vue create mode 100644 src/views/inspection/staff/profile/resetPwd.vue create mode 100644 src/views/inspection/staff/profile/userAvatar.vue create mode 100644 src/views/inspection/staff/profile/userInfo.vue create mode 100644 src/views/inspection/staff/profile/userSocial.vue diff --git a/src/views/inspection/inspection/PartnerManagement/index.vue b/src/views/inspection/inspection/PartnerManagement/index.vue index b830b1d..1d30ff2 100644 --- a/src/views/inspection/inspection/PartnerManagement/index.vue +++ b/src/views/inspection/inspection/PartnerManagement/index.vue @@ -9,7 +9,7 @@ clearable @keyup.enter.native="handleQuery" /> - + z diff --git a/src/views/inspection/staff/api/staff.js b/src/views/inspection/staff/api/staff.js new file mode 100644 index 0000000..92f5cf6 --- /dev/null +++ b/src/views/inspection/staff/api/staff.js @@ -0,0 +1,144 @@ +import request from '@/utils/request' +import { praseStrEmpty } from "@/utils/ruoyi"; + +// 查询用户列表 +export function listUser(query) { + return request({ + url: '/inspectionStaff/list', + method: 'get', + params: query + }) +} + +// 获取用户精简信息列表 +export function listSimpleUsers() { + return request({ + url: '/system/user/list-all-simple', + method: 'get' + }) +} + +// 查询用户详细 +export function getUser(userId) { + return request({ + url: '/inspectionStaff/get?id=' + praseStrEmpty(userId), + method: 'get' + }) +} +// 驾照类型 +export function getDriverLicenseType(userId) { + return request({ + url: '/common/down/getDriverLicenseType', + method: 'get' + }) +} + +// 新增用户 +export function addUser(data) { + return request({ + url: '/system/user/create', + method: 'post', + data: data + }) +} + +// 修改用户 +export function updateUser(data) { + return request({ + url: '/inspectionStaff/update', + method: 'put', + data: data + }) +} + +// 删除用户 +export function delUser(userId) { + return request({ + url: '/system/user/delete?id=' + userId, + method: 'delete' + }) +} + +// 导出用户 +export function exportUser(query) { + return request({ + url: '/system/user/export', + method: 'get', + params: query, + responseType: 'blob' + }) +} + +// 用户密码重置 +export function resetUserPwd(id, password) { + const data = { + id, + password + } + return request({ + url: '/system/user/update-password', + method: 'put', + data: data + }) +} + +// 用户状态修改 +export function changeUserStatus(id, status) { + const data = { + id, + status + } + return request({ + url: '/system/user/update-status', + method: 'put', + data: data + }) +} + +// 查询用户个人信息 +export function getUserProfile() { + return request({ + url: '/system/user/profile/get', + method: 'get' + }) +} + +// 修改用户个人信息 +export function updateUserProfile(data) { + return request({ + url: '/system/user/profile/update', + method: 'put', + data: data + }) +} + +// 用户密码重置 +export function updateUserPwd(oldPassword, newPassword) { + const data = { + oldPassword, + newPassword + } + return request({ + url: '/system/user/profile/update-password', + method: 'put', + data: data + }) +} + +// 用户头像上传 +export function uploadAvatar(data) { + return request({ + url: '/system/user/profile/update-avatar', + method: 'put', + data: data + }) +} + +// 下载用户导入模板 +export function importTemplate() { + return request({ + url: '/inspectionStaff/get-import-template', + method: 'get', + responseType: 'blob' + }) +} diff --git a/src/views/inspection/staff/index.vue b/src/views/inspection/staff/index.vue new file mode 100644 index 0000000..5b63e74 --- /dev/null +++ b/src/views/inspection/staff/index.vue @@ -0,0 +1,755 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + + + + + 新增 + + + + 导入 + + + + 导出 + + + + + + + + + + + + + + + + + + + {{ parseTime(scope.row.createTime) }} + + + + + 修改 + + handleCommand(command, scope.$index, scope.row)" + v-hasPermi="['system:user:delete', 'system:user:update-password', 'system:permission:assign-user-role']"> + 更多 + + 删除 + + 重置密码 + + 分配角色 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 将文件拖到此处,或点击上传 + + + + 是否更新已经存在的用户数据 + + 仅允许导入xls、xlsx格式文件。 + 下载模板 + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/inspection/staff/profile/index.vue b/src/views/inspection/staff/profile/index.vue new file mode 100644 index 0000000..519a058 --- /dev/null +++ b/src/views/inspection/staff/profile/index.vue @@ -0,0 +1,100 @@ + + + + + + + 个人信息 + + + + + + + + 用户名称 + {{ user.username }} + + + 手机号码 + {{ user.mobile }} + + + 用户邮箱 + {{ user.email }} + + + 所属部门 + {{ user.dept.name }} + + + + + + + 所属角色 + {{ user.roles.map(role => role.name).join(',') }} + + + 创建日期 + {{ parseTime(user.createTime) }} + + + + + + + + + 基本资料 + + + + + + + + + + + + + + + + + + + diff --git a/src/views/inspection/staff/profile/resetPwd.vue b/src/views/inspection/staff/profile/resetPwd.vue new file mode 100644 index 0000000..d769868 --- /dev/null +++ b/src/views/inspection/staff/profile/resetPwd.vue @@ -0,0 +1,71 @@ + + + + + + + + + + + + + 保存 + 关闭 + + + + + diff --git a/src/views/inspection/staff/profile/userAvatar.vue b/src/views/inspection/staff/profile/userAvatar.vue new file mode 100644 index 0000000..56e03c7 --- /dev/null +++ b/src/views/inspection/staff/profile/userAvatar.vue @@ -0,0 +1,171 @@ + + + + + + + + + + + + + + + + + + + + 选择 + + + + + + + + + + + + + + + + + + 提 交 + + + + + + + + diff --git a/src/views/inspection/staff/profile/userInfo.vue b/src/views/inspection/staff/profile/userInfo.vue new file mode 100644 index 0000000..cc2f83f --- /dev/null +++ b/src/views/inspection/staff/profile/userInfo.vue @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + 男 + 女 + + + + 保存 + 关闭 + + + + + diff --git a/src/views/inspection/staff/profile/userSocial.vue b/src/views/inspection/staff/profile/userSocial.vue new file mode 100644 index 0000000..95f1550 --- /dev/null +++ b/src/views/inspection/staff/profile/userSocial.vue @@ -0,0 +1,100 @@ + + + + + {{ scope.row.title }} + + + + + + 已绑定 + (解绑) + + + 未绑定 + (绑定) + + + + + + +