|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div class="monitoring-page">
|
|
|
<!-- 新增Tabs组件区分实时/历史数据 -->
|
|
|
- <Tabs v-model:activeKey="activeTab" type="line" style="margin-bottom: 16px">
|
|
|
+ <Tabs v-model:activeKey="activeTab" type="line" class="common-page-tabs">
|
|
|
<TabPane tab="实时监测" key="realtime">
|
|
|
<div class="board-info">
|
|
|
<MiniBoard
|
|
|
@@ -19,8 +19,8 @@
|
|
|
<template #action="{ record }">
|
|
|
<div class="action-buttons">
|
|
|
<!-- 操作按钮 -->
|
|
|
- <button @click="openModal(record, 'detail')" class="action-btn detail-btn" title="操作">
|
|
|
- <span class="action-text">详情</span>
|
|
|
+ <button @click="openModal(record, 'resolved')" class="action-btn resolved-btn" title="已解决">
|
|
|
+ <span class="action-text">解决</span>
|
|
|
</button>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -42,14 +42,15 @@
|
|
|
</Tabs>
|
|
|
<!-- 弹窗组件 -->
|
|
|
<a-modal
|
|
|
- style="top: 30%; left: 170px"
|
|
|
- v-model:visible="visibleModal"
|
|
|
- :width="450"
|
|
|
- title="实时监测数据"
|
|
|
- @ok="handleOkEdit"
|
|
|
+ style="height: 400px"
|
|
|
+ v-model:visible="visibleresolveModal"
|
|
|
+ :width="600"
|
|
|
+ centered
|
|
|
+ title="密闭漏风处理情况"
|
|
|
+ @ok="handleOkEdit()"
|
|
|
@cancel="handleCancelEdit"
|
|
|
>
|
|
|
- <a-table></a-table>
|
|
|
+ <a-textarea style="width: 90%; margin-left: 20px; margin-right: 20px" v-model:value="resolveValue" placeholder="请输入解决情况" :rows="4" />
|
|
|
</a-modal>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -71,6 +72,8 @@ const deviceOptions = ref([]);
|
|
|
const goafOptions = ref([]);
|
|
|
const mineCode = ref('');
|
|
|
const goafId = ref('');
|
|
|
+const visibleresolveModal = ref(false); //解决弹窗状态
|
|
|
+const resolveValue = ref('');
|
|
|
const boardData = ref([
|
|
|
{
|
|
|
label: '存在风险情况数量',
|
|
|
@@ -104,7 +107,7 @@ const [registerTable] = useTable({
|
|
|
schemas: [
|
|
|
{
|
|
|
label: '煤矿名称',
|
|
|
- field: 'mineCode', // 对应组件的value.mineCode(最终传给Table的查询参数)
|
|
|
+ field: 'mineCodeList', // 对应组件的value.mineCode(最终传给Table的查询参数)
|
|
|
component: 'MineCascader', // 自定义组件名
|
|
|
colProps: { span: 6 },
|
|
|
rules: [],
|
|
|
@@ -118,13 +121,13 @@ const [registerTable] = useTable({
|
|
|
useSearchForm: true,
|
|
|
bordered: true,
|
|
|
showIndexColumn: false,
|
|
|
- // actionColumn: {
|
|
|
- // width: 60,
|
|
|
- // title: '操作',
|
|
|
- // dataIndex: 'action',
|
|
|
- // slots: { customRender: 'action' },
|
|
|
- // fixed: undefined,
|
|
|
- // },
|
|
|
+ actionColumn: {
|
|
|
+ width: 80,
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'action',
|
|
|
+ slots: { customRender: 'action' },
|
|
|
+ fixed: undefined,
|
|
|
+ },
|
|
|
});
|
|
|
|
|
|
// 注册历史数据表格
|
|
|
@@ -231,6 +234,9 @@ 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 {
|
|
|
@@ -239,10 +245,10 @@ const openModal = (record, type) => {
|
|
|
}
|
|
|
};
|
|
|
const handleOkEdit = () => {
|
|
|
- visibleModal.value = false;
|
|
|
+ visibleresolveModal.value = false;
|
|
|
};
|
|
|
const handleCancelEdit = () => {
|
|
|
- visibleModal.value = false;
|
|
|
+ visibleresolveModal.value = false;
|
|
|
};
|
|
|
async function fetchAlarmData(id) {
|
|
|
const params = {
|