Browse Source

关联清表修改

duy 3 weeks ago
parent
commit
0062a373e4
1 changed files with 30 additions and 10 deletions
  1. 30 10
      src/views/manager/projectinfo/tree.vue

+ 30 - 10
src/views/manager/projectinfo/tree.vue

@@ -3744,16 +3744,36 @@ export default {
             message: "关联清表成功",
           });
           // selectByNodeTable刷新表单列表
-          this.updateNodeTable();
-          this.GLExcel = false;
-          console.log(this.GLExcelFrom, "GLExcelFrom");
-          this.rightClick(
-            this.GLExcelFrom.id,
-            this.GLExcelFrom.excelId,
-            this.GLExcelFrom.ids,
-            this.GLExcelFrom.initTableName,
-            this.GLExcelFrom.initTableId
-          );
+            // await this.updateNodeTable()
+            selectByNodeTable( this.curTreeData.id, this.projectid, this.id).then(
+                (res) => {
+                  if (res.data.data && res.data.data.length) {
+                    this.formData = res.data.data;
+                    this.formData.forEach((ele) => {
+                          this.GLExcel = false;
+                            this.formData.forEach((ele) => {
+                              if(ele.excelId = this.GLExcelFrom.excelId){
+                                this.GLExcelFrom.initTableId=ele.initTableId 
+                              }
+                            })
+                            
+                            
+                              this.rightClick(
+                                this.GLExcelFrom.id,
+                                this.GLExcelFrom.excelId,
+                                this.GLExcelFrom.ids,
+                                this.GLExcelFrom.initTableName,
+                                this.GLExcelFrom.initTableId
+                              );
+                  
+                                  });
+                  } else {
+                    this.formData = [];
+                  }
+                }
+              );
+           
+      
         }
       } else {
         this.$message({