diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/dto/DeptTree.java b/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/dto/DeptTree.java
index ca8e585..20c8dbd 100644
--- a/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/dto/DeptTree.java
+++ b/nladmin-system/nlsso-server/src/main/java/org/nl/modules/system/service/dto/DeptTree.java
@@ -31,8 +31,9 @@ import java.util.Objects;
@Getter
@Setter
public class DeptTree implements Serializable {
-
+
private Long Dept_id;
+
private Long pid;
private String name;
@JsonInclude(JsonInclude.Include.NON_EMPTY)
diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/sso/wql/SYS_DEPT.wql b/nladmin-system/nlsso-server/src/main/java/org/nl/sso/wql/SYS_DEPT.wql
index 2ac1a5b..cef3186 100644
--- a/nladmin-system/nlsso-server/src/main/java/org/nl/sso/wql/SYS_DEPT.wql
+++ b/nladmin-system/nlsso-server/src/main/java/org/nl/sso/wql/SYS_DEPT.wql
@@ -92,3 +92,20 @@
ENDSELECT
ENDPAGEQUERY
ENDIF
+
+ IF 输入.flag = "2"
+ PAGEQUERY
+ SELECT
+ max(t3.childId)
+ from
+ (
+ select *,
+ if( find_in_set(t1.pid, @p) > 0,@p := concat(@p,',',id),0 ) as childId
+ from
+ (select dept_id as id, pid from sys_dept t order by id) t1,
+ (select @p := '输入.pid') t2
+ ) t3
+ where childId != '0'
+ ENDSELECT
+ ENDPAGEQUERY
+ ENDIF
diff --git a/nladmin-ui/src/views/system/user/index.vue b/nladmin-ui/src/views/system/user/index.vue
index 2c5c548..8e3898d 100644
--- a/nladmin-ui/src/views/system/user/index.vue
+++ b/nladmin-ui/src/views/system/user/index.vue
@@ -78,10 +78,9 @@
-
@@ -365,7 +364,6 @@ export default {
getDeptTree() {
setTimeout(() => {
getDeptTreee().then(res => {
- debugger
this.deptDatas = res.content
})
}, 100)
@@ -374,6 +372,7 @@ export default {
console.log('获取部门')
getDepts({ is_used: 1 }).then(res => {
console.log('获取的部门信息', res)
+
this.depts = res.content.map(function(obj) {
if (obj.hasChildren) {
obj.children = null
@@ -402,6 +401,7 @@ export default {
},
// 获取弹窗内部门数据
loadDepts({ action, parentNode, callback }) {
+ debugger
if (action === LOAD_CHILDREN_OPTIONS) {
getDepts({ is_used: 1, pid: parentNode.id }).then(res => {
parentNode.children = res.content.map(function(obj) {