Browse Source

Merge branch 'master' of http://182.92.126.35:3000/hrx/mky-vent-base

hongrunxia 1 year ago
parent
commit
a36ff0d14f

+ 7 - 7
src/views/vent/monitorManager/alarmMonitor/alarm.data.ts

@@ -530,39 +530,39 @@ export const fireMonitor = [
   {
     title: '最高温度(℃)',
     code: '',
-    value: '26.7',
+    value: 0,
   },
   {
     title: 'CO最大值(ppm)',
     code: '',
-    value: '0.0',
+    value: 0,
   },
   {
     title: 'CH4最大值(%)',
     code: '',
-    value: '0.03',
+    value: 0,
   },
   {
     title: 'C2H4最大值(ppm)',
     code: '',
-    value: '0.0',
+    value: 0,
   },
   {
     title: 'CO2最大值(%)',
     code: '',
-    value: '0.0',
+    value: 0,
   },
   {
     title: '上隅角O2最小值(%)',
     code: '',
-    value: '18.3',
+    value: 0,
   },
 ];
 export const fireMonitor1 = [
   {
     title: '最高温度(℃)',
     code: '',
-    value: '98.7',
+    value: 0,
   },
   {
     title: '火焰传感器',

+ 42 - 20
src/views/vent/monitorManager/alarmMonitor/index.vue

@@ -104,7 +104,16 @@
     <div class="center-box">
       <div class="animation-box">
         <canvas class="rain"></canvas>
-        <div class="bottom" :class="{ 'bottom1': centerData.levels==0,'bottom2':centerData.levels==101,'bottom3':centerData.levels==102,'bottom4':centerData.levels==103,'bottom5':centerData.levels==104 }">
+        <div
+          class="bottom"
+          :class="{
+            bottom1: centerData.levels == 0,
+            bottom2: centerData.levels == 101,
+            bottom3: centerData.levels == 102,
+            bottom4: centerData.levels == 103,
+            bottom5: centerData.levels == 104,
+          }"
+        >
           <div class="animation1">
             <div class="ball"></div>
             <svg xmlns="http://www.w3.org/2000/svg" width="375.334" height="77.559" viewBox="0 0 375.334 77.559" style="opacity: 0.5">
@@ -136,7 +145,19 @@
             </svg>
           </div>
           <div class="text-box">
-            <div class="text1">{{ centerData.levels==0 ? '正常' : centerData.levels==101 ? '低风险' : centerData.levels==102 ? '中风险' : centerData.levels==103 ? '高风险' : centerData.levels==104 ? '报警' : '--' }}</div>
+            <div class="text1">{{
+              centerData.levels == 0
+                ? '正常'
+                : centerData.levels == 101
+                ? '低风险'
+                : centerData.levels == 102
+                ? '中风险'
+                : centerData.levels == 103
+                ? '高风险'
+                : centerData.levels == 104
+                ? '报警'
+                : '--'
+            }}</div>
             <div class="text2">风险分析</div>
           </div>
           <div class="icon-animation"></div>
@@ -316,9 +337,9 @@
   };
   let windData = reactive({
     levels: {},
-    jf:0,
-    hf:0,
-    xf:0,
+    jf: 0,
+    hf: 0,
+    xf: 0,
   }); //通风监测数据
   let dustData = reactive({
     //粉尘监测数据
@@ -330,7 +351,7 @@
     ws: '',
     sb: '',
     fc: '',
-    levels:0,
+    levels: 0,
   });
   const [register, { openModal }] = useModal();
 
@@ -379,30 +400,31 @@
   async function getList() {
     const res = await getTotalList({});
     console.log(res, '预警数据--------------');
-    let data=[]
+    let data = [];
     windData.levels = res.info.sysInfo.ventS.levels;
+    windData.jf = res.ventInfo.zongfengliang;
+    windData.hf = res.ventInfo.zonghuifeng;
+    windData.xf = res.ventInfo.xufengliang;
     dustData.levels = res.info.sysInfo.dustS.levels;
     centerData.fire = res.info.sysInfo.fireS.status;
     centerData.tf = res.info.sysInfo.ventS.status;
     centerData.ws = res.info.sysInfo.gasS.status;
     centerData.sb = res.info.sysInfo.synthesizeS.status;
     centerData.fc = res.info.sysInfo.dustS.status;
-    Object.keys(res.info.sysInfo).forEach(v=>{
-      data.push(res.info.sysInfo[v].maxLevel)
-    })
-    data=data.sort((a,b)=>b-a)
-    centerData.levels=data[0]
+    Object.keys(res.info.sysInfo).forEach((v) => {
+      data.push(res.info.sysInfo[v].maxLevel);
+    });
+    data = data.sort((a, b) => b - a);
+    centerData.levels = data[0];
     Object.keys(iconsMonitor).forEach((el) => {
       iconsMonitor[el].level = res.info.devicekindInfo[el].maxLevel;
     });
-
-    // if(dataSource.value.length > 0){
-    //   dataSource.value.map((data: any) => {
-    //     const readData = data.readData;
-    //     data = Object.assign(data, readData);
-    //     return data;
-    //   });
-    // }
+    fireMonitor[0].value = 0;
+    fireMonitor[1].value = res.info.sysInfo.fireS.summaryInfo.external.coval.value;
+    fireMonitor[2].value = res.info.sysInfo.fireS.summaryInfo.external.chval.value;
+    fireMonitor[3].value = res.info.sysInfo.fireS.summaryInfo.external.ch2val.value;
+    fireMonitor[4].value = res.info.sysInfo.fireS.summaryInfo.external.co2val.value;
+    fireMonitor[5].value = res.info.sysInfo.fireS.summaryInfo.external.o2val.value;
   }
 
   onMounted(async () => {