瀏覽代碼

[Mod 0000] 安全监控小调度接口对接

hongrunxia 3 周之前
父節點
當前提交
3500028dcc

+ 4 - 4
src/views/vent/monitorManager/safetyMonitor/index.vue

@@ -171,9 +171,9 @@
           />
         </div>
       </a-tab-pane>
-      <a-tab-pane key="5" tab="报警分析" >
+      <a-tab-pane key="5" tab="报警分析">
         <div class="tab-item">
-          <safetyWarnAnalysis  :device-type="deviceType"></safetyWarnAnalysis>
+          <safetyWarnAnalysis :device-type="deviceType" />
         </div>
       </a-tab-pane>
     </a-tabs>
@@ -202,7 +202,7 @@
   import { ref, onMounted, onUnmounted, shallowRef, defineProps, watch, inject, unref } from 'vue';
   import { list, getDeviceList, safetyList, getExportUrl, subStationList, initSubStation } from './safety.api';
   // import AlarmHistoryCommentTable from '../comment/AlarmHistoryTable.vue';
-  import  safetyWarnAnalysis from '../comment/safetyWarnAnalysis.vue'
+  import safetyWarnAnalysis from '../comment/safetyWarnAnalysis.vue';
   import AlarmHistoryTable from './AlarmHistoryTable.vue';
   import HistoryTable from './HistoryTable.vue';
   import HandlerHistoryTable from '../comment/HandlerHistoryTable.vue';
