|
|
@@ -56,182 +56,182 @@
|
|
|
</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 { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
|
|
|
- tableProps: {
|
|
|
- columns,
|
|
|
- api: getProvinceAlarm,
|
|
|
- formConfig: {
|
|
|
- labelWidth: 120,
|
|
|
- schemas: [
|
|
|
- {
|
|
|
- label: '煤矿名称',
|
|
|
- field: 'mineCodeList', // 对应组件的value.mineCode(最终传给Table的查询参数)
|
|
|
- component: 'MineCascader', // 自定义组件名
|
|
|
- colProps: { span: 6 },
|
|
|
- rules: [],
|
|
|
- },
|
|
|
- ],
|
|
|
- showAdvancedButton: false,
|
|
|
- schemaGroupNames: ['常规查询'],
|
|
|
+ const boardData = ref([
|
|
|
+ {
|
|
|
+ label: '老空区数量',
|
|
|
+ value: '-',
|
|
|
},
|
|
|
- pagination: true,
|
|
|
- striped: true,
|
|
|
- useSearchForm: true,
|
|
|
- bordered: true,
|
|
|
- showIndexColumn: false,
|
|
|
- actionColumn: {
|
|
|
- width: 80,
|
|
|
- title: '详情',
|
|
|
- dataIndex: 'action',
|
|
|
- slots: { customRender: 'action' },
|
|
|
- fixed: undefined,
|
|
|
+ {
|
|
|
+ label: '可以启封',
|
|
|
+ value: '-',
|
|
|
},
|
|
|
- },
|
|
|
- exportConfig: {
|
|
|
- url: '/ventanaly-province/province/alarm/exportProvinceAlarmReal',
|
|
|
- name: '火区密闭启封判定',
|
|
|
- params: {
|
|
|
- alarmType: 'unsealAlarm',
|
|
|
+ {
|
|
|
+ label: '不可启封',
|
|
|
+ value: '-',
|
|
|
},
|
|
|
- },
|
|
|
-});
|
|
|
-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);
|
|
|
+ // 注册实时数据表格
|
|
|
+ const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
|
|
|
+ tableProps: {
|
|
|
+ columns,
|
|
|
+ api: getProvinceAlarm,
|
|
|
+ formConfig: {
|
|
|
+ labelWidth: 120,
|
|
|
+ schemas: [
|
|
|
+ {
|
|
|
+ label: '煤矿名称',
|
|
|
+ field: 'mineCodeList', // 对应组件的value.mineCode(最终传给Table的查询参数)
|
|
|
+ component: 'MineCascader', // 自定义组件名
|
|
|
+ colProps: { span: 6 },
|
|
|
+ rules: [],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ showAdvancedButton: false,
|
|
|
+ schemaGroupNames: ['常规查询'],
|
|
|
+ },
|
|
|
+ pagination: true,
|
|
|
+ striped: true,
|
|
|
+ useSearchForm: true,
|
|
|
+ bordered: true,
|
|
|
+ showIndexColumn: false,
|
|
|
+ actionColumn: {
|
|
|
+ width: 80,
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'action',
|
|
|
+ slots: { customRender: 'action' },
|
|
|
+ fixed: undefined,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ exportConfig: {
|
|
|
+ url: '/ventanaly-province/province/alarm/exportProvinceAlarmReal',
|
|
|
+ name: '火区密闭启封判定',
|
|
|
+ params: {
|
|
|
+ alarmType: 'unsealAlarm',
|
|
|
+ },
|
|
|
},
|
|
|
- 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 [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: [],
|
|
|
},
|
|
|
- colProps: { span: 6 },
|
|
|
- rules: [],
|
|
|
- },
|
|
|
- ...historicalFormSchema,
|
|
|
- ],
|
|
|
- showAdvancedButton: false,
|
|
|
- schemaGroupNames: ['常规查询'],
|
|
|
+ ...historicalFormSchema,
|
|
|
+ ],
|
|
|
+ showAdvancedButton: false,
|
|
|
+ schemaGroupNames: ['常规查询'],
|
|
|
+ },
|
|
|
+ pagination: true,
|
|
|
+ striped: true,
|
|
|
+ useSearchForm: true,
|
|
|
+ bordered: true,
|
|
|
+ showIndexColumn: true,
|
|
|
+ showActionColumn: false,
|
|
|
},
|
|
|
- pagination: true,
|
|
|
- striped: true,
|
|
|
- useSearchForm: true,
|
|
|
- bordered: true,
|
|
|
- showIndexColumn: true,
|
|
|
- showActionColumn: false,
|
|
|
- },
|
|
|
- exportConfig: {
|
|
|
- url: '/province/alarm/exportProvinceAlarmHistory',
|
|
|
- name: '历史数据',
|
|
|
- params: {
|
|
|
- alarmType: 'unsealAlarm',
|
|
|
- goafId,
|
|
|
+ exportConfig: {
|
|
|
+ url: '/province/alarm/exportProvinceAlarmHistory',
|
|
|
+ name: '历史数据',
|
|
|
+ params: {
|
|
|
+ alarmType: 'unsealAlarm',
|
|
|
+ goafId,
|
|
|
+ },
|
|
|
},
|
|
|
- },
|
|
|
-});
|
|
|
+ });
|
|
|
|
|
|
-const [registerHistoryTable, historyTable] = tableContext;
|
|
|
+ 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;
|
|
|
-}
|
|
|
+ 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>
|