|
|
@@ -38,7 +38,7 @@
|
|
|
<template #action="{ record }">
|
|
|
<div class="action-buttons">
|
|
|
<button @click="openModal(record, 'history')" class="action-btn">
|
|
|
- <img src="@/assets/images/common/icon-details.svg" class="action-icon" />
|
|
|
+ <SvgIcon name="details" />
|
|
|
</button>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -72,124 +72,124 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import { ref } from 'vue';
|
|
|
-import { BasicTable, useTable } from '/@/components/Table';
|
|
|
-import { Tabs, TabPane } from 'ant-design-vue';
|
|
|
-import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
|
|
|
-// 引入模拟数据
|
|
|
-import { boardData, columns, searchFormSchema, minesData, historicalMinesData } from './pressureDiffAnalysis.data';
|
|
|
+ import { ref } from 'vue';
|
|
|
+ import { BasicTable, useTable } from '/@/components/Table';
|
|
|
+ import { Tabs, TabPane } from 'ant-design-vue';
|
|
|
+ import MiniBoard from '/@/components/Configurable/detail/MiniBoard.vue';
|
|
|
+ import { SvgIcon } from '/@/components/Icon';
|
|
|
+ // 引入模拟数据
|
|
|
+ import { boardData, columns, searchFormSchema, minesData, historicalMinesData } from './pressureDiffAnalysis.data';
|
|
|
|
|
|
-// 激活的Tab页签
|
|
|
-const activeTab = ref('realtime');
|
|
|
-const visibleModal = ref(false);
|
|
|
-const visibleresolveModal = ref(false);
|
|
|
-const resolveValue = ref('');
|
|
|
-// 注册实时数据表格
|
|
|
-const [registerRealtimeTable] = useTable({
|
|
|
- dataSource: minesData,
|
|
|
- columns,
|
|
|
- formConfig: {
|
|
|
- labelWidth: 120,
|
|
|
- schemas: searchFormSchema,
|
|
|
- showAdvancedButton: false,
|
|
|
- },
|
|
|
- pagination: false,
|
|
|
- striped: false,
|
|
|
- useSearchForm: true,
|
|
|
- bordered: true,
|
|
|
- showIndexColumn: false,
|
|
|
- canResize: false,
|
|
|
- actionColumn: {
|
|
|
- width: 120,
|
|
|
- title: '操作',
|
|
|
- dataIndex: 'action',
|
|
|
- slots: { customRender: 'action' },
|
|
|
- fixed: undefined,
|
|
|
- },
|
|
|
-});
|
|
|
+ // 激活的Tab页签
|
|
|
+ const activeTab = ref('realtime');
|
|
|
+ const visibleModal = ref(false);
|
|
|
+ const visibleresolveModal = ref(false);
|
|
|
+ const resolveValue = ref('');
|
|
|
+ // 注册实时数据表格
|
|
|
+ const [registerRealtimeTable] = useTable({
|
|
|
+ dataSource: minesData,
|
|
|
+ columns,
|
|
|
+ formConfig: {
|
|
|
+ labelWidth: 120,
|
|
|
+ schemas: searchFormSchema,
|
|
|
+ showAdvancedButton: false,
|
|
|
+ },
|
|
|
+ pagination: false,
|
|
|
+ striped: false,
|
|
|
+ useSearchForm: true,
|
|
|
+ bordered: true,
|
|
|
+ showIndexColumn: false,
|
|
|
+ canResize: false,
|
|
|
+ actionColumn: {
|
|
|
+ width: 120,
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'action',
|
|
|
+ slots: { customRender: 'action' },
|
|
|
+ fixed: undefined,
|
|
|
+ },
|
|
|
+ });
|
|
|
|
|
|
-// 注册历史数据表格
|
|
|
-const [registerHistoryTable] = useTable({
|
|
|
- dataSource: historicalMinesData,
|
|
|
- columns,
|
|
|
- formConfig: {
|
|
|
- labelWidth: 120,
|
|
|
- schemas: searchFormSchema,
|
|
|
- showAdvancedButton: false,
|
|
|
- },
|
|
|
- pagination: false,
|
|
|
- striped: false,
|
|
|
- useSearchForm: true,
|
|
|
- bordered: true,
|
|
|
- showIndexColumn: false,
|
|
|
- canResize: false,
|
|
|
- actionColumn: {
|
|
|
- width: 120,
|
|
|
- title: '操作',
|
|
|
- dataIndex: 'action',
|
|
|
- slots: { customRender: 'action' },
|
|
|
- fixed: undefined,
|
|
|
- },
|
|
|
-});
|
|
|
+ // 注册历史数据表格
|
|
|
+ const [registerHistoryTable] = useTable({
|
|
|
+ dataSource: historicalMinesData,
|
|
|
+ columns,
|
|
|
+ formConfig: {
|
|
|
+ labelWidth: 120,
|
|
|
+ schemas: searchFormSchema,
|
|
|
+ showAdvancedButton: false,
|
|
|
+ },
|
|
|
+ pagination: false,
|
|
|
+ striped: false,
|
|
|
+ useSearchForm: true,
|
|
|
+ bordered: true,
|
|
|
+ showIndexColumn: false,
|
|
|
+ canResize: false,
|
|
|
+ actionColumn: {
|
|
|
+ width: 120,
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'action',
|
|
|
+ slots: { customRender: 'action' },
|
|
|
+ fixed: undefined,
|
|
|
+ },
|
|
|
+ });
|
|
|
|
|
|
-// 弹窗引用
|
|
|
-const realtimeModalRef = ref(null);
|
|
|
-const historyModalRef = ref(null);
|
|
|
+ // 弹窗引用
|
|
|
+ const realtimeModalRef = ref(null);
|
|
|
+ const historyModalRef = ref(null);
|
|
|
|
|
|
-// 打开弹窗方法(区分实时/历史)
|
|
|
-const openModal = (record, type) => {
|
|
|
- if (type === 'realtime') {
|
|
|
- // 可向实时弹窗传递当前记录数据
|
|
|
- realtimeModalRef.value?.showModal(record);
|
|
|
- } else if (type === 'resolved') {
|
|
|
- visibleresolveModal.value = true;
|
|
|
- record.isResolved = resolveValue.value || '';
|
|
|
- } else if (type === 'detail') {
|
|
|
- visibleModal.value = true;
|
|
|
- } else {
|
|
|
- // 可向历史弹窗传递当前记录数据
|
|
|
- historyModalRef.value?.showModal(record);
|
|
|
- }
|
|
|
-};
|
|
|
-const handleOkEdit = () => {
|
|
|
- visibleresolveModal.value = false;
|
|
|
-};
|
|
|
-const handleCancelEdit = () => {
|
|
|
- visibleresolveModal.value = false;
|
|
|
-};
|
|
|
+ // 打开弹窗方法(区分实时/历史)
|
|
|
+ const openModal = (record, type) => {
|
|
|
+ if (type === 'realtime') {
|
|
|
+ // 可向实时弹窗传递当前记录数据
|
|
|
+ realtimeModalRef.value?.showModal(record);
|
|
|
+ } else if (type === 'resolved') {
|
|
|
+ visibleresolveModal.value = true;
|
|
|
+ record.isResolved = resolveValue.value || '';
|
|
|
+ } else if (type === 'detail') {
|
|
|
+ visibleModal.value = true;
|
|
|
+ } else {
|
|
|
+ // 可向历史弹窗传递当前记录数据
|
|
|
+ historyModalRef.value?.showModal(record);
|
|
|
+ }
|
|
|
+ };
|
|
|
+ const handleOkEdit = () => {
|
|
|
+ visibleresolveModal.value = false;
|
|
|
+ };
|
|
|
+ const handleCancelEdit = () => {
|
|
|
+ visibleresolveModal.value = false;
|
|
|
+ };
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
-.monitoring-page {
|
|
|
- padding: 16px;
|
|
|
-}
|
|
|
-.board-info {
|
|
|
- display: grid;
|
|
|
- grid-template-columns: repeat(5, auto); /* 3列:改5则为5列 */
|
|
|
- gap: auto;
|
|
|
- justify-content: start;
|
|
|
- flex-wrap: wrap;
|
|
|
- box-sizing: border-box;
|
|
|
- background-color: #fff;
|
|
|
- padding: 10px;
|
|
|
- margin: 0 10px;
|
|
|
- gap: 100px;
|
|
|
-}
|
|
|
-.board-item {
|
|
|
- box-sizing: border-box;
|
|
|
-}
|
|
|
-.action-btn {
|
|
|
- cursor: pointer;
|
|
|
- border: none;
|
|
|
- background: transparent;
|
|
|
- padding: 4px;
|
|
|
-}
|
|
|
-.action-icon {
|
|
|
- width: 16px;
|
|
|
- height: 16px;
|
|
|
-}
|
|
|
-.action-text {
|
|
|
- font-size: 12px;
|
|
|
- color: #6398fc;
|
|
|
-}
|
|
|
-</style>
|
|
|
+ .monitoring-page {
|
|
|
+ padding: 16px;
|
|
|
+ }
|
|
|
+ .board-info {
|
|
|
+ display: grid;
|
|
|
+ grid-template-columns: repeat(5, auto); /* 3列:改5则为5列 */
|
|
|
+ gap: auto;
|
|
|
+ justify-content: start;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ box-sizing: border-box;
|
|
|
+ background-color: #fff;
|
|
|
+ padding: 10px;
|
|
|
+ margin: 0 10px;
|
|
|
+ gap: 100px;
|
|
|
+ }
|
|
|
+ .board-item {
|
|
|
+ box-sizing: border-box;
|
|
|
+ }
|
|
|
+ .action-btn {
|
|
|
+ cursor: pointer;
|
|
|
+ border: none;
|
|
|
+ padding: 4px;
|
|
|
+ }
|
|
|
+ .action-icon {
|
|
|
+ width: 16px;
|
|
|
+ height: 16px;
|
|
|
+ }
|
|
|
+ .action-text {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #6398fc;
|
|
|
+ }
|
|
|
+</style>
|