|
|
@@ -33,9 +33,6 @@
|
|
|
<template #resetBefore>
|
|
|
<a-button type="default" class="ml-8px" preIcon="mdi:download" @click="onExportXls"> 导出 </a-button>
|
|
|
</template>
|
|
|
- <template #form-goaf-select>
|
|
|
- <a-select v-model:value="goafId" :options="goafOptions" placeholder="请选择" />
|
|
|
- </template>
|
|
|
</BasicTable>
|
|
|
</TabPane>
|
|
|
</Tabs>
|
|
|
@@ -49,16 +46,17 @@
|
|
|
<script setup lang="ts">
|
|
|
import { ref } from 'vue';
|
|
|
import { BasicTable } from '/@/components/Table';
|
|
|
- import { Tabs, TabPane, message } from 'ant-design-vue';
|
|
|
+ import { Tabs, TabPane } from 'ant-design-vue';
|
|
|
import { SvgIcon } from '/@/components/Icon';
|
|
|
// 引入模拟数据
|
|
|
import { columns } from './reportAnalysis.data';
|
|
|
import { getProvinceAlarm, getProvinceAlarmHistory } from './report.api';
|
|
|
import { useInitForm } from '../../common/analysis';
|
|
|
import { BasicModal } from '/@/components/Modal/index';
|
|
|
- import { historicalFormSchema } from '/@/views/monitor/sealedMonitor/monitor.data';
|
|
|
+ // import { historicalFormSchema } from '/@/views/monitor/sealedMonitor/monitor.data';
|
|
|
// import { useIntervalFn } from '@vueuse/core';
|
|
|
import { useListPage } from '/@/hooks/system/useListPage';
|
|
|
+ import dayjs from 'dayjs';
|
|
|
|
|
|
// 激活的Tab页签
|
|
|
const activeTab = ref('realtime');
|
|
|
@@ -104,20 +102,13 @@
|
|
|
},
|
|
|
});
|
|
|
const [registerRealtimeTable] = ctxRealtime;
|
|
|
- const { goafOptions, goafId, hiscode, resolveValue, registerModal, openModal, initGoafOptions, handleResolve } = useInitForm();
|
|
|
+ const { 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);
|
|
|
- },
|
|
|
+ api: getProvinceAlarmHistory,
|
|
|
formConfig: {
|
|
|
model: { customField: hiscode },
|
|
|
labelWidth: 120,
|
|
|
@@ -140,7 +131,32 @@
|
|
|
colProps: { span: 6 },
|
|
|
rules: [],
|
|
|
},
|
|
|
- ...historicalFormSchema,
|
|
|
+ {
|
|
|
+ field: 'startTime',
|
|
|
+ label: '起始日期',
|
|
|
+ component: 'DatePicker',
|
|
|
+ componentProps: {
|
|
|
+ //日期格式化,页面上显示的值
|
|
|
+ format: 'YYYY-MM-DD',
|
|
|
+ //返回值格式化(绑定值的格式)
|
|
|
+ valueFormat: 'YYYY-MM-DD 00:00:00',
|
|
|
+ },
|
|
|
+ defaultValue: dayjs().add(-30, 'day').format('YYYY-MM-DD'),
|
|
|
+ colProps: { span: 6 },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'endTime',
|
|
|
+ label: '结束日期',
|
|
|
+ component: 'DatePicker',
|
|
|
+ componentProps: {
|
|
|
+ //日期格式化,页面上显示的值
|
|
|
+ format: 'YYYY-MM-DD',
|
|
|
+ //返回值格式化(绑定值的格式)
|
|
|
+ valueFormat: 'YYYY-MM-DD 23:59:59',
|
|
|
+ },
|
|
|
+ defaultValue: dayjs().format('YYYY-MM-DD'),
|
|
|
+ colProps: { span: 6 },
|
|
|
+ },
|
|
|
],
|
|
|
showAdvancedButton: false,
|
|
|
schemaGroupNames: ['常规查询'],
|
|
|
@@ -157,7 +173,6 @@
|
|
|
name: '历史数据',
|
|
|
params: {
|
|
|
alarmType: 'lateReport',
|
|
|
- goafId,
|
|
|
},
|
|
|
},
|
|
|
});
|