Browse Source

风机列表模块完成

yangxiao 3 years ago
parent
commit
1abe08f788
2 changed files with 39 additions and 61 deletions
  1. 1 1
      public/static/config/modeConfig.js
  2. 38 60
      src/views/WindSite/pages/DraughtFanList.vue

+ 1 - 1
public/static/config/modeConfig.js

@@ -1,6 +1,6 @@
 
 // 本地联调开关
-const localTest = 1;
+const localTest = 0;
 
 // 服务器地址
 let baseURL = null;

+ 38 - 60
src/views/WindSite/pages/DraughtFanList.vue

@@ -75,143 +75,120 @@ export default {
         column: [
           {
             name: "风机名称",
-            field: "name",
+            field: "code",
             is_num: false,
             is_light: false,
           },
           {
             name: "冷却风温度",
-            field: "lqf",
+            field: "FDJLQFWD",
             is_num: true,
             is_light: false,
           },
           {
             name: "有功功率",
-            field: "yggl",
+            field: "FJGL",
             is_num: true,
             is_light: false,
           },
           {
             name: "液压油温度",
-            field: "yyy",
+            field: "YYYW",
             is_num: true,
             is_light: false,
           },
           {
             name: "Pcspp温度",
-            field: "pcspp",
+            field: "PCS_WD",
             is_num: true,
             is_light: false,
           },
           {
             name: "U1绕组温度",
-            field: "u1",
+            field: "U1YZWD",
             is_num: true,
             is_light: false,
           },
           {
             name: "U2绕组温度",
-            field: "u2",
+            field: "U2YZWD",
             is_num: true,
-            is_light: true,
+            is_light: false,
           },
           {
             name: "V1绕组温度",
-            field: "v1",
+            field: "V1YZWD",
             is_num: true,
             is_light: false,
           },
           {
             name: "V2绕组温度",
-            field: "v2",
+            field: "V2YZWD",
             is_num: true,
             is_light: false,
           },
           {
             name: "W1绕组温度",
-            field: "w1",
+            field: "W1YZWD",
             is_num: true,
             is_light: false,
           },
           {
             name: "W2绕组温度",
-            field: "w2",
+            field: "W2YZWD",
             is_num: true,
             is_light: false,
           },
           {
             name: "轴承A温度",
-            field: "zca",
+            field: "FDJZCAWD",
             is_num: true,
             is_light: false,
           },
           {
             name: "轴承B温度",
-            field: "zcb",
+            field: "FDJZCBWD",
             is_num: true,
             is_light: false,
           },
           {
             name: "齿轮箱温度",
-            field: "clx",
+            field: "CLXWD",
             is_num: true,
             is_light: false,
           },
           {
             name: "齿轮箱轴1温度",
-            field: "clx1",
+            field: "CLXSRZ1WD",
             is_num: true,
             is_light: false,
           },
           {
             name: "齿轮箱轴2温度",
-            field: "clx2",
+            field: "CLXSRZ2WD",
             is_num: true,
             is_light: false,
           },
           {
             name: "机舱温度",
-            field: "jc",
+            field: "JCWD",
             is_num: true,
             is_light: false,
           },
           {
             name: "滑环温度",
-            field: "hh",
+            field: "FDJHHWD",
             is_num: true,
             is_light: false,
           },
           {
             name: "环境温度",
-            field: "hj",
+            field: "JCWWD",
             is_num: true,
             is_light: false,
           },
         ],
-        data: [
-          {
-            name: "1E01",
-            lqf: 15.78,
-            yggl: 15.79,
-            yyy: 15.79,
-            pcspp: 15.79,
-            u1: 15.79,
-            u2: 15.79,
-            v1: 15.79,
-            v2: 15.79,
-            w1: 15.79,
-            w2: 15.79,
-            zca: 15.79,
-            zcb: 15.79,
-            clx: 15.79,
-            clx1: 15.79,
-            clx2: 15.79,
-            jc: 15.79,
-            hh: 15.79,
-            hj: 15.79,
-            is_light: false,
-          },
-        ],
+        data: [],
       },
     };
   },
@@ -223,28 +200,25 @@ export default {
       that.API.requestData({
         showLoading,
         method: "POST",
-        subUrl: "matrix/matrixDetialGfPush",
+        subUrl: "monitorwt/findWtInfoList",
+        data: {
+          wpId: "MHS_FDC"
+        },
         success (res) {
-          console.log(123123, res);
+          res.data.forEach(ele => {
+            for (let key in ele) {
+              if (key !== "code" && key !== "lnid" && key !== "model" && key !== "pjid" && key !== "wpid") {
+                ele[key] = ele[key] || 0;
+              }
+            }
+          });
+          that.data.data = res.data;
         },
       });
     },
   },
-  // 生命周期钩子
-  beforeCreate () {
-    // 创建前
-  },
-  created () {
-    // 创建后
-    for (let i = 1; i < 50; i++) {
-      this.data.data.push(JSON.parse(JSON.stringify(this.data.data[0])));
-      if (i == 16) {
-        this.data.data[i].is_light = true;
-      }
-    }
-  },
 
-  mounted () {
+  created () {
     let that = this;
     that.$nextTick(() => {
       that.requestData(false);
@@ -254,6 +228,10 @@ export default {
     });
   },
 
+  mounted () {
+
+  },
+
   unmounted () {
     clearInterval(this.timmer);
     this.timmer = null;