瀏覽代碼

modify the infopointcode to path

haojianlong 5 年之前
父節點
當前提交
175b2fd96e
共有 1 個文件被更改,包括 16 次插入8 次删除
  1. 16 8
      src/views/ledger/facility/parts/index.vue

+ 16 - 8
src/views/ledger/facility/parts/index.vue

@@ -221,7 +221,7 @@ export default {
           this.page.pageNumber = response.PageNumber;
           this.page.total = response.Total;
           if (this.tableData && this.tableData.length) {
-            this.getBatch(response.Content)
+            this.getBatch(response.Content);
             this.initTable();
           }
         } else {
@@ -530,7 +530,7 @@ export default {
             if (cur) {
               param.data.criterias.push({
                 id: item.EquipID,
-                code: head.Path
+                code: head.InfoPointCode
               });
             }
           });
@@ -542,13 +542,21 @@ export default {
             res.Content.map(child => {
               if (item.EquipID == child.id) {
                 if (child.data || child.data == 0) {
-                  tools.setDataForKey(item, child.code, child.data);
+                  this.tableHeader.map(head => {
+                    if (head.InfoPointCode == child.code) {
+                      tools.setDataForKey(item, head.Path, child.data);
+                    }
+                  });
                 } else {
-                  tools.setDataForKey(
-                    item,
-                    child.code,
-                    child.error ? "表号功能号格式错误" : "表号功能号不存在"
-                  );
+                  this.tableHeader.map(head => {
+                    if (head.InfoPointCode == child.code) {
+                      tools.setDataForKey(
+                        item,
+                        head.Path,
+                        child.error ? "表号功能号格式错误" : "表号功能号不存在"
+                      );
+                    }
+                  });
                 }
               }
             });