ソースを参照

预警-提交新版本

lxh 1 年間 前
コミット
720deb3fc2

+ 8 - 4
src/views/vent/monitorManager/alarmMonitor/AlarmHistoryTable.vue

@@ -148,10 +148,10 @@
         // fieldMapToTime: [['tickectDate', ['starttime_begin', 'starttime_end'], '']],
       },
       fetchSetting: {
-        listField: 'list.records',
-        pageField: 'list.pages',
-        sizeField: 'list.size',
-        totalField: 'list.total',
+        listField: 'records',
+        pageField: 'pages',
+        sizeField: 'size',
+        totalField: 'total',
       },
       beforeFetch(params) {
         params.strtype = props.deviceType + '*';
@@ -223,4 +223,8 @@
       }
     }
   }
+
+  ::v-deep .zxm-table-content{
+    overflow: hidden !important; 
+  }
 </style>

+ 6 - 6
src/views/vent/monitorManager/alarmMonitor/DetailModal.vue

@@ -10,7 +10,6 @@
               :dataSource="dataSource"
               design-scope="alarm"
               :isShowSelect="false"
-              :formConfig="formConfig"
               title="预警监测"
             >
               <template #filterCell="{ column, record }">
@@ -26,7 +25,7 @@
         </a-tab-pane>
         <a-tab-pane key="2" tab="报警历史">
           <div class="tab-item box-bg">
-            <AlarmHistoryTable v-if="activeKey == '2'" :columns="levelColumns" designScope="alarm-history" />
+            <AlarmHistoryTable v-if="activeKey == '2'" :columns="levelHisColumns" designScope="alarm-history" />
           </div>
         </a-tab-pane>
       </a-tabs>
@@ -39,9 +38,9 @@ import { onMounted, ref, defineEmits, reactive, onUnmounted, watch } from 'vue';
 import MonitorTable from '../comment/MonitorTable.vue';
 import AlarmHistoryTable from './AlarmHistoryTable.vue';
 import { warningList } from './alarm.api';
-import { formConfig, levelColumns } from './alarm.data'
+import { levelColumns,levelHisColumns } from './alarm.data'
 import { BasicModal, useModalInner } from '/@/components/Modal';
