2024-05-15 21:33:54 +08:00
|
|
|
<template>
|
2024-05-21 16:27:27 +08:00
|
|
|
<TableHeader datePicker ref="TableHeaderRef">
|
2024-05-15 21:33:54 +08:00
|
|
|
|
|
|
|
|
<template #operation>
|
2024-05-21 16:27:27 +08:00
|
|
|
|
|
|
|
|
<!-- <el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>-->
|
|
|
|
|
<!-- <el-button icon="el-icon-Delete" type="primary">删除</el-button>-->
|
|
|
|
|
<!-- <el-button icon="el-icon-Download" type="primary">导出</el-button>-->
|
|
|
|
|
|
2024-05-15 21:33:54 +08:00
|
|
|
</template>
|
|
|
|
|
</TableHeader ref="tableRef">
|
|
|
|
|
<Table ref="tableRef" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 新增 -->
|
|
|
|
|
<listForm ref="listFormRef"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
|
|
|
|
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 { useDictData } from '@/stores/dictData'
|
|
|
|
|
import listForm from "./listForm.vue"
|
|
|
|
|
const dictData = useDictData()
|
|
|
|
|
const tableRef = ref()
|
|
|
|
|
const planAddRef = ref()
|
|
|
|
|
const TableHeaderRef = ref()
|
|
|
|
|
const listFormRef = ref()
|
|
|
|
|
const tableStore = new TableStore({
|
2024-05-21 16:27:27 +08:00
|
|
|
url: '/supervision-boot/warningLeaflet/alarmPageData',
|
2024-05-15 21:33:54 +08:00
|
|
|
publicHeight: 65,
|
|
|
|
|
method: 'POST',
|
|
|
|
|
column: [
|
2024-05-21 16:27:27 +08:00
|
|
|
{
|
2024-05-15 21:33:54 +08:00
|
|
|
title: '序号',
|
|
|
|
|
type: 'seq',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: 60,
|
|
|
|
|
formatter: (row: any) => {
|
|
|
|
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-05-21 16:27:27 +08:00
|
|
|
{ field: 'problemType', title: '告警单问题来源', minWidth: '150',
|
|
|
|
|
render: 'tag',
|
|
|
|
|
custom: {
|
|
|
|
|
1: 'warning',
|
|
|
|
|
2: 'warning',
|
|
|
|
|
3: 'warning',
|
|
|
|
|
4: 'warning'
|
|
|
|
|
},
|
|
|
|
|
replaceValue: {
|
|
|
|
|
1: '技术监督计划',
|
|
|
|
|
2: '在线监测超标问题',
|
|
|
|
|
3: '用户投诉问题',
|
|
|
|
|
4: '现场测试超标问题'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{ field: 'leafletName', title: '单据名称', minWidth: '150' },
|
|
|
|
|
{ field: 'status', title: '告警单状态', minWidth: '150',
|
|
|
|
|
render: 'tag',
|
|
|
|
|
custom: {
|
|
|
|
|
1: 'primary',
|
|
|
|
|
2: 'success',
|
|
|
|
|
3: 'danger',
|
|
|
|
|
4: 'warning',
|
|
|
|
|
5: 'primary',
|
|
|
|
|
},
|
|
|
|
|
replaceValue: {
|
|
|
|
|
1: '审批中',
|
|
|
|
|
2: '审批通过',
|
|
|
|
|
3: '审批不通过',
|
|
|
|
|
4: '已取消',
|
|
|
|
|
5: '待反馈'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{ field: 'createTime', title: '创建时间', minWidth: '150' },
|
2024-05-15 21:33:54 +08:00
|
|
|
{
|
|
|
|
|
title: '操作',
|
|
|
|
|
width: '180',
|
|
|
|
|
align: 'center',
|
|
|
|
|
render: 'buttons',
|
|
|
|
|
fixed: 'right',
|
|
|
|
|
buttons: [
|
|
|
|
|
{
|
|
|
|
|
name: 'productSetting',
|
|
|
|
|
title: '反馈数据',
|
|
|
|
|
type: 'primary',
|
|
|
|
|
icon: 'el-icon-EditPen',
|
|
|
|
|
render: 'basicButton',
|
2024-05-21 16:27:27 +08:00
|
|
|
disabled: row => {
|
|
|
|
|
return row.status !== 5
|
|
|
|
|
},
|
2024-05-15 21:33:54 +08:00
|
|
|
click: row => {
|
|
|
|
|
// planAddRef.value.open('查看计划', row)
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-05-21 16:27:27 +08:00
|
|
|
{
|
|
|
|
|
name: 'productSetting',
|
|
|
|
|
title: '流程详情',
|
|
|
|
|
type: 'primary',
|
|
|
|
|
icon: 'el-icon-EditPen',
|
|
|
|
|
render: 'basicButton',
|
|
|
|
|
disabled: row => {
|
|
|
|
|
return row.status == 5
|
|
|
|
|
},
|
|
|
|
|
click: row => {
|
|
|
|
|
// handleAudit(row.processInstanceId)
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-05-15 21:33:54 +08:00
|
|
|
{
|
|
|
|
|
name: 'edit',
|
2024-05-21 16:27:27 +08:00
|
|
|
title: '重新发起',
|
2024-05-15 21:33:54 +08:00
|
|
|
type: 'warning',
|
|
|
|
|
icon: 'el-icon-Open',
|
|
|
|
|
render: 'basicButton',
|
2024-05-21 16:27:27 +08:00
|
|
|
disabled: row => {
|
|
|
|
|
return row.status == 1 || row.status == 2 || row.status == 4 || row.status == 5
|
|
|
|
|
},
|
2024-05-15 21:33:54 +08:00
|
|
|
click: row => {
|
|
|
|
|
// deviceQuitPopup.value.open('重新发起退运', row)
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-05-21 16:27:27 +08:00
|
|
|
{
|
|
|
|
|
name: 'cancel',
|
|
|
|
|
title: '取消',
|
|
|
|
|
type: 'danger',
|
|
|
|
|
icon: 'el-icon-Open',
|
|
|
|
|
render: 'basicButton',
|
|
|
|
|
disabled: row => {
|
|
|
|
|
return row.status == 3 || row.status == 2 || row.status == 4 || row.status == 5
|
|
|
|
|
},
|
|
|
|
|
click: row => {
|
|
|
|
|
// cancelLeave(row)
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-05-15 21:33:54 +08:00
|
|
|
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
beforeSearchFun: () => {
|
|
|
|
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
|
|
|
|
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
tableStore.table.params.status = ''
|
|
|
|
|
|
|
|
|
|
provide('tableStore', tableStore)
|
|
|
|
|
// 新增计划
|
|
|
|
|
const add = () => {
|
|
|
|
|
// title.value = '普测计划新增'
|
|
|
|
|
listFormRef.value.open('新增告警单')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
tableStore.index()
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss"></style>
|