Browse Source

火焰传感器,光钎测温修改-提交

lxh 1 month ago
parent
commit
67adbfffa9
2 changed files with 129 additions and 127 deletions
  1. 123 121
      src/views/vent/fire/fireMonitor/index.vue
  2. 6 6
      src/views/vent/fire/wokeFace/index.vue

+ 123 - 121
src/views/vent/fire/fireMonitor/index.vue

@@ -4,14 +4,14 @@
       <div class="table-box">
         <basicSensor :sensorTitle="sensorTitle" :sensorList="sensorList" :headList="headList" />
       </div>
-      <div class="table-box">
+      <!-- <div class="table-box">
         <basicSensor :sensorTitle="sensorTitle1" :sensorList="sensorList1" :headList="headList" />
-      </div>
+      </div> -->
       <div class="table-box">
         <basicSensor :sensorTitle="sensorTitle2" :sensorList="sensorList2" :headList="headList" />
       </div>
     </div>
-    <div class="bot-box">
+    <!-- <div class="bot-box">
       <div class="bot-item-title">
         <div class="item-left">光纤测温系统温度实时监测</div>
         <a-select style="width: 180px" :options="gxSelectList" size="small" placeholder="请选择" v-model:value="gxSelect"
@@ -20,7 +20,7 @@
       <div class="bot-item-content">
         <basicEchartLine :gridV="gridV" :markLine="markLine1" :echartData="echartDataGx"></basicEchartLine>
       </div>
-    </div>
+    </div> -->
 
   </div>
 </template>
@@ -31,7 +31,7 @@ import basicSensor from '../../common/basicSensor.vue';
 import { getYwRealData, getHyRealData, getPfmhRealData, getGxcwHistoryDataByPointCode, getInfosByAreaCode } from './fireMonitor.api'
 
 let sensorTitle = ref('烟雾传感器监测');
