修改 在线监测告警 页面

This commit is contained in:
GGJ
2024-04-07 16:40:16 +08:00
parent 266da2405f
commit 81a1e38344
8 changed files with 273 additions and 68 deletions

View File

@@ -42,13 +42,11 @@
</template>
<template #operation>
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
<el-button icon="el-icon-SuccessFilled" type="primary">归档</el-button>
<el-button icon="el-icon-PieChart" type="primary">历史审核记录</el-button>
</template>
</TableHeader>
<Table ref="tableRef" />
<!-- 新增 -->
<NewlyAdd v-if="showNewlyAdded" @handleClose="handleClose" @onSubmit="" />
<NewlyAdd v-if="showNewlyAdded" @handleClose="handleClose" @onSubmit="beforeClose" />
<!-- 填报 -->
<el-dialog draggable title="填报" v-model="dialogVisible" width="1400px" :before-close="beforeClose">
<Filling ref="FillingRef" @beforeClose="beforeClose" />
@@ -63,7 +61,7 @@ import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { deleteIssues } from '@/api/process-boot/electricitymanagement'
import { deleteIssues, archive } from '@/api/process-boot/electricitymanagement'
import { useDictData } from '@/stores/dictData'
import NewlyAdd from './NewlyAdd.vue'
import Filling from './filling.vue'
@@ -117,16 +115,16 @@ const tableStore: any = new TableStore({
},
{
title: '操作',
width: '150',
width: '180',
render: 'buttons',
buttons: [
{
name: 'edit',
title: '查看',
type: 'primary',
// disabled: row => {
// return !(row.reportProcess != 'Not_Reported' && row.reportProcess != 'Archived')
// },
disabled: row => {
return row.reportProcessStatus == 'Init'
},
icon: 'el-icon-Plus',
render: 'basicButton',
click: async row => {
@@ -139,7 +137,8 @@ const tableStore: any = new TableStore({
disabled: row => {
return (
row.reportProcessStatus == 'Auditt' ||
(row.reportProcess == 'Insights' && row.reportProcessStatus == 'Success')
(row.reportProcess == 'Insights' && row.reportProcessStatus == 'Success') ||
row.reportProcess == 'Archived'
)
},
type: 'primary',
@@ -152,6 +151,39 @@ const tableStore: any = new TableStore({
}, 10)
}
},
{
name: 'edit',
title: '归档',
disabled: row => {
return !(row.reportProcess == 'Insights' && row.reportProcessStatus == 'Success')
},
type: 'primary',
icon: 'el-icon-SuccessFilled',
render: 'basicButton',
popconfirm: {
confirmButtonText: '确认',
cancelButtonText: '取消',
confirmButtonType: 'danger',
title: '确定归档?'
},
click: row => {
archive(row.powerQualityProblemNo).then(() => {
ElMessage.success('归档成功!')
tableStore.index()
})
}
},
{
name: 'edit',
title: '审核记录',
type: 'primary',
disabled: row => {
return row.reportProcessStatus == 'Init'
},
icon: 'el-icon-PieChart',
render: 'basicButton',
click: async row => {}
},
{
name: 'del',
text: '删除',
@@ -164,6 +196,9 @@ const tableStore: any = new TableStore({
confirmButtonType: 'danger',
title: '确定删除?'
},
disabled: row => {
return row.reportProcess == 'Archived'
},
click: row => {
deleteIssues(row.powerQualityProblemNo).then(() => {
ElMessage.success('删除成功')