diff --git a/jero-web/src/components/PersonnelSelection/index.vue b/jero-web/src/components/PersonnelSelection/index.vue index a3e26e2bc..bfd786a92 100644 --- a/jero-web/src/components/PersonnelSelection/index.vue +++ b/jero-web/src/components/PersonnelSelection/index.vue @@ -42,12 +42,15 @@ isLeaf: 'leaf' }" :defaultCheckedKeys="defaultCheckedKeys" + :defaultExpandAll="defaultExpandAll" :check-strictly="false" node-key="id" @check-change="handleCheckChange" :data.sync="gData"> - {{ data.title }} + + {{ data.title }} + @@ -89,7 +92,7 @@ return { loading: false, gData: [], - autoExpandParent: true, + autoExpandParent: false, checkboxList: [], expandedKeys: [], visible: false, @@ -103,7 +106,8 @@ defaultCheckedKeys: [], defaultCheckedKeysName: [], content: [], - dataList: [] + dataList: [], + defaultExpandAll: false } }, mounted() { @@ -169,6 +173,7 @@ } this.defaultCheckedKeys = this.userIds this.defaultCheckedKeys = [...this.defaultCheckedKeys] + this.defaultExpandAll = false this.treeVisible = true } else { this.queryDepartUserTreeList(1) @@ -307,7 +312,7 @@ }, onSearch(e) { this.loading = true - // this.treeVisible = false + this.treeVisible = false let p = new Promise((resolve, reject) => { resolve() }) @@ -319,6 +324,7 @@ JSON.parse(gData).forEach(res => { if (res.type == 'User') { if (res.name.includes(e)) { + res.color = true content.push(res) } } else if (res.type == 'Depart') { @@ -328,6 +334,7 @@ content.push(res) } }) + this.defaultExpandAll = true this.gData = this.toTree(content) } else { let content = JSON.parse(gData) @@ -339,11 +346,12 @@ }) } this.gData = this.toTree(content) + this.defaultExpandAll = false } } this.defaultCheckedKeys = this.userIds this.defaultCheckedKeys = [...this.defaultCheckedKeys] - // this.treeVisible = true + this.treeVisible = true this.loading = false }) // this.gData = [] @@ -444,6 +452,7 @@ // } // } } + this.defaultExpandAll = false this.treeVisible = true } else { this.gData = [] @@ -537,4 +546,8 @@ .treeWrap { height: calc(100vh - 240px); } + .active{ + color: #21c9cc; + display: inline-block; + } \ No newline at end of file