-let sensorTitle1 = ref('火焰传感器监测');
+// let sensorTitle1 = ref('火焰传感器监测');
 let sensorTitle2 = ref('电磁阀开关量监测');
 
 let headList = reactive([
@@ -41,48 +41,48 @@ let headList = reactive([
 ]);
 
 let sensorList = reactive<any[]>([])
-let sensorList1 = reactive<any[]>([])
+// let sensorList1 = reactive<any[]>([])
 let sensorList2 = reactive<any[]>([])
 
-let gxSelect = ref('')
-let gxSelectList = reactive<any[]>([])
-
-let gridV = reactive({
-  top: '13%',
-  left: '3%',
-  right: '3%',
-  bottom: '10%',
-})
-
-let markLine1 = reactive({ //最大值和最小值
-  data: [{
-    name: '预警值40­°C',
-    yAxis: 40,
-    label: {
-      show: true,
-      position: 'insideEndTop',
-      formatter: '预警值40­°C',
-      color: '#FF5D1D',
-      fontSize: 12,
-    },
-    lineStyle: {
-      normal: {
-        width: 1,
-        color: "#FF5D1D",
-      }
-    }
-
-  },
-  ]
-})
-let echartDataGx = reactive(
-  {
-    xData: [],
-    yData: [],
-    yData1: [],
-    legendName: ['最高温度', '最低温度']
-  }
-)
+// let gxSelect = ref('')
+// let gxSelectList = reactive<any[]>([])
+
+// let gridV = reactive({
+//   top: '13%',
+//   left: '3%',
+//   right: '3%',
+//   bottom: '10%',
+// })
+
+// let markLine1 = reactive({ //最大值和最小值
+//   data: [{
+//     name: '预警值40­°C',
+//     yAxis: 40,
+//     label: {
+//       show: true,
+//       position: 'insideEndTop',
+//       formatter: '预警值40­°C',
+//       color: '#FF5D1D',
+//       fontSize: 12,
+//     },
+//     lineStyle: {
+//       normal: {
+//         width: 1,
+//         color: "#FF5D1D",
+//       }
+//     }
+
+//   },
+//   ]
+// })
+// let echartDataGx = reactive(
+//   {
+//     xData: [],
+//     yData: [],
+//     yData1: [],
+//     legendName: ['最高温度', '最低温度']
+//   }
+// )
 
 //获取烟雾传感器监测数据
 async function getYwRealDataList() {
@@ -97,17 +97,17 @@ async function getYwRealDataList() {
   }
 }
 //获取火焰传感器监测数据
-async function getHyRealDataList() {
-  let res = await getHyRealData({ areaCode: 'zybds001' })
-  console.log(res, '火焰传感器数据------')
-  if (res.length != 0) {
-    sensorList1.length = 0
-    res.forEach(el => {
-      el.isOpens = el.isOpen == '0' ? '正常' : '关闭'
-      sensorList1.push({ name: el.pointName, warn: el.isOpens, times: el.time })
-    })
-  }
-}
+// async function getHyRealDataList() {
+//   let res = await getHyRealData({ areaCode: 'zybds001' })
+//   console.log(res, '火焰传感器数据------')
+//   if (res.length != 0) {
+//     sensorList1.length = 0
+//     res.forEach(el => {
+//       el.isOpens = el.isOpen == '0' ? '正常' : '关闭'
+//       sensorList1.push({ name: el.pointName, warn: el.isOpens, times: el.time })
+//     })
+//   }
+// }
 //获取喷粉灭火装置数据
 async function getPfmhRealDataList() {
   let res = await getPfmhRealData({ areaCode: 'zybds001' })
@@ -122,47 +122,47 @@ async function getPfmhRealDataList() {
 }
 
 //获取工作面光纤条数及测点编号
-async function getInfosByAreaCodeList() {
-  let res = await getInfosByAreaCode({ areaCode: 'zybds001' })
-  if (res.length != 0) {
-    gxSelectList.length = 0
-    res.forEach(el => {
-      gxSelectList.push({
-        label: el.pointName,
-        value: el.pointCode,
-      })
-    })
-    gxSelect.value = gxSelect.value ? gxSelect.value : res[0]['pointCode']
-    //获取光纤测温图表数据
-    getGxcwHistoryDataByPointCodeList()
-  }
-}
+// async function getInfosByAreaCodeList() {
+//   let res = await getInfosByAreaCode({ areaCode: 'zybds001' })
+//   if (res.length != 0) {
+//     gxSelectList.length = 0
+//     res.forEach(el => {
+//       gxSelectList.push({
+//         label: el.pointName,
+//         value: el.pointCode,
+//       })
+//     })
+//     gxSelect.value = gxSelect.value ? gxSelect.value : res[0]['pointCode']
+//     //获取光纤测温图表数据
+//     getGxcwHistoryDataByPointCodeList()
+//   }
+// }
 //获取光纤测温图表数据
-async function getGxcwHistoryDataByPointCodeList() {
-  let res = await getGxcwHistoryDataByPointCode({ pointCode: gxSelect.value })
-  echartDataGx.xData.length = 0
-  echartDataGx.yData.length = 0
-  echartDataGx.yData1.length = 0
-  res.time.forEach(el => {
-    echartDataGx.xData.push(el)
-  })
-  res.maxValue.forEach(el => {
-    echartDataGx.yData.push(el)
-  })
-  res.minValue.forEach(el => {
-    echartDataGx.yData1.push(el)
-  })
-}
+// async function getGxcwHistoryDataByPointCodeList() {
+//   let res = await getGxcwHistoryDataByPointCode({ pointCode: gxSelect.value })
+//   echartDataGx.xData.length = 0
+//   echartDataGx.yData.length = 0
+//   echartDataGx.yData1.length = 0
+//   res.time.forEach(el => {
+//     echartDataGx.xData.push(el)
+//   })
+//   res.maxValue.forEach(el => {
+//     echartDataGx.yData.push(el)
+//   })
+//   res.minValue.forEach(el => {
+//     echartDataGx.yData1.push(el)
+//   })
+// }
 //工作面光纤测温测点编号选项切换
-function pointChange(val) {
-  gxSelect.value = val
-  getGxcwHistoryDataByPointCodeList()
-}
+// function pointChange(val) {
+//   gxSelect.value = val
+//   getGxcwHistoryDataByPointCodeList()
+// }
 onMounted(() => {
   getYwRealDataList()
-  getHyRealDataList()
+  // getHyRealDataList()
   getPfmhRealDataList()
-  getInfosByAreaCodeList()
+  // getInfosByAreaCodeList()
 })
 
 
@@ -182,44 +182,46 @@ onMounted(() => {
     box-sizing: border-box;
     justify-content: space-between;
     width: 100%;
-    height: calc(70% - 2px);
+    // height: 70%;
+    height: 100%;
     margin-bottom: 2px;
     padding: 10px 0;
 
 
     .table-box {
-      width: 33%;
+      // width: 33%;
+      width: 49%;
       height: 100%;
     }
   }
 
-  .bot-box {
-    width: 100%;
-    height: 30%;
-
-    .bot-item-title {
-      display: flex;
-      box-sizing: border-box;
-      align-items: center;
-      justify-content: space-between;
-      height: 40px;
-      padding: 10px;
-      background: rgb(41 49 53 / 80%);
-
-      .item-left {
-        color: #fff;
-        font-family: "Microsoft YaHei", sans-serif;
-        font-size: 16px;
-      }
-    }
-
-    .bot-item-content {
-      box-sizing: border-box;
-      height: calc(100% - 30px);
-      padding: 10px;
-      background: rgb(41 49 53 / 80%);
-    }
-  }
+  // .bot-box {
+  //   width: 100%;
+  //   height: 30%;
+
+  //   .bot-item-title {
+  //     display: flex;
+  //     box-sizing: border-box;
+  //     align-items: center;
+  //     justify-content: space-between;
+  //     height: 40px;
+  //     padding: 10px;
+  //     background: rgb(41 49 53 / 80%);
+
+  //     .item-left {
+  //       color: #fff;
+  //       font-family: "Microsoft YaHei", sans-serif;
+  //       font-size: 16px;
+  //     }
+  //   }
+
+  //   .bot-item-content {
+  //     box-sizing: border-box;
+  //     height: calc(100% - 30px);
+  //     padding: 10px;
+  //     background: rgb(41 49 53 / 80%);
+  //   }
+  // }
 }
 
 :deep(.vMonitor-select-selector) {

+ 6 - 6
src/views/vent/fire/wokeFace/index.vue

@@ -337,9 +337,9 @@ async function getCoByAreaCodeList() {
   if (res.length != 0) {
     botCardList[2].sensorList.length = 0
     res.forEach(el => {
-      let dw = el.unit != 'null' && el.unit != null ? `(${el.unit})` : ''
+      // let dw = el.unit != 'null' && el.unit != null ? `(${el.unit})` : ''
       el.detectValue = el.sensorType == 'M0104' ? '0ppm' : el.sensorType == 'K0007' ? el.detectValue == '0' ? '无烟雾' : el.detectValue == '1' ? '有烟雾' : '-' : '-'
-      botCardList[2].sensorList.push({ name: el.nodePlacement, status: el.detectValue + dw, times: el.dateTime })
+      botCardList[2].sensorList.push({ name: el.nodePlacement, status: el.detectValue, times: el.dateTime })
     })
   }
 }
@@ -350,7 +350,7 @@ async function getPlzzRealDataList() {
   if (res.length != 0) {
     botCardList[3].sensorList.length = 0
     res.forEach(el => {
-      el.isOpen = el.isOpen == '0' ? '正常' : '异常'
+      el.isOpen = el.isOpen == '0'|| el.isOpen == 0 ? '关闭' : '打开'
       botCardList[3].sensorList.push({ name: el.pointName, status: el.isOpen, times: el.time })
     })
 
@@ -425,7 +425,7 @@ onMounted(() => {
   align-items: center;
   justify-content: space-between;
   width: calc(100% - 20px);
-  height: 928px;
+  height: 1080px;
   margin: 0 10px;
   background: #282828;
 
@@ -498,8 +498,8 @@ onMounted(() => {
       overflow-x: auto;
 
       .bot-box-card {
-        width: 805px;
-        height: 430px;
+        width: 800px;
+        height: 498px;
         margin: 10px;
       }
     }