Browse Source

[Feat 0000]矿山信息、密闭检测、预警分析模块导出功能

bobo04052021@163.com 2 months ago
parent
commit
041af798a5

+ 159 - 145
src/views/analysis/warningAnalysis/airLeakStatus/index.vue

@@ -9,7 +9,7 @@
         </div>
       </div>
       <!-- 实时数据表格 -->
-      <BasicTable @register="registerTable" :scroll="{ x: 'max-content' }" :style="{ padding: 0 }">
+      <BasicTable @register="registerRealtimeTable" :scroll="{ x: 'max-content' }" :style="{ padding: 0 }">
         <template #action="{ record }">
           <!-- 操作按钮 -->
           <!-- <button @click="openModal(record, 'detail')" class="action-btn detail-btn" title="操作">
@@ -20,6 +20,9 @@
             <SvgIcon name="details" />
           </button>
         </template>
+        <template #resetBefore>
+          <a-button type="default" class="ml-8px" preIcon="mdi:download" @click="onExportXlsTime"> 导出 </a-button>
+        </template>
       </BasicTable>
     </TabPane>
 
@@ -49,33 +52,39 @@
 </template>
 
 <script setup lang="ts">
-  import { ref, onMounted } from 'vue';
-  import { BasicTable, useTable } from '/@/components/Table';
-  import { Tabs, TabPane, message } from 'ant-design-vue';
-  import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
-  import { SvgIcon } from '/@/components/Icon';
-  // 引入模拟数据
-  import { columns } from './airLeakStatus.data';
-  import { getProvinceAlarm, getProvinceAlarmHistory, getProvinceAlarmNum } from './airLeak.api';
-  import { useInitForm } from '../../common/analysis';
-  import { BasicModal } from '/@/components/Modal/index';
-  import { historicalFormSchema } from '/@/views/monitor/sealedMonitor/monitor.data';
-  import { useIntervalFn } from '@vueuse/core';
-  import { useListPage } from '/@/hooks/system/useListPage';
+import { ref, onMounted } from 'vue';
+import { BasicTable, useTable } from '/@/components/Table';
+import { Tabs, TabPane, message } from 'ant-design-vue';
+import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
+import { SvgIcon } from '/@/components/Icon';
+// 引入模拟数据
+import { columns } from './airLeakStatus.data';
+import { getProvinceAlarm, getProvinceAlarmHistory, getProvinceAlarmNum, exportMineData } from './airLeak.api';
+import { useInitForm } from '../../common/analysis';
+import { BasicModal } from '/@/components/Modal/index';
+import { historicalFormSchema } from '/@/views/monitor/sealedMonitor/monitor.data';
+import { useIntervalFn } from '@vueuse/core';
+import { useListPage } from '/@/hooks/system/useListPage';
 
-  // 激活的Tab页签
-  const activeTab = ref('realtime');
+// 激活的Tab页签
+const activeTab = ref('realtime');
 
