Browse Source

休息时间段

cs 2 years ago
parent
commit
a799060083

+ 3 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/settings/timetype.vue

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