Переглянути джерело

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