浏览代码

预警管控修改

lxh 1 周之前
父节点
当前提交
52e038e37e

+ 120 - 0
src/views/vent/monitorManager/alarmMonitor/common.data.ts

@@ -2,6 +2,126 @@ import { reactive, markRaw, defineAsyncComponent } from 'vue';
 import { getAssetURL } from '/@/utils/ui';
 import { useGlobSetting } from '/@/hooks/setting';
 
+
+export const getMaxY = function (param) {
+  console.log(param,'999999')
+  let maxval=0
+  if (param.length == 1) {
+     maxval = Math.max(...param[0]);
+  } else if (param.length == 2) {
+    const max1 = Math.max(...param[0]);
+    const max2 = Math.max(...param[1]);
+    maxval = Math.max(max1,max2)
+  } else if (param.length == 3) {
+    const max1 = Math.max(...param[0]);
+    const max2 = Math.max(...param[1]);
+    const max3 = Math.max(...param[2]);
+    maxval=Math.max(max1,max2,max3)
+  }
+  const digitCount = maxval.toFixed(0).length;
+  console.log(digitCount,'digitCount')
+  let yMax = 0;
+  if (digitCount < 2) {
+    if (yMax < 0.5) {
+      yMax = 1;
+    } else if (yMax < 0.9) {
+      yMax = 1.5;
+    } else if (yMax < 5) {
+      yMax = 10;
+    } else {
+      yMax = 15;
+    }
+  } else if (digitCount < 3) {
+    const n = Number((Number(yMax.toFixed(0)) / 10).toFixed(0));
+    if (yMax < n * 10 + 5) {
+      yMax = (n + 1) * 10;
+    } else {
+      yMax = (n + 2) * 10;
+    }
+  } else if (digitCount < 4) {
+    const n = Number((Number(yMax.toFixed(0)) / 100).toFixed(0));
+    if (yMax < n * 100 + 50) {
+      yMax = (n + 1) * 100;
+    } else {
+      yMax = (n + 2) * 100;
+    }
+  } else if (digitCount < 5) {
+    const n = Number((Number(yMax.toFixed(0)) / 1000).toFixed(0));
+    if (yMax < n * 1000 + 500) {
+      yMax = (n + 1) * 1000;
+    } else {
+      yMax = (n + 1) * 1000 + 500;
+    }
+  } else if (digitCount < 6) {
+    const n = Number((Number(yMax.toFixed(0)) / 10000).toFixed(0));
+    if (yMax < n * 10000 + 5000) {
+      yMax = (n + 1) * 10000;
+    } else {
+      yMax = (n + 1) * 10000 + 5000;
+    }
+  }
+  return yMax
+}
+
+export const getMinY = function (param) {
+  let minval=0
+  if (param.length == 1) {
+    minval = Math.min(...param[0]);
+  } else if (param.length == 2) {
+    const min1 = Math.min(...param[0]);
+    const min2 = Math.min(...param[1]);
+    minval=Math.min(min1,min2)
+  } else if (param.length == 3) {
+    const min1 = Math.min(...param[0]);
+    const min2 = Math.min(...param[1]);
+    const min3 = Math.min(...param[2]);
+    minval=Math.min(min1,min2,min3)
+  }
+  const minDigitCount = minval.toFixed(0).length;
+  let yMin = 0;
+  if (minDigitCount < 2) {
+    if (yMin> 0.5) {
+      yMin = 0.5;
+    } else if (yMin > 1.5) {
+      yMin = 1.0;
+    } else if (yMin > 10) {
+      yMin = 5;
+    } else {
+      yMin = 15;
+    }
+  } else if (minDigitCount < 3) {
+    const n = Number((Number(yMin.toFixed(0)) / 10).toFixed(0));
+    if (n > 1) {
+      yMin = (n - 1) * 10;
+    } else {
+      yMin = 10;
+    }
+  } else if (minDigitCount < 4) {
+    const n = Number((Number(yMin.toFixed(0)) / 100).toFixed(0));
+    if (n > 1) {
+      yMin = (n - 1) * 100;
+    } else {
+      yMin = 100;
+    }
+  } else if (minDigitCount < 5) {
+    const n = Number((Number(yMin.toFixed(0)) / 1000).toFixed(0));
+    if (n > 1) {
+      yMin = (n - 1) * 1000;
+    } else {
+      yMin = 1000;
+    }
+  } else if (minDigitCount < 6) {
+    const n = Number((Number(yMin.toFixed(0)) / 10000).toFixed(0));
+    if (n > 1) {
+      yMin = (n - 1) * 10000;
+    } else {
+      yMin = 10000;
+    }
+  }
+  return yMin
+}
+
+
 //中间区域数据-通风
 export const centerAreaListT1 = [
   { id: 0, label: '进风量(m³/min)' },

+ 1 - 1
src/views/vent/monitorManager/alarmMonitor/common/mainWell.vue

@@ -684,7 +684,7 @@ watch(
         monitorlistWd.push({
           strinstallpos: el.strinstallpos,
           // val: el.readData.fireval,
-          val: el.readData.temperature,
+          val: el.readData.fireval,
           warnLevel_str: el.warnLevel_str,
           readTime: el.readTime,
         });

+ 1 - 1
src/views/vent/monitorManager/alarmMonitor/common/measurePoint.vue

@@ -31,7 +31,7 @@
                   'status-l': el.label.includes('状态') && el.value == 0,
                 }"
               >
-                {{ el.label.includes('状态') ? (el.value == 1 ? '异常' : el.value == 0 ? '正常' : el.value) : el.value }}
+                {{ el.label.includes('状态') ? (el.value == 1 ? '异常' : el.value == 0 ? '正常' : el.value) : `${el.value} ${el.dw}`  }}
               </span>
             </div>
           </div>

文件差异内容过多而无法显示
+ 607 - 523
src/views/vent/monitorManager/alarmMonitor/warn/ventilateWarn.vue


部分文件因为文件数量过多而无法显示