@@ -655,7 +655,7 @@
 
     .@{ventSpace}-picker,
     .@{ventSpace}-select-selector {
-      width: 100% ;
+      width: 100%;
       background: #00000017 !important;
       border: 1px solid @vent-form-item-border !important;
 

+ 108 - 67
src/views/vent/monitorManager/safetySensorMonitor/AlarmHistoryTable.vue

@@ -4,26 +4,11 @@
       <template #form-onExportXls>
         <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls()"> 导出</a-button>
       </template>
-
-      <template #bodyCell="{ column, record }">
-        <template v-if="column.dict">
-          <!-- 除了 101(蓝色预警)其他都是红色字体 -->
-          <span v-if="column.dataIndex === 'nwartype'" :class="{ 'color-#ff3823': ['102', '103', '104', '201', '1001'].includes(record.nwartype) }">
-            {{ render.renderDictText(record.nwartype, 'leveltype') || '-' }}
-          </span>
-          <span v-else>
-            {{ render.renderDictText(record[column.dataIndex], column.dict) || '-' }}
-          </span>
-        </template>
-      </template>
-      <template #action="{ record }">
-        <a @click="openHistoryCurve(record)">预警分析</a>
-      </template>
     </BasicTable>
   </div>
 </template>
 
-<script lang="ts" name="SafetyAlarm" setup>
+<script lang="ts" name="safetyAlarm" setup>
   //ts语法
   import { watch, ref, defineExpose, inject, onMounted } from 'vue';
   import { BasicTable } from '/@/components/Table';
@@ -32,9 +17,8 @@
   import { defHttp } from '/@/utils/http/axios';
   import dayjs from 'dayjs';
   import { getAutoScrollContainer } from '/@/utils/common/compUtils';
-  import { render } from '/@/utils/common/renderUtils';
-  import { useModal } from '/@/components/Modal';
-  import { message } from 'ant-design-vue';
+  import { safetyDeviceList, safetyList } from './safety.api';
+  import { getDictItemsByCode } from '/@/utils/dict';
 
   const props = defineProps({
     columnsType: {
@@ -59,37 +43,62 @@
     sysId: {
       type: String,
     },
-    deviceId: {
-      type: String,
-      default: '',
-    },
     scroll: {
       type: Object,
       default: { y: 0 },
     },
-    deviceTypeOption: {
-      type: Array,
-      default: () => [],
-    },
     list: {
       type: Function,
-      default: (params) => defHttp.post({ url: '/monitor/history/getAlarmHistoryData', params }),
+      default: (params) => defHttp.get({ url: '/safety/ventanalyAlarmLog/list', params }),
     },
   });
+
+  const getDeviceListApi = (params) => defHttp.post({ url: '/monitor/device', params });
+  const globalConfig = inject('globalConfig');
   const alarmHistory = ref();
   const columns = ref([]);
-  const deviceOptions = ref<any>([]);
+  const deviceOptions = ref([]);
+  const dataTypeName = ref('');
 
   const tableScroll = props.scroll.y ? ref({ y: props.scroll.y - 100 }) : ref({});
 
+  async function getDeviceList() {
+    let result;
+    const res = await getDeviceListApi({ devicetype: props.deviceType, filterParams: { dataTypeName: dataTypeName.value }, pageSize: 10000 });
+    if (res['records'] && res['records'].length > 0) {
+      result = res['records'];
+    } else if (res['msgTxt'] && res['msgTxt'][0] && res['msgTxt'][0]['datalist']) {
+      result = res['msgTxt'][0]['datalist'];
+    }
+    if (result && result.length > 0) {
+      deviceOptions.value = [];
+      deviceOptions.value = result.map((item, index) => {
+        return {
+          label: item['strinstallpos'],
+          value: item['id'] || item['deviceID'],
+          strtype: item['strtype'] || item['deviceType'],
+          strinstallpos: item['strinstallpos'],
+          devicekind: item['devicekind'],
+          stationtype: item['stationtype'],
+        };
+      });
+    } else {
+      deviceOptions.value = [];
+    }
+    await getForm().setFieldsValue({ deviceId: deviceOptions.value[0] ? deviceOptions.value[0]['value'] : '' });
+  }
+
   watch(
     () => {
       return props.columnsType;
     },
     async (newVal) => {
       if (!newVal) return;
-
-      const column = getTableHeaderColumns(newVal + '_history');
+      let column;
+      column = getTableHeaderColumns('safetymonitor_warning');
+      if (!column || column.length < 1) {
+        column = getTableHeaderColumns(newVal + '_history');
+      }
       if (column && column.length < 1) {
         const arr = newVal.split('_');
         const columnKey = arr.reduce((prev, cur, index) => {
@@ -111,6 +120,14 @@
   );
 
   watch(
+    () => props.deviceType,
+    async () => {
+      if (alarmHistory.value) getForm().resetFields();
+      await getDeviceList();
+    }
+  );
+
+  watch(
     () => props.scroll.y,
     (newVal) => {
       if (newVal) {
@@ -124,29 +141,54 @@
   // 列表页面公共参数、方法
   const { tableContext, onExportXls } = useListPage({
     tableProps: {
-      api: props.list,
+      api: safetyList,
       columns: props.columnsType ? columns : (props.columns as any[]),
-      canResize: true,
+      canResize: false,
       showTableSetting: false,
-      showActionColumn: true,
+      showActionColumn: false,
       bordered: false,
+      showIndexColumn: true,
       size: 'small',
       scroll: tableScroll,
-      showIndexColumn: true,
       formConfig: {
         labelAlign: 'left',
         showAdvancedButton: false,
         // autoAdvancedCol: 2,
+        actionColOptions: {
+          xs: 4, // <576px
+          sm: 14, // ≥576px
+          md: 4, // ≥768px
+          lg: 4, // ≥992px
+          xl: 4, // ≥1200px
+          xxl: 4, // ≥1600px
+
+          style: { textAlign: 'left' },
+        },
         schemas: [
           {
-            field: 'time',
-            label: '查询时间',
+            field: 'startTime',
+            label: '开始时间',
+            component: 'DatePicker',
+            defaultValue: dayjs().add(-30, 'day').format('YYYY-MM-DD HH:mm:ss'),
+            required: true,
+            componentProps: {
+              showTime: true,
+              valueFormat: 'YYYY-MM-DD HH:mm:ss',
+              getPopupContainer: getAutoScrollContainer,
+            },
+            colProps: {
+              span: 4,
+            },
+          },
+          {
+            field: 'endTime',
+            label: '结束时间',
             component: 'DatePicker',
-            defaultValue: dayjs().format('YYYY-MM-DD'),
+            defaultValue: dayjs(),
             required: true,
             componentProps: {
               showTime: true,
-              valueFormat: 'YYYY-MM-DD',
+              valueFormat: 'YYYY-MM-DD HH:mm:ss',
               getPopupContainer: getAutoScrollContainer,
             },
             colProps: {
@@ -155,11 +197,14 @@
           },
           {
             label: '设备类型',
-            field: 'deviceid',
-            component: 'Select',
-            defaultValue: props.deviceTypeOption && props.deviceTypeOption.length > 0 ? props.deviceTypeOption[0]['value'] : '',
+            field: 'dataTypeName',
+            component: 'ApiSelect',
             componentProps: {
-              options: props.deviceTypeOption,
+              api: getDictItemsByCode.bind(null, 'safetySensorAlarm'),
+              onChange: async (e, option) => {
+                dataTypeName.value = e;
+                await getDeviceList();
+              },
             },
             colProps: {
               span: 4,
@@ -167,22 +212,21 @@
           },
           // {
           //   label: '查询设备',
-          //   field: 'deviceid',
+          //   field: 'deviceId',
           //   component: 'Select',
-          //   defaultValue: '',
+          //   defaultValue: deviceOptions.value[0] ? deviceOptions.value[0]['value'] : '',
           //   componentProps: {
           //     showSearch: true,
           //     filterOption: (input: string, option: any) => {
           //       return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
           //     },
-          //     options: props.deviceTypeOption,
+          //     options: deviceOptions,
           //   },
           //   colProps: {
           //     span: 4,
           //   },
           // },
         ],
-        // fieldMapToTime: [['createTime', ['createTime_begin', 'createTime_end'], '']],
       },
       fetchSetting: {
         listField: 'records',
@@ -192,12 +236,12 @@
         pageSize: 10,
         pageSizeOptions: ['10', '30', '50', '100'],
       },
-      beforeFetch(params) {
-        params.devicetype = props.deviceType + '*';
-        if (props.sysId) {
-          params.sysId = props.sysId;
-        }
-      },
+      // beforeFetch(params) {
+      //   params.devicetype = props.deviceType + '*';
+      //   if (props.sysId) {
+      //     params.sysId = props.sysId;
+      //   }
+      // },
     },
     exportConfig: {
       name: '预警历史列表',
@@ -205,19 +249,11 @@
     },
   });
   //注册table数据
-  const [registerTable, { reload, setLoading }] = tableContext;
+  const [registerTable, { reload, setLoading, getForm }] = tableContext;
 
-  const [{ openModal }] = useModal();
-
-  function openHistoryCurve(record) {
-    if (['net'].includes(record.valuecode)) return message.info('该报警字段不支持历史曲线展示');
-    openModal(true, {
-      data: record,
-      device: deviceOptions.value[0],
-    });
-  }
-
-  onMounted(async () => {});
+  onMounted(async () => {
+    await getDeviceList();
+  });
 
   defineExpose({ setLoading });
 </script>
@@ -228,33 +264,38 @@
   :deep(.ventSpace-table-body) {
     height: auto !important;
   }
+
   :deep(.zxm-picker) {
     height: 30px !important;
   }
+
   .alarm-history-table {
     width: 100%;
-    padding-top: 10px;
-    height: 770px;
+
     :deep(.jeecg-basic-table-form-container) {
       .@{ventSpace}-form {
         padding: 0 !important;
         border: none !important;
         margin-bottom: 0 !important;
+
         .@{ventSpace}-picker,
         .@{ventSpace}-select-selector {
           width: 100% !important;
           background: #00000017;
           border: 1px solid #b7b7b7;
+
           input,
           .@{ventSpace}-select-selection-item,
           .@{ventSpace}-picker-suffix {
             color: #fff;
           }
+
           .@{ventSpace}-select-selection-placeholder {
             color: #ffffffaa;
           }
         }
       }
+
       .@{ventSpace}-table-title {
         min-height: 0 !important;
       }

+ 21 - 47
src/views/vent/monitorManager/safetySensorMonitor/index.vue

@@ -43,66 +43,37 @@
             </div>
           </div>
         </a-tab-pane>
-        <!-- <a-tab-pane key="2" tab="历史数据">
-          <div class="tab-item table-box box-bg padding-0" v-if="activeKey == '2'">
-            <HistoryTable
-              :columns-type="deviceKind"
-              :device-type="deviceKind"
-              :device-list-api="list.bind(null, { devicetype: selectData.deviceType })"
-              @change="historyDataSourceChange"
-              designScope="modelsensor-history"
-              :scroll="{ y: chartsColumns.length > 0 ? 400 : 600 }"
-            />
-            <div class="charts-box" v-if="chartsColumns.length > 0">
-              <BarAndLine
-                :chartsColumnsType="selectData.deviceType"
-                xAxisPropType="ttime"
-                :dataSource="historyDataSource"
-                height="300px"
-                :chartsColumns="chartsColumns"
-                chartsType="history"
-                :option="echartsOption1"
-                @refresh="refreshEchatrs"
-              />
-            </div>
-          </div>
-        </a-tab-pane> -->
         <a-tab-pane key="3" tab="报警历史">
           <div class="tab-item box-bg" v-if="activeKey == '3'">
-            <SafetyAlarm columns-type="alarm" device-type="modelsensor" designScope="alarm-history" :device-type-option="deviceTypeOption" />
+            <SafetyAlarm
+              ref="alarmHistoryTable"
+              v-if="activeKey == '3'"
+              columns-type="alarm"
+              :list="safetyList"
+              device-type="safetymonitor"
+              :device-list-api="getDeviceList.bind(null, { devicekind: 'safetymonitor', pageSize: 10000 })"
+              designScope="alarm-history"
+            />
           </div>
         </a-tab-pane>
-        <!-- <a-tab-pane key="4" tab="报警分析">
-          <div class="tab-item box-bg" v-if="activeKey == '4'">
-            <warnAnalysis device-type="modelsensor" />
-          </div>
-        </a-tab-pane> -->
-        <!-- <a-tab-pane key="4" tab="操作历史">
-          <div class="tab-item box-bg">
-            <HandlerHistoryTable columns-type="operator_history" device-type="modelsensor" designScope="alarm-history" />
-          </div>
-        </a-tab-pane> -->
       </a-tabs>
     </a-spin>
   </div>
 </template>
 
 <script setup lang="ts">
-  import BarAndLine from '/@/components/chart/BarAndLine.vue';
   import { Select } from 'ant-design-vue';
   import { onBeforeMount, ref, onMounted, onUnmounted, toRaw, reactive, nextTick, unref } from 'vue';
   import MonitorTable from '../comment/MonitorTable.vue';
-  // import HistoryTable from '../comment/HistoryTable.vue';
   import SafetyAlarm from './AlarmHistoryTable.vue';
-  // import warnAnalysis from '../comment/warnAnalysis.vue';
   import { list, getTableList } from './sensor.api';
-  // import { deviceList } from '../../deviceManager/comment/pointTabel/point.api';
   import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
   import { cloneDeep } from 'lodash-es';
   import { useMethods } from '/@/hooks/system/useMethods';
   import { useGlobSetting } from '/@/hooks/setting';
   import { useRouter } from 'vue-router';
   import { getDictItemsByCode } from '/@/utils/dict';
+  import { getDeviceList, safetyList } from './safety.api';
 
   const router = useRouter();
   const { sysOrgCode } = useGlobSetting();
@@ -238,6 +209,10 @@
     // getMonitor(true);
     console.log('echarts 刷新');
   }
+  function historyDataSourceChange(dataSource) {
+    historyDataSource.value = dataSource;
+    if (historyDataSource.value.length > 0) handleChange(historyDataSource.value[0].gdevicetype);
+  }
 
   function onExportXlsFn() {
     // 判断时间间隔和查询时间区间,数据量下载大时进行提示
@@ -255,13 +230,13 @@
 
   onMounted(async () => {
     let dictName = 'modelsensorkind';
-    // const route = unref(router.currentRoute);
-    // if (route.name) {
-    //   const nameStrList = route.name.split('-');
-    //   if (nameStrList.length > 0 && nameStrList[nameStrList.length - 1] !== 'sensorMonitor') {
-    //     dictName = nameStrList[nameStrList.length - 1];
-    //   }
-    // }
+    const route = unref(router.currentRoute);
+    if (route.name) {
+      const nameStrList = route.name.split('-');
+      if (nameStrList.length > 0 && nameStrList[nameStrList.length - 1] !== 'sensorMonitor') {
+        dictName = nameStrList[nameStrList.length - 1];
+      }
+    }
     const res = getDictItemsByCode(dictName);
     deviceTypeOption.value = res;
     deviceKind.value = deviceTypeOption.value[0]['value'];
@@ -284,7 +259,6 @@
   .sensor-container {
     height: 100%;
     position: relative;
-    // top: 65px;
     padding: 10px;
     z-index: 999;
     // max-height: calc(100vh - 150px);

+ 0 - 3
src/views/vent/monitorManager/safetySensorMonitor/sensor.api.ts

@@ -3,7 +3,6 @@ import { defHttp } from '/@/utils/http/axios';
 enum Api {
   list = '/monitor/device',
   baseList = '/safety/ventanalyWindow/list',
-  safetyList = '/monitor/history/getAlarmHistoryData',
 }
 /**
  * 列表接口
@@ -16,5 +15,3 @@ export const list = (params) => defHttp.post({ url: Api.list, params });
  * @param params
  */
 export const getTableList = (params) => defHttp.get({ url: Api.baseList, params });
-
-export const safetyList = (params) => defHttp.post({ url: Api.safetyList, params });

+ 17 - 18
src/views/vent/monitorManager/warningMonitor/alarm.data.ts

@@ -1,7 +1,7 @@
 import { BasicColumn, FormSchema } from '/@/components/Table';
 import { render } from '/@/utils/common/renderUtils';
 import { getAutoScrollContainer } from '/@/utils/common/compUtils';
- import dayjs from 'dayjs';
+import dayjs from 'dayjs';
 
 export const manageAutoColumns: BasicColumn[] = [
   {
@@ -93,57 +93,57 @@ export const safetyColumns: BasicColumn[] = [
     dataIndex: 'devicename',
     align: 'center',
   },
-    {
+  {
     title: '类型',
     dataIndex: 'valuename',
     align: 'center',
   },
-    {
+  {
     title: '单位',
     dataIndex: 'valueUnit',
     align: 'center',
   },
-    {
+  {
     title: '报警时刻',
     dataIndex: 'starttime',
     align: 'center',
   },
-    {
+  {
     title: '解除时刻',
     dataIndex: 'endtime',
     align: 'center',
   },
-   {
+  {
     title: '累计时间',
     dataIndex: 'warntime',
     align: 'center',
   },
-   {
+  {
     title: '报警次数',
     dataIndex: 'alarmNum',
     align: 'center',
   },
-   {
+  {
     title: '最小值',
     dataIndex: 'minValue',
     align: 'center',
   },
-   {
+  {
     title: '最小值时刻',
     dataIndex: 'minValueTime',
     align: 'center',
   },
-    {
+  {
     title: '最大值',
     dataIndex: 'maxValue',
     align: 'center',
   },
-   {
+  {
     title: '最大值时刻',
     dataIndex: 'maxValueTime',
     align: 'center',
   },
-   {
+  {
     title: '原因',
     dataIndex: 'wardescrip',
     align: 'center',
@@ -299,7 +299,7 @@ export const unsafetySchema: FormSchema[] = [
       span: 4,
     },
   },
-]
+];
 
 export const safetySchema: FormSchema[] = [
   {
@@ -313,7 +313,7 @@ export const safetySchema: FormSchema[] = [
     field: 'warnLevel',
     defaultValue: null,
     component: 'JDictSelectTag',
-     componentProps: () => {
+    componentProps: () => {
       return {
         dictCode: 'aqjkAlarmType',
       };
@@ -325,7 +325,7 @@ export const safetySchema: FormSchema[] = [
     field: 'deviceKind',
     defaultValue: null,
     component: 'JDictSelectTag',
-     componentProps: () => {
+    componentProps: () => {
       return {
         dictCode: 'aqjkAlarmDevType',
       };
@@ -405,7 +405,7 @@ export const safetySchema: FormSchema[] = [
     field: 'starttime',
     label: '开始时间',
     component: 'DatePicker',
-      defaultValue: dayjs().startOf('date'),
+    defaultValue: dayjs().startOf('date'),
     componentProps: {
       showTime: false,
       valueFormat: 'YYYY-MM-DD',
@@ -428,5 +428,4 @@ export const safetySchema: FormSchema[] = [
   //     span: 4,
   //   },
   // },
-]
-
+];

+ 236 - 234
src/views/vent/monitorManager/warningMonitor/index-mine.vue

@@ -15,8 +15,7 @@
         <template #bodyCell="{ column, record }">
           <template v-if="column.dict">
             <!-- 除了 101(蓝色预警)其他都是红色字体 -->
-            <span v-if="column.dataIndex === 'nwartype'"
-              :class="{ 'color-#ff3823': ['102', '103', '104', '201', '1001'].includes(record.nwartype) }">
+            <span v-if="column.dataIndex === 'nwartype'" :class="{ 'color-#ff3823': ['102', '103', '104', '201', '1001'].includes(record.nwartype) }">
               {{ render.renderDictText(record.nwartype, 'leveltype') || '-' }}
             </span>
             <span v-else>
@@ -34,8 +33,7 @@
         <template #bodyCell="{ column, record }">
           <template v-if="column.dict">
             <!-- 除了 101(蓝色预警)其他都是红色字体 -->
-            <span v-if="column.dataIndex === 'nwartype'"
-              :class="{ 'color-#ff3823': ['102', '103', '104', '201', '1001'].includes(record.nwartype) }">
+            <span v-if="column.dataIndex === 'nwartype'" :class="{ 'color-#ff3823': ['102', '103', '104', '201', '1001'].includes(record.nwartype) }">
               {{ render.renderDictText(record.nwartype, 'leveltype') || '-' }}
             </span>
             <span v-else>
@@ -46,271 +44,275 @@
       </BasicTable>
     </template>
     <template v-if="activeKey == 'safety'">
-      <AlarmHistoryTable ref="alarmHistoryTable" columns-type="alarm" :list="safetyList" device-type="safetymonitor"
+      <AlarmHistoryTable
+        ref="alarmHistoryTable"
+        columns-type="alarm"
+        :list="safetyList"
+        device-type="safetymonitor"
         :device-list-api="getDeviceList.bind(null, { devicekind: 'safetymonitor', pageSize: 10000 })"
-        designScope="alarm-history" />
+        designScope="alarm-history"
+      />
     </template>
   </div>
 </template>
 
 <script lang="ts" name="system-user" setup>
-//ts语法
-import { watch, ref, defineExpose, onMounted, reactive } from 'vue';
-import { BasicTable } from '/@/components/Table';
-import { useListPage } from '/@/hooks/system/useListPage';
-import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
-import { manageAutoColumns } from './alarm.data';
-import { getAutoScrollContainer } from '/@/utils/common/compUtils';
-import { getAlarmLogList, getManageAutoLogList, } from './warning.api';
-import { getDeviceList, safetyList, } from '../safetyMonitor/safety.api';
-import customHeader from '/@/components/vent/customHeader.vue';
-import AlarmHistoryTable from '../safetyMonitor/AlarmHistoryTable.vue';
-import { render } from '/@/utils/common/renderUtils';
-const props = defineProps({
-  formConfig: {
-    type: Object as PropType<FormProps> | undefined,
-    default: undefined,
-  },
-});
+  //ts语法
+  import { watch, ref, defineExpose, onMounted, reactive } from 'vue';
+  import { BasicTable } from '/@/components/Table';
+  import { useListPage } from '/@/hooks/system/useListPage';
+  import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
+  import { manageAutoColumns } from './alarm.data';
+  import { getAutoScrollContainer } from '/@/utils/common/compUtils';
+  import { getAlarmLogList, getManageAutoLogList } from './warning.api';
+  import { getDeviceList, safetyList } from '../safetyMonitor/safety.api';
+  import customHeader from '/@/components/vent/customHeader.vue';
+  import AlarmHistoryTable from '../safetyMonitor/AlarmHistoryTable.vue';
+  import { render } from '/@/utils/common/renderUtils';
+  const props = defineProps({
+    formConfig: {
+      type: Object as PropType<FormProps> | undefined,
+      default: undefined,
+    },
+  });
 
-const activeKey = ref('device');
-const alarmHistory = ref();
-const deviceColumns = getTableHeaderColumns('alarm_history') as [];
-const dataColumns = ref(deviceColumns);
-const list = ref<any>(getAlarmLogList);
+  const activeKey = ref('device');
+  const alarmHistory = ref();
+  const deviceColumns = getTableHeaderColumns('alarm_history') as [];
+  const dataColumns = ref(deviceColumns);
+  const list = ref<any>(getAlarmLogList);
 
-// 列表页面公共参数、方法
-const { tableContext, onExportXls } = useListPage({
-  tableProps: {
-    api: list,
-    columns: dataColumns,
-    canResize: true,
-    showTableSetting: false,
-    showActionColumn: false,
-    showIndexColumn: true,
-    bordered: false,
-    size: 'small',
-    formConfig: {
-      labelAlign: 'left',
-      showAdvancedButton: false,
-      // autoAdvancedCol: 2,
-      schemas: [
-        {
-          label: '是否解决',
-          // field: 'isok',
-          field: 'isOk',
-          defaultValue: false,
-          component: 'Select',
-          componentProps: {
-            options: [
-              {
-                label: '未解决',
-                value: false,
-              },
-              {
-                label: '已解决',
-                value: true,
-              },
-            ],
+  // 列表页面公共参数、方法
+  const { tableContext, onExportXls } = useListPage({
+    tableProps: {
+      api: list,
+      columns: dataColumns,
+      canResize: true,
+      showTableSetting: false,
+      showActionColumn: false,
+      showIndexColumn: true,
+      bordered: false,
+      size: 'small',
+      formConfig: {
+        labelAlign: 'left',
+        showAdvancedButton: false,
+        // autoAdvancedCol: 2,
+        schemas: [
+          {
+            label: '是否解决',
+            // field: 'isok',
+            field: 'isOk',
+            defaultValue: false,
+            component: 'Select',
+            componentProps: {
+              options: [
+                {
+                  label: '未解决',
+                  value: false,
+                },
+                {
+                  label: '已解决',
+                  value: true,
+                },
+              ],
+            },
+            colProps: { span: 4 },
           },
-          colProps: { span: 4 },
-        },
-        {
-          label: '所属系统',
-          // field: 'kindtype',systemType
-          field: 'systemType',
-          component: 'Select',
-          componentProps: {
-            options: [
-              {
-                label: '通风',
-                value: 'ventS',
-              },
-              {
-                label: '防灭火',
-                value: 'fireS',
-              },
-              {
-                label: '防尘',
-                value: 'dustS',
-              },
-              {
-                label: '瓦斯',
-                value: 'gasS',
-              },
-            ],
+          {
+            label: '所属系统',
+            // field: 'kindtype',systemType
+            field: 'systemType',
+            component: 'Select',
+            componentProps: {
+              options: [
+                {
+                  label: '通风',
+                  value: 'ventS',
+                },
+                {
+                  label: '防灭火',
+                  value: 'fireS',
+                },
+                {
+                  label: '防尘',
+                  value: 'dustS',
+                },
+                {
+                  label: '瓦斯',
+                  value: 'gasS',
+                },
+              ],
+            },
+            colProps: { span: 4 },
           },
-          colProps: { span: 4 },
-        },
-        // {
-        //   label: '设备类型',
-        //   field: 'deviceKind',
-        //   component: 'MTreeSelect',
-        //   componentProps: {
-        //     virtual: false,
-        //   },
-        //   colProps: { span: 4 },
-        // },
-        {
-          label: '设备类型',
-          field: 'deviceKind',
-          component: 'Select',
-          defaultValue: '',
-          componentProps: {
-            options: [
-              {
-                label: '全部',
-                value: '',
-              },
-
-            ],
-          },
-          colProps: { span: 4 },
-        },
-        {
-          field: 'starttime',
-          label: '开始报警时间',
-          component: 'DatePicker',
-          componentProps: {
-            showTime: true,
-            valueFormat: 'YYYY-MM-DD HH:mm:ss',
-            getPopupContainer: getAutoScrollContainer,
+          // {
+          //   label: '设备类型',
+          //   field: 'deviceKind',
+          //   component: 'MTreeSelect',
+          //   componentProps: {
+          //     virtual: false,
+          //   },
+          //   colProps: { span: 4 },
+          // },
+          {
+            label: '设备类型',
+            field: 'deviceKind',
+            component: 'Select',
+            defaultValue: '',
+            componentProps: {
+              options: [
+                {
+                  label: '全部',
+                  value: '',
+                },
+              ],
+            },
+            colProps: { span: 4 },
           },
-          colProps: {
-            span: 4,
+          {
+            field: 'starttime',
+            label: '开始报警时间',
+            component: 'DatePicker',
+            componentProps: {
+              showTime: true,
+              valueFormat: 'YYYY-MM-DD HH:mm:ss',
+              getPopupContainer: getAutoScrollContainer,
+            },
+            colProps: {
+              span: 4,
+            },
           },
-        },
-        // {
-        //   field: 'endtime',
-        //   label: '结束时间',
-        //   component: 'DatePicker',
-        //   componentProps: {
-        //     showTime: true,
-        //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
-        //     getPopupContainer: getAutoScrollContainer,
-        //   },
-        //   colProps: {
-        //     span: 4,
-        //   },
-        // },
-      ],
-    },
-    fetchSetting: {
-      listField: 'records',
+          // {
+          //   field: 'endtime',
+          //   label: '结束时间',
+          //   component: 'DatePicker',
+          //   componentProps: {
+          //     showTime: true,
+          //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          //     getPopupContainer: getAutoScrollContainer,
+          //   },
+          //   colProps: {
+          //     span: 4,
+          //   },
+          // },
+        ],
+      },
+      fetchSetting: {
+        listField: 'records',
+      },
+      pagination: {
+        current: 1,
+        pageSize: 10,
+        pageSizeOptions: ['10', '30', '50', '100'],
+      },
+      beforeFetch(params) {
+        if (!params['deviceKind']) {
+          params['deviceKind'] = null;
+        }
+        return params;
+      },
     },
-    pagination: {
-      current: 1,
-      pageSize: 10,
-      pageSizeOptions: ['10', '30', '50', '100'],
+    exportConfig: {
+      name: '预警历史列表',
+      url: '/safety/ventanalyAlarmLog/exportXls',
     },
-    beforeFetch(params) {
-      if (!params['deviceKind']) {
-        params['deviceKind'] = null;
-      }
-      return params;
-    },
-  },
-  exportConfig: {
-    name: '预警历史列表',
-    url: '/safety/ventanalyAlarmLog/exportXls',
-  },
-});
-//注册table数据
-const [registerTable, { reload, setLoading, getForm }] = tableContext;
+  });
+  //注册table数据
+  const [registerTable, { reload, setLoading, getForm }] = tableContext;
 
-function onChangeTab(tab) {
-  if (tab === 'device') {
-    list.value = getAlarmLogList;
-    dataColumns.value = deviceColumns;
-  } else {
-    list.value = getManageAutoLogList;
-    dataColumns.value = manageAutoColumns;
+  function onChangeTab(tab) {
+    if (tab === 'device') {
+      list.value = getAlarmLogList;
+      dataColumns.value = deviceColumns;
+    } else {
+      list.value = getManageAutoLogList;
+      dataColumns.value = manageAutoColumns;
+    }
   }
-}
-onMounted(async () => {
-  // getEachMineWarnCountInfoList();
-});
+  onMounted(async () => {
+    // getEachMineWarnCountInfoList();
+  });
 
-defineExpose({ setLoading });
+  defineExpose({ setLoading });
 </script>
 
 <style scoped lang="less">
-@ventSpace: zxm;
+  @ventSpace: zxm;
 
-:deep(.zxm-table-container) {
-  max-height: 720px !important;
-}
+  :deep(.zxm-table-container) {
+    max-height: 720px !important;
+  }
 
-:deep(.ventSpace-table-body) {
-  height: auto !important;
-}
+  :deep(.ventSpace-table-body) {
+    height: auto !important;
+  }
 
-:deep(.zxm-picker) {
-  height: 30px !important;
-}
+  :deep(.zxm-picker) {
+    height: 30px !important;
+  }
 
-:deep(.@{ventSpace}-picker-dropdown) {
-  position: absolute !important;
-  top: 35px !important;
-  left: 0 !important;
-}
+  :deep(.@{ventSpace}-picker-dropdown) {
+    position: absolute !important;
+    top: 35px !important;
+    left: 0 !important;
+  }
 
-.tab-box {
-  display: flex;
-  color: #fff;
-  position: relative;
-  // top: 11px;
-  margin-top: 80px;
-  background: linear-gradient(#001325, #012e4f);
+  .tab-box {
+    display: flex;
+    color: #fff;
+    position: relative;
+    // top: 11px;
+    margin-top: 80px;
+    background: linear-gradient(#001325, #012e4f);
 
-  :deep(.zxm-tabs-nav) {
-    margin: 0 !important;
+    :deep(.zxm-tabs-nav) {
+      margin: 0 !important;
 
-    .zxm-tabs-tab {
-      width: 180px;
-      height: 45px;
-      background: url('@/assets/images/top-btn.png') center no-repeat;
-      background-size: cover;
-      display: flex;
-      justify-content: center;
-      font-size: 16px;
-    }
+      .zxm-tabs-tab {
+        width: 180px;
+        height: 45px;
+        background: url('@/assets/images/top-btn.png') center no-repeat;
+        background-size: cover;
+        display: flex;
+        justify-content: center;
+        font-size: 16px;
+      }
 
-    .zxm-tabs-tab-active {
-      width: 180px;
-      position: relative;
-      background: url('@/assets/images/top-btn-select.png') center no-repeat;
-      background-size: cover;
+      .zxm-tabs-tab-active {
+        width: 180px;
+        position: relative;
+        background: url('@/assets/images/top-btn-select.png') center no-repeat;
+        background-size: cover;
 
-      .zxm-tabs-tab-btn {
-        color: #fff !important;
+        .zxm-tabs-tab-btn {
+          color: #fff !important;
+        }
       }
-    }
 
-    .zxm-tabs-ink-bar {
-      width: 0 !important;
-    }
+      .zxm-tabs-ink-bar {
+        width: 0 !important;
+      }
 
-    .zxm-tabs-tab+.zxm-tabs-tab {
-      margin: 0 !important;
+      .zxm-tabs-tab + .zxm-tabs-tab {
+        margin: 0 !important;
+      }
     }
   }
-}
 
-.alarm-history-table {
-  width: 100%;
-  background-color: #0ebbff15;
-  position: relative;
-  margin-top: 10px;
+  .alarm-history-table {
+    width: 100%;
+    background-color: #0ebbff15;
+    position: relative;
+    margin-top: 10px;
 
-  &::after {
-    position: absolute;
-    content: '';
-    width: calc(100% + 10px);
-    height: 2px;
-    top: 0px;
-    left: -10px;
-    border-bottom: 1px solid #0efcff44;
+    &::after {
+      position: absolute;
+      content: '';
+      width: calc(100% + 10px);
+      height: 2px;
+      top: 0px;
+      left: -10px;
+      border-bottom: 1px solid #0efcff44;
+    }
   }
-}
 </style>

+ 281 - 292
src/views/vent/monitorManager/warningMonitor/index.vue

@@ -30,8 +30,7 @@
       <template #bodyCell="{ column, record }">
         <template v-if="column.dict">
           <!-- 除了 101(蓝色预警)其他都是红色字体 -->
-          <span v-if="column.dataIndex === 'nwartype'"
-            :class="{ 'color-#ff3823': ['102', '103', '104', '201', '1001'].includes(record.nwartype) }">
+          <span v-if="column.dataIndex === 'nwartype'" :class="{ 'color-#ff3823': ['102', '103', '104', '201', '1001'].includes(record.nwartype) }">
             {{ render.renderDictText(record.nwartype, 'leveltype') || '-' }}
           </span>
           <span v-else>
@@ -40,16 +39,14 @@
         </template>
       </template>
     </BasicTable>
-    <BasicTable v-if="activeKey == 'manageAuto'" ref="alarmHistory" @register="registerTable"
-      :scroll="{ x: 0, y: 350 }">
+    <BasicTable v-if="activeKey == 'manageAuto'" ref="alarmHistory" @register="registerTable" :scroll="{ x: 0, y: 350 }">
       <template #form-onExportXls>
         <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls()"> 导出</a-button>
       </template>
       <template #bodyCell="{ column, record }">
         <template v-if="column.dict">
           <!-- 除了 101(蓝色预警)其他都是红色字体 -->
-          <span v-if="column.dataIndex === 'nwartype'"
-            :class="{ 'color-#ff3823': ['102', '103', '104', '201', '1001'].includes(record.nwartype) }">
+          <span v-if="column.dataIndex === 'nwartype'" :class="{ 'color-#ff3823': ['102', '103', '104', '201', '1001'].includes(record.nwartype) }">
             {{ render.renderDictText(record.nwartype, 'leveltype') || '-' }}
           </span>
           <span v-else>
@@ -65,8 +62,7 @@
       <template #bodyCell="{ column, record }">
         <template v-if="column.dict">
           <!-- 除了 101(蓝色预警)其他都是红色字体 -->
-          <span v-if="column.dataIndex === 'nwartype'"
-            :class="{ 'color-#ff3823': ['102', '103', '104', '201', '1001'].includes(record.nwartype) }">
+          <span v-if="column.dataIndex === 'nwartype'" :class="{ 'color-#ff3823': ['102', '103', '104', '201', '1001'].includes(record.nwartype) }">
             {{ render.renderDictText(record.nwartype, 'leveltype') || '-' }}
           </span>
           <span v-else>
@@ -79,330 +75,323 @@
 </template>
 
 <script lang="ts" name="system-user" setup>
-//ts语法
-import { watch, ref, defineExpose, onMounted, reactive } from 'vue';
-import { BasicTable } from '/@/components/Table';
-import { useListPage } from '/@/hooks/system/useListPage';
-import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
-import { manageAutoColumns1, safetyColumns, safetySchema, unsafetySchema } from './alarm.data';
-
-import { list, getEachMineWarnCountInfo, getExportUrl } from './warning.api';
-import { useRoute } from 'vue-router';
-import customHeader from '/@/components/vent/customHeader.vue';
-import { render } from '/@/utils/common/renderUtils';
-const props = defineProps({
-  formConfig: {
-    type: Object as PropType<FormProps> | undefined,
-    default: undefined,
-  },
-});
-const route = useRoute();
-let statisticsList = reactive<any[]>([
-  { title: '通风', valueT: 0, valueB: '' },
-  { title: '粉尘', valueT: 0, valueB: '' },
-  { title: '瓦斯', valueT: 0, valueB: '' },
-  { title: '火灾', valueT: 0, valueB: '' },
-  { title: '安全监测', valueT: 0, valueB: '' },
-]);
-const activeKey = ref('safety');
-const alarmHistory = ref();
-const deviceColumns = getTableHeaderColumns('alarm_history') as [];
-const dataColumns = ref<any>(safetyColumns);
-const searchFormSchema = ref<any>(safetySchema);
-const paramType = ref('aqjkAlarmLog');
-
-
-
-
-function onChangeTab(tab) {
-  activeKey.value = tab
-  if (tab === 'safety') {
-    paramType.value = 'aqjkAlarmLog';
-    dataColumns.value = safetyColumns;
-    searchFormSchema.value = safetySchema
-  } else if (tab === 'device') {
-    paramType.value = 'alarmLog';
-    dataColumns.value = deviceColumns;
-    searchFormSchema.value = unsafetySchema
-  } else {
-    paramType.value = 'autoLog';
-    dataColumns.value = manageAutoColumns1;
-    searchFormSchema.value = unsafetySchema
-  }
-}
-
-
-// 列表页面公共参数、方法
-const { tableContext, onExportXls, onExportXlsPost } = useListPage({
-  tableProps: {
-    api: list,
-    columns: dataColumns,
-    canResize: true,
-    showTableSetting: false,
-    showActionColumn: false,
-    showIndexColumn: true,
-    bordered: false,
-    size: 'small',
+  //ts语法
+  import { watch, ref, defineExpose, onMounted, reactive } from 'vue';
+  import { BasicTable } from '/@/components/Table';
+  import { useListPage } from '/@/hooks/system/useListPage';
+  import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
+  import { manageAutoColumns1, safetyColumns, safetySchema, unsafetySchema } from './alarm.data';
+
+  import { list, getEachMineWarnCountInfo, getExportUrl } from './warning.api';
+  import { useRoute } from 'vue-router';
+  import customHeader from '/@/components/vent/customHeader.vue';
+  import { render } from '/@/utils/common/renderUtils';
+  const props = defineProps({
     formConfig: {
-      labelAlign: 'left',
-      showAdvancedButton: false,
-      // autoAdvancedCol: 4,
-      // labelWidth:50,
-      schemas: searchFormSchema as any
-    },
-    fetchSetting: {
-      listField: 'records',
+      type: Object as PropType<FormProps> | undefined,
+      default: undefined,
     },
-    pagination: {
-      current: 1,
-      pageSize: 10,
-      pageSizeOptions: ['10', '30', '50', '100'],
+  });
+  const route = useRoute();
+  let statisticsList = reactive<any[]>([
+    { title: '通风', valueT: 0, valueB: '' },
+    { title: '粉尘', valueT: 0, valueB: '' },
+    { title: '瓦斯', valueT: 0, valueB: '' },
+    { title: '火灾', valueT: 0, valueB: '' },
+    { title: '安全监测', valueT: 0, valueB: '' },
+  ]);
+  const activeKey = ref('safety');
+  const alarmHistory = ref();
+  const deviceColumns = getTableHeaderColumns('alarm_history') as [];
+  const dataColumns = ref<any>(safetyColumns);
+  const searchFormSchema = ref<any>(safetySchema);
+  const paramType = ref('aqjkAlarmLog');
+
+  function onChangeTab(tab) {
+    activeKey.value = tab;
+    if (tab === 'safety') {
+      paramType.value = 'aqjkAlarmLog';
+      dataColumns.value = safetyColumns;
+      searchFormSchema.value = safetySchema;
+    } else if (tab === 'device') {
+      paramType.value = 'alarmLog';
+      dataColumns.value = deviceColumns;
+      searchFormSchema.value = unsafetySchema;
+    } else {
+      paramType.value = 'autoLog';
+      dataColumns.value = manageAutoColumns1;
+      searchFormSchema.value = unsafetySchema;
+    }
+  }
+
+  // 列表页面公共参数、方法
+  const { tableContext, onExportXls, onExportXlsPost } = useListPage({
+    tableProps: {
+      api: list,
+      columns: dataColumns,
+      canResize: true,
+      showTableSetting: false,
+      showActionColumn: false,
+      showIndexColumn: true,
+      bordered: false,
+      size: 'small',
+      formConfig: {
+        labelAlign: 'left',
+        showAdvancedButton: false,
+        // autoAdvancedCol: 4,
+        // labelWidth:50,
+        schemas: searchFormSchema as any,
+      },
+      fetchSetting: {
+        listField: 'records',
+      },
+      pagination: {
+        current: 1,
+        pageSize: 10,
+        pageSizeOptions: ['10', '30', '50', '100'],
+      },
+      beforeFetch(params) {
+        params.type = paramType.value;
+        return params;
+      },
     },
-    beforeFetch(params) {
-      params.type = paramType.value;
-      return params;
+    exportConfig: {
+      name: '预警历史列表',
+      url: () => getExportUrl(activeKey.value),
     },
-  },
-  exportConfig: {
-    name: '预警历史列表',
-    url: () => getExportUrl(activeKey.value)
-  },
-});
-//注册table数据
-const [registerTable, { reload, setLoading, getForm }] = tableContext;
-
-
-
-
-//获取预警统计信息
-async function getEachMineWarnCountInfoList() {
-  let res = await getEachMineWarnCountInfo({});
-  console.log(res, '监测数量预警状态------');
-  statisticsList[0].valueT = res.ventSWarnInfo.totalNum || 0;
-  statisticsList[0].valueB = res.ventSWarnInfo.maxWarnLevel || '';
-  statisticsList[1].valueT = res.dustSWarnInfo.totalNum || 0;
-  statisticsList[1].valueB = res.dustSWarnInfo.maxWarnLevel || '';
-  statisticsList[2].valueT = res.gasSWarnInfo.totalNum || 0;
-  statisticsList[2].valueB = res.gasSWarnInfo.maxWarnLevel || '';
-  statisticsList[3].valueT = res.fireSWarnInfo.totalNum || 0;
-  statisticsList[3].valueB = res.fireSWarnInfo.maxWarnLevel || '';
-  statisticsList[4].valueT = res.synthesizeSWarnInfo.totalNum || 0;
-  statisticsList[4].valueB = res.synthesizeSWarnInfo.maxWarnLevel || '';
-}
-
-const orgname = ref<any>('');
-
-onMounted(async () => {
-  orgname.value = route.query.orgname;
-  getEachMineWarnCountInfoList();
-});
-
-defineExpose({ setLoading });
-</script>
-
-<style scoped lang="less">
-@import '/@/design/theme.less';
-@ventSpace: zxm;
+  });
+  //注册table数据
+  const [registerTable, { reload, setLoading, getForm }] = tableContext;
+
+  //获取预警统计信息
+  async function getEachMineWarnCountInfoList() {
+    let res = await getEachMineWarnCountInfo({});
+    console.log(res, '监测数量预警状态------');
+    statisticsList[0].valueT = res.ventSWarnInfo.totalNum || 0;
+    statisticsList[0].valueB = res.ventSWarnInfo.maxWarnLevel || '';
+    statisticsList[1].valueT = res.dustSWarnInfo.totalNum || 0;
+    statisticsList[1].valueB = res.dustSWarnInfo.maxWarnLevel || '';
+    statisticsList[2].valueT = res.gasSWarnInfo.totalNum || 0;
+    statisticsList[2].valueB = res.gasSWarnInfo.maxWarnLevel || '';
+    statisticsList[3].valueT = res.fireSWarnInfo.totalNum || 0;
+    statisticsList[3].valueB = res.fireSWarnInfo.maxWarnLevel || '';
+    statisticsList[4].valueT = res.synthesizeSWarnInfo.totalNum || 0;
+    statisticsList[4].valueB = res.synthesizeSWarnInfo.maxWarnLevel || '';
+  }
 
-:deep(.zxm-table-container) {
-  max-height: 720px !important;
-}
+  const orgname = ref<any>('');
 
-:deep(.ventSpace-table-body) {
-  height: auto !important;
-}
+  onMounted(async () => {
+    orgname.value = route.query.orgname;
+    getEachMineWarnCountInfoList();
+  });
 
-:deep(.zxm-picker) {
-  height: 30px !important;
-}
+  defineExpose({ setLoading });
+</script>
 
-:deep(.@{ventSpace}-picker-dropdown) {
-  position: absolute !important;
-  top: 35px !important;
-  left: 0 !important;
-}
+<style scoped lang="less">
+  @import '/@/design/theme.less';
+  @ventSpace: zxm;
 
-@{theme-deepblue} {
-  .data-statistics {
-    --image-vent-tf: url('/@/assets/images/themify/deepblue/vent-tf.png');
-    --image-dust-fc: url('/@/assets/images/themify/deepblue/dust-fc.png');
-    --image-gas-ws: url('/@/assets/images/themify/deepblue/gas-ws.png');
-    --image-fire-fz: url('/@/assets/images/themify/deepblue/fire-fz.png');
-    --image-aqjc: url('/@/assets/images/themify/deepblue/aqjc.png');
-    --image-his-one: url('/@/assets/images/themify/deepblue/his-one.png');
+  :deep(.zxm-table-container) {
+    max-height: 720px !important;
   }
 
-  .tab-box {
-    --table-border: #0eb3ff66;
-    --tab-bg: linear-gradient(#001325, #051f4a);
-    --image-top-btn: url('/@/assets/images/themify/deepblue/top-btn.png');
-    --image-top-btn-select: url('/@/assets/images/themify/deepblue/top-btn-select.png');
+  :deep(.ventSpace-table-body) {
+    height: auto !important;
   }
-}
-
-.data-statistics {
-  --image-vent-tf: url('/@/assets/images/vent-tf.png');
-  --image-dust-fc: url('/@/assets/images/dust-fc.png');
-  --image-gas-ws: url('/@/assets/images/gas-ws.png');
-  --image-fire-fz: url('/@/assets/images/fire-fz.png');
-  --image-aqjc: url('/@/assets/images/aqjc.png');
-  --image-his-one: url('/@/assets/images/his-one.png');
-  height: 200px;
-  padding: 20px;
-  margin-top: 90px;
-  background-color: #0ebbff15;
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-
-  .statistics-box {
-    display: flex;
-    flex: 1;
-    height: 100%;
-    justify-content: center;
-    align-items: center;
-
-    .left-box {
-      position: relative;
-      width: 138px;
-      height: 100%;
 
-      .box-title {
-        position: absolute;
-        left: 50%;
-        bottom: 18px;
-        transform: translate(-50%, 0);
-        color: #fff;
-      }
-    }
-
-    &:nth-child(1) .left-box {
-      background: var(--image-vent-tf) no-repeat center;
-      background-size: 100% auto;
-    }
+  :deep(.zxm-picker) {
+    height: 30px !important;
+  }
 
-    &:nth-child(2) .left-box {
-      background: var(--image-dust-fc) no-repeat center;
-      background-size: 100% auto;
-    }
+  :deep(.@{ventSpace}-picker-dropdown) {
+    position: absolute !important;
+    top: 35px !important;
+    left: 0 !important;
+  }
 
-    &:nth-child(3) .left-box {
-      background: var(--image-gas-ws) no-repeat center;
-      background-size: 100% auto;
+  @{theme-deepblue} {
+    .data-statistics {
+      --image-vent-tf: url('/@/assets/images/themify/deepblue/vent-tf.png');
+      --image-dust-fc: url('/@/assets/images/themify/deepblue/dust-fc.png');
+      --image-gas-ws: url('/@/assets/images/themify/deepblue/gas-ws.png');
+      --image-fire-fz: url('/@/assets/images/themify/deepblue/fire-fz.png');
+      --image-aqjc: url('/@/assets/images/themify/deepblue/aqjc.png');
+      --image-his-one: url('/@/assets/images/themify/deepblue/his-one.png');
     }
 
-    &:nth-child(4) .left-box {
-      background: var(--image-fire-fz) no-repeat center;
-      background-size: 100% auto;
+    .tab-box {
+      --table-border: #0eb3ff66;
+      --tab-bg: linear-gradient(#001325, #051f4a);
+      --image-top-btn: url('/@/assets/images/themify/deepblue/top-btn.png');
+      --image-top-btn-select: url('/@/assets/images/themify/deepblue/top-btn-select.png');
     }
+  }
 
-    &:nth-child(5) .left-box {
-      background: var(--image-aqjc) no-repeat center;
-      background-size: 100% auto;
-    }
+  .data-statistics {
+    --image-vent-tf: url('/@/assets/images/vent-tf.png');
+    --image-dust-fc: url('/@/assets/images/dust-fc.png');
+    --image-gas-ws: url('/@/assets/images/gas-ws.png');
+    --image-fire-fz: url('/@/assets/images/fire-fz.png');
+    --image-aqjc: url('/@/assets/images/aqjc.png');
+    --image-his-one: url('/@/assets/images/his-one.png');
+    height: 200px;
+    padding: 20px;
+    margin-top: 90px;
+    background-color: #0ebbff15;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
 
-    .right-box {
-      position: relative;
-      width: 215px;
-      height: 100%;
+    .statistics-box {
       display: flex;
-      flex-direction: column;
-      justify-content: space-around;
+      flex: 1;
+      height: 100%;
+      justify-content: center;
       align-items: center;
 
-      .box-text {
+      .left-box {
         position: relative;
-        width: 100%;
-        height: 40px;
-        color: #fff;
-        background: var(--image-his-one) no-repeat center;
-        background-size: 100% 100%;
+        width: 138px;
+        height: 100%;
 
-        .text-label {
+        .box-title {
           position: absolute;
-          left: 20px;
-          top: 50%;
-          transform: translate(0, -50%);
+          left: 50%;
+          bottom: 18px;
+          transform: translate(-50%, 0);
+          color: #fff;
         }
+      }
 
-        .text-value {
-          position: absolute;
-          left: 130px;
-          top: 50%;
-          transform: translate(0, -50%);
-          font-family: 'douyuFont';
-        }
+      &:nth-child(1) .left-box {
+        background: var(--image-vent-tf) no-repeat center;
+        background-size: 100% auto;
+      }
+
+      &:nth-child(2) .left-box {
+        background: var(--image-dust-fc) no-repeat center;
+        background-size: 100% auto;
+      }
+
+      &:nth-child(3) .left-box {
+        background: var(--image-gas-ws) no-repeat center;
+        background-size: 100% auto;
+      }
+
+      &:nth-child(4) .left-box {
+        background: var(--image-fire-fz) no-repeat center;
+        background-size: 100% auto;
       }
 
-      .warning-state {
-        .text-value {
-          color: aqua !important;
-          font-family: 'douyuFont';
+      &:nth-child(5) .left-box {
+        background: var(--image-aqjc) no-repeat center;
+        background-size: 100% auto;
+      }
+
+      .right-box {
+        position: relative;
+        width: 215px;
+        height: 100%;
+        display: flex;
+        flex-direction: column;
+        justify-content: space-around;
+        align-items: center;
+
+        .box-text {
+          position: relative;
+          width: 100%;
+          height: 40px;
+          color: #fff;
+          background: var(--image-his-one) no-repeat center;
+          background-size: 100% 100%;
+
+          .text-label {
+            position: absolute;
+            left: 20px;
+            top: 50%;
+            transform: translate(0, -50%);
+          }
+
+          .text-value {
+            position: absolute;
+            left: 130px;
+            top: 50%;
+            transform: translate(0, -50%);
+            font-family: 'douyuFont';
+          }
+        }
+
+        .warning-state {
+          .text-value {
+            color: aqua !important;
+            font-family: 'douyuFont';
+          }
         }
       }
     }
   }
-}
-
-.tab-box {
-  --table-border: #0efcff44;
-  --tab-bg: linear-gradient(#001325, #012e4f);
-  --image-top-btn: url('/@/assets/images/top-btn.png');
-  --image-top-btn-select: url('/@/assets/images/top-btn-select.png');
-  display: flex;
-  color: #fff;
-  position: relative;
-  top: 11px;
-  background: var(--tab-bg);
-
-  :deep(.zxm-tabs-nav) {
-    margin: 0 !important;
-
-    .zxm-tabs-tab {
-      width: 180px;
-      height: 45px;
-      background: var(--image-top-btn) center no-repeat;
-      background-size: cover;
-      display: flex;
-      justify-content: center;
-      font-size: 16px;
-    }
 
-    .zxm-tabs-tab-active {
-      width: 180px;
-      position: relative;
-      background: var(--image-top-btn-select) center no-repeat;
-      background-size: cover;
+  .tab-box {
+    --table-border: #0efcff44;
+    --tab-bg: linear-gradient(#001325, #012e4f);
+    --image-top-btn: url('/@/assets/images/top-btn.png');
+    --image-top-btn-select: url('/@/assets/images/top-btn-select.png');
+    display: flex;
+    color: #fff;
+    position: relative;
+    top: 11px;
+    background: var(--tab-bg);
+
+    :deep(.zxm-tabs-nav) {
+      margin: 0 !important;
 
-      .zxm-tabs-tab-btn {
-        color: #fff !important;
+      .zxm-tabs-tab {
+        width: 180px;
+        height: 45px;
+        background: var(--image-top-btn) center no-repeat;
+        background-size: cover;
+        display: flex;
+        justify-content: center;
+        font-size: 16px;
       }
-    }
 
-    .zxm-tabs-ink-bar {
-      width: 0 !important;
-    }
+      .zxm-tabs-tab-active {
+        width: 180px;
+        position: relative;
+        background: var(--image-top-btn-select) center no-repeat;
+        background-size: cover;
 
-    .zxm-tabs-tab+.zxm-tabs-tab {
-      margin: 0 !important;
+        .zxm-tabs-tab-btn {
+          color: #fff !important;
+        }
+      }
+
+      .zxm-tabs-ink-bar {
+        width: 0 !important;
+      }
+
+      .zxm-tabs-tab + .zxm-tabs-tab {
+        margin: 0 !important;
+      }
     }
   }
-}
-
-.alarm-history-table {
-  width: 100%;
-  background-color: #0ebbff15;
-  position: relative;
-  margin-top: 10px;
-
-  &::after {
-    position: absolute;
-    content: '';
-    width: calc(100% + 10px);
-    height: 2px;
-    top: 0px;
-    left: -10px;
-    border-bottom: 1px solid var(--table-border);
+
+  .alarm-history-table {
+    width: 100%;
+    background-color: #0ebbff15;
+    position: relative;
+    margin-top: 10px;
+
+    &::after {
+      position: absolute;
+      content: '';
+      width: calc(100% + 10px);
+      height: 2px;
+      top: 0px;
+      left: -10px;
+      border-bottom: 1px solid var(--table-border);
+    }
   }
-}
 </style>