소스 검색

分配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;