From c9fb9f9f563b7ff373776eed4b29dead051863d6 Mon Sep 17 00:00:00 2001 From: haha Date: Fri, 21 Feb 2025 23:55:45 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E7=94=A8=E6=88=B7=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E5=A2=9E=E5=8A=A0=E8=BA=AB=E4=BB=BD=E8=AF=81=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yanzhu/system/api/domain/SysUser.java | 9 + .../resources/mapper/system/SysUserMapper.xml | 6 +- ...roProjectInfoSubdeptsUsersServiceImpl.java | 1 + .../service/impl/SysUserServiceImpl.java | 1 + yanzhu-ui-vue3/src/api/system/user.js | 192 +++++++++--------- .../proProjectInfoSubdeptsUsers/index.vue | 2 +- .../src/views/system/user/index.vue | 153 ++++++++++++-- 7 files changed, 253 insertions(+), 111 deletions(-) diff --git a/yanzhu-api/yanzhu-api-system/src/main/java/com/yanzhu/system/api/domain/SysUser.java b/yanzhu-api/yanzhu-api-system/src/main/java/com/yanzhu/system/api/domain/SysUser.java index 2dc0adab..ff5113a2 100644 --- a/yanzhu-api/yanzhu-api-system/src/main/java/com/yanzhu/system/api/domain/SysUser.java +++ b/yanzhu-api/yanzhu-api-system/src/main/java/com/yanzhu/system/api/domain/SysUser.java @@ -104,6 +104,7 @@ public class SysUser extends BaseEntity /** 角色对象 */ private List roles; + private String userInfos; /** 角色组 */ private Long[] roleIds; @@ -119,6 +120,14 @@ public class SysUser extends BaseEntity return workType; } + public String getUserInfos() { + return userInfos; + } + + public void setUserInfos(String userInfos) { + this.userInfos = userInfos; + } + public void setWorkType(Long workType) { this.workType = workType; } diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/system/SysUserMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/system/SysUserMapper.xml index fac8142c..9b7dc633 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/system/SysUserMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/system/SysUserMapper.xml @@ -18,6 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -65,7 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select u.user_id, u.com_id, com.dept_name as com_name, u.dept_id, u.user_name, u.nick_name, ex.user_type,ex.work_type, u.card_code, u.email , u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.dept_short_name, d.dept_code, d.dept_type, d.order_num, d.leader, d.status as dept_status, - r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,com.dept_name com_dept_name + r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,com.dept_name com_dept_name,u.user_infos from sys_user u left join sys_dept d on u.dept_id = d.dept_id left join sys_dept com on u.com_id = com.dept_id @@ -208,6 +209,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" avatar, phonenumber, sex, + user_infos, password, status, create_by, @@ -224,6 +226,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{avatar}, #{phonenumber}, #{sex}, + #{userInfos}, #{password}, #{status}, #{createBy}, @@ -244,6 +247,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" email = #{email}, phonenumber = #{phonenumber}, sex = #{sex}, + user_infos = #{userInfos}, avatar = #{avatar}, password = #{password}, status = #{status}, diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java index 1e2cebcf..e6e1a541 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java @@ -145,6 +145,7 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu sysUser.setUpdateTime(DateUtils.getNowDate()); sysUser.setComId(proProjectInfoSubdeptsUsers.getComId()); sysUser.setDeptId(proProjectInfoSubdeptsUsers.getProjectId()); + sysUser.setUserInfos(proProjectInfoSubdeptsUsers.getUserInfos()); String subDeptType = proProjectInfoSubdeptsUsers.getSubDeptType(); // 判断单位类型 if(Objects.nonNull(subDeptType)){ diff --git a/yanzhu-modules/yanzhu-system/src/main/java/com/yanzhu/system/service/impl/SysUserServiceImpl.java b/yanzhu-modules/yanzhu-system/src/main/java/com/yanzhu/system/service/impl/SysUserServiceImpl.java index 10c121ad..aac9e7a3 100644 --- a/yanzhu-modules/yanzhu-system/src/main/java/com/yanzhu/system/service/impl/SysUserServiceImpl.java +++ b/yanzhu-modules/yanzhu-system/src/main/java/com/yanzhu/system/service/impl/SysUserServiceImpl.java @@ -434,6 +434,7 @@ public class SysUserServiceImpl implements ISysUserService data.put("userId",user.getUserId()); data.put("userName",user.getNickName()); data.put("cardType","1"); + data.put("userInfos",user.getUserInfos()); data.put("workType",user.getWorkType()); data.put("cardCode",user.getCardCode()); data.put("userSex",user.getSex()); diff --git a/yanzhu-ui-vue3/src/api/system/user.js b/yanzhu-ui-vue3/src/api/system/user.js index 02587732..e45861bf 100644 --- a/yanzhu-ui-vue3/src/api/system/user.js +++ b/yanzhu-ui-vue3/src/api/system/user.js @@ -1,196 +1,196 @@ -import request from '@/utils/request' +import request from "@/utils/request"; import { parseStrEmpty } from "@/utils/ruoyi"; // 查询用户列表 export function listUser(query) { return request({ - url: '/system/user/list', - method: 'get', - params: query - }) + url: "/system/user/list", + method: "get", + params: query, + }); } // 查询用户详细 export function getUser(userId) { return request({ - url: '/system/user/' + parseStrEmpty(userId), - method: 'get' - }) + url: "/system/user/" + parseStrEmpty(userId), + method: "get", + }); } // 按手机号码查询用户 export function selectByPhone(phone) { return request({ - url: '/system/user/selectByPhone/' + phone, - method: 'get' - }) + url: "/system/user/selectByPhone/" + phone, + method: "get", + }); } - // 新增用户 export function addUser(data) { return request({ - url: '/system/user', - method: 'post', - data: data - }) + url: "/system/user", + method: "post", + data: data, + }); } // 修改用户 export function updateUser(data) { return request({ - url: '/system/user', - method: 'put', + url: "/system/user", + method: "put", data: { - userId:data.userId, - nickName:data.nickName, - userType:data.userType, - workType:data.workType, - sex:data.sex, - status:data.status, - postIds:data.postIds, - roles:data.roles, - comId:data.comId, - deptId:data.deptId, - roleIds:data.roleIds - } - }) + userId: data.userId, + nickName: data.nickName, + userType: data.userType, + workType: data.workType, + sex: data.sex, + status: data.status, + userInfos: data.userInfos, + postIds: data.postIds, + roles: data.roles, + comId: data.comId, + deptId: data.deptId, + roleIds: data.roleIds, + }, + }); } // 删除用户 export function delUser(userId) { return request({ - url: '/system/user/' + userId, - method: 'delete' - }) + url: "/system/user/" + userId, + method: "delete", + }); } // 用户密码重置 export function resetUserPwd(userId, password) { const data = { userId, - password - } + password, + }; return request({ - url: '/system/user/resetPwd', - method: 'put', - data: data - }) + url: "/system/user/resetPwd", + method: "put", + data: data, + }); } // 用户状态修改 export function changeUserStatus(userId, status) { const data = { userId, - status - } + status, + }; return request({ - url: '/system/user/changeStatus', - method: 'put', - data: data - }) + url: "/system/user/changeStatus", + method: "put", + data: data, + }); } // 查询用户个人信息 export function getUserProfile() { return request({ - url: '/system/user/profile', - method: 'get' - }) + url: "/system/user/profile", + method: "get", + }); } // 修改用户个人信息 export function updateUserProfile(data) { return request({ - url: '/system/user/profile', - method: 'put', - data: data - }) + url: "/system/user/profile", + method: "put", + data: data, + }); } // 用户密码重置 export function updateUserPwd(oldPassword, newPassword) { const data = { oldPassword, - newPassword - } + newPassword, + }; return request({ - url: '/system/user/profile/updatePwd', - method: 'put', - params: data - }) + url: "/system/user/profile/updatePwd", + method: "put", + params: data, + }); } // 用户头像上传 export function uploadAvatar(data) { return request({ - url: '/system/user/profile/avatar', - method: 'post', + url: "/system/user/profile/avatar", + method: "post", headers: { - 'Content-Type': 'multipart/form-data' - }, - data: data - }) + "Content-Type": "multipart/form-data", + }, + data: data, + }); } // 查询授权角色 export function getAuthRole(userId) { return request({ - url: '/system/user/authRole/' + userId, - method: 'get' - }) + url: "/system/user/authRole/" + userId, + method: "get", + }); } // 保存授权角色 export function updateAuthRole(data) { return request({ - url: '/system/user/authRole', - method: 'put', - params: data - }) + url: "/system/user/authRole", + method: "put", + params: data, + }); } // 查询部门下拉树结构 export function deptTreeSelect() { return request({ - url: '/system/user/deptTree', - method: 'get' - }) + url: "/system/user/deptTree", + method: "get", + }); } // 查询部门下拉树结构 export function deptFirTreeSelect() { return request({ - url: '/system/user/deptTree', - method: 'get' - }) + url: "/system/user/deptTree", + method: "get", + }); } -export function getUserComs(userId){ +export function getUserComs(userId) { return request({ - url: '/system/user/profile/getUserComps/'+userId, - method: 'get' - }) + url: "/system/user/profile/getUserComps/" + userId, + method: "get", + }); } -export function activeUserCom(userCom){ +export function activeUserCom(userCom) { return request({ - url:'/system/user/activeUserCom', - method:'post', - data:userCom - }) + url: "/system/user/activeUserCom", + method: "post", + data: userCom, + }); } -export function reload(){ +export function reload() { return request({ - url: '/system/user/reload', - method: 'get' - }) + url: "/system/user/reload", + method: "get", + }); } -export function getUserByName(userName){ +export function getUserByName(userName) { return request({ - url: '/system/user/getUserByName/'+userName, - method: 'get' - }) -} \ No newline at end of file + url: "/system/user/getUserByName/" + userName, + method: "get", + }); +} diff --git a/yanzhu-ui-vue3/src/views/manage/proProjectInfoSubdeptsUsers/index.vue b/yanzhu-ui-vue3/src/views/manage/proProjectInfoSubdeptsUsers/index.vue index 15327311..5ab9c988 100644 --- a/yanzhu-ui-vue3/src/views/manage/proProjectInfoSubdeptsUsers/index.vue +++ b/yanzhu-ui-vue3/src/views/manage/proProjectInfoSubdeptsUsers/index.vue @@ -128,7 +128,7 @@ - - + diff --git a/yanzhu-ui-vue3/src/views/system/user/index.vue b/yanzhu-ui-vue3/src/views/system/user/index.vue index 0d748adb..b08a5a72 100644 --- a/yanzhu-ui-vue3/src/views/system/user/index.vue +++ b/yanzhu-ui-vue3/src/views/system/user/index.vue @@ -1,5 +1,5 @@