瀏覽代碼

关联节点回显

duy 2 年之前
父節點
當前提交
a577de4395
共有 2 個文件被更改,包括 9 次插入5 次删除
  1. 2 2
      src/views/manager/wbsinfo/PublicWbs.vue
  2. 7 3
      src/views/manager/wbsinfo/element.vue

+ 2 - 2
src/views/manager/wbsinfo/PublicWbs.vue

@@ -250,7 +250,7 @@ export default {
                 this.AssociatedPublicTap=true;
                 this.addElementForm.nodeName=this.from.title;
                  this.addElementForm.tableType=this.from.tableType+''
-                  this.addElementForm.tableOwner = this.from.tableOwner+''
+                  this.addElementForm.tableOwner = this.from.tableOwner
                  //清除数据
                 this.filterText1 = "";
                 this.exceldata = [];
@@ -261,7 +261,7 @@ export default {
 
                 //清理之前填写的数据
                 this.addElementForm.wbsId = "";
-                this.addElementForm.tableOwner = "";
+                // this.addElementForm.tableOwner = "";
                 this.getWbsTypeList();
                 console.log(this.from,'点击节点数据');
                 this.excelType();

+ 7 - 3
src/views/manager/wbsinfo/element.vue

@@ -724,10 +724,10 @@ export default {
       return cellValue;
       //console.log(cellValue)
     },
-    formatOwner(row, column, cellValue) {
+    formatOwner( cellValue) {
       for (let i = 0; i < this.ownerTypeList.length; i++) {
-        if (this.ownerTypeList[i].dictKey == cellValue) {
-          return this.ownerTypeList[i].dictValue;
+        if (this.ownerTypeList[i].dictValue == cellValue) {
+          return this.ownerTypeList[i].dictKey;
         }
       }
       return cellValue;
@@ -896,10 +896,14 @@ export default {
     },
     //分配节点
     distribution(row){
+      console.log(row);
       this.from.id=row.id;
       this.from.title=row.title;
       this.from.tableType=row.tabType
       this.from.tableType=this.formatTableType(this.from.tableType);
+      this.from.tableOwner=row.tabOwner
+      this.from.tableOwner=this.formatOwner(this.from.tableOwner);
+      // console.log( this.formatOwner(this.from.tableOwner),' this.from.tableOwner');
        this.$refs.PublicWbs.show();
       // this.AssociatedPublicTap = true;
     },