浏览代码

分配wbs时,切换试验和质检,默认选中第一个wbs树

gangyj 3 年之前
父节点
当前提交
cac1459947
共有 1 个文件被更改,包括 11 次插入2 次删除
  1. 11 2
      src/views/manager/projectinfo/detail.vue

+ 11 - 2
src/views/manager/projectinfo/detail.vue

@@ -1080,10 +1080,19 @@ export default {
           arr[1].options = data.wbsTreePrivates;
         }
         this.treeList = arr;
+
+        if(this.treeList[0].options.length > 0){
+          this.wbsId = this.treeList[0].options[0].value;
+          this.wbsChange(this.wbsId)
+        }else if(this.treeList[1].options.length > 0){
+          this.wbsId = this.treeList[1].options[0].value;
+          this.wbsChange(this.wbsId)
+        }else{
+          this.wbsId = '';
+          this.leftTreeData = [];
+        }
       })
 
-      this.wbsId = '';
-      this.leftTreeData = [];
     },
     async treeLogInit(){
       let refId = this.projectForm.referenceLogWbsTemplateId;