Ver código fonte

多灾融合预警报表实时切换图标修改,158分站修改-提交

lxh 3 semanas atrás
pai
commit
50816d2e1c

+ 21 - 21
src/views/vent/gas/gasReport/gas-report.data.ts

@@ -10,13 +10,13 @@ export const columns: BasicColumn[] = [
           {
             title: '第一次',
             children: [
-              {
-                title: '煤层',
-                dataIndex: 'coalseam_dictText',
-                key: 'coalseam_dictText',
-                width: 100,
-                align: 'center',
-              },
+              // {
+              //   title: '煤层',
+              //   dataIndex: 'coalseam_dictText',
+              //   key: 'coalseam_dictText',
+              //   width: 100,
+              //   align: 'center',
+              // },
               {
                 title: '检测地点',
                 dataIndex: 'strInstallPos',
@@ -200,13 +200,13 @@ export const columns: BasicColumn[] = [
           {
             title: '第一次',
             children: [
-              {
-                title: '煤层',
-                dataIndex: 'coalseam_dictText',
-                key: 'coalseam_dictText',
-                width: 100,
-                align: 'center',
-              },
+              // {
+              //   title: '煤层',
+              //   dataIndex: 'coalseam_dictText',
+              //   key: 'coalseam_dictText',
+              //   width: 100,
+              //   align: 'center',
+              // },
               {
                 title: '检测地点',
                 dataIndex: 'strInstallPos',
@@ -390,13 +390,13 @@ export const columns: BasicColumn[] = [
           {
             title: '第一次',
             children: [
-              {
-                title: '煤层',
-                dataIndex: 'coalseam_dictText',
-                key: 'coalseam_dictText',
-                width: 100,
-                align: 'center',
-              },
+              // {
+              //   title: '煤层',
+              //   dataIndex: 'coalseam_dictText',
+              //   key: 'coalseam_dictText',
+              //   width: 100,
+              //   align: 'center',
+              // },
               {
                 title: '检测地点',
                 dataIndex: 'strInstallPos',

+ 72 - 14
src/views/vent/gas/gasReport/index.vue

@@ -74,7 +74,30 @@
       </div>
       <a-table :columns="columns" :data-source="tableData" size="small" :scroll="{ y: 500 }" class="tableW"
         :pagination="pagination" @change="pageChange">
-        <template #bodyCell="{ column, text }"></template>
+        <template #bodyCell="{ column, text }">
+          <template
+            v-if="column.dataIndex == 'o2Night1' || column.dataIndex == 'o2Night2' || column.dataIndex == 'o2Early1' || column.dataIndex == 'o2Early2' || column.dataIndex == 'o2Noon1' || column.dataIndex == 'o2Noon2'">
+            <div :style="{ color: Number(text) >= 18 && Number(text) <= 20.9 ? '#ff2313' : '#0ae715' }">{{ text }}</div>
+          </template>
+          <template
+            v-if="column.dataIndex == 'coNight1' || column.dataIndex == 'coNight2' || column.dataIndex == 'coEarly1' || column.dataIndex == 'coEarly2' || column.dataIndex == 'coNoon1' || column.dataIndex == 'coNoon2'">
+            <div :style="{ color: Number(text) >= 0 && Number(text) <= 23 ? '#ff2313' : '#0ae715' }">{{ text }}</div>
+          </template>
+          <template
+            v-if="column.dataIndex == 'tNight1' || column.dataIndex == 'tNight2' || column.dataIndex == 'tEarly1' || column.dataIndex == 'tEarly2' || column.dataIndex == 'tNoon1' || column.dataIndex == 'tNoon2'">
+            <div :style="{ color: Number(text) >= 3 && Number(text) <= 25 ? '#ff2313' : '#0ae715' }">{{ text }}</div>
+          </template>
+          <template
+            v-if="column.dataIndex == 'co2Night1' || column.dataIndex == 'co2Night2' || column.dataIndex == 'co2Early1' || column.dataIndex == 'co2Early2' || column.dataIndex == 'co2Noon1' || column.dataIndex == 'co2Noon2'">
+            <div :style="{ color: Number(text) >= 0.04 && Number(text) <= 0.1 ? '#ff2313' : '#0ae715' }">{{ text }}
+            </div>
+          </template>
+          <template
+            v-if="column.dataIndex == 'ch4Night1' || column.dataIndex == 'ch4Night2' || column.dataIndex == 'ch4Early1' || column.dataIndex == 'ch4Early2' || column.dataIndex == 'ch4Noon1' || column.dataIndex == 'ch4Noon2'">
+            <div :style="{ color: Number(text) >= 0 && Number(text) <= 0.1 ? '#ff2313' : '#0ae715' }">{{ text }}</div>
+          </template>
+
+        </template>
       </a-table>
     </div>
   </div>
@@ -88,6 +111,8 @@ import customHeader from '/@/components/vent/customHeader.vue';
 import { message } from 'ant-design-vue';
 import dayjs from 'dayjs';
 
+
+
 let searchData = reactive({
   reportTime: dayjs().format('YYYY-MM-DD'),
   districtTeam: '',
@@ -161,17 +186,23 @@ async function getSelectList() {
 }
 //导出报表
 async function getExport() {
-  if (searchData.reportTime) {
-    let data = await getIsReviewPass({ reportTime: searchData.reportTime })
-    if (data == '已审核通过!') {
-      let res = await expComReportByParam({ tempName: 'wsrb', reportTime: searchData.reportTime });
-      console.log(res, '导出------------');
-      let filename = searchData.reportTime + '.xlsx';
-      downFilePublic(res, filename);
-    }
+  if (getTs()) {
+    message.warning('数据异常!');
   } else {
-    message.warning('请选择需要导出数据的填报日期!');
+    if (searchData.reportTime) {
+      let data = await getIsReviewPass({ reportTime: searchData.reportTime })
+      if (data == '已审核通过!') {
+        let res = await expComReportByParam({ tempName: 'wsrb', reportTime: searchData.reportTime });
+        console.log(res, '导出------------');
+        let filename = searchData.reportTime + '.xlsx';
+        downFilePublic(res, filename);
+      }
+    } else {
+      message.warning('请选择需要导出数据的填报日期!');
+    }
   }
+
+
 }
 //导出三对照报表
 async function getExport1() {
@@ -230,12 +261,39 @@ async function handleMenuClick(val) {
     message.warning('请选择需要导出数据的填报日期!');
   }
 }
+
+function getTs() {
+  let param = true
+  tableData.value.forEach(el => {
+    if ((Number(el.o2Night1) >= 18 && Number(el.o2Night1) <= 20.9) && (Number(el.o2Night2) >= 18 && Number(el.o2Night2) <= 20.9) && (Number(el.o2Early1) >= 18 && Number(el.o2Early1) <= 20.9) && (Number(el.o2Early2) >= 18 && Number(el.o2Early2) <= 20.9) && (Number(el.o2Noon1) >= 18 && Number(el.o2Noon1) <= 20.9) && (Number(el.o2Noon2) >= 18 && Number(el.o2Noon2) <= 20.9)) {
+      param = false
+    } else if ((Number(el.coNight1) >= 0 && Number(el.coNight1) <= 23) && (Number(el.coNight2) >= 0 && Number(el.coNight2) <= 23) && (Number(el.coEarly1) >= 0 && Number(el.coEarly1) <= 23) && (Number(el.coEarly2) >= 0 && Number(el.coEarly2) <= 23) && (Number(el.coNoon1) >= 0 && Number(el.coNoon1) <= 23) && (Number(el.coNoon2) >= 0 && Number(el.coNoon2) <= 23)) {
+      param = false
+    } else if ((Number(el.co2Night1) >= 0.04 && Number(el.co2Night1) <= 0.1) && (Number(el.co2Night2) >= 0.04 && Number(el.co2Night2) <= 0.1) && (Number(el.co2Early1) >= 0.04 && Number(el.co2Early1) <= 0.1) && (Number(el.co2Early2) >= 0.04 && Number(el.co2Early2) <= 0.1) && (Number(el.co2Noon1) >= 0.04 && Number(el.co2Noon1) <= 0.1) && (Number(el.co2Noon2) >= 0.04 && Number(el.co2Noon2) <= 0.1)) {
+      param = false
+    } else if ((Number(el.tNight1) >= 3 && Number(el.tNight1) <= 25) && (Number(el.tNight2) >= 3 && Number(el.tNight2) <= 25) && (Number(el.tEarly1) >= 3 && Number(el.tEarly1) <= 25) && (Number(el.tEarly2) >= 3 && Number(el.tEarly2) <= 25) && (Number(el.tNoon1) >= 3 && Number(el.tNoon1) <= 25) && (Number(el.tNoon2) >= 3 && Number(el.tNoon2) <= 25)) {
+      param = false
+    } else if ((Number(el.ch4Night1) >= 0 && Number(el.ch4Night1) <= 0.1) && (Number(el.ch4Night2) >= 0 && Number(el.ch4Night2) <= 0.1) && (Number(el.ch4Early1) >= 0 && Number(el.ch4Early1) <= 0.1) && (Number(el.ch4Early2) >= 0 && Number(el.ch4Early2) <= 0.1) && (Number(el.ch4Noon1) >= 0 && Number(el.ch4Noon1) <= 0.1) && (Number(el.ch4Noon2) >= 0 && Number(el.ch4Noon2) <= 0.1)) {
+      param = false
+    } else {
+      param = true
+      return
+    }
+  })
+  return param
+}
+
 //审核通过
 async function getPassSh() {
-  let res = await reviewPass({ reportTime: searchData.reportTime })
-  console.log(res, '审核通过')
-  if (res) {
-    getTableList();
+  console.log(getTs())
+  if (getTs()) {
+    message.warning('数据异常!');
+  } else {
+    let res = await reviewPass({ reportTime: searchData.reportTime })
+    console.log(res, '审核通过')
+    if (res) {
+      getTableList();
+    }
   }
 }
 

+ 1 - 2
src/views/vent/monitorManager/alarmMonitor/common.data.ts

@@ -167,11 +167,10 @@ export function getMonitorComponent() {
       return typeMenuListGas;
     default:
       typeMenuListGas = [{ name: '预警监测' }, { name: '预警指标' }];
-      // typeMenuListGas = [{ name: '预警监测' },{ name: '管道故障诊断' }, { name: '预警指标' }];
       return typeMenuListGas;
   }
 }
-//瓦斯监测菜单列表
+
 export function getMonitorFlag() {
   const { sysOrgCode } = useGlobSetting();
   let typeFlag = '';

+ 10 - 5
src/views/vent/monitorManager/alarmMonitor/index.vue

@@ -5,7 +5,7 @@
       <ventBox1>
         <template #title>
           <div v-if="showToggle == 'all'" class="icon-toggle" @click="handlerToggle">
-            <img v-if="monitor" src="@/assets/images/vent/monitor-toggle.png" alt="" />
+            <img v-if="!monitor" src="@/assets/images/vent/monitor-toggle.png" alt="" />
             <img v-else src="@/assets/images/vent/report-toggle.png" alt="" />
           </div>
           <div class="monitor-title" @click="showModal('vent')">通风监测预警</div>
@@ -451,6 +451,8 @@ let handlerToggle = () => {
   monitor.value = !monitor.value;
   windData.jf = monitor.value ?  toggleData.ventInfo.totalIntM3 : toggleData.ventInfo.zongjinfeng ;
   windData.hf = monitor.value ?  toggleData.ventInfo.totalRetM3: toggleData.ventInfo.zonghuifeng ;
+  windData.levels =monitor.value ? Object.assign({},{alarm:0,blue:0,orange:0,red:0,yellow:0}) :  toggleData.info.sysInfo.ventS.levels;
+  windData.levels['blue'] = warnNumMap.get('vent');
 };
 //风险等级点击
 let warnGradeClick = () => {
@@ -501,19 +503,22 @@ async function getList() {
   console.log(res, '预警数据--------------');
   fireMonitor1.length = 0;
   toggleData = Object.assign({}, res);
-  windData.levels = res.info.sysInfo.ventS.levels;
-  windData.levels['blue'] = warnNumMap.get('vent');
+
   if (showToggle.value == 'monitor') {
     windData.jf = res.ventInfo.zongjinfeng;
     windData.hf = res.ventInfo.zonghuifeng;
+    windData.levels = res.info.sysInfo.ventS.levels;
+    windData.levels['blue'] = warnNumMap.get('vent');
   } else if (showToggle.value == 'report') {
     windData.jf = res.ventInfo.totalIntM3;
     windData.hf = res.ventInfo.totalRetM3;
+    windData.levels =Object.assign({},{alarm:0,blue:0,orange:0,red:0,yellow:0});
+    windData.levels['blue'] = warnNumMap.get('vent');
   } else {
-    // windData.jf = monitor.value ? res.ventInfo.zongjinfeng : res.ventInfo.totalIntM3;
-    // windData.hf = monitor.value ? res.ventInfo.zonghuifeng : res.ventInfo.totalRetM3;
     windData.jf = res.ventInfo.totalIntM3;
     windData.hf = res.ventInfo.totalRetM3;
+    windData.levels =Object.assign({},{alarm:0,blue:0,orange:0,red:0,yellow:0});
+    windData.levels['blue'] = warnNumMap.get('vent');
   }
   windData.xf = res.ventInfo.xufengliang;
   dustData.levels = res.info.sysInfo.dustS.levels;

+ 1 - 1
src/views/vent/monitorManager/alarmMonitor/warn/ventilateWarn.vue

@@ -2,7 +2,7 @@
   <customHeader :options="options" @change="getSelectRow" :optionValue="optionValue"> 通风监测预警 </customHeader>
   <div class="ventilateWarn">
     <div v-if="showToggle == 'all'" class="icon-toggle" @click="handlerToggle">
-      <img v-if="monitor" src="@/assets/images/vent/monitor-toggle.png" alt="" />
+      <img v-if="!monitor" src="@/assets/images/vent/monitor-toggle.png" alt="" />
       <img v-else src="@/assets/images/vent/report-toggle.png" alt="" />
     </div>
     <div class="ventilate-top">

+ 4 - 3
src/views/vent/safetyList/common/detail.vue

@@ -178,7 +178,7 @@
         </div>
         <!-- 监测详情 -->
         <div class="detail-content" v-if="activeKey == 'manageAuto'">
-          <!-- <a-button preIcon="ant-design:sync-outlined" @click="visibleModalEdit1 = true">重置</a-button> -->
+       
           <a-table size="small" :scroll="{ y: 710 }" :row-key="(record)=>record.stationId" :expandedRowKeys="expandedRowKeys" :columns="columnsDetail" :data-source="tableData1"
             @expand="tableExpand">
             <template #action="{ record }">
@@ -187,7 +187,8 @@
             </template>
             <template #bodyCell="{ column, text }"></template>
             <template #expandedRowRender>
-              <a-table :columns="deviceColumns" :data-source="tableData2" :pagination="false">
+              <a-table :columns="deviceColumns" :data-source="tableData2" :pagination="false"   maxWidth="340"
+              :scroll="{ x: 'max-content', y: 200 }">
                 <template #action="{ record }"></template>
                 <template #bodyCell="{ column }"></template>
               </a-table>
@@ -552,7 +553,7 @@ async function getShowReadList() {
 async function tableExpand(expaned, record) {
   let res=await set158StationDevicesRead({ stationId: record.stationId })
   if(res && expaned){
-    expandedRowKeys.length=0
+    // expandedRowKeys.length=0
     let data = await get158StationData();
     tableData2.value = data.filter(v => v.stationId == record.stationId)[0].deviceList || []
     expandedRowKeys.push(record.stationId)

+ 32 - 0
src/views/vent/safetyList/safetyList.data.ts

@@ -189,54 +189,63 @@ export const deviceColumns: BasicColumn[] = [
     title: '第一路风速风向',
     dataIndex: 'dylfsfx',
     key: 'dylfsfx',
+    width: 100,
     align: 'center',
   },
   {
     title: '第一路报警状态',
     dataIndex: 'dylbjzt',
     key: 'dylbjzt',
+    width: 100,
     align: 'center',
   },
   {
     title: '第一路1发2收AD值',
     dataIndex: 'dyl1f2sADz',
     key: 'dyl1f2sADz',
+    width: 100,
     align: 'center',
   },
   {
     title: '第一路2发1收AD值',
     dataIndex: 'dyl2f1sADz',
     key: 'dyl2f1sADz',
+    width: 100,
     align: 'center',
   },
   {
     title: '通风量',
     dataIndex: 'tfl',
     key: 'tfl',
+    width: 100,
     align: 'center',
   },
   {
     title: '硬件版本',
     dataIndex: 'yjbb',
     key: 'yjbb',
+    width: 100,
     align: 'center',
   },
   {
     title: '软件版本',
     dataIndex: 'rjbb',
     key: 'rjbb',
+    width: 100,
     align: 'center',
   },
   {
     title: '在线离线标志',
     dataIndex: 'zxlxbz',
     key: 'zxlxbz',
+    width: 100,
     align: 'center',
   },
   {
     title: '日期和时间',
     dataIndex: 'rqsj',
     key: 'rqsj',
+    width: 100,
     align: 'center',
   },
   {
@@ -244,138 +253,161 @@ export const deviceColumns: BasicColumn[] = [
     dataIndex: 'rs485modbusdz',
     key: 'rs485modbusdz',
     align: 'center',
+    width: 100,
   },
   {
     title: '探头安装距离',
     dataIndex: 'ttazjl',
     key: 'ttazjl',
     align: 'center',
+    width: 100,
   },
   {
     title: '基线距离',
     dataIndex: 'jxjl',
     key: 'jxjl',
     align: 'center',
+    width: 100,
   },
   {
     title: '安装角度',
     dataIndex: 'azjd',
     key: 'azjd',
     align: 'center',
+    width: 100,
   },
   {
     title: '设置时长',
     dataIndex: 'szsz',
     key: 'szsz',
     align: 'center',
+    width: 100,
   },
   {
     title: '数据平均周期',
     dataIndex: 'sjpjzq',
     key: 'sjpjzq',
     align: 'center',
+    width: 100,
   },
   {
     title: '第一路一发二收PG值',
     dataIndex: 'dylyfesPGz',
     key: 'dylyfesPGz',
     align: 'center',
+    width: 100,
   },
   {
     title: '第一路二发一收PG值',
     dataIndex: 'dylefysPGz',
     key: 'dylefysPGz',
     align: 'center',
+    width: 100,
   },
   {
     title: '风道截面积',
     dataIndex: 'fdjmj',
     key: 'fdjmj',
     align: 'center',
+    width: 100,
   },
   {
     title: '第一路整体系数k',
     dataIndex: 'dylztxsk',
     key: 'dylztxsk',
     align: 'center',
+    width: 100,
   },
   {
     title: '第一路第一段系数',
     dataIndex: 'dyldydxs1',
     key: 'dyldydxs1',
     align: 'center',
+    width: 100,
   },
   {
     title: '第一路第二段系数',
     dataIndex: 'dyldedxs2',
     key: 'dyldedxs2',
     align: 'center',
+    width: 100,
   },
   {
     title: '第一路第三段系数',
     dataIndex: 'dyldsdxs3',
     key: 'dyldsdxs3',
     align: 'center',
+    width: 100,
   },
   {
     title: '第一路第四段系数',
     dataIndex: 'dyldsdxs4',
     key: 'dyldsdxs4',
     align: 'center',
+    width: 100,
   },
   {
     title: '第一路第五段系数',
     dataIndex: 'dyldwdxs5',
     key: 'dyldwdxs5',
     align: 'center',
+    width: 100,
   },
   {
     title: '第一路第六段系数',
     dataIndex: 'dyldldxs6',
     key: 'dyldldxs6',
     align: 'center',
+    width: 100,
   },
   {
     title: '系数KB',
     dataIndex: 'xsKB',
     key: 'xsKB',
     align: 'center',
+    width: 100,
   },
   {
     title: '系数KB符号',
     dataIndex: 'xsKBfh',
     key: 'xsKBfh',
     align: 'center',
+    width: 100,
   },
   {
     title: '高报警阈值',
     dataIndex: 'gbjyz',
     key: 'gbjyz',
     align: 'center',
+    width: 100,
   },
   {
     title: '低报警阈值',
     dataIndex: 'dbjyz',
     key: 'dbjyz',
     align: 'center',
+    width: 100,
   },
   {
     title: '报警使能',
     dataIndex: 'bjsn',
     key: 'bjsn',
     align: 'center',
+    width: 100,
   },
   {
     title: '第一路485波特率',
     dataIndex: 'dyl485btl',
     key: 'dyl485btl',
     align: 'center',
+    width: 100,
   },
   {
     title: '四个字节保存密码',
     dataIndex: 'sgzjbcmm',
     key: 'sgzjbcmm',
     align: 'center',
+    width: 100,
   },
 ];