设置创建人处理查询人的数据
This commit is contained in:
+3
@@ -26,6 +26,7 @@ import com.jero.common.util.RedisUtil;
|
||||
import com.jero.common.util.oConvertUtils;
|
||||
import com.jero.modules.base.service.BaseCommonService;
|
||||
import com.jero.modules.system.entity.*;
|
||||
import com.jero.modules.system.enums.UserOrDepartEnum;
|
||||
import com.jero.modules.system.model.DepartIdModel;
|
||||
import com.jero.modules.system.model.SysUserSysDepartModel;
|
||||
import com.jero.modules.system.service.*;
|
||||
@@ -1554,6 +1555,7 @@ public class SysUserController {
|
||||
SysUserDepartVO sysUserDepartVO = new SysUserDepartVO();
|
||||
sysUserDepartVO.setKey(sysDepart.getId());
|
||||
sysUserDepartVO.setTitle(sysDepart.getDepartName());
|
||||
sysUserDepartVO.setFlag(UserOrDepartEnum.USER.getValue());
|
||||
list.add(sysUserDepartVO);
|
||||
}
|
||||
}
|
||||
@@ -1562,6 +1564,7 @@ public class SysUserController {
|
||||
SysUserDepartVO sysUserDepartVO = new SysUserDepartVO();
|
||||
sysUserDepartVO.setKey(sysUser.getId());
|
||||
sysUserDepartVO.setTitle(sysUser.getUsername());
|
||||
sysUserDepartVO.setFlag(UserOrDepartEnum.DEPART.getValue());
|
||||
list.add(sysUserDepartVO);
|
||||
}
|
||||
}
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.jero.modules.system.enums;
|
||||
|
||||
/**
|
||||
* @Author: liyawei
|
||||
* @Description:
|
||||
* @Date: Created in 14:12 2022/5/26
|
||||
*/
|
||||
public enum UserOrDepartEnum {
|
||||
|
||||
USER("同步部门","USER"),
|
||||
DEPART("同步用户","DEPART");
|
||||
|
||||
private String name;
|
||||
private String value;
|
||||
|
||||
private UserOrDepartEnum(String name, String value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
+10
@@ -11,6 +11,8 @@ public class SysUserDepartVO {
|
||||
|
||||
private String title;
|
||||
|
||||
private String flag; //depart,user 2个属性
|
||||
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
@@ -26,4 +28,12 @@ public class SysUserDepartVO {
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getFlag() {
|
||||
return flag;
|
||||
}
|
||||
|
||||
public void setFlag(String flag) {
|
||||
this.flag = flag;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,7 +136,11 @@
|
||||
},
|
||||
getUserAndDepart() {
|
||||
getAction('sys/user/getUserAndDepart', { name: this.searchModel }).then((res) => {
|
||||
this.gData = res || []
|
||||
if (res){
|
||||
this.gData = res.filter(ele => ele.flag === 'DEPART');
|
||||
} else {
|
||||
this.gData = []
|
||||
}
|
||||
this.visibleTree = true
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user