|
@@ -15,7 +15,7 @@
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
<!-- 实时数据表格 -->
|
|
<!-- 实时数据表格 -->
|
|
|
- <BasicTable @register="registerTable" :scroll="{ x: 'max-content' }" :style="{ padding: 0 }">
|
|
|
|
|
|
|
+ <BasicTable @register="registerRealtimeTable" :scroll="{ x: 'max-content' }" :style="{ padding: 0 }">
|
|
|
<!-- 核心:判断record是否有有效数据,无则显示- -->
|
|
<!-- 核心:判断record是否有有效数据,无则显示- -->
|
|
|
<template #action="{ record }">
|
|
<template #action="{ record }">
|
|
|
<div class="action-buttons">
|
|
<div class="action-buttons">
|
|
@@ -27,6 +27,9 @@
|
|
|
</button>
|
|
</button>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
+ <template #resetBefore>
|
|
|
|
|
+ <a-button type="default" class="ml-8px" preIcon="mdi:download" @click="onExportXlsTime"> 导出 </a-button>
|
|
|
|
|
+ </template>
|
|
|
<template #empty>
|
|
<template #empty>
|
|
|
<!-- 无数据时显示-,样式居中对齐 -->
|
|
<!-- 无数据时显示-,样式居中对齐 -->
|
|
|
<span class="empty-placeholder">-</span>
|
|
<span class="empty-placeholder">-</span>
|
|
@@ -59,7 +62,7 @@
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
import { ref } from 'vue';
|
|
import { ref } from 'vue';
|
|
|
- import { BasicTable, useTable } from '/@/components/Table';
|
|
|
|
|
|
|
+ import { BasicTable } from '/@/components/Table';
|
|
|
import { Tabs, TabPane } from 'ant-design-vue';
|
|
import { Tabs, TabPane } from 'ant-design-vue';
|
|
|
import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
|
|
import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
|
|
|
import { SvgIcon } from '/@/components/Icon';
|
|
import { SvgIcon } from '/@/components/Icon';
|
|
@@ -108,36 +111,46 @@
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// 注册实时数据表格
|
|
// 注册实时数据表格
|
|
|
- const [registerTable] = useTable({
|
|
|
|
|
- columns,
|
|
|
|
|
- api: wrappedGetMineData,
|
|
|
|
|
- formConfig: {
|
|
|
|
|
- labelWidth: 120,
|
|
|
|
|
- schemas: [
|
|
|
|
|
- {
|
|
|
|
|
- label: '煤矿名称',
|
|
|
|
|
- field: 'deptId',
|
|
|
|
|
- component: 'MineCascader', // 自定义组件名
|
|
|
|
|
- colProps: { span: 6 },
|
|
|
|
|
- rules: [],
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
- showAdvancedButton: false,
|
|
|
|
|
- schemaGroupNames: ['常规查询'],
|
|
|
|
|
|
|
+ const { tableContext: ctxRealtime, onExportXls: onExportXlsTime } = useListPage({
|
|
|
|
|
+ tableProps: {
|
|
|
|
|
+ columns,
|
|
|
|
|
+ api: wrappedGetMineData,
|
|
|
|
|
+ formConfig: {
|
|
|
|
|
+ labelWidth: 120,
|
|
|
|
|
+ schemas: [
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '煤矿名称',
|
|
|
|
|
+ field: 'deptId',
|
|
|
|
|
+ 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,
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
- 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: 'explosionAlarm',
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
|
|
+ const [registerRealtimeTable] = ctxRealtime;
|
|
|
|
|
|
|
|
// 注册历史数据表格
|
|
// 注册历史数据表格
|
|
|
const { tableContext, onExportXls } = useListPage({
|
|
const { tableContext, onExportXls } = useListPage({
|