Z 1 yıl önce
ebeveyn
işleme
35ca9ab904

+ 9 - 3
src/components/staffSelection/staffSelection.vue

@@ -73,7 +73,7 @@
                           class="zw-page-list-more"
                         >
                           <el-button type="text" @click="getMore()"
-                          >更多<i class="el-icon-caret-bottom"></i
+                            >更多<i class="el-icon-caret-bottom"></i
                           ></el-button>
                         </div>
                       </div>
@@ -172,7 +172,6 @@
     created() {},
     methods: {
       open(selectedList) {
-
         this.dialogVisible = true;
         this.selectStafflist = selectedList;
         this.getInfo();
@@ -185,11 +184,18 @@
           idField: 'id',
           parentIdField: 'parentId'
         });
+        if (this.treeList.length) {
+          this.$nextTick(() => {
+            this.$refs.tree.setCurrentNode(this.treeList[0]);
+            this.handleNodeClick(this.treeList[0]);
+          });
+        }
+
         //this.treeList = res.data;
       },
       //选择分类
       handleNodeClick(data) {
-        this.currentData = data
+        this.currentData = data;
         this.staffList = [];
 
         this.form.groupId = data.id;