duy 2 жил өмнө
parent
commit
95a831dc5e

+ 3 - 1
src/views/manager/wbsinfo/PublicWbs.vue

@@ -251,8 +251,10 @@ export default {
     },
     methods:{
             show(){
-                console.log(this.from);
+                console.log(this.from,'from');
                 this.AssociatedPublicTap=true;
+                this.addElementForm.nodeName=this.from.title;
+                 this.addElementForm.tableType=this.from.tableType+''
                  //清除数据
                 this.filterText1 = "";
                 this.exceldata = [];

+ 10 - 8
src/views/manager/wbsinfo/element.vue

@@ -450,6 +450,7 @@ import FormulaEdit from "@/views/formula/edit.vue";
 import PublicWbs from './PublicWbs.vue'
 import { searchNodeTables, } from "@/api/exctab/excelmodel";
 import { getDictionary } from "@/api/system/dict";
+import { log } from '@antv/g2plot/lib/utils';
 
 export default {
   components:{
@@ -706,10 +707,10 @@ export default {
         list.splice(index, 1);
       }
     },
-     formatTableType(row, column, cellValue) {
+     formatTableType(cellValue) {
       for (let i = 0; i < this.tableTypelist.length; i++) {
-        if (this.tableTypelist[i].dictKey == cellValue) {
-          return this.tableTypelist[i].dictValue;
+        if (this.tableTypelist[i].dictValue == cellValue) {
+          return this.tableTypelist[i].dictKey;
         }
       }
       return cellValue;
@@ -834,15 +835,16 @@ export default {
       this.editEleVisible = true;
     },
       //修改数据类型,给个默认值
-    setDefaultLength (row) {
+    setDefatableTypeultLength (row) {
       this.$set(row, 'eLength', this.dataTypeDefaultMap[row.eType]);
     },
     //分配节点
     distribution(row){
-      console.log('分配节点');
-      this.$refs.PublicWbs.show();
-      this.from.id=row.id
-      
+      this.from.id=row.id;
+      this.from.title=row.title;
+      this.from.tableType=row.tabType
+      this.from.tableType=this.formatTableType(this.from.tableType);
+       this.$refs.PublicWbs.show();
       // this.AssociatedPublicTap = true;
     },