流程审核不通过,在我的待办中直接跳转
This commit is contained in:
@@ -1,26 +1,26 @@
|
||||
<template>
|
||||
<!-- 用户投诉 -->
|
||||
<!-- 2 有新增 发起 预警单 -->
|
||||
<!-- 用户投诉 -->
|
||||
<!-- 2 有新增 发起 预警单 -->
|
||||
|
||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||
<template v-slot:operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<!-- 新增 -->
|
||||
<complaintsForm ref="formRef" @onSubmit="tableStore.index()" />
|
||||
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
|
||||
<template v-slot:operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef"/>
|
||||
<!-- 新增 -->
|
||||
<complaintsForm ref="formRef" @onSubmit="tableStore.index()"/>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
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 {ElMessage, ElMessageBox} from 'element-plus'
|
||||
import {useDictData} from '@/stores/dictData'
|
||||
import complaintsForm from './form/complaintsForm.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { sureInitiateWarningLeaflet } from '@/api/process-boot/electricitymanagement'
|
||||
import {useRouter} from 'vue-router'
|
||||
import {sureInitiateWarningLeaflet} from '@/api/process-boot/electricitymanagement'
|
||||
// Steady_Statis
|
||||
const dictData = useDictData()
|
||||
const exceeded = dictData.getBasicData('Steady_Statis')
|
||||
@@ -30,137 +30,138 @@ const formRef = ref()
|
||||
const TableHeaderRef = ref()
|
||||
const router = useRouter() // 路由对象
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/SupervisionUserComplaint/list',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
title: '序号',
|
||||
type: 'seq',
|
||||
align: 'center',
|
||||
width: 60,
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'userName', title: '用户名称' },
|
||||
{ field: 'userNumber', title: '用户编号' },
|
||||
{ field: 'dutyOrgName', title: '负责单位', minWidth: '150' },
|
||||
// { field: 'userCategory', title: '用户类别' },
|
||||
|
||||
{ field: 'complaintText', title: '投诉内容' },
|
||||
{ field: 'steadyIndicator', title: '稳态指标' },
|
||||
{ field: 'transientIndicators', title: '暂态指标' },
|
||||
{
|
||||
field: 'monitorName',
|
||||
title: '监测点名称',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
// {
|
||||
// field: 'monitorNumber',
|
||||
// title: '监测点编号',
|
||||
// formatter: (row: any) => {
|
||||
// return row.cellValue ? row.cellValue : '/'
|
||||
// }
|
||||
// },
|
||||
{
|
||||
field: 'detectionFlag',
|
||||
title: '是否实现监测',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == '0' ? '否' : '是'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '180',
|
||||
align: 'center',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '发起告警单',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.initiateWarningFlag == 1
|
||||
},
|
||||
// popconfirm: {
|
||||
// confirmButtonText: '确认',
|
||||
// cancelButtonText: '取消',
|
||||
// confirmButtonType: 'primary',
|
||||
// title: '请确认发起告警单!'
|
||||
// },
|
||||
click: async row => {
|
||||
const { value } = await ElMessageBox.prompt('', '整改意见', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '请输入整改意见'
|
||||
})
|
||||
sureInitiateWarningLeaflet({ id: row.id, reformAdvice: value }).then(res=>{
|
||||
ElMessage.success('发起告警单成功!')
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '查看告警单',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.initiateWarningFlag == 0
|
||||
},
|
||||
click: row => {
|
||||
router.push({
|
||||
name: 'supervision/supervision/manage',
|
||||
state: {
|
||||
type: 1
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||
url: '/supervision-boot/SupervisionUserComplaint/list',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
title: '序号',
|
||||
type: 'seq',
|
||||
align: 'center',
|
||||
width: 60,
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
loadCallback: () => {
|
||||
// tableStore.table.data = [
|
||||
// {
|
||||
// userName: '东润开阳堡光伏电站用户',
|
||||
// userId: '8115771123274',
|
||||
// complaintContent: '终端频繁重启',
|
||||
// complaintTime: '2024-05-16'
|
||||
// }
|
||||
// ]
|
||||
{field: 'userName', title: '用户名称'},
|
||||
{field: 'userNumber', title: '用户编号'},
|
||||
{field: 'dutyOrgName', title: '负责单位', minWidth: '150'},
|
||||
// { field: 'userCategory', title: '用户类别' },
|
||||
|
||||
{field: 'complaintText', title: '投诉内容'},
|
||||
{field: 'steadyIndicator', title: '稳态指标'},
|
||||
{field: 'transientIndicators', title: '暂态指标'},
|
||||
{
|
||||
field: 'monitorName',
|
||||
title: '监测点名称',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
// {
|
||||
// field: 'monitorNumber',
|
||||
// title: '监测点编号',
|
||||
// formatter: (row: any) => {
|
||||
// return row.cellValue ? row.cellValue : '/'
|
||||
// }
|
||||
// },
|
||||
{
|
||||
field: 'detectionFlag',
|
||||
title: '是否实现监测',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == '0' ? '否' : '是'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '180',
|
||||
align: 'center',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '发起告警单',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.initiateWarningFlag == 1
|
||||
},
|
||||
// popconfirm: {
|
||||
// confirmButtonText: '确认',
|
||||
// cancelButtonText: '取消',
|
||||
// confirmButtonType: 'primary',
|
||||
// title: '请确认发起告警单!'
|
||||
// },
|
||||
click: async row => {
|
||||
const {value} = await ElMessageBox.prompt('', '整改意见', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '请输入整改意见'
|
||||
})
|
||||
sureInitiateWarningLeaflet({id: row.id, reformAdvice: value}).then(res => {
|
||||
ElMessage.success('发起告警单成功!')
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '查看告警单',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.initiateWarningFlag == 0
|
||||
},
|
||||
click: row => {
|
||||
router.push({
|
||||
name: 'supervision/supervision/manage',
|
||||
query: {
|
||||
type: 1,
|
||||
t: Date.now()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||
},
|
||||
loadCallback: () => {
|
||||
// tableStore.table.data = [
|
||||
// {
|
||||
// userName: '东润开阳堡光伏电站用户',
|
||||
// userId: '8115771123274',
|
||||
// complaintContent: '终端频繁重启',
|
||||
// complaintTime: '2024-05-16'
|
||||
// }
|
||||
// ]
|
||||
}
|
||||
})
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
tableStore.index()
|
||||
})
|
||||
// 新增
|
||||
const add = () => {
|
||||
formRef.value.open({ text: '新增投诉' })
|
||||
formRef.value.open({text: '新增投诉'})
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user