lxh пре 1 година
родитељ
комит
b1417801ea

+ 13 - 13
src/views/vent/monitorManager/alarmMonitor/DetailModalFire.vue

@@ -95,20 +95,20 @@ function btnClick(ind) {
       break;
     case 1:
       activeIndex1.value = 0;
-      // menuList = menuList1.external.map(el => {
-      //   return {
-      //     name: el.systemname,
-      //     warn: '低风险',
-      //     type: 'out',
-      //     deviceID: el.id,
-      //     strtype:el.strtype,
-      //   }
-      // })
-      menuList.length=0
+      menuList = menuList1.external.map(el => {
+        return {
+          name: el.systemname,
+          warn: '低风险',
+          type: 'out',
+          deviceID: el.id,
+          strtype:el.strtype,
+        }
+      })
+      // menuList.length=0
       clearInterval(timer)
-      current.value = ''
-      // getSysWarnList(menuList[0].deviceID, 'fire');
-      // strType.value=menuList[0].strtype
+      // current.value = ''
+      getSysWarnList(menuList[0].deviceID, 'fire');
+      strType.value=menuList[0].strtype
       break;
   }
 }

+ 33 - 18
src/views/vent/monitorManager/alarmMonitor/fire/closeWall.vue

@@ -25,11 +25,11 @@
         <div class="content">
             <div class="title-b">采空区密闭参数</div>
             <div class="card-btn">
-                <div :class="activeIndex == index ? 'box-container1' : 'box-container'" v-for="(item, index) in mbList" :key="index"
-                    @click="btnClick(item, index)">
+                <div :class="activeIndex == index ? 'box-container1' : 'box-container'" v-for="(item, index) in mbList"
+                    :key="index" @click="btnClick(item, index)">
                     <div class="box-label">
                         <span> {{ item.label }}</span>
-                        <span >{{ item.dw }}</span>    
+                        <span>{{ item.dw }}</span>
                     </div>
                     <div class="box-item box-item1">
                         <span class="text-t">{{ `${item.label1}:` }}</span>