-import { array } from 'vue-types';
+
 
 const props = defineProps({
   deviceId: { type: String },
@@ -97,7 +96,8 @@ onUnmounted(() => {
     .@{ventSpace}-tabs {
       max-height: calc(100vh - 100px);
       .tab-item {
-        max-height: calc(100vh - 170px);
+        height: calc(90vh - 152px);
+        // max-height: calc(100vh - 170px);
         overflow-y: auto;
       }
     }
@@ -110,7 +110,7 @@ onUnmounted(() => {
       color: #fff;
     }
     .table-box {
-      height: calc(60vh - 150px);
+      height: calc(90vh - 152px);
       padding: 20px 10px;
       overflow-y: auto;
     }

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

@@ -44,7 +44,6 @@ export const levelColumns: BasicColumn[] = [
     dataIndex: 'nwartype',
     customRender: ({ record }) => {
       return render.renderDict(record.nwartype , 'leveltype');
-    
     },
     width: 100,
     align: 'center',
@@ -55,18 +54,62 @@ export const levelColumns: BasicColumn[] = [
     width: 100,
     align: 'center',
   },
+  // {
+  //   title: '报警持续时间',
+  //   dataIndex: 'warntime',
+  //   width: 100,
+  //   align: 'center',
+  // },
+  // {
+  //   title: '持续时间(s)',
+  //   dataIndex: 'timelength',
+  //   width: 100,
+  //   align: 'center',
+  // },
   {
-    title: '报警持续时间',
-    dataIndex: 'warntime',
+    title: '报警描述',
+    dataIndex: 'wardescrip',
     width: 100,
     align: 'center',
   },
+];
+
+export const levelHisColumns: BasicColumn[] = [
   {
-    title: '持续时间(s)',
-    dataIndex: 'timelength',
+    title: '设备名称',
+    dataIndex: 'devicename',
     width: 100,
     align: 'center',
   },
+
+  
+  {
+    title: '报警类型',
+    dataIndex: 'nwartype',
+    customRender: ({ record }) => {
+      return render.renderDict(record.nwartype , 'leveltype');
+    },
+    width: 100,
+    align: 'center',
+  },
+  {
+    title: '报警开始时间',
+    dataIndex: 'starttime',
+    width: 100,
+    align: 'center',
+  },
+  {
+    title: '报警持续时间',
+    dataIndex: 'warntime',
+    width: 100,
+    align: 'center',
+  },
+  // {
+  //   title: '持续时间(s)',
+  //   dataIndex: 'timelength',
+  //   width: 100,
+  //   align: 'center',
+  // },
   {
     title: '报警描述',
     dataIndex: 'wardescrip',

+ 23 - 23
src/views/vent/monitorManager/alarmMonitor/index.vue

@@ -137,7 +137,7 @@
                     ? '高风险'
                     : centerData.levels == 201
                       ? '报警'
-                      : centerData.levels == 0 ? '正常' : '--'
+                      : centerData.levels == 0 ? '正常' : '网络异常'
             }}</div>
             <div class="text2">风险分析</div>
           </div>
@@ -421,30 +421,30 @@ async function getList() {
       iconsMonitor[el].level = res.info.devicekindInfo[el].maxLevel;
     }
   });
-  fireMonitor[0].value = res.info.sysInfo.fireS.summaryInfo.external.temperature.value;
-  fireMonitor[0].level = res.info.sysInfo.fireS.summaryInfo.external.temperature.maxlevel;
-  fireMonitor[1].value = res.info.sysInfo.fireS.summaryInfo.external.coval.value;
-  fireMonitor[1].level = res.info.sysInfo.fireS.summaryInfo.external.coval.maxlevel;
-  fireMonitor[2].value = res.info.sysInfo.fireS.summaryInfo.external.chval.value;
-  fireMonitor[2].level = res.info.sysInfo.fireS.summaryInfo.external.chval.maxlevel;
-  fireMonitor[3].value = res.info.sysInfo.fireS.summaryInfo.external.ch2val.value;
-  fireMonitor[3].level = res.info.sysInfo.fireS.summaryInfo.external.ch2val.maxlevel;
-  fireMonitor[4].value = res.info.sysInfo.fireS.summaryInfo.external.co2val.value;
-  fireMonitor[4].level = res.info.sysInfo.fireS.summaryInfo.external.co2val.maxlevel;
-  fireMonitor[5].value = res.info.sysInfo.fireS.summaryInfo.external.o2val.value;
-  fireMonitor[5].level = res.info.sysInfo.fireS.summaryInfo.external.o2val.maxlevel;
+  fireMonitor[0].value =res.info.sysInfo.fireS.summaryInfo.external.temperature ? res.info.sysInfo.fireS.summaryInfo.external.temperature.value : '';
+  fireMonitor[0].level = res.info.sysInfo.fireS.summaryInfo.external.temperature ? res.info.sysInfo.fireS.summaryInfo.external.temperature.maxlevel : '';
+  fireMonitor[1].value =res.info.sysInfo.fireS.summaryInfo.external.coval ? res.info.sysInfo.fireS.summaryInfo.external.coval.value : '';
+  fireMonitor[1].level =  res.info.sysInfo.fireS.summaryInfo.external.coval ? res.info.sysInfo.fireS.summaryInfo.external.coval.maxlevel : '';
+  fireMonitor[2].value = res.info.sysInfo.fireS.summaryInfo.external.chval ? res.info.sysInfo.fireS.summaryInfo.external.chval.value : '';
+  fireMonitor[2].level = res.info.sysInfo.fireS.summaryInfo.external.chval ? res.info.sysInfo.fireS.summaryInfo.external.chval.maxlevel : '';
+  fireMonitor[3].value = res.info.sysInfo.fireS.summaryInfo.external.ch2val ? res.info.sysInfo.fireS.summaryInfo.external.ch2val.value : '';
+  fireMonitor[3].level = res.info.sysInfo.fireS.summaryInfo.external.ch2val ? res.info.sysInfo.fireS.summaryInfo.external.ch2val.maxlevel : '';
+  fireMonitor[4].value = res.info.sysInfo.fireS.summaryInfo.external.co2val ? res.info.sysInfo.fireS.summaryInfo.external.co2val.value : '';
+  fireMonitor[4].level = res.info.sysInfo.fireS.summaryInfo.external.co2val ? res.info.sysInfo.fireS.summaryInfo.external.co2val.maxlevel : '';
+  fireMonitor[5].value = res.info.sysInfo.fireS.summaryInfo.external.o2val ? res.info.sysInfo.fireS.summaryInfo.external.o2val.value : '';
+  fireMonitor[5].level = res.info.sysInfo.fireS.summaryInfo.external.o2val ? res.info.sysInfo.fireS.summaryInfo.external.o2val.maxlevel : '';
   console.log(fireMonitor, 'fireMonitor---------------')
 
-  fireMonitor1[0].value = res.info.sysInfo.fireS.summaryInfo.internal.coval.value;
-  fireMonitor1[0].level = res.info.sysInfo.fireS.summaryInfo.internal.coval.maxlevel;
-  fireMonitor1[1].value = res.info.sysInfo.fireS.summaryInfo.internal.chval.value;
-  fireMonitor1[1].level = res.info.sysInfo.fireS.summaryInfo.internal.chval.maxlevel;
-  fireMonitor1[2].value = res.info.sysInfo.fireS.summaryInfo.internal.ch2val.value;
-  fireMonitor1[2].level = res.info.sysInfo.fireS.summaryInfo.internal.ch2val.maxlevel;
-  fireMonitor1[3].value = res.info.sysInfo.fireS.summaryInfo.internal.co2val.value;
-  fireMonitor1[3].level = res.info.sysInfo.fireS.summaryInfo.internal.co2val.maxlevel;
-  fireMonitor1[4].value = res.info.sysInfo.fireS.summaryInfo.internal.o2val.value;
-  fireMonitor1[4].level = res.info.sysInfo.fireS.summaryInfo.internal.o2val.maxlevel;
+  fireMonitor1[0].value = res.info.sysInfo.fireS.summaryInfo.internal.coval ? res.info.sysInfo.fireS.summaryInfo.internal.coval.value : '';
+  fireMonitor1[0].level = res.info.sysInfo.fireS.summaryInfo.internal.coval ? res.info.sysInfo.fireS.summaryInfo.internal.coval.maxlevel : '';
+  fireMonitor1[1].value = res.info.sysInfo.fireS.summaryInfo.internal.chval ? res.info.sysInfo.fireS.summaryInfo.internal.chval.value : '';
+  fireMonitor1[1].level = res.info.sysInfo.fireS.summaryInfo.internal.chval ? res.info.sysInfo.fireS.summaryInfo.internal.chval.maxlevel : '';
+  fireMonitor1[2].value = res.info.sysInfo.fireS.summaryInfo.internal.ch2val ? res.info.sysInfo.fireS.summaryInfo.internal.ch2val.value : '';
+  fireMonitor1[2].level = res.info.sysInfo.fireS.summaryInfo.internal.ch2val ? res.info.sysInfo.fireS.summaryInfo.internal.ch2val.maxlevel : '';
+  fireMonitor1[3].value = res.info.sysInfo.fireS.summaryInfo.internal.co2val ?res.info.sysInfo.fireS.summaryInfo.internal.co2val.value : '';
+  fireMonitor1[3].level =  res.info.sysInfo.fireS.summaryInfo.internal.co2val ? res.info.sysInfo.fireS.summaryInfo.internal.co2val.maxlevel : '';
+  fireMonitor1[4].value = res.info.sysInfo.fireS.summaryInfo.internal.o2val ? res.info.sysInfo.fireS.summaryInfo.internal.o2val.value : '';
+  fireMonitor1[4].level =res.info.sysInfo.fireS.summaryInfo.internal.o2val ? res.info.sysInfo.fireS.summaryInfo.internal.o2val.maxlevel : '';
   console.log(fireMonitor1, 'fireMonitor1------')
   gasMonitor.length = 0
   gasData.sums = 0