修改流程状态

This commit is contained in:
GGJ
2024-06-19 11:28:18 +08:00
parent 71ce755919
commit c496a13617
15 changed files with 247 additions and 209 deletions

View File

@@ -29,6 +29,7 @@ export const useDictData = defineStore(
const statusSelect = () => {
return [
{ name: '待提交审批', id: 0 },
{ name: '审批中', id: 1 },
{ name: '审批通过', id: 2 },
{ name: '审批不通过', id: 3 },

View File

@@ -45,7 +45,9 @@ const tableStore = new TableStore({
},
{ field: 'userName', title: '用户名称' },
{ field: 'userNumber', title: '用户编号' },
{ field: 'dutyOrgName', title: '负责单位', minWidth: '150' },
// { field: 'userCategory', title: '用户类别' },
{ field: 'complaintText', title: '投诉内容' },
{ field: 'steadyIndicator', title: '稳态指标' },
{ field: 'transientIndicators', title: '暂态指标' },
@@ -89,20 +91,28 @@ const tableStore = new TableStore({
title: '发起告警单',
type: 'warning',
icon: 'el-icon-Open',
render: 'confirmButton',
render: 'basicButton',
disabled: row => {
return row.initiateWarningFlag == 1
},
popconfirm: {
confirmButtonText: '确认',
cancelButtonText: '取消',
confirmButtonType: 'primary',
title: '请确认发起告警单!'
},
click: row => {
sureInitiateWarningLeaflet({ id: row.id })
ElMessage.success('发起告警单成功!')
tableStore.index()
// 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 })
// ElMessage.success('发起告警单成功!')
// tableStore.index()
}
},
{
@@ -117,8 +127,8 @@ const tableStore = new TableStore({
click: row => {
router.push({
name: 'supervision/supervision/manage',
state:{
type:1
state: {
type: 1
}
})
}

View File

@@ -53,6 +53,7 @@ const tableStore = new TableStore({
},
{ field: 'sustationName', title: '变电站名称', width: 170 },
{ field: 'barName', title: '母线名称', width: 170 },
{ field: 'dutyOrgName', title: '负责单位', minWidth: '150' },
{ field: 'measurementPointName', title: '监测点名称', width: 170 },
{ field: 'voltageLevel', title: '电压等级', width: 170 },
{ field: 'loadType', title: '监测点对象类型', width: 170 },

View File

@@ -206,6 +206,7 @@ const cancelLeave = async (row: any) => {
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '取消原因不能为空'
})

View File

@@ -165,10 +165,7 @@ const tableStore = new TableStore({
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return (
row.createBy != adminInfo.$state.id ||
!(row.status == 3 || row.status == 4 )
)
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
},
click: row => {
planTestRef.value.open('重新发起计划测试', row.id, false)
@@ -228,6 +225,7 @@ const cancelLeave = async (row: any) => {
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '取消原因不能为空'
})

View File

@@ -61,7 +61,9 @@ const dictData = useDictData()
const { push, options, currentRoute } = useRouter()
const TableHeaderRef = ref()
const tableRef = ref()
const areaOptionList = dictData.getBasicData('jibei_area').filter(item => !(item.name == '超高压' || item.name == '风光储'))
const areaOptionList = dictData
.getBasicData('jibei_area')
.filter(item => !(item.name == '超高压' || item.name == '风光储'))
const statusSelect = dictData.statusSelect()
const addRef = ref()
const AuditRef = ref()
@@ -155,6 +157,9 @@ const tableStore = new TableStore({
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return row.processInstanceId == null
},
click: row => {
flag.value = true
handleAudit(row.processInstanceId, row.historyInstanceId)
@@ -167,7 +172,7 @@ const tableStore = new TableStore({
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || !(row.status == 0 )
return row.createBy != adminInfo.$state.id || !(row.status == 0)
},
click: row => {
addForms.value.open({
@@ -219,7 +224,7 @@ tableStore.table.params.projectName = ''
tableStore.table.params.loadType = ''
tableStore.table.params.userName = ''
tableStore.table.params.fileUploadflag = ''
tableStore.table.params.status=''
tableStore.table.params.status = ''
provide('tableStore', tableStore)
// 新增
@@ -261,6 +266,7 @@ const cancelLeave = async (row: any) => {
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '取消原因不能为空'
})

View File

@@ -346,6 +346,7 @@ const cancelLeave = async (row: any) => {
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '取消原因不能为空'
})

View File

@@ -1,35 +1,35 @@
<!--待办事项列表-->
<template>
<div >
<TableHeader date-picker nextFlag>
<template #select>
<el-form-item label="流程状态">
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
<el-option
v-for="item in statusSelect"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</template>
<template #operation>
<el-button icon='el-icon-Plus' type='primary' @click='add'>新增</el-button>
</template>
</TableHeader>
<!--表格-->
<Table ref='tableRef'></Table>
<!--弹框-->
<monitor-quit-popup ref='deviceQuitPopup' />
</div>
<div>
<TableHeader date-picker nextFlag>
<template #select>
<el-form-item label="流程状态">
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
<el-option
v-for="item in statusSelect"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</template>
<template #operation>
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
</template>
</TableHeader>
<!--表格-->
<Table ref="tableRef"></Table>
<!--弹框-->
<monitor-quit-popup ref="deviceQuitPopup" />
</div>
</template>
<script setup lang='ts'>
<script setup lang="ts">
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { onMounted, provide, ref ,watch} from 'vue'
import { onMounted, provide, ref, watch } from 'vue'
import { useRouter } from 'vue-router'
import MonitorQuitPopup from '@/views/pqs/supervise/retire/monitorQuitPopup.vue'
import { ElMessage } from 'element-plus'
@@ -44,64 +44,68 @@ import { useAdminInfo } from '@/stores/adminInfo'
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
defineOptions({
name: 'supervision/retire'
name: 'supervision/retire'
})
const { push, options, currentRoute } = useRouter()
const flag = ref(false)
const deviceQuitPopup = ref()
const tableStore = new TableStore({
url: '/supervision-boot/quitRunningDevice/list',
method: 'POST',
publicHeight:65,
column: [
{
field: 'index',
title: '序号',
width: '60',
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ title: '供电公司', field: 'gdName', minWidth: 130 },
{ title: '变电站', field: 'subName', minWidth: 160 },
{ title: '监测点', field: 'deviceName', minWidth: 200 },
{ title: '退运原因', field: 'propertyNo', minWidth: 160 },
{
title: '变更前状态', field: 'devOriginalStatus', minWidth: 130,
render: 'tag',
custom: {
0: 'success',
1: 'warning',
2: 'danger',
3: 'warning',
4: 'info'
},
replaceValue: {
0: '运行',
1: '检修',
2: '运',
3: '调试',
4: '退运'
}
},
{
field: 'status', title: '流程状态', minWidth: 100,
render: 'tag',
custom: {
1: 'primary',
2: 'success',
3: 'danger',
4: 'warning'
},
replaceValue: {
1: '审批中',
2: '审批通过',
3: '审批不通过',
4: '已取消'
}
},
{ field: 'createTime', title: '开始时间', minWidth: 170 },
{
url: '/supervision-boot/quitRunningDevice/list',
method: 'POST',
publicHeight: 65,
column: [
{
field: 'index',
title: '序号',
width: '60',
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ title: '供电公司', field: 'gdName', minWidth: 130 },
{ title: '变电站', field: 'subName', minWidth: 160 },
{ title: '监测点', field: 'deviceName', minWidth: 200 },
{ title: '退运原因', field: 'propertyNo', minWidth: 160 },
{
title: '变更前状态',
field: 'devOriginalStatus',
minWidth: 130,
render: 'tag',
custom: {
0: 'success',
1: 'warning',
2: 'danger',
3: 'warning',
4: 'info'
},
replaceValue: {
0: '运',
1: '检修',
2: '运',
3: '调试',
4: '退运'
}
},
{
field: 'status',
title: '流程状态',
minWidth: 100,
render: 'tag',
custom: {
1: 'primary',
2: 'success',
3: 'danger',
4: 'warning'
},
replaceValue: {
1: '审批中',
2: '审批通过',
3: '审批不通过',
4: '已取消'
}
},
{ field: 'createTime', title: '开始时间', minWidth: 170 },
{
field: 'createBy',
title: '填报人',
minWidth: 80,
@@ -109,61 +113,61 @@ const tableStore = new TableStore({
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
}
},
{
title: '操作',
align: 'center',
minWidth: '150',
fixed: 'right',
render: 'buttons',
buttons: [
{
name: 'productSetting',
title: '流程详情',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
handleAudit(row.processInstanceId, row.historyInstanceId)
}
},
{
name: 'edit',
title: '重新发起',
type: 'warning',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
},
click: row => {
deviceQuitPopup.value.open('重新发起', row)
}
},
{
name: 'cancel',
title: '取消',
type: 'danger',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || row.status !== 1
},
click: row => {
cancelLeave(row)
}
title: '操作',
align: 'center',
minWidth: '150',
fixed: 'right',
render: 'buttons',
buttons: [
{
name: 'productSetting',
title: '流程详情',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
handleAudit(row.processInstanceId, row.historyInstanceId)
}
},
{
name: 'edit',
title: '重新发起',
type: 'warning',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || !(row.status == 3 || row.status == 4)
},
click: row => {
deviceQuitPopup.value.open('重新发起', row)
}
},
{
name: 'cancel',
title: '取消',
type: 'danger',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || row.status !== 1
},
click: row => {
cancelLeave(row)
}
}
]
}
]
}
],
beforeSearchFun: () => {
// for (let key in tableStore.table.params) {
// if (tableStore.table.params[key] === '') {
// delete tableStore.table.params[key]
// }
],
beforeSearchFun: () => {
// for (let key in tableStore.table.params) {
// if (tableStore.table.params[key] === '') {
// delete tableStore.table.params[key]
// }
// }
tableStore.table.params.deviceType = 2
}
// }
tableStore.table.params.deviceType = 2
}
})
tableStore.table.params.searchValue = ''
tableStore.table.params.status = ''
@@ -171,44 +175,45 @@ provide('tableStore', tableStore)
//新增退运终端信息
const add = () => {
deviceQuitPopup.value.open('新增监测点状态变更')
deviceQuitPopup.value.open('新增监测点状态变更')
}
/** 流程实例详情 */
const handleAudit = (instanceId: string, historyInstanceId: string) => {
push({
name: 'BpmProcessInstanceDetail',
state: {
id: instanceId,
historyInstanceId
}
})
push({
name: 'BpmProcessInstanceDetail',
state: {
id: instanceId,
historyInstanceId
}
})
}
/**取消流程操作*/
const cancelLeave = async (row: any) => {
// 二次确认
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '取消原因不能为空'
})
// 发起取消
let data = {
id: row.id,
processInstanceId: row.processInstanceId,
reason: value
}
await cancelQuitRunningDevice(data)
ElMessage.success('取消成功')
// 加载数据
tableStore.index()
// 二次确认
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '取消原因不能为空'
})
// 发起取消
let data = {
id: row.id,
processInstanceId: row.processInstanceId,
reason: value
}
await cancelQuitRunningDevice(data)
ElMessage.success('取消成功')
// 加载数据
tableStore.index()
}
onMounted(() => {
// 加载数据
tableStore.index()
// 加载数据
tableStore.index()
})
watch(
() => currentRoute.value.path,
@@ -222,5 +227,4 @@ watch(
deep: true
}
)
</script>

View File

@@ -1,6 +1,6 @@
<!--待办事项列表-->
<template>
<div >
<div>
<TableHeader date-picker nextFlag>
<template v-slot:select>
<el-form-item label="流程状态">
@@ -51,7 +51,7 @@ const deviceQuitPopup = ref()
const tableStore = new TableStore({
url: '/supervision-boot/quitRunningDevice/list',
method: 'POST',
publicHeight:65,
publicHeight: 65,
column: [
{
field: 'index',
@@ -214,6 +214,7 @@ const cancelLeave = async (row: any) => {
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '取消原因不能为空'
})

View File

@@ -204,6 +204,7 @@ const cancelLeave = async (row: any) => {
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '取消原因不能为空'
})

View File

@@ -1,15 +1,15 @@
<template>
<TableHeader datePicker nextFlag ref='TableHeaderRef'>
<TableHeader datePicker nextFlag ref="TableHeaderRef">
<!-- <template #operation>-->
<!-- <el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>-->
<!-- <el-button icon="el-icon-Delete" type="primary">删除</el-button>-->
<!-- </template>-->
</TableHeader>
<Table ref='tableRef' />
<Table ref="tableRef" />
<!--弹框-->
<feedback-popup ref='feedbackPopup' />
<feedback-popup ref="feedbackPopup" />
</template>
<script setup lang='ts'>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
@@ -43,7 +43,9 @@ const tableStore = new TableStore({
},
{
field: 'problemType', title: '预警单问题来源', minWidth: '150',
field: 'problemType',
title: '预警单问题来源',
minWidth: '150',
render: 'tag',
custom: {
1: 'warning',
@@ -61,7 +63,9 @@ const tableStore = new TableStore({
{ field: 'dutyOrgName', title: '负责单位', minWidth: '150' },
{ field: 'leafletName', title: '单据名称', minWidth: '150' },
{
field: 'status', title: '流程状态', minWidth: '150',
field: 'status',
title: '流程状态',
minWidth: '150',
render: 'tag',
custom: {
1: 'primary',
@@ -103,7 +107,7 @@ const tableStore = new TableStore({
render: 'basicButton',
click: row => {
// handleAudit(row.processInstanceId)
ElMessage.warning("待打通生成管理系统接口!")
ElMessage.warning('待打通生成管理系统接口!')
}
},
{
@@ -116,8 +120,7 @@ const tableStore = new TableStore({
return row.status !== 5
},
click: row => {
feedbackPopup.value.open('填报反馈单', row.id, row.status, row.issueDetail,row.problemPath)
feedbackPopup.value.open('填报反馈单', row.id, row.status, row.issueDetail, row.problemPath)
}
},
{
@@ -130,7 +133,7 @@ const tableStore = new TableStore({
return row.status == 5
},
click: row => {
handleAudit(row.processInstanceId,row.historyInstanceId)
handleAudit(row.processInstanceId, row.historyInstanceId)
}
},
{
@@ -144,7 +147,15 @@ const tableStore = new TableStore({
},
click: row => {
// deviceQuitPopup.value.open('重新发起', row)
feedbackPopup.value.open('重新发起预警单', row.id, row.status, row.issueDetail,row.problemPath,row.takeStep,row.reportPath)
feedbackPopup.value.open(
'重新发起预警单',
row.id,
row.status,
row.issueDetail,
row.problemPath,
row.takeStep,
row.reportPath
)
}
},
{
@@ -180,6 +191,7 @@ const cancelLeave = async (row: any) => {
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '取消原因不能为空'
})
@@ -195,7 +207,7 @@ const cancelLeave = async (row: any) => {
tableStore.index()
}
/** 流程实例详情 */
const handleAudit = (instanceId: any,historyInstanceId:any) => {
const handleAudit = (instanceId: any, historyInstanceId: any) => {
push({
name: 'BpmProcessInstanceDetail',
query: {
@@ -206,4 +218,4 @@ const handleAudit = (instanceId: any,historyInstanceId:any) => {
}
</script>
<style scoped lang='scss'></style>
<style scoped lang="scss"></style>

View File

@@ -19,7 +19,6 @@
></el-option>
</el-select>
</el-form-item>
</template>
</TableHeader>
<Table ref="tableRef" />
@@ -153,6 +152,7 @@ const tableStore = new TableStore({
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '取消原因不能为空'
})

View File

@@ -1,7 +1,7 @@
<!---终端入网检测-->
<template>
<TableHeader area datePicker nextFlag ref="TableHeaderRef">
<template #select>
<template #select>
<el-form-item label="搜索">
<el-input
v-model="tableStore.table.params.searchValue"
@@ -9,16 +9,16 @@
clearable
></el-input>
</el-form-item>
<el-form-item label="流程状态">
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
<el-option
v-for="item in statusSelect"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="流程状态">
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
<el-option
v-for="item in statusSelect"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</template>
<template #operation>
<!-- <el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button> -->
@@ -52,7 +52,6 @@ const TableHeaderRef = ref()
const tableRef = ref()
const statusSelect = dictData.statusSelect()
const tableStore = new TableStore({
url: '/supervision-boot/tempLinedebug/list',
publicHeight: 65,
@@ -200,7 +199,7 @@ const tableStore = new TableStore({
// tableStore.table.params.relationUserName = tableStore.table.params.userName
}
})
tableStore.table.params.status=''
tableStore.table.params.status = ''
tableStore.table.params.searchValue = ''
// tableStore.table.params.loadType = ''
// tableStore.table.params.userName = ''
@@ -253,6 +252,7 @@ const cancelLeave = async (row: any) => {
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '取消原因不能为空'
})

View File

@@ -178,6 +178,7 @@ const cancelLeave = async (row: any) => {
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '取消原因不能为空'
})

View File

@@ -222,6 +222,7 @@ const cancelLeave = async (row: any) => {
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '取消原因不能为空'
})