@@ -76,61 +76,61 @@ let topContent = reactive({
 let mbList = reactive([
     {
         label: 'O₂',
-        dw:'(%)',
+        dw: '(%)',
         label1: '浓度',
         label2: '时间',
         label3: '位置',
-        nd: 0,
+        nd: '0',
         time1: '',
         address: '',
     },
     {
         label: 'CO',
-        dw:'(ppm)',
+        dw: '(ppm)',
         label1: '浓度',
         label2: '时间',
         label3: '位置',
-        nd: 0,
+        nd: '0',
         time1: '',
         address: '',
     },
     {
         label: 'CO₂',
-        dw:'(%)',
+        dw: '(%)',
         label1: '浓度',
         label2: '时间',
         label3: '位置',
-        nd: 0,
+        nd: '0',
         time1: '',
         address: '',
     },
     {
         label: 'CH₄',
-        dw:'(%)',
+        dw: '(%)',
         label1: '浓度',
         label2: '时间',
         label3: '位置',
-        nd: 0,
+        nd: '0',
         time1: '',
         address: '',
     },
     {
         label: 'C₂H₂',
-        dw:'(ppm)',
+        dw: '(ppm)',
         label1: '浓度',
         label2: '时间',
         label3: '位置',
-        nd: 0,
+        nd: '0',
         time1: '',
         address: '',
     },
     {
         label: 'C₂H₄',
-        dw:'(ppm)',
+        dw: '(ppm)',
         label1: '浓度',
         label2: '时间',
         label3: '位置',
-        nd: 0,
+        nd: '0',
         time1: '',
         address: '',
     },
@@ -243,8 +243,21 @@ watch(() => props.listData, (val) => {
                 }
                 echartDataSgList.push(v)
             })
-
-
+        } else {
+            topContent.temperature = 0
+            topContent.position = '--'
+            topContent.time = '--'
+            topContent.warn = '正常'
+            mbList[0].nd = '--'
+            mbList[1].nd = '--'
+            mbList[2].nd = '--'
+            mbList[3].nd = '--'
+            mbList[4].nd = '--'
+            mbList[5].nd = '--'
+            mbList.forEach(el => {
+                el.time1 = '--'
+                el.address = '--'
+            })
         }
     }
 
@@ -271,8 +284,10 @@ watch(() => props.listData, (val) => {
         background: url('../../../../../assets/images/fire/bj1.png') no-repeat center;
         background-size: 100% 100%;
         align-items: center;
+
         .box-container {
             display: flex;
+
             &:nth-child(1) {
                 justify-content: space-around;
                 align-items: center;
@@ -419,7 +434,7 @@ watch(() => props.listData, (val) => {
                     }
                 }
 
-               
+
                 .box-item1 {
                     top: 24%;
                 }

+ 4 - 7
src/views/vent/monitorManager/alarmMonitor/fire/dustPage.vue

@@ -68,9 +68,9 @@ function topAreaClick(index) {
 }
 
 function formatRoundNum(num) {
-  let interger = Math.ceil(num)
-  let leng = String(interger).length
-  return Math.ceil(interger / Math.pow(10, leng - 1)) * Math.pow(10, leng - 1)
+    let interger = Math.ceil(num)
+    let leng = String(interger).length
+    return Math.ceil(interger / Math.pow(10, leng - 1)) * Math.pow(10, leng - 1)
 }
 
 watch(() => props.listData, (val) => {
@@ -94,14 +94,12 @@ watch(() => props.listData, (val) => {
         echartDataFc.aveValue.data.length = 0
         echartDataFc.xData.length = 0
         if (choiceData[activeIndex.value]) {
-            
             choiceData[activeIndex.value].history.forEach(el => {
                 echartDataFc.maxData.data.push(el.dustval)
                 echartDataFc.minData.data.push(el.ratio)
                 echartDataFc.aveValue.data.push(el.totalDust)
                 echartDataFc.xData.push(el.time)
             })
-
             let max1 = echartDataFc.maxData.data.reduce((acr, cur) => {
                 return acr > cur ? acr : cur
             })
@@ -120,8 +118,6 @@ watch(() => props.listData, (val) => {
             })
             maxY.value = formatRoundNum(max1 * 1.5)
         }
-
-
     }
 }, { deep: true })
 
@@ -176,6 +172,7 @@ watch(() => props.listData, (val) => {
                     height: 50%;
                     background: url('../../../../../assets/images/fire/content-item.png') no-repeat center;
                     background-size: 72% 50%;
+
                     .item-label {
                         position: absolute;
                         left: 21%;

+ 19 - 2
src/views/vent/monitorManager/alarmMonitor/fire/fireWork.vue

@@ -143,12 +143,16 @@ watch(() => props.listData, (val, val1) => {
             topList[0].value = val.fiber[0].readData.fmax
             topList[1].value = val.fiber[0].readData.fmin
             topList[2].value = val.fiber[0].readData.favg
-            topList[3].text = val.fiber[0].warnFlag ? '报警' : '未报警'
+            topList[3].text = val.fiber[0].warnFlag ? '报警' : '正常'
             JSON.parse(val.fiber[0].readData.fibreTemperature).forEach(el => {
                 echartDataGq.xData.push(el.pos)
                 echartDataGq.maxData.data.push(el.value)
             })
-
+        } else {
+            topList[0].value = '--'
+            topList[1].value = '--'
+            topList[2].value = '--'
+            topList[3].text = '正常'
         }
 
         if (val.bundletube.length != 0) {
@@ -182,6 +186,18 @@ watch(() => props.listData, (val, val1) => {
                 }
                 echartDataSgList.push(el)
             })
+        }else {
+            contentList[0].list[0].value = '--'
+            contentList[0].list[1].value = '--'
+            contentList[1].list[0].value = '--'
+            contentList[1].list[1].value = '--'
+            contentList[2].list[0].value = '--'
+            contentList[2].list[1].value ='--'
+            contentList.forEach(el => {
+                el.list.forEach(v => {
+                    v.time = '--'
+                })
+            })
         }
     }
 }, { deep: true })
@@ -388,6 +404,7 @@ watch(() => props.listData, (val, val1) => {
                 display: flex;
                 justify-content: space-between;
                 margin-top: 0px !important;
+
                 .box-item {
                     position: relative;
                     width: 16%;

+ 0 - 1
src/views/vent/monitorManager/alarmMonitor/fire/gasPage.vue

@@ -83,7 +83,6 @@ watch(() => props.listData, (val) => {
         })
 
         val.common.gas.forEach(el => {
-
             cardListWs.push({
                 label: '甲烷',
                 value: el.readData.gasC || '--',

+ 52 - 37
src/views/vent/monitorManager/alarmMonitor/fire/mainWell.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="mainWell">
         <!-- 光钎测温 -->
-        <div class="work-nav" v-if="listData.bundletube.length == 0 && strType!='sys_coalseam'">
+        <div class="work-nav" v-if="listData.bundletube.length == 0 && strType != 'sys_coalseam'">
             <div class="nav" v-for="(item, index) in topOutList" :key="index">
                 <div class="pic" v-if="item.imgSrc">
                     <img :src="imgUrl" alt="" />
@@ -14,7 +14,7 @@
             </div>
         </div>
         <!-- 束管监测 -->
-        <div class="work-nav" v-if="listData.bundletube.length!=0 && strType!='sys_coalseam'">
+        <div class="work-nav" v-if="listData.bundletube.length != 0 && strType != 'sys_coalseam'">
             <div class="content-box">
                 <div class="contents">
                     <img src="../../../../../assets/images/fire/pie.png" alt="" />
@@ -38,7 +38,7 @@
         </div>
 
 
-        <div class="center-box" v-if="strType!='sys_coalseam'">
+        <div class="center-box" v-if="strType != 'sys_coalseam'">
             <div class="content-box" v-for="(items, index) in tabList" :key="index">
                 <div class="title">
                     <span class="title-label">{{ items.label }}</span>
@@ -61,34 +61,37 @@
             </div>
         </div>
 
-        <div  :class="listData.fiber.length!=0 ? 'center-box1' : 'center-box2'" v-if="strType=='sys_coalseam'">
+        <div :class="listData.fiber.length != 0 ? 'center-box1' : 'center-box2'" v-if="strType == 'sys_coalseam'">
             <div class="content-box" v-for="(items, index) in tabLists" :key="index">
                 <div class="title">
                     <span class="title-label">{{ items.label }}</span>
                     <span class="details">{{ `${items.details}>>` }}</span>
                 </div>
                 <div class="content">
-                    <a-table v-if="index == 0" ref="table" size="small" :scroll="{ y: listData.fiber.length!=0 ? 160 : 320 }" :columns="columns"
+                    <a-table v-if="index == 0" ref="table" size="small"
+                        :scroll="{ y: listData.fiber.length != 0 ? 160 : 320 }" :columns="columns"
                         :data-source="monitorlistYw" :pagination="false">
                         <span slot="action" slot-scope="text, record"></span>
                     </a-table>
                     <a-table v-if="index == 1" ref="table1" size="small" :columns="columns" :data-source="monitorlistHy"
-                        :pagination="false" :scroll="{ y: listData.fiber.length!=0 ? 160 : 320}">
+                        :pagination="false" :scroll="{ y: listData.fiber.length != 0 ? 160 : 320 }">
                         <span slot="action" slot-scope="text, record"> </span>
                     </a-table>
-                    <a-table v-if="index == 2" ref="table" size="small" :scroll="{ y: listData.fiber.length!=0 ? 160 : 320 }" :columns="columns"
+                    <a-table v-if="index == 2" ref="table" size="small"
+                        :scroll="{ y: listData.fiber.length != 0 ? 160 : 320 }" :columns="columns"
                         :data-source="monitorlistPl" :pagination="false">
                         <span slot="action" slot-scope="text, record"> </span>
                     </a-table>
 
-                    <a-table v-if="index == 3" ref="table" size="small" :scroll="{ y: listData.fiber.length!=0 ? 160 : 320}" :columns="columns"
-                        :data-source="monitorlistWd" :pagination="false">
+                    <a-table v-if="index == 3" ref="table" size="small" :scroll="{ y: listData.fiber.length != 0 ? 160 : 320 }"
+                        :columns="columns" :data-source="monitorlistWd" :pagination="false">
                         <span slot="action" slot-scope="text, record"> </span>
                     </a-table>
                 </div>
             </div>
         </div>
-        <div :class="strType=='sys_coalseam' ? 'footer-box1' : 'footer-box'" v-if="listData.bundletube.length == 0 && listData.fiber.length!=0">
+        <div :class="strType == 'sys_coalseam' ? 'footer-box1' : 'footer-box'"
+            v-if="listData.bundletube.length == 0 || strType == 'sys_coalseam' && listData.fiber.length != 0">
             <div class="footer-title">
                 <div class="echart-label">光钎测温系统实时温度监测</div>
             </div>
@@ -98,11 +101,11 @@
         </div>
 
         <!-- 束管监测 -->
-        <div class="content-s" v-if="listData.bundletube.length!=0 && strType!='sys_coalseam'">
+        <div class="content-s" v-if="listData.bundletube.length != 0 && strType != 'sys_coalseam'">
             <div class="title-b">采空区密闭参数</div>
             <div class="card-btn">
-                <div :class="activeIndex == index ? 'content-box1' : 'content-box'" v-for="(item, index) in mbList" :key="index"
-                    @click="btnClick(item, index)">
+                <div :class="activeIndex == index ? 'content-box1' : 'content-box'" v-for="(item, index) in mbList"
+                    :key="index" @click="btnClick(item, index)">
                     <div class="btn-label">
                         <span>{{ item.label }}</span>
                         <span>{{ item.dw }}</span>
@@ -135,20 +138,20 @@
 
 <script lang="ts" setup>
 import { ref, computed, reactive, watch, defineProps } from 'vue';
-import { topOutList, tabList,tabLists, columns, } from '../fire.data'
+import { topOutList, tabList, tabLists, columns, } from '../fire.data'
 import imgUrl from '../../../../../assets/images/fire/pie.png'
 import echartLine2 from './common/echartLine2.vue'
 import echartLine1 from './common/echartLine1.vue'
 
 let props = defineProps({
     listData: Object,
-    strType:String
+    strType: String
 });
 
 
 //束管监测-顶部区域数据
 let topContent = reactive({
-    temperature: 0,
+    temperature: '0',
     position: '',
     time: '',
     warn: '',
@@ -161,7 +164,7 @@ let type = ref('O₂')
 let mbList = reactive([
     {
         label: 'O₂',
-        dw:'(%)',
+        dw: '(%)',
         label1: '浓度',
         label2: '时间',
         label3: '位置',
@@ -171,7 +174,7 @@ let mbList = reactive([
     },
     {
         label: 'CO',
-        dw:'(ppm)',
+        dw: '(ppm)',
         label1: '浓度',
         label2: '时间',
         label3: '位置',
@@ -181,7 +184,7 @@ let mbList = reactive([
     },
     {
         label: 'CO₂',
-        dw:'(%)',
+        dw: '(%)',
         label1: '浓度',
         label2: '时间',
         label3: '位置',
@@ -191,7 +194,7 @@ let mbList = reactive([
     },
     {
         label: 'CH₄',
-        dw:'(%)',
+        dw: '(%)',
         label1: '浓度',
         label2: '时间',
         label3: '位置',
@@ -201,7 +204,7 @@ let mbList = reactive([
     },
     {
         label: 'C₂H₂',
-        dw:'(ppm)',
+        dw: '(ppm)',
         label1: '浓度',
         label2: '时间',
         label3: '位置',
@@ -211,7 +214,7 @@ let mbList = reactive([
     },
     {
         label: 'C₂H₄',
-        dw:'(ppm)',
+        dw: '(ppm)',
         label1: '浓度',
         label2: '时间',
         label3: '位置',
@@ -248,7 +251,7 @@ let monitorlistHy = reactive([])
 let monitorlistPl = reactive([])
 
 //温度传感器列表数据
-let monitorlistWd=reactive([])
+let monitorlistWd = reactive([])
 
 //束管监测密闭参数选项切换
 function btnClick(item, ind) {
@@ -317,7 +320,7 @@ watch(() => props.listData, (val) => {
         monitorlistYw.length = 0
         monitorlistHy.length = 0
         monitorlistPl.length = 0
-        monitorlistWd.length=0
+        monitorlistWd.length = 0
         if (val.fiber.length != 0) {
             topOutList[0].value = val.fiber[0].readData.fmax
             topOutList[1].value = val.fiber[0].readData.fmin
@@ -327,6 +330,11 @@ watch(() => props.listData, (val) => {
                 echartDataWd.xData.push(el.pos)
                 echartDataWd.maxData.data.push(el.value)
             })
+        } else {
+            topOutList[0].value = '--'
+            topOutList[1].value = '--'
+            topOutList[2].value = '--'
+            topOutList[3].text = '正常'
         }
 
         if (val.bundletube.length != 0) {
@@ -351,6 +359,11 @@ watch(() => props.listData, (val) => {
                 }
                 echartDataSgList.push(v)
             })
+        } else {
+            topContent.temperature = '--'
+            topContent.position = '--'
+            topContent.time = '--'
+            topContent.warn = '正常'
         }
 
         if (val.smoke.length != 0) {
@@ -372,8 +385,8 @@ watch(() => props.listData, (val) => {
             })
         }
 
-        if(val.temperature.length!=0){
-            val.temperature.forEach(el=>{
+        if (val.temperature.length != 0) {
+            val.temperature.forEach(el => {
                 monitorlistWd.push(el)
             })
         }
@@ -497,7 +510,7 @@ watch(() => props.listData, (val) => {
 
 
 
-       
+
         .content-box {
             display: flex;
 
@@ -639,15 +652,16 @@ watch(() => props.listData, (val) => {
             display: flex;
             flex-direction: column;
             width: calc(50% - 10px);
-            height:calc(50% - 10px);
+            height: calc(50% - 10px);
             background: url('../../../../../assets/images/fire/bj1.png') no-repeat center;
             background-size: 100% 100%;
 
             &:nth-child(1) {
-                margin:0px 20px 20px 0px;
+                margin: 0px 20px 20px 0px;
             }
+
             &:nth-child(3) {
-                margin:0px 20px 0px 0px;
+                margin: 0px 20px 0px 0px;
             }
 
             .title {
@@ -690,15 +704,16 @@ watch(() => props.listData, (val) => {
             display: flex;
             flex-direction: column;
             width: calc(50% - 10px);
-            height:calc(50% - 10px);
+            height: calc(50% - 10px);
             background: url('../../../../../assets/images/fire/bj1.png') no-repeat center;
             background-size: 100% 100%;
 
             &:nth-child(1) {
-                margin:0px 20px 20px 0px;
+                margin: 0px 20px 20px 0px;
             }
+
             &:nth-child(3) {
-                margin:0px 20px 0px 0px;
+                margin: 0px 20px 0px 0px;
             }
 
             .title {
@@ -776,13 +791,14 @@ watch(() => props.listData, (val) => {
         }
     }
 
-    .content-s{
+    .content-s {
         width: 100%;
         height: 608px;
         padding: 15px 20px 0px 20px;
         background: url('../../../../../assets/images/fire/bj1.png') no-repeat center;
         background-size: 100% 100%;
         box-sizing: border-box;
+
         .title-b {
             height: 30px;
             line-height: 30px;
@@ -843,7 +859,7 @@ watch(() => props.listData, (val) => {
                     }
                 }
 
-               
+
                 .box-item1 {
                     top: 24%;
                 }
@@ -941,5 +957,4 @@ watch(() => props.listData, (val) => {
             }
         }
     }
-}
-</style>
+}</style>

+ 9 - 7
src/views/vent/monitorManager/alarmMonitor/fire/ventilate.vue

@@ -114,18 +114,20 @@ watch(
             { ids: 2, label: '报警描述', value: '--' },
           ],
         });
-
       }
 
       centerAreaListB1[0].content = val.common.jin || '--';
       centerAreaListB1[1].content = val.common.hui || '--';
       centerAreaListB1[2].content = val.common.xufengliang || '--';
 
-      val.common.history.forEach((v) => {
-        echartDataFc1.maxData.data.push(parseFloat(v.jin));
-        echartDataFc1.minData.data.push(parseFloat(v.hui));
-        echartDataFc1.xData.push(v.time);
-      });
+      if (val.common.history.length != 0) {
+        val.common.history.forEach((v) => {
+          echartDataFc1.maxData.data.push(parseFloat(v.jin));
+          echartDataFc1.minData.data.push(parseFloat(v.hui));
+          echartDataFc1.xData.push(v.time);
+        });
+      }
+
       let max1 = echartDataFc1.maxData.data.reduce((acr, cur) => {
         return acr > cur ? acr : cur
       })
@@ -151,7 +153,7 @@ watch(
     display: flex;
     justify-content: space-between;
     margin-bottom: 10px;
- 
+
 
     .top-box {
       position: relative;