Explorar el Código

refactor(exctab):添加元素库修改

duy hace 21 horas
padre
commit
1ae1d9e682
Se han modificado 1 ficheros con 29 adiciones y 4 borrados
  1. 29 4
      src/views/exctab/ElementIdentification/index.vue

+ 29 - 4
src/views/exctab/ElementIdentification/index.vue

@@ -796,7 +796,8 @@ export default {
         nodeName:'',
         tableType:'',
         tableOwner:""
-      }
+      },
+      clickData:{}
 
     };
   },
@@ -959,6 +960,7 @@ export default {
       //树节点点击事件
       console.log(data,'树节点点击事件');
       if (data.fileType == 3) {
+        this.clickData=data
         this.getExcelHtmlCol(data.id); //获取excel模板
         this.excelId=data.id//表格id
         if (this.dataType.length == 0) {
@@ -1137,9 +1139,32 @@ export default {
       this.addTableData = [];
     },
     addtoElement(){
-       this.eleDialog=true;
-       this.eleForm.tableOwner=''
-       this.elloading=false
+      const {tabId}=this.clickData
+      if(!tabId){
+         this.eleDialog=true;
+        this.eleForm.tableOwner=''
+        this.elloading=false
+      }else{
+    
+            if (
+            this.clickData.name &&
+            this.clickData.tableType &&
+            this.clickData.tableOwner
+          ) {
+       
+            this.submitExcelRelationWbsTreeAndElement({
+              nodeName: this.clickData.nodeName,
+              tableType: this.clickData.tableType,
+              tableOwner: this.clickData.tableOwner,
+              elementList: this.tableData,
+              excelTabId: this.from.id,
+              submitStatus: 3,
+            })
+          } 
+
+        
+      }
+      
 
     },
     submitEleDialog(){