dedsudiyu 3 viikkoa sitten
vanhempi
commit
47ab4cff48

+ 2 - 2
src/views/emergencyManagement/pageComponent/deptListComponent.vue

@@ -148,11 +148,11 @@
           let self = this;
           let list = this.forTreeId(response.data);
           this.$nextTick(()=>{
-            let checkData = list[0].childTreeList[0];
             //写入楼层下数据
             this.$set(this,'deptOptions',list)
+            let checkData = list[0].childTreeList[0].childTreeList[0];
             //展开列表
-            this.$set(this,'defaultKey',[list[0].treeId,list[0].childTreeList[0].treeId]);
+            self.$set(self,'defaultKey',[list[0].treeId,list[0].childTreeList[0].treeId]);
             setTimeout(function(){
               //选中列表
               self.$refs.tree.setCurrentKey(checkData.treeId);