瀏覽代碼

修改工艺图

tengmingxue 1 年之前
父節點
當前提交
681d039870
共有 2 個文件被更改,包括 16 次插入12 次删除
  1. 4 5
      src/views/scadaCraftMap/index.vue
  2. 12 7
      src/views/scadaCraftMap/siteIndex.js

+ 4 - 5
src/views/scadaCraftMap/index.vue

@@ -628,6 +628,8 @@ export default {
             },
           })
             .then((res) => {
+              const indexs = ["S7.300.CHU_SS","S7.300.CHU_CL","S7.300.CHU_FT","S7.300.1#QSYW","S7.300.2#QSYW","SC_In_DN350_FT","SC_In_DN500_FT"]
+              const indexs2 = ["SC_In_DN350_TFT","SC_In_DN500_TFT"]
               if (res && res.hasOwnProperty("code") && res.code == 1) {
                 res = res.result;
                 for (var item in res) {
@@ -646,11 +648,8 @@ export default {
                         if (t == "S7.300.2#F_OPEN") n = n == "1" ? "开" : "关";
                         if (t == "S7.300.2#F_POWER_FAULT")
                           n = n == "1" ? "开" : "关";
-                        if (t == "S7.300.CHU_SS") n = parseFloat(n).toFixed(3);
-                        if (t == "S7.300.CHU_CL") n = parseFloat(n).toFixed(3);
-                        if (t == "S7.300.CHU_FT") n = parseFloat(n).toFixed(3);
-                        if (t == "S7.300.1#QSYW") n = parseFloat(n).toFixed(3);
-                        if (t == "S7.300.2#QSYW") n = parseFloat(n).toFixed(3);
+                        if (indexs.indexOf(t) >= 0) n= parseFloat(n).toFixed(3);
+                        if (indexs2.indexOf(t) >= 0) n= parseInt(n);
                         infos[t].innerHTML = n;
                       }
                     }

+ 12 - 7
src/views/scadaCraftMap/siteIndex.js

@@ -68,16 +68,19 @@ const siteIndex = {
         },
         // 电动阀1
         {
-            'type': 'text', 'id': 'm1t3', 'name': '', 'point': [1, 0.5], 'from': 'm2p4', 'margin': { 'x': [0, 90], 'y': [0, 50] }, 'value': [
-                // { 'id': 't1', 'name': '电源:', 'value': 0.0, 'unit': '', 'itnm': 'S7.300.1#F_POWER_FAULT', 'isType': '1', 'type': { '0': '关闭', '1': '打开' } },
-                { 'id': 't1', 'name': '开关状态:', 'value': 0, 'unit': '', 'itnm': 'S7.300.1#F_OPEN', 'isType': '1', 'type': { '0': '关', '1': '开' },"style":"",'alarmValue':1 }
+            'type': 'text', 'id': 'm1t3', 'name': '', 'point': [1, 0.5], 'from': 'm2p4', 'margin': { 'x': [0, 280], 'y': [0, 80] }, 'value': [
+                { 'id': 't1', 'name': '开关状态:', 'value': 0, 'unit': '', 'itnm': 'S7.300.1#F_OPEN', 'isType': '1', 'type': { '0': '关', '1': '开' },"style":"",'alarmValue':1 },
+                { 'id': 't1', 'name': '取水瞬时流量:', 'value': 0.0, 'unit': 'm³/h', 'itnm': 'SC_In_DN500_FT', 'isType': '2', 'toFixed': '3', "style":"color:#EEEEEE;font-size:40px;" },
+                { 'id': 't1', 'name': '取水累计流量:', 'value': 0.0, 'unit': 'm³', 'itnm': 'SC_In_DN500_TFT', 'isType': '2', 'toFixed': '3', "style":"color:#EEEEEE;font-size:40px;" }
             ]
         },
         // 电动阀2
         {
-            'type': 'text', 'id': 'm1t4', 'name': '', 'point': [1, 0.5], 'from': 'm2p5', 'margin': { 'x': [0, 90], 'y': [0, 50] }, 'value': [
+            'type': 'text', 'id': 'm1t4', 'name': '', 'point': [1, 0.5], 'from': 'm2p5', 'margin': { 'x': [0, 280], 'y': [0, 80] }, 'value': [
                 // { 'id': 't1', 'name': '电源:', 'value': 0.0, 'unit': '', 'itnm': 'S7.300.2#F_POWER_FAULT', 'isType': '1', 'type': { '0': '关闭', '1': '打开' } },
-                { 'id': 't1', 'name': '开关状态:', 'value': 0, 'unit': '', 'itnm': 'S7.300.2#F_OPEN', 'isType': '1', 'type': { '0': '关', '1': '开' },"style":"",'alarmValue':1 }
+                { 'id': 't1', 'name': '开关状态:', 'value': 0, 'unit': '', 'itnm': 'S7.300.2#F_OPEN', 'isType': '1', 'type': { '0': '关', '1': '开' },"style":"",'alarmValue':1 },
+                { 'id': 't1', 'name': '取水瞬时流量:', 'value': 0.0, 'unit': 'm³/h', 'itnm': 'SC_In_DN350_FT', 'isType': '2', 'toFixed': '3', "style":"color:#EEEEEE;font-size:40px;" },
+                { 'id': 't1', 'name': '取水累计流量:', 'value': 0.0, 'unit': 'm³', 'itnm': 'SC_In_DN350_TFT', 'isType': '2', 'toFixed': '3', "style":"color:#EEEEEE;font-size:40px;" }
             ]
         },
         {
@@ -97,13 +100,15 @@ const siteIndex = {
         // 一号清水箱水位
         {
             'type': 'text', 'id': 'm1t6', 'name': '', 'point': [1, 0.5], 'from': 'm2p10', 'margin': { 'x': [0, 190], 'y': [0, 70] }, 'value': [
-                { 'id': 't1', 'name': '水位:', 'value': 0.0, 'unit': 'L', 'itnm': 'S7.300.1#QSYW', 'isType': '2', 'toFixed': '3',"style":"color:#EEEEEE;font-size:40px;" }
+                // { 'id': 't1', 'name': '水位:', 'value': 0.0, 'unit': 'L', 'itnm': 'S7.300.1#QSYW', 'isType': '2', 'toFixed': '3',"style":"color:#EEEEEE;font-size:40px;" }
+                { 'id': 't1', 'name': '水位:', 'value': 0.0, 'unit': 'L', 'itnm': 'S8.300.1#QSYW', 'isType': '2', 'toFixed': '3',"style":"color:#EEEEEE;font-size:40px;" }
             ]
         },
         // 二号清水箱水位
         {
             'type': 'text', 'id': 'm1t7', 'name': '', 'point': [1, 0.5], 'from': 'm2p11', 'margin': { 'x': [0, 190], 'y': [0, 70] }, 'value': [
-                { 'id': 't1', 'name': '水位:', 'value': 0.0, 'unit': 'L', 'itnm': 'S7.300.2#QSYW', 'isType': '2', 'toFixed': '3',"style":"color:#EEEEEE;font-size:40px;" }
+                // { 'id': 't1', 'name': '水位:', 'value': 0.0, 'unit': 'L', 'itnm': 'S7.300.2#QSYW', 'isType': '2', 'toFixed': '3',"style":"color:#EEEEEE;font-size:40px;" }
+                { 'id': 't1', 'name': '水位:', 'value': 0.0, 'unit': 'L', 'itnm': 'S8.300.2#QSYW', 'isType': '2', 'toFixed': '3',"style":"color:#EEEEEE;font-size:40px;" }
             ]
         },
     ],