-  const boardData = ref([
-    { label: '存在风险情况数量', value: '-' },
-    { label: '闭内气体涌出', value: '-' },
-    { label: '闭外气体涌出', value: '-' },
-  ]);
-
-  // 注册实时数据表格
-  const [registerTable, tableCtx] = useTable({
-    title: '密闭漏风状态判定',
-    api: getProvinceAlarm,
+const boardData = ref([
+  { label: '存在风险情况数量', value: '-' },
+  { label: '闭内气体涌出', value: '-' },
+  { label: '闭外气体涌出', value: '-' },
+]);
+const tableQueryParams = ref({}); // 存储表格查询参数的响应式变量
+const wrappedGetMineData = async (params) => {
+  // 缓存参数(这就是getMineData实际请求的参数)
+  tableQueryParams.value = { ...params };
+  // 调用原接口
+  return await getProvinceAlarm(params);
+};
+// 注册实时数据表格
+const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
+  tableProps: {
+    api: wrappedGetMineData,
     columns,
     formConfig: {
       labelWidth: 120,
@@ -101,133 +110,138 @@
       dataIndex: 'action',
       slots: { customRender: 'action' },
     },
-  });
-
-  const { goafOptions, goafId, hiscode, resolveValue, registerModal, openModal, initGoafOptions, handleResolve } = useInitForm(tableCtx);
-
-  // 注册历史数据表格
-  const { tableContext, onExportXls } = useListPage({
-    tableProps: {
-      columns,
-      // columns: historyColumns,
-      api: (params) => {
-        if (!goafId.value) {
-          message.info('请先选择煤矿及老空区');
-          return Promise.reject();
-        }
-        params.goafId = goafId.value;
-        return getProvinceAlarmHistory(params);
-      },
-      formConfig: {
-        model: { mineCode: hiscode },
-        labelWidth: 120,
-        schemas: [
-          // {
-          //   label: '开始时间',
-          //   field: 'startTime',
-          //   component: 'DatePicker',
-          //   defaultValue: dayjs().add(-30, 'day').format('YYYY-MM-DD HH:mm:ss'),
-          //   componentProps: {
-          //     showTime: true,
-          //     placeholder: '请选择开始时间',
-          //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
-          //   },
-          //   colProps: { span: 6 },
-          //   rules: [{ required: true, message: '请选择开始时间' }],
-          // },
-          // {
-          //   label: '结束时间',
-          //   field: 'endTime',
-          //   component: 'DatePicker',
-          //   defaultValue: dayjs(),
-          //   componentProps: {
-          //     showTime: true,
-          //     placeholder: '请选择结束时间',
-          //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
-          //   },
-          //   colProps: { span: 6 },
-          //   rules: [{ required: true, message: '请选择结束时间' }],
-          // },
-          {
-            label: '煤矿名称',
-            field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
-            component: 'MineCascader', // 自定义组件名
-            componentProps: {
-              initFromStore: false,
-              syncToStore: false,
-              changeOnSelect: false,
-              onChange: (e) => {
-                historyTable.setLoading(true);
-                initGoafOptions(e).finally(() => {
-                  historyTable.setLoading(false);
-                });
-              },
+  },
+  exportConfig: {
+    url: '/ventanaly-province/province/alarm/exportProvinceAlarmReal',
+    name: '密闭漏风状态判定',
+    params: {
+      alarmType: 'leakageAlarm',
+    },
+  },
+});
+const [registerRealtimeTable] = ctxRealtime;
+const { goafOptions, goafId, hiscode, resolveValue, registerModal, openModal, initGoafOptions, handleResolve } = useInitForm();
+// 注册历史数据表格
+const { tableContext, onExportXls } = useListPage({
+  tableProps: {
+    columns,
+    // columns: historyColumns,
+    api: (params) => {
+      if (!goafId.value) {
+        message.info('请先选择煤矿及老空区');
+        return Promise.reject();
+      }
+      params.goafId = goafId.value;
+      return getProvinceAlarmHistory(params);
+    },
+    formConfig: {
+      model: { mineCode: hiscode },
+      labelWidth: 120,
+      schemas: [
+        // {
+        //   label: '开始时间',
+        //   field: 'startTime',
+        //   component: 'DatePicker',
+        //   defaultValue: dayjs().add(-30, 'day').format('YYYY-MM-DD HH:mm:ss'),
+        //   componentProps: {
+        //     showTime: true,
+        //     placeholder: '请选择开始时间',
+        //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
+        //   },
+        //   colProps: { span: 6 },
+        //   rules: [{ required: true, message: '请选择开始时间' }],
+        // },
+        // {
+        //   label: '结束时间',
+        //   field: 'endTime',
+        //   component: 'DatePicker',
+        //   defaultValue: dayjs(),
+        //   componentProps: {
+        //     showTime: true,
+        //     placeholder: '请选择结束时间',
+        //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
+        //   },
+        //   colProps: { span: 6 },
+        //   rules: [{ required: true, message: '请选择结束时间' }],
+        // },
+        {
+          label: '煤矿名称',
+          field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+          component: 'MineCascader', // 自定义组件名
+          componentProps: {
+            initFromStore: false,
+            syncToStore: false,
+            changeOnSelect: false,
+            onChange: (e) => {
+              historyTable.setLoading(true);
+              initGoafOptions(e).finally(() => {
+                historyTable.setLoading(false);
+              });
             },
-            colProps: { span: 6 },
-            rules: [],
           },
-          ...historicalFormSchema,
-        ],
-        showAdvancedButton: false,
-        schemaGroupNames: ['常规查询'],
-      },
-      pagination: true,
-      striped: true,
-      useSearchForm: true,
-      bordered: true,
-      showIndexColumn: true,
-      showActionColumn: false,
+          colProps: { span: 6 },
+          rules: [],
+        },
+        ...historicalFormSchema,
+      ],
+      showAdvancedButton: false,
+      schemaGroupNames: ['常规查询'],
     },
-    exportConfig: {
-      url: '/province/alarm/exportProvinceAlarmHistory',
-      name: '历史数据',
-      params: {
-        alarmType: 'leakageAlarm',
-        goafId,
-      },
+    pagination: true,
+    striped: true,
+    useSearchForm: true,
+    bordered: true,
+    showIndexColumn: true,
+    showActionColumn: false,
+  },
+  exportConfig: {
+    url: '/province/alarm/exportProvinceAlarmHistory',
+    name: '历史数据',
+    params: {
+      alarmType: 'leakageAlarm',
+      goafId,
     },
-  });
-
-  const [registerHistoryTable, historyTable] = tableContext;
+  },
+});
 
-  async function getAlarmTotalData() {
-    const params = {
-      alarmType: 'leakageAlarm',
-    };
-    const result = await getProvinceAlarmNum(params);
-    boardData.value[1].value = result.alarmLevel1;
-    boardData.value[2].value = result.alarmLevel2;
-    boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2;
-  }
+const [registerHistoryTable, historyTable] = tableContext;
 
-  useIntervalFn(() => tableCtx.reload({ silence: true }), 10000);
+async function getAlarmTotalData() {
+  const params = {
+    alarmType: 'leakageAlarm',
+  };
+  const result = await getProvinceAlarmNum(params);
+  boardData.value[1].value = result.alarmLevel1;
+  boardData.value[2].value = result.alarmLevel2;
+  boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2;
+}
 
-  onMounted(() => {
-    // 页面挂载时的逻辑
-    getAlarmTotalData();
-  });
+onMounted(() => {
+  // 页面挂载时的逻辑
+  getAlarmTotalData();
+});
 </script>
 
 <style lang="less" scoped>
-  .board-info {
-    display: flex;
-    flex-wrap: nowrap;
-    padding: 10px;
-    justify-content: space-evenly;
-    background-color: @white;
-    // margin: 0 10px;
-    margin-bottom: 5px;
-    gap: 10px;
-    box-sizing: border-box;
-  }
-  .board-item {
-    // flex: 1;
-    box-sizing: border-box;
-  }
-  :deep(.jeecg-basic-table-form-container .ant-form) {
-    border: none !important;
-  }
-  :where(.css-dev-only-do-not-override-x9w3vz).ant-form-item .ant-form-item-label {
-    margin-top: 10px !important;
-  }
+.board-info {
+  display: flex;
+  flex-wrap: nowrap;
+  padding: 10px;
+  justify-content: space-evenly;
+  background-color: @white;
+  // margin: 0 10px;
+  margin-bottom: 5px;
+  gap: 10px;
+  box-sizing: border-box;
+}
+.board-item {
+  // flex: 1;
+  box-sizing: border-box;
+}
+:deep(.jeecg-basic-table-form-container .ant-form) {
+  border: none !important;
+}
+:where(.css-dev-only-do-not-override-x9w3vz).ant-form-item .ant-form-item-label {
+  margin-top: 10px !important;
+}
 </style>

+ 150 - 141
src/views/analysis/warningAnalysis/autoFireAnalysis/index.vue

@@ -16,7 +16,7 @@
           />
         </div>
         <!-- 实时数据表格 -->
-        <BasicTable @register="registerTable" :scroll="{ x: 'max-content' }" :style="{ padding: 0 }">
+        <BasicTable @register="registerRealtimeTable" :scroll="{ x: 'max-content' }" :style="{ padding: 0 }">
           <template #action="{ record }">
             <div class="action-buttons">
               <!-- 操作按钮 -->
@@ -25,6 +25,9 @@
               </button>
             </div>
           </template>
+          <template #resetBefore>
+            <a-button type="default" class="ml-8px" preIcon="mdi:download" @click="onExportXlsTime"> 导出 </a-button>
+          </template>
         </BasicTable>
       </TabPane>
 
@@ -55,48 +58,49 @@
 </template>
 
 <script setup lang="ts">
-  import { ref, onMounted } from 'vue';
-  import { BasicTable, useTable } from '/@/components/Table';
-  import { Tabs, TabPane, message } from 'ant-design-vue';
-  import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
-  import { SvgIcon } from '/@/components/Icon';
-  // 引入模拟数据
-  import { columns } from './autoFireAnalysis.data';
-  import { getProvinceAlarm, getProvinceAlarmHistory, getProvinceAlarmNum } from './autoFire.api';
-  import { useInitForm } from '../../common/analysis';
-  import { BasicModal } from '/@/components/Modal/index';
-  import { historicalFormSchema } from '/@/views/monitor/sealedMonitor/monitor.data';
-  import { useIntervalFn } from '@vueuse/core';
-  import { useListPage } from '/@/hooks/system/useListPage';
+import { ref, onMounted } from 'vue';
+import { BasicTable, useTable } from '/@/components/Table';
+import { Tabs, TabPane, message } from 'ant-design-vue';
+import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
+import { SvgIcon } from '/@/components/Icon';
+// 引入模拟数据
+import { columns } from './autoFireAnalysis.data';
+import { getProvinceAlarm, getProvinceAlarmHistory, getProvinceAlarmNum } from './autoFire.api';
+import { useInitForm } from '../../common/analysis';
+import { BasicModal } from '/@/components/Modal/index';
+import { historicalFormSchema } from '/@/views/monitor/sealedMonitor/monitor.data';
+import { useIntervalFn } from '@vueuse/core';
+import { useListPage } from '/@/hooks/system/useListPage';
 
-  // 激活的Tab页签
-  const activeTab = ref('realtime');
+// 激活的Tab页签
+const activeTab = ref('realtime');
 
-  const boardData = ref([
-    {
-      label: '存在风险情况数量',
-      value: '-',
-    },
-    {
-      label: '低风险',
-      value: '-',
-    },
-    {
-      label: '一般风险',
-      value: '-',
-    },
-    {
-      label: '较高风险',
-      value: '-',
-    },
-    {
-      label: '高风险',
-      value: '-',
-    },
-  ]);
+const boardData = ref([
+  {
+    label: '存在风险情况数量',
+    value: '-',
+  },
+  {
+    label: '低风险',
+    value: '-',
+  },
+  {
+    label: '一般风险',
+    value: '-',
+  },
+  {
+    label: '较高风险',
+    value: '-',
+  },
+  {
+    label: '高风险',
+    value: '-',
+  },
+]);
 
-  // 注册实时数据表格
-  const [registerTable, tableCtx] = useTable({
+// 注册实时数据表格
+const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
+  tableProps: {
     columns,
     api: getProvinceAlarm,
     formConfig: {
@@ -125,115 +129,120 @@
       slots: { customRender: 'action' },
       fixed: undefined,
     },
-  });
-
-  const { goafOptions, goafId, hiscode, resolveValue, registerModal, openModal, initGoafOptions, handleResolve } = useInitForm(tableCtx);
-
-  // 注册历史数据表格
-  const { tableContext, onExportXls } = useListPage({
-    tableProps: {
-      columns,
-      // columns: historyColumns,
-      api: (params) => {
-        if (!goafId.value) {
-          message.info('请先选择煤矿及老空区');
-          return Promise.reject();
-        }
-        params.goafId = goafId.value;
-        return getProvinceAlarmHistory(params);
-      },
-      formConfig: {
-        model: { mineCode: hiscode },
-        labelWidth: 120,
-        schemas: [
-          // {
-          //   label: '开始时间',
-          //   field: 'startTime',
-          //   component: 'DatePicker',
-          //   defaultValue: dayjs().add(-30, 'day').format('YYYY-MM-DD HH:mm:ss'),
-          //   componentProps: {
-          //     showTime: true,
-          //     placeholder: '请选择开始时间',
-          //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
-          //   },
-          //   colProps: { span: 6 },
-          //   rules: [{ required: true, message: '请选择开始时间' }],
-          // },
-          // {
-          //   label: '结束时间',
-          //   field: 'endTime',
-          //   component: 'DatePicker',
-          //   defaultValue: dayjs(),
-          //   componentProps: {
-          //     showTime: true,
-          //     placeholder: '请选择结束时间',
-          //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
-          //   },
-          //   colProps: { span: 6 },
-          //   rules: [{ required: true, message: '请选择结束时间' }],
-          // },
-          {
-            label: '煤矿名称',
-            field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
-            component: 'MineCascader', // 自定义组件名
-            componentProps: {
-              initFromStore: false,
-              syncToStore: false,
-              changeOnSelect: false,
-              onChange: (e) => {
-                historyTable.setLoading(true);
-                initGoafOptions(e).finally(() => {
-                  historyTable.setLoading(false);
-                });
-              },
+  },
+  exportConfig: {
+    url: '/ventanaly-province/province/alarm/exportProvinceAlarmReal',
+    name: '自燃发火隐患分级',
+    params: {
+      alarmType: 'fireAlarm',
+    },
+  },
+});
+const [registerRealtimeTable] = ctxRealtime;
+const { goafOptions, goafId, hiscode, resolveValue, registerModal, openModal, initGoafOptions, handleResolve } = useInitForm();
+// 注册历史数据表格
+const { tableContext, onExportXls } = useListPage({
+  tableProps: {
+    columns,
+    // columns: historyColumns,
+    api: (params) => {
+      if (!goafId.value) {
+        message.info('请先选择煤矿及老空区');
+        return Promise.reject();
+      }
+      params.goafId = goafId.value;
+      return getProvinceAlarmHistory(params);
+    },
+    formConfig: {
+      model: { mineCode: hiscode },
+      labelWidth: 120,
+      schemas: [
+        // {
+        //   label: '开始时间',
+        //   field: 'startTime',
+        //   component: 'DatePicker',
+        //   defaultValue: dayjs().add(-30, 'day').format('YYYY-MM-DD HH:mm:ss'),
+        //   componentProps: {
+        //     showTime: true,
+        //     placeholder: '请选择开始时间',
+        //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
+        //   },
+        //   colProps: { span: 6 },
+        //   rules: [{ required: true, message: '请选择开始时间' }],
+        // },
+        // {
+        //   label: '结束时间',
+        //   field: 'endTime',
+        //   component: 'DatePicker',
+        //   defaultValue: dayjs(),
+        //   componentProps: {
+        //     showTime: true,
+        //     placeholder: '请选择结束时间',
+        //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
+        //   },
+        //   colProps: { span: 6 },
+        //   rules: [{ required: true, message: '请选择结束时间' }],
+        // },
+        {
+          label: '煤矿名称',
+          field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+          component: 'MineCascader', // 自定义组件名
+          componentProps: {
+            initFromStore: false,
+            syncToStore: false,
+            changeOnSelect: false,
+            onChange: (e) => {
+              historyTable.setLoading(true);
+              initGoafOptions(e).finally(() => {
+                historyTable.setLoading(false);
+              });
             },
-            colProps: { span: 6 },
-            rules: [],
           },
-          ...historicalFormSchema,
-        ],
-        showAdvancedButton: false,
-        schemaGroupNames: ['常规查询'],
-      },
-      pagination: true,
-      striped: true,
-      useSearchForm: true,
-      bordered: true,
-      showIndexColumn: true,
-      showActionColumn: false,
+          colProps: { span: 6 },
+          rules: [],
+        },
+        ...historicalFormSchema,
+      ],
+      showAdvancedButton: false,
+      schemaGroupNames: ['常规查询'],
     },
-    exportConfig: {
-      url: '/province/alarm/exportProvinceAlarmHistory',
-      name: '历史数据',
-      params: {
-        alarmType: 'fireAlarm',
-        goafId,
-      },
+    pagination: true,
+    striped: true,
+    useSearchForm: true,
+    bordered: true,
+    showIndexColumn: true,
+    showActionColumn: false,
+  },
+  exportConfig: {
+    url: '/province/alarm/exportProvinceAlarmHistory',
+    name: '历史数据',
+    params: {
+      alarmType: 'fireAlarm',
+      goafId,
     },
-  });
+  },
+});
 
-  const [registerHistoryTable, historyTable] = tableContext;
-
-  async function getAlarmTotalData() {
-    const params = {
-      alarmType: 'fireAlarm',
-    };
-    const result = await getProvinceAlarmNum(params);
-    boardData.value[1].value = result.alarmLevel1;
-    boardData.value[2].value = result.alarmLevel2;
-    boardData.value[3].value = result.alarmLevel3;
-    boardData.value[4].value = result.alarmLevel4;
-    boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4;
-  }
+const [registerHistoryTable, historyTable] = tableContext;
 
-  useIntervalFn(() => tableCtx.reload({ silence: true }), 10000);
+async function getAlarmTotalData() {
+  const params = {
+    alarmType: 'fireAlarm',
+  };
+  const result = await getProvinceAlarmNum(params);
+  boardData.value[1].value = result.alarmLevel1;
+  boardData.value[2].value = result.alarmLevel2;
+  boardData.value[3].value = result.alarmLevel3;
+  boardData.value[4].value = result.alarmLevel4;
+  boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4;
+}
 
-  onMounted(() => {
-    // 页面挂载时的逻辑
-    getAlarmTotalData();
-  });
+onMounted(() => {
+  // 页面挂载时的逻辑
+  getAlarmTotalData();
+});
 </script>
 
 <style lang="less" scoped>
-  @import url(../../common/board.less);
+@import url(../../common/board.less);
 </style>

+ 140 - 130
src/views/analysis/warningAnalysis/fireAreaJudgeAnalysis/index.vue

@@ -15,7 +15,7 @@
         />
       </div>
       <!-- 实时数据表格 -->
-      <BasicTable @register="registerTable" :scroll="{ x: 'max-content' }" :style="{ padding: 0 }">
+      <BasicTable @register="registerRealtimeTable" :scroll="{ x: 'max-content' }" :style="{ padding: 0 }">
         <template #action="{ record }">
           <div class="action-buttons">
             <!-- 已解决按钮 -->
@@ -24,6 +24,9 @@
             </button>
           </div>
         </template>
+        <template #resetBefore>
+          <a-button type="default" class="ml-8px" preIcon="mdi:download" @click="onExportXlsTime"> 导出 </a-button>
+        </template>
       </BasicTable>
     </TabPane>
 
@@ -53,40 +56,41 @@
 </template>
 
 <script setup lang="ts">
-  import { ref, onMounted } from 'vue';
-  import { BasicTable, useTable } from '/@/components/Table';
-  import { Tabs, TabPane, message } from 'ant-design-vue';
-  import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
-  import { SvgIcon } from '/@/components/Icon';
-  // 引入模拟数据
-  import { columns } from './fireAreaJudgeAnalysis.data';
-  import { getProvinceAlarm, getProvinceAlarmHistory, getProvinceAlarmNum } from './fireAreaJudge.api';
-  import { useInitForm } from '../../common/analysis';
-  import { BasicModal } from '/@/components/Modal/index';
-  import { historicalFormSchema } from '/@/views/monitor/sealedMonitor/monitor.data';
-  import { useIntervalFn } from '@vueuse/core';
-  import { useListPage } from '/@/hooks/system/useListPage';
+import { ref, onMounted } from 'vue';
+import { BasicTable, useTable } from '/@/components/Table';
+import { Tabs, TabPane, message } from 'ant-design-vue';
+import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
+import { SvgIcon } from '/@/components/Icon';
+// 引入模拟数据
+import { columns } from './fireAreaJudgeAnalysis.data';
+import { getProvinceAlarm, getProvinceAlarmHistory, getProvinceAlarmNum } from './fireAreaJudge.api';
+import { useInitForm } from '../../common/analysis';
+import { BasicModal } from '/@/components/Modal/index';
+import { historicalFormSchema } from '/@/views/monitor/sealedMonitor/monitor.data';
+import { useIntervalFn } from '@vueuse/core';
+import { useListPage } from '/@/hooks/system/useListPage';
 
-  // 激活的Tab页签
-  const activeTab = ref('realtime');
+// 激活的Tab页签
+const activeTab = ref('realtime');
 
-  const boardData = ref([
-    {
-      label: '老空区数量',
-      value: '-',
-    },
-    {
-      label: '可以启封',
-      value: '-',
-    },
-    {
-      label: '不可启封',
-      value: '-',
-    },
-  ]);
+const boardData = ref([
+  {
+    label: '老空区数量',
+    value: '-',
+  },
+  {
+    label: '可以启封',
+    value: '-',
+  },
+  {
+    label: '不可启封',
+    value: '-',
+  },
+]);
 
-  // 注册实时数据表格
-  const [registerTable, tableCtx] = useTable({
+// 注册实时数据表格
+const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
+  tableProps: {
     columns,
     api: getProvinceAlarm,
     formConfig: {
@@ -115,113 +119,119 @@
       slots: { customRender: 'action' },
       fixed: undefined,
     },
-  });
-
-  const { goafOptions, goafId, hiscode, resolveValue, registerModal, openModal, initGoafOptions, handleResolve } = useInitForm(tableCtx);
+  },
+  exportConfig: {
+    url: '/ventanaly-province/province/alarm/exportProvinceAlarmReal',
+    name: '火区密闭启封判定',
+    params: {
+      alarmType: 'unsealAlarm',
+    },
+  },
+});
+const [registerRealtimeTable] = ctxRealtime;
+const { goafOptions, goafId, hiscode, resolveValue, registerModal, openModal, initGoafOptions, handleResolve } = useInitForm();
 
-  // 注册历史数据表格
-  const { tableContext, onExportXls } = useListPage({
-    tableProps: {
-      columns,
-      // columns: historyColumns,
-      api: (params) => {
-        if (!goafId.value) {
-          message.info('请先选择煤矿及老空区');
-          return Promise.reject();
-        }
-        params.goafId = goafId.value;
-        return getProvinceAlarmHistory(params);
-      },
-      formConfig: {
-        model: { mineCode: hiscode },
-        labelWidth: 120,
-        schemas: [
-          // {
-          //   label: '开始时间',
-          //   field: 'startTime',
-          //   component: 'DatePicker',
-          //   defaultValue: dayjs().add(-30, 'day').format('YYYY-MM-DD HH:mm:ss'),
-          //   componentProps: {
-          //     showTime: true,
-          //     placeholder: '请选择开始时间',
-          //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
-          //   },
-          //   colProps: { span: 6 },
-          //   rules: [{ required: true, message: '请选择开始时间' }],
-          // },
-          // {
-          //   label: '结束时间',
-          //   field: 'endTime',
-          //   component: 'DatePicker',
-          //   defaultValue: dayjs(),
-          //   componentProps: {
-          //     showTime: true,
-          //     placeholder: '请选择结束时间',
-          //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
-          //   },
-          //   colProps: { span: 6 },
-          //   rules: [{ required: true, message: '请选择结束时间' }],
-          // },
-          {
-            label: '煤矿名称',
-            field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
-            component: 'MineCascader', // 自定义组件名
-            componentProps: {
-              initFromStore: false,
-              syncToStore: false,
-              changeOnSelect: false,
-              onChange: (e) => {
-                historyTable.setLoading(true);
-                initGoafOptions(e).finally(() => {
-                  historyTable.setLoading(false);
-                });
-              },
+// 注册历史数据表格
+const { tableContext, onExportXls } = useListPage({
+  tableProps: {
+    columns,
+    // columns: historyColumns,
+    api: (params) => {
+      if (!goafId.value) {
+        message.info('请先选择煤矿及老空区');
+        return Promise.reject();
+      }
+      params.goafId = goafId.value;
+      return getProvinceAlarmHistory(params);
+    },
+    formConfig: {
+      model: { mineCode: hiscode },
+      labelWidth: 120,
+      schemas: [
+        // {
+        //   label: '开始时间',
+        //   field: 'startTime',
+        //   component: 'DatePicker',
+        //   defaultValue: dayjs().add(-30, 'day').format('YYYY-MM-DD HH:mm:ss'),
+        //   componentProps: {
+        //     showTime: true,
+        //     placeholder: '请选择开始时间',
+        //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
+        //   },
+        //   colProps: { span: 6 },
+        //   rules: [{ required: true, message: '请选择开始时间' }],
+        // },
+        // {
+        //   label: '结束时间',
+        //   field: 'endTime',
+        //   component: 'DatePicker',
+        //   defaultValue: dayjs(),
+        //   componentProps: {
+        //     showTime: true,
+        //     placeholder: '请选择结束时间',
+        //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
+        //   },
+        //   colProps: { span: 6 },
+        //   rules: [{ required: true, message: '请选择结束时间' }],
+        // },
+        {
+          label: '煤矿名称',
+          field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+          component: 'MineCascader', // 自定义组件名
+          componentProps: {
+            initFromStore: false,
+            syncToStore: false,
+            changeOnSelect: false,
+            onChange: (e) => {
+              historyTable.setLoading(true);
+              initGoafOptions(e).finally(() => {
+                historyTable.setLoading(false);
+              });
             },
-            colProps: { span: 6 },
-            rules: [],
           },
-          ...historicalFormSchema,
-        ],
-        showAdvancedButton: false,
-        schemaGroupNames: ['常规查询'],
-      },
-      pagination: true,
-      striped: true,
-      useSearchForm: true,
-      bordered: true,
-      showIndexColumn: true,
-      showActionColumn: false,
+          colProps: { span: 6 },
+          rules: [],
+        },
+        ...historicalFormSchema,
+      ],
+      showAdvancedButton: false,
+      schemaGroupNames: ['常规查询'],
     },
-    exportConfig: {
-      url: '/province/alarm/exportProvinceAlarmHistory',
-      name: '历史数据',
-      params: {
-        alarmType: 'unsealAlarm',
-        goafId,
-      },
+    pagination: true,
+    striped: true,
+    useSearchForm: true,
+    bordered: true,
+    showIndexColumn: true,
+    showActionColumn: false,
+  },
+  exportConfig: {
+    url: '/province/alarm/exportProvinceAlarmHistory',
+    name: '历史数据',
+    params: {
+      alarmType: 'unsealAlarm',
+      goafId,
     },
-  });
-
-  const [registerHistoryTable, historyTable] = tableContext;
+  },
+});
 
-  async function getAlarmTotalData() {
-    const params = {
-      alarmType: 'unsealAlarm',
-    };
-    const result = await getProvinceAlarmNum(params);
-    boardData.value[1].value = result.alarmLevel5;
-    boardData.value[2].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4;
-    boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4 + result.alarmLevel5;
-  }
+const [registerHistoryTable, historyTable] = tableContext;
 
-  useIntervalFn(() => tableCtx.reload({ silence: true }), 10000);
+async function getAlarmTotalData() {
+  const params = {
+    alarmType: 'unsealAlarm',
+  };
+  const result = await getProvinceAlarmNum(params);
+  boardData.value[1].value = result.alarmLevel5;
+  boardData.value[2].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4;
+  boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4 + result.alarmLevel5;
+}
 
-  onMounted(() => {
-    // 页面挂载时的逻辑
-    getAlarmTotalData();
-  });
+onMounted(() => {
+  // 页面挂载时的逻辑
+  getAlarmTotalData();
+});
 </script>
 
 <style lang="less" scoped>
-  @import url(../../common/board.less);
+@import url(../../common/board.less);
 </style>

+ 150 - 140
src/views/analysis/warningAnalysis/overlimitAlarm/index.vue

@@ -15,7 +15,7 @@
         />
       </div>
       <!-- 实时数据表格 -->
-      <BasicTable @register="registerTable" :scroll="{ x: 'max-content' }" :style="{ padding: 0 }">
+      <BasicTable @register="registerRealtimeTable" :scroll="{ x: 'max-content' }" :style="{ padding: 0 }">
         <template #action="{ record }">
           <div class="action-buttons">
             <!-- 操作按钮 -->
@@ -24,6 +24,9 @@
             </button>
           </div>
         </template>
+        <template #resetBefore>
+          <a-button type="default" class="ml-8px" preIcon="mdi:download" @click="onExportXlsTime"> 导出 </a-button>
+        </template>
       </BasicTable>
     </TabPane>
 
@@ -53,48 +56,49 @@
 </template>
 
 <script setup lang="ts">
-  import { ref, onMounted } from 'vue';
-  import { BasicTable, useTable } from '/@/components/Table';
-  import { Tabs, TabPane, message } from 'ant-design-vue';
-  import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
-  import { SvgIcon } from '/@/components/Icon';
-  // 引入模拟数据
-  import { columns } from './overlimitAlarm.data';
-  import { getProvinceAlarm, getProvinceAlarmHistory, getProvinceAlarmNum } from './overlimit.api';
-  import { useInitForm } from '../../common/analysis';
-  import { BasicModal } from '/@/components/Modal/index';
-  import { historicalFormSchema } from '/@/views/monitor/sealedMonitor/monitor.data';
-  import { useIntervalFn } from '@vueuse/core';
-  import { useListPage } from '/@/hooks/system/useListPage';
+import { ref, onMounted } from 'vue';
+import { BasicTable, useTable } from '/@/components/Table';
+import { Tabs, TabPane, message } from 'ant-design-vue';
+import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
+import { SvgIcon } from '/@/components/Icon';
+// 引入模拟数据
+import { columns } from './overlimitAlarm.data';
+import { getProvinceAlarm, getProvinceAlarmHistory, getProvinceAlarmNum } from './overlimit.api';
+import { useInitForm } from '../../common/analysis';
+import { BasicModal } from '/@/components/Modal/index';
+import { historicalFormSchema } from '/@/views/monitor/sealedMonitor/monitor.data';
+import { useIntervalFn } from '@vueuse/core';
+import { useListPage } from '/@/hooks/system/useListPage';
 
-  // 激活的Tab页签
-  const activeTab = ref('realtime');
+// 激活的Tab页签
+const activeTab = ref('realtime');
 
-  const boardData = ref([
-    {
-      label: '存在风险情况数量',
-      value: '-',
-    },
-    {
-      label: '低风险',
-      value: '-',
-    },
-    {
-      label: '一般风险',
-      value: '-',
-    },
-    {
-      label: '较高风险',
-      value: '-',
-    },
-    {
-      label: '高风险',
-      value: '-',
-    },
-  ]);
+const boardData = ref([
+  {
+    label: '存在风险情况数量',
+    value: '-',
+  },
+  {
+    label: '低风险',
+    value: '-',
+  },
+  {
+    label: '一般风险',
+    value: '-',
+  },
+  {
+    label: '较高风险',
+    value: '-',
+  },
+  {
+    label: '高风险',
+    value: '-',
+  },
+]);
 
-  // 注册实时数据表格
-  const [registerTable, tableCtx] = useTable({
+// 注册实时数据表格
+const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
+  tableProps: {
     columns,
     api: getProvinceAlarm,
     formConfig: {
@@ -123,115 +127,121 @@
       slots: { customRender: 'action' },
       fixed: undefined,
     },
-  });
-
-  const { goafOptions, goafId, hiscode, resolveValue, registerModal, openModal, initGoafOptions, handleResolve } = useInitForm(tableCtx);
+  },
+  exportConfig: {
+    url: '/ventanaly-province/province/alarm/exportProvinceAlarmReal',
+    name: '超限报警',
+    params: {
+      alarmType: 'overLimitAlarm',
+    },
+  },
+});
+const [registerRealtimeTable] = ctxRealtime;
+const { goafOptions, goafId, hiscode, resolveValue, registerModal, openModal, initGoafOptions, handleResolve } = useInitForm();
 
-  // 注册历史数据表格
-  const { tableContext, onExportXls } = useListPage({
-    tableProps: {
-      columns,
-      // columns: historyColumns,
-      api: (params) => {
-        if (!goafId.value) {
-          message.info('请先选择煤矿及老空区');
-          return Promise.reject();
-        }
-        params.goafId = goafId.value;
-        return getProvinceAlarmHistory(params);
-      },
-      formConfig: {
-        model: { mineCode: hiscode },
-        labelWidth: 120,
-        schemas: [
-          // {
-          //   label: '开始时间',
-          //   field: 'startTime',
-          //   component: 'DatePicker',
-          //   defaultValue: dayjs().add(-30, 'day').format('YYYY-MM-DD HH:mm:ss'),
-          //   componentProps: {
-          //     showTime: true,
-          //     placeholder: '请选择开始时间',
-          //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
-          //   },
-          //   colProps: { span: 6 },
-          //   rules: [{ required: true, message: '请选择开始时间' }],
-          // },
-          // {
-          //   label: '结束时间',
-          //   field: 'endTime',
-          //   component: 'DatePicker',
-          //   defaultValue: dayjs(),
-          //   componentProps: {
-          //     showTime: true,
-          //     placeholder: '请选择结束时间',
-          //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
-          //   },
-          //   colProps: { span: 6 },
-          //   rules: [{ required: true, message: '请选择结束时间' }],
-          // },
-          {
-            label: '煤矿名称',
-            field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
-            component: 'MineCascader', // 自定义组件名
-            componentProps: {
-              initFromStore: false,
-              syncToStore: false,
-              changeOnSelect: false,
-              onChange: (e) => {
-                historyTable.setLoading(true);
-                initGoafOptions(e).finally(() => {
-                  historyTable.setLoading(false);
-                });
-              },
+// 注册历史数据表格
+const { tableContext, onExportXls } = useListPage({
+  tableProps: {
+    columns,
+    // columns: historyColumns,
+    api: (params) => {
+      if (!goafId.value) {
+        message.info('请先选择煤矿及老空区');
+        return Promise.reject();
+      }
+      params.goafId = goafId.value;
+      return getProvinceAlarmHistory(params);
+    },
+    formConfig: {
+      model: { mineCode: hiscode },
+      labelWidth: 120,
+      schemas: [
+        // {
+        //   label: '开始时间',
+        //   field: 'startTime',
+        //   component: 'DatePicker',
+        //   defaultValue: dayjs().add(-30, 'day').format('YYYY-MM-DD HH:mm:ss'),
+        //   componentProps: {
+        //     showTime: true,
+        //     placeholder: '请选择开始时间',
+        //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
+        //   },
+        //   colProps: { span: 6 },
+        //   rules: [{ required: true, message: '请选择开始时间' }],
+        // },
+        // {
+        //   label: '结束时间',
+        //   field: 'endTime',
+        //   component: 'DatePicker',
+        //   defaultValue: dayjs(),
+        //   componentProps: {
+        //     showTime: true,
+        //     placeholder: '请选择结束时间',
+        //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
+        //   },
+        //   colProps: { span: 6 },
+        //   rules: [{ required: true, message: '请选择结束时间' }],
+        // },
+        {
+          label: '煤矿名称',
+          field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+          component: 'MineCascader', // 自定义组件名
+          componentProps: {
+            initFromStore: false,
+            syncToStore: false,
+            changeOnSelect: false,
+            onChange: (e) => {
+              historyTable.setLoading(true);
+              initGoafOptions(e).finally(() => {
+                historyTable.setLoading(false);
+              });
             },
-            colProps: { span: 6 },
-            rules: [],
           },
-          ...historicalFormSchema,
-        ],
-        showAdvancedButton: false,
-        schemaGroupNames: ['常规查询'],
-      },
-      pagination: true,
-      striped: true,
-      useSearchForm: true,
-      bordered: true,
-      showIndexColumn: true,
-      showActionColumn: false,
+          colProps: { span: 6 },
+          rules: [],
+        },
+        ...historicalFormSchema,
+      ],
+      showAdvancedButton: false,
+      schemaGroupNames: ['常规查询'],
     },
-    exportConfig: {
-      url: '/province/alarm/exportProvinceAlarmHistory',
-      name: '历史数据',
-      params: {
-        alarmType: 'overLimitAlarm',
-        goafId,
-      },
+    pagination: true,
+    striped: true,
+    useSearchForm: true,
+    bordered: true,
+    showIndexColumn: true,
+    showActionColumn: false,
+  },
+  exportConfig: {
+    url: '/province/alarm/exportProvinceAlarmHistory',
+    name: '历史数据',
+    params: {
+      alarmType: 'overLimitAlarm',
+      goafId,
     },
-  });
-
-  const [registerHistoryTable, historyTable] = tableContext;
+  },
+});
 
-  async function getAlarmTotalData() {
-    const params = {
-      alarmType: 'overLimitAlarm',
-    };
-    const result = await getProvinceAlarmNum(params);
-    boardData.value[1].value = result.alarmLevel1;
-    boardData.value[2].value = result.alarmLevel2;
-    boardData.value[3].value = result.alarmLevel3;
-    boardData.value[4].value = result.alarmLevel4;
-    boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4;
-  }
+const [registerHistoryTable, historyTable] = tableContext;
 
-  useIntervalFn(() => tableCtx.reload({ silence: true }), 10000);
+async function getAlarmTotalData() {
+  const params = {
+    alarmType: 'overLimitAlarm',
+  };
+  const result = await getProvinceAlarmNum(params);
+  boardData.value[1].value = result.alarmLevel1;
+  boardData.value[2].value = result.alarmLevel2;
+  boardData.value[3].value = result.alarmLevel3;
+  boardData.value[4].value = result.alarmLevel4;
+  boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4;
+}
 
-  onMounted(() => {
-    // 页面挂载时的逻辑
-    getAlarmTotalData();
-  });
+onMounted(() => {
+  // 页面挂载时的逻辑
+  getAlarmTotalData();
+});
 </script>
 
 <style lang="less" scoped>
-  @import url(../../common/board.less);
+@import url(../../common/board.less);
 </style>

+ 150 - 140
src/views/analysis/warningAnalysis/pressureDiffAnalysis/index.vue

@@ -15,7 +15,7 @@
         />
       </div>
       <!-- 实时数据表格 -->
-      <BasicTable @register="registerTable" :scroll="{ x: 'max-content' }" :style="{ padding: 0 }">
+      <BasicTable @register="registerRealtimeTable" :scroll="{ x: 'max-content' }" :style="{ padding: 0 }">
         <template #action="{ record }">
           <div class="action-buttons">
             <!-- 操作按钮 -->
@@ -28,6 +28,9 @@
             </button>
           </div>
         </template>
+        <template #resetBefore>
+          <a-button type="default" class="ml-8px" preIcon="mdi:download" @click="onExportXlsTime"> 导出 </a-button>
+        </template>
       </BasicTable>
     </TabPane>
 
@@ -68,48 +71,49 @@
 </template>
 
 <script setup lang="ts">
-  import { ref, onMounted } from 'vue';
-  import { BasicTable, useTable } from '/@/components/Table';
-  import { Tabs, TabPane, message } from 'ant-design-vue';
-  import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
-  import { SvgIcon } from '/@/components/Icon';
-  // 引入模拟数据
-  import { columns } from './pressureDiffAnalysis.data';
-  import { getProvinceAlarm, getProvinceAlarmHistory, getProvinceAlarmNum } from './pressureDiff.api';
-  import { useInitForm } from '../../common/analysis';
-  import { BasicModal } from '/@/components/Modal/index';
-  import { historicalFormSchema } from '/@/views/monitor/sealedMonitor/monitor.data';
-  import { useIntervalFn } from '@vueuse/core';
-  import { useListPage } from '/@/hooks/system/useListPage';
+import { ref, onMounted } from 'vue';
+import { BasicTable, useTable } from '/@/components/Table';
+import { Tabs, TabPane, message } from 'ant-design-vue';
+import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
+import { SvgIcon } from '/@/components/Icon';
+// 引入模拟数据
+import { columns } from './pressureDiffAnalysis.data';
+import { getProvinceAlarm, getProvinceAlarmHistory, getProvinceAlarmNum } from './pressureDiff.api';
+import { useInitForm } from '../../common/analysis';
+import { BasicModal } from '/@/components/Modal/index';
+import { historicalFormSchema } from '/@/views/monitor/sealedMonitor/monitor.data';
+import { useIntervalFn } from '@vueuse/core';
+import { useListPage } from '/@/hooks/system/useListPage';
 
-  // 激活的Tab页签
-  const activeTab = ref('realtime');
+// 激活的Tab页签
+const activeTab = ref('realtime');
 
-  const boardData = ref([
-    {
-      label: '存在风险情况数量',
-      value: '-',
-    },
-    {
-      label: '低风险',
-      value: '-',
-    },
-    {
-      label: '一般风险',
-      value: '-',
-    },
-    {
-      label: '较高风险',
-      value: '-',
-    },
-    {
-      label: '高风险',
-      value: '-',
-    },
-  ]);
+const boardData = ref([
+  {
+    label: '存在风险情况数量',
+    value: '-',
+  },
+  {
+    label: '低风险',
+    value: '-',
+  },
+  {
+    label: '一般风险',
+    value: '-',
+  },
+  {
+    label: '较高风险',
+    value: '-',
+  },
+  {
+    label: '高风险',
+    value: '-',
+  },
+]);
 
-  // 注册实时数据表格
-  const [registerTable, tableCtx] = useTable({
+// 注册实时数据表格
+const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
+  tableProps: {
     columns,
     api: getProvinceAlarm,
     formConfig: {
@@ -138,115 +142,121 @@
       slots: { customRender: 'action' },
       fixed: undefined,
     },
-  });
-
-  const { goafOptions, goafId, hiscode, resolveValue, registerModal, openModal, initGoafOptions, handleResolve } = useInitForm(tableCtx);
+  },
+  exportConfig: {
+    url: '/ventanaly-province/province/alarm/exportProvinceAlarmReal',
+    name: '内外压差变化风险分析',
+    params: {
+      alarmType: 'sourcePressureAlarm',
+    },
+  },
+});
+const [registerRealtimeTable] = ctxRealtime;
+const { goafOptions, goafId, hiscode, resolveValue, registerModal, openModal, initGoafOptions, handleResolve } = useInitForm();
 
-  // 注册历史数据表格
-  const { tableContext, onExportXls } = useListPage({
-    tableProps: {
-      columns,
-      // columns: historyColumns,
-      api: (params) => {
-        if (!goafId.value) {
-          message.info('请先选择煤矿及老空区');
-          return Promise.reject();
-        }
-        params.goafId = goafId.value;
-        return getProvinceAlarmHistory(params);
-      },
-      formConfig: {
-        model: { mineCode: hiscode },
-        labelWidth: 120,
-        schemas: [
-          // {
-          //   label: '开始时间',
-          //   field: 'startTime',
-          //   component: 'DatePicker',
-          //   defaultValue: dayjs().add(-30, 'day').format('YYYY-MM-DD HH:mm:ss'),
-          //   componentProps: {
-          //     showTime: true,
-          //     placeholder: '请选择开始时间',
-          //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
-          //   },
-          //   colProps: { span: 6 },
-          //   rules: [{ required: true, message: '请选择开始时间' }],
-          // },
-          // {
-          //   label: '结束时间',
-          //   field: 'endTime',
-          //   component: 'DatePicker',
-          //   defaultValue: dayjs(),
-          //   componentProps: {
-          //     showTime: true,
-          //     placeholder: '请选择结束时间',
-          //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
-          //   },
-          //   colProps: { span: 6 },
-          //   rules: [{ required: true, message: '请选择结束时间' }],
-          // },
-          {
-            label: '煤矿名称',
-            field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
-            component: 'MineCascader', // 自定义组件名
-            componentProps: {
-              initFromStore: false,
-              syncToStore: false,
-              changeOnSelect: false,
-              onChange: (e) => {
-                historyTable.setLoading(true);
-                initGoafOptions(e).finally(() => {
-                  historyTable.setLoading(false);
-                });
-              },
+// 注册历史数据表格
+const { tableContext, onExportXls } = useListPage({
+  tableProps: {
+    columns,
+    // columns: historyColumns,
+    api: (params) => {
+      if (!goafId.value) {
+        message.info('请先选择煤矿及老空区');
+        return Promise.reject();
+      }
+      params.goafId = goafId.value;
+      return getProvinceAlarmHistory(params);
+    },
+    formConfig: {
+      model: { mineCode: hiscode },
+      labelWidth: 120,
+      schemas: [
+        // {
+        //   label: '开始时间',
+        //   field: 'startTime',
+        //   component: 'DatePicker',
+        //   defaultValue: dayjs().add(-30, 'day').format('YYYY-MM-DD HH:mm:ss'),
+        //   componentProps: {
+        //     showTime: true,
+        //     placeholder: '请选择开始时间',
+        //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
+        //   },
+        //   colProps: { span: 6 },
+        //   rules: [{ required: true, message: '请选择开始时间' }],
+        // },
+        // {
+        //   label: '结束时间',
+        //   field: 'endTime',
+        //   component: 'DatePicker',
+        //   defaultValue: dayjs(),
+        //   componentProps: {
+        //     showTime: true,
+        //     placeholder: '请选择结束时间',
+        //     valueFormat: 'YYYY-MM-DD HH:mm:ss',
+        //   },
+        //   colProps: { span: 6 },
+        //   rules: [{ required: true, message: '请选择结束时间' }],
+        // },
+        {
+          label: '煤矿名称',
+          field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
+          component: 'MineCascader', // 自定义组件名
+          componentProps: {
+            initFromStore: false,
+            syncToStore: false,
+            changeOnSelect: false,
+            onChange: (e) => {
+              historyTable.setLoading(true);
+              initGoafOptions(e).finally(() => {
+                historyTable.setLoading(false);
+              });
             },
-            colProps: { span: 6 },
-            rules: [],
           },
-          ...historicalFormSchema,
-        ],
-        showAdvancedButton: false,
-        schemaGroupNames: ['常规查询'],
-      },
-      pagination: true,
-      striped: true,
-      useSearchForm: true,
-      bordered: true,
-      showIndexColumn: true,
-      showActionColumn: false,
+          colProps: { span: 6 },
+          rules: [],
+        },
+        ...historicalFormSchema,
+      ],
+      showAdvancedButton: false,
+      schemaGroupNames: ['常规查询'],
     },
-    exportConfig: {
-      url: '/province/alarm/exportProvinceAlarmHistory',
-      name: '历史数据',
-      params: {
-        alarmType: 'sourcePressureAlarm',
-        goafId,
-      },
+    pagination: true,
+    striped: true,
+    useSearchForm: true,
+    bordered: true,
+    showIndexColumn: true,
+    showActionColumn: false,
+  },
+  exportConfig: {
+    url: '/province/alarm/exportProvinceAlarmHistory',
+    name: '历史数据',
+    params: {
+      alarmType: 'sourcePressureAlarm',
+      goafId,
     },
-  });
-
-  const [registerHistoryTable, historyTable] = tableContext;
+  },
+});
 
-  async function getAlarmTotalData() {
-    const params = {
-      alarmType: 'sourcePressureAlarm',
-    };
-    const result = await getProvinceAlarmNum(params);
-    boardData.value[1].value = result.alarmLevel1;
-    boardData.value[2].value = result.alarmLevel2;
-    boardData.value[3].value = result.alarmLevel3;
-    boardData.value[4].value = result.alarmLevel4;
-    boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4;
-  }
+const [registerHistoryTable, historyTable] = tableContext;
 
-  useIntervalFn(() => tableCtx.reload({ silence: true }), 10000);
+async function getAlarmTotalData() {
+  const params = {
+    alarmType: 'sourcePressureAlarm',
+  };
+  const result = await getProvinceAlarmNum(params);
+  boardData.value[1].value = result.alarmLevel1;
+  boardData.value[2].value = result.alarmLevel2;
+  boardData.value[3].value = result.alarmLevel3;
+  boardData.value[4].value = result.alarmLevel4;
+  boardData.value[0].value = result.alarmLevel1 + result.alarmLevel2 + result.alarmLevel3 + result.alarmLevel4;
+}
 
-  onMounted(() => {
-    // 页面挂载时的逻辑
-    getAlarmTotalData();
-  });
+onMounted(() => {
+  // 页面挂载时的逻辑
+  getAlarmTotalData();
+});
 </script>
 
 <style lang="less" scoped>
-  @import url(../../common/board.less);
+@import url(../../common/board.less);
 </style>

+ 132 - 118
src/views/dashboard/basicInfo/minesInfo/index.vue

@@ -1,6 +1,9 @@
 <!-- eslint-disable vue/multi-word-component-names -->
 <template>
-  <BasicTable @register="registerTable">
+  <BasicTable style="padding: 0" @register="registerRealtimeTable">
+    <template #resetBefore>
+      <a-button type="default" class="ml-8px" preIcon="mdi:download" @click="onExportXls"> 导出 </a-button>
+    </template>
     <template #action="{ record }">
       <button @click="handleGoToPageQuery(record, `/sealed/${record.areaId}`)" class="action-btn" title="密闭监测数据">
         <SvgIcon name="data" />
@@ -16,137 +19,148 @@
 </template>
 
 <script setup lang="ts">
-  import { ref, nextTick, computed, onMounted } from 'vue';
-  import { useRouter } from 'vue-router';
-  import { BasicTable, useTable } from '/@/components/Table';
-  import { SvgIcon } from '/@/components/Icon';
-  import { message } from 'ant-design-vue';
-  // 引入动态列/表单配置函数 + 类型
-  import { getColumns, getSearchFormSchema, type ProductionStatusMap } from './minesInfo.data';
-  import { getMineData } from '../basicInfo.api';
-  // 引入字典获取方法
-  import { getDictItemsByCode } from '/@/utils/dict';
-
-  // 路由实例
-  const router = useRouter();
-
-  // ========== 动态生产状态配置 ==========
-  // 1. 响应式存储动态状态映射(key: 状态值,value: 配置)
-  const dynamicProductionStatusMap = ref<ProductionStatusMap>({});
-  // 2. 响应式存储动态下拉选项(供搜索表单使用)
-  const dynamicProductionStatusOptions = ref<{ label: string; value: string | number }[]>([]);
-
-  // 3. 生产状态颜色分配规则(和dataQuality保持一致)
-  const getStatusColor = (statusText: string) => {
-    if (statusText.includes('正常生产')) return 'green';
-    if (statusText.includes('拟建矿井')) return 'blue';
-    return 'red'; // 其他状态统一红色
-  };
-
-  // 4. 从接口获取生产状态字典,生成动态映射/选项
-  const fetchProductionStatus = async () => {
-    try {
-      const statusList = await getDictItemsByCode('mineProStatus');
-      if (!Array.isArray(statusList)) return;
-
-      const statusMap: ProductionStatusMap = {};
-      const statusOptions: { label: string; value: string | number }[] = [];
-
-      statusList.forEach((item) => {
-        const value = item.value;
-        const label = item.text || item.label;
-        const color = getStatusColor(label);
-
-        statusMap[value] = { label, value, color };
-        statusOptions.push({ label, value });
-      });
-
-      // 赋值到响应式变量
-      dynamicProductionStatusMap.value = statusMap;
-      dynamicProductionStatusOptions.value = statusOptions;
-
-      // 刷新表格(使用最新的状态映射)
-      await safeReloadTable();
-    } catch (error) {
-      console.error('获取生产状态字典失败:', error);
-      message.error('生产状态数据加载失败');
-    }
-  };
-
-  // 5. 生成动态列和搜索表单(computed响应式更新)
-  const columns = computed(() => getColumns(dynamicProductionStatusMap));
-  const searchFormSchema = computed(() => getSearchFormSchema(dynamicProductionStatusOptions));
-
-  // ========== 表格注册 ==========
-  const [registerTable, { reload: reloadTable }] = useTable({
-    title: '矿山信息表格',
+import { ref, nextTick, computed, onMounted } from 'vue';
+import { useRouter } from 'vue-router';
+import { BasicTable } from '/@/components/Table';
+import { SvgIcon } from '/@/components/Icon';
+import { message } from 'ant-design-vue';
+// 引入动态列/表单配置函数 + 类型
+import { getColumns, getSearchFormSchema, type ProductionStatusMap } from './minesInfo.data';
+import { getMineData } from '../basicInfo.api';
+// 引入字典获取方法
+import { getDictItemsByCode } from '/@/utils/dict';
+import { useListPage } from '/@/hooks/system/useListPage';
+import { useIntervalFn } from '@vueuse/core';
+import { useModal } from '/@/components/Modal';
+
+// 路由实例
+const router = useRouter();
+
+// ========== 动态生产状态配置 ==========
+// 1. 响应式存储动态状态映射(key: 状态值,value: 配置)
+const dynamicProductionStatusMap = ref<ProductionStatusMap>({});
+// 2. 响应式存储动态下拉选项(供搜索表单使用)
+const dynamicProductionStatusOptions = ref<{ label: string; value: string | number }[]>([]);
+
+// 3. 生产状态颜色分配规则(和dataQuality保持一致)
+const getStatusColor = (statusText: string) => {
+  if (statusText.includes('正常生产')) return 'green';
+  if (statusText.includes('拟建矿井')) return 'blue';
+  return 'red'; // 其他状态统一红色
+};
+
+// 4. 从接口获取生产状态字典,生成动态映射/选项
+const fetchProductionStatus = async () => {
+  try {
+    const statusList = await getDictItemsByCode('mineProStatus');
+    if (!Array.isArray(statusList)) return;
+
+    const statusMap: ProductionStatusMap = {};
+    const statusOptions: { label: string; value: string | number }[] = [];
+
+    statusList.forEach((item) => {
+      const value = item.value;
+      const label = item.text || item.label;
+      const color = getStatusColor(label);
+
+      statusMap[value] = { label, value, color };
+      statusOptions.push({ label, value });
+    });
+
+    // 赋值到响应式变量
+    dynamicProductionStatusMap.value = statusMap;
+    dynamicProductionStatusOptions.value = statusOptions;
+
+    // 刷新表格(使用最新的状态映射)
+    await safeReloadTable();
+  } catch (error) {
+    console.error('获取生产状态字典失败:', error);
+    message.error('生产状态数据加载失败');
+  }
+};
+
+// 5. 生成动态列和搜索表单(computed响应式更新)
+const columns = computed(() => getColumns(dynamicProductionStatusMap));
+const searchFormSchema = computed(() => getSearchFormSchema(dynamicProductionStatusOptions));
+// ========== 表格注册 ==========
+const { tableContext: ctxRealtime, onExportXls } = useListPage({
+  tableProps: {
     api: getMineData, // 数据统计接口
-    columns: columns, // 绑定动态列
+    columns, // 绑定动态列
     formConfig: {
       labelWidth: 120,
       schemas: searchFormSchema.value, // 绑定动态搜索表单
       showAdvancedButton: false,
       schemaGroupNames: ['常规查询'],
     },
-    pagination: true,
-    useSearchForm: true,
-    bordered: true,
     showIndexColumn: false,
     scroll: { x: 'max-content' },
-    actionColumn: {
-      width: 180,
-      title: '操作',
-      dataIndex: 'action',
-      slots: { customRender: 'action' },
-    },
-    immediate: false, // 先不加载,等字典获取后再加载
-  });
-
-  // ========== 辅助方法 ==========
-  // 安全刷新表格(避免表格未初始化导致的报错)
-  async function safeReloadTable() {
-    await nextTick();
-    try {
-      await reloadTable();
-    } catch (e) {
-      console.warn('矿山信息表格重载失败:', e);
-    }
-  }
-
-  /**
-   * 通用页面跳转方法
-   * @param record 当前行数据
-   * @param path 目标路径
-   */
-  function handleGoToPage(record: any, path: string) {
-    router.push({
-      path,
-    });
-  }
-
-  function handleGoToPageQuery(record: any, path: string) {
-    const mineCode = record.mineCode;
-    router.push({
-      path,
-      query: { mineCode },
-    });
+  },
+  exportConfig: {
+    url: '/ventanaly-province/province/mineData/exportMineData',
+    name: '矿山信息',
+    params: {},
+  },
+});
+const [registerRealtimeTable, realtimeTable] = ctxRealtime;
+const { pause, resume } = useIntervalFn(() => realtimeTable.reload({ silence: true }), 10000);
+
+// ========== 辅助方法 ==========
+// 安全刷新表格(避免表格未初始化导致的报错)
+async function safeReloadTable() {
+  await nextTick();
+  try {
+    await reloadTable();
+  } catch (e) {
+    console.warn('矿山信息表格重载失败:', e);
   }
+}
+
+/**
+ * 通用页面跳转方法
+ * @param record 当前行数据
+ * @param path 目标路径
+ */
+function handleGoToPage(record: any, path: string) {
+  router.push({
+    path,
+  });
+}
 
-  // ========== 初始化 ==========
-  onMounted(async () => {
-    // 先获取生产状态字典,再加载表格
-    await fetchProductionStatus();
+function handleGoToPageQuery(record: any, path: string) {
+  const mineCode = record.mineCode;
+  router.push({
+    path,
+    query: { mineCode },
   });
+}
+const [registerRealtimeModal, { openModal: openRealtimeModal }] = useModal();
+
+const openModal = (record) => {
+  openRealtimeModal(true, record);
+  // if (type === 'realtime') {
+  //   // 可向实时弹窗传递当前记录数据
+  // } else {
+  //   // 可向历史弹窗传递当前记录数据
+  //   openHistoryModal(true, record);
+  // }
+  pause();
+};
+// ========== 初始化 ==========
+onMounted(async () => {
+  // 先获取生产状态字典,再加载表格
+  await fetchProductionStatus();
+});
 </script>
 
 <style lang="less" scoped>
-  .action-btn {
-    height: 30px;
-    cursor: pointer;
-    margin-right: 10px;
-
-    &:last-child {
-      margin-right: 0;
-    }
+.action-btn {
+  height: 30px;
+  cursor: pointer;
+  margin-right: 10px;
+
+  &:last-child {
+    margin-right: 0;
   }
+}
 </style>

+ 128 - 112
src/views/monitor/sealedMonitor/index.vue

@@ -10,6 +10,9 @@
             <SvgIcon name="details" />
           </button>
         </template>
+        <template #resetBefore>
+          <a-button type="default" class="ml-8px" preIcon="mdi:download" @click="onExportXlsTime"> 导出 </a-button>
+        </template>
       </BasicTable>
     </TabPane>
 
@@ -38,131 +41,144 @@
 </template>
 
 <script setup lang="ts">
-  import { ref } from 'vue';
-  import { BasicTable } from '/@/components/Table';
-  import { Tabs, TabPane, message } from 'ant-design-vue';
-  // 引入模拟数据
-  import { columns, historicalColumns, historicalFormSchema, searchFormSchema } from './monitor.data';
-  import RealtimeDetailsModal from './components/RealtimeDetailsModal.vue';
-  // import HistoricalDetailsModal from './components/HistoricalDetailsModal.vue';
-  import { SvgIcon } from '/@/components/Icon';
-  import { getGoafData, getGoafHistory } from './monitor.api';
-  import { useListPage } from '/@/hooks/system/useListPage';
-  import { useModal } from '/@/components/Modal';
-  import { useIntervalFn } from '@vueuse/core';
-  import { useInitForm } from './hooks/form';
-  // import { getGoafList } from '../../system/algorithm/algorithm.api';
-
-  // 激活的Tab页签
+import { ref } from 'vue';
+import { BasicTable } from '/@/components/Table';
+import { Tabs, TabPane, message } from 'ant-design-vue';
+// 引入模拟数据
+import { columns, historicalColumns, historicalFormSchema, searchFormSchema } from './monitor.data';
+import RealtimeDetailsModal from './components/RealtimeDetailsModal.vue';
+// import HistoricalDetailsModal from './components/HistoricalDetailsModal.vue';
+import { SvgIcon } from '/@/components/Icon';
+import { getGoafData, getGoafHistory, exportMineData } from './monitor.api';
+import { useListPage } from '/@/hooks/system/useListPage';
+import { useModal } from '/@/components/Modal';
+import { useIntervalFn } from '@vueuse/core';
+import { useInitForm } from './hooks/form';
+// import { getGoafList } from '../../system/algorithm/algorithm.api';
 
-  // 处理矿名选择器相关的逻辑
-  const { departId, goafOptions, goafId, rawcode, hiscode, initGoafOptions } = useInitForm();
-  const activeTab = ref('realtime');
+// 激活的Tab页签
 
-  // 注册实时数据表格
-  const { tableContext: ctxRealtime } = useListPage({
-    tableProps: {
-      api: getGoafData,
-      columns,
-      formConfig: {
-        model: { mineCodeList: rawcode },
-        schemas: [
-          {
-            field: 'mineCodeList',
-            label: '煤矿名称',
-            component: 'MineCascader',
-            colProps: { span: 6 },
-            required: true,
-            componentProps: {
-              initFromStore: false,
-              syncToStore: false,
-              rootId: departId,
-            },
+// 处理矿名选择器相关的逻辑
+const { departId, goafOptions, goafId, rawcode, hiscode, initGoafOptions } = useInitForm();
+const activeTab = ref('realtime');
+const tableQueryParams = ref({}); // 存储表格查询参数的响应式变量
+const wrappedGetMineData = async (params) => {
+  // 缓存参数(这就是getMineData实际请求的参数)
+  tableQueryParams.value = { ...params };
+  // 调用原接口
+  return await getGoafData(params);
+};
+// 注册实时数据表格
+const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
+  tableProps: {
+    api: wrappedGetMineData,
+    columns,
+    formConfig: {
+      model: { mineCodeList: rawcode },
+      schemas: [
+        {
+          field: 'mineCodeList',
+          label: '煤矿名称',
+          component: 'MineCascader',
+          colProps: { span: 6 },
+          required: true,
+          componentProps: {
+            initFromStore: false,
+            syncToStore: false,
+            rootId: departId,
           },
-          ...searchFormSchema,
-        ],
-        schemaGroupNames: ['常规查询'],
-      },
-      showIndexColumn: false,
-      scroll: { x: 'max-content' },
+        },
+        ...searchFormSchema,
+      ],
+      schemaGroupNames: ['常规查询'],
     },
-    pagination: false,
-  });
-  const [registerRealtimeTable, realtimeTable] = ctxRealtime;
+    showIndexColumn: false,
+    scroll: { x: 'max-content' },
+  },
+  pagination: false,
+  exportConfig: {
+    url: '/ventanaly-province/province/device/exportGoafReal',
+    name: '密闭监测数据',
+    params: {
+      goafId,
+    },
+  },
+});
+const [registerRealtimeTable, realtimeTable] = ctxRealtime;
 
-  const { pause, resume } = useIntervalFn(() => realtimeTable.reload({ silence: true }), 10000);
+const { pause, resume } = useIntervalFn(() => realtimeTable.reload({ silence: true }), 10000);
 
-  // 注册历史数据表格
-  const { tableContext: ctxHistory, onExportXls } = useListPage({
-    tableProps: {
-      api: (params) => {
-        if (!goafId.value) {
-          message.info('请先选择煤矿及老空区');
-          return Promise.reject();
-        }
-        params.goafId = goafId.value;
-        return getGoafHistory(params);
+// 注册历史数据表格
+const { tableContext: ctxHistory, onExportXls } = useListPage({
+  tableProps: {
+    api: (params) => {
+      if (!goafId.value) {
+        message.info('请先选择煤矿及老空区');
+        return Promise.reject();
+      }
+      params.goafId = goafId.value;
+      return getGoafHistory(params);
+    },
+    columns: historicalColumns,
+    formConfig: {
+      model: {
+        mineCodeList: hiscode,
       },
-      columns: historicalColumns,
-      formConfig: {
-        model: {
-          mineCodeList: hiscode,
-        },
-        schemas: [
-          {
-            field: 'mineCodeList',
-            label: '煤矿名称',
-            component: 'MineCascader',
-            colProps: { span: 6 },
-            required: true,
-            componentProps: {
-              initFromStore: false,
-              syncToStore: false,
-              rootId: departId,
-              onChange(v) {
-                historyTable.setLoading(true);
-                initGoafOptions(v).finally(() => {
-                  historyTable.setLoading(false);
-                });
-              },
+      schemas: [
+        {
+          field: 'mineCodeList',
+          label: '煤矿名称',
+          component: 'MineCascader',
+          colProps: { span: 6 },
+          required: true,
+          componentProps: {
+            initFromStore: false,
+            syncToStore: false,
+            rootId: departId,
+            onChange(v) {
+              historyTable.setLoading(true);
+              initGoafOptions(v).finally(() => {
+                historyTable.setLoading(false);
+              });
             },
           },
-          ...historicalFormSchema,
-        ], // 使用历史数据的搜索配置
-        schemaGroupNames: ['常规查询'],
-      },
-      useSearchForm: true,
-      bordered: true,
-      showIndexColumn: false,
-      scroll: { x: 'max-content' },
-      showActionColumn: false,
+        },
+        ...historicalFormSchema,
+      ], // 使用历史数据的搜索配置
+      schemaGroupNames: ['常规查询'],
     },
-    exportConfig: {
-      url: '/province/device/exportGoafHistory',
-      name: '历史数据',
-      params: {
-        goafId,
-      },
+    useSearchForm: true,
+    bordered: true,
+    showIndexColumn: false,
+    scroll: { x: 'max-content' },
+    showActionColumn: false,
+  },
+  exportConfig: {
+    url: '/province/device/exportGoafHistory',
+    name: '历史数据',
+    params: {
+      goafId,
     },
-    pagination: true,
-  });
-  const [registerHistoryTable, historyTable] = ctxHistory;
+  },
+  pagination: true,
+});
+const [registerHistoryTable, historyTable] = ctxHistory;
 
-  // 弹窗引用
-  const [registerRealtimeModal, { openModal: openRealtimeModal }] = useModal();
-  // const [registerHistoryModal, { openModal: openHistoryModal }] = useModal();
+// 弹窗引用
+const [registerRealtimeModal, { openModal: openRealtimeModal }] = useModal();
+// const [registerHistoryModal, { openModal: openHistoryModal }] = useModal();
 
-  // 打开弹窗方法(区分实时/历史)
-  const openModal = (record) => {
-    openRealtimeModal(true, record);
-    // if (type === 'realtime') {
-    //   // 可向实时弹窗传递当前记录数据
-    // } else {
-    //   // 可向历史弹窗传递当前记录数据
-    //   openHistoryModal(true, record);
-    // }
-    pause();
-  };
+// 打开弹窗方法(区分实时/历史)
+const openModal = (record) => {
+  openRealtimeModal(true, record);
+  // if (type === 'realtime') {
+  //   // 可向实时弹窗传递当前记录数据
+  // } else {
+  //   // 可向历史弹窗传递当前记录数据
+  //   openHistoryModal(true, record);
+  // }
+  pause();
+};
 </script>
 
 <style lang="less" scoped></style>