|
@@ -491,6 +491,8 @@
|
|
ref="deptTree"
|
|
ref="deptTree"
|
|
:props="deptProps"
|
|
:props="deptProps"
|
|
:data="options"
|
|
:data="options"
|
|
|
|
+ node-key="id"
|
|
|
|
+ :default-expanded-keys="[-1]"
|
|
show-checkbox>
|
|
show-checkbox>
|
|
<span class="custom-tree-node" slot-scope="{ node }">
|
|
<span class="custom-tree-node" slot-scope="{ node }">
|
|
<span v-if="!user.userNameNeedTranslate == 1">{{ node.label }} </span>
|
|
<span v-if="!user.userNameNeedTranslate == 1">{{ node.label }} </span>
|
|
@@ -706,9 +708,8 @@
|
|
this.http.post('/department/list',{
|
|
this.http.post('/department/list',{
|
|
},res => {
|
|
},res => {
|
|
if(res.code == 'ok'){
|
|
if(res.code == 'ok'){
|
|
- this.options = res.data;
|
|
|
|
console.log(res.data)
|
|
console.log(res.data)
|
|
- var all = { label: '全选',children:[]}
|
|
|
|
|
|
+ var all = {id:-1,label: '全选',children:[]}
|
|
all.children = JSON.parse(JSON.stringify(res.data))
|
|
all.children = JSON.parse(JSON.stringify(res.data))
|
|
this.options.unshift(all)
|
|
this.options.unshift(all)
|
|
}else {
|
|
}else {
|