业务流程添加重新发起&取消

This commit is contained in:
zhujiyan
2024-06-04 16:54:33 +08:00
parent ed9bce09b3
commit a0c64a4232
19 changed files with 532 additions and 226 deletions

View File

@@ -2,10 +2,7 @@
<TableHeader ref="TableHeaderRef">
<template #select>
<el-form-item label="用户名称">
<el-input
v-model="tableStore.table.params.projectName"
placeholder="请输入用户名称"
></el-input>
<el-input v-model="tableStore.table.params.projectName" placeholder="请输入用户名称"></el-input>
</el-form-item>
<el-form-item label="所属地市">
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所属地市">
@@ -43,9 +40,14 @@ import Audit from './audit.vue'
import addForm from './addForm.vue'
import { useDictData } from '@/stores/dictData'
import { getLoadTypeUserList } from '@/api/process-boot/interference'
import { cancelFormData } from '@/api/supervision-boot/interfere/index'
import { ElMessage } from 'element-plus'
import { ElMessageBox } from 'element-plus/es'
import { useAdminInfo } from '@/stores/adminInfo'
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
const dictData = useDictData()
const { push } = useRouter()
const TableHeaderRef = ref()
const tableRef = ref()
const areaOptionList = dictData.getBasicData('jibei_area')
@@ -141,7 +143,7 @@ const tableStore = new TableStore({
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.status == 1 || row.status == 2
return row.createBy != adminInfo.$state.id || row.status !=3
},
click: row => {
addForms.value.open({
@@ -157,9 +159,11 @@ const tableStore = new TableStore({
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.status == 3 || row.status == 2 || row.status == 4
return row.createBy != adminInfo.$state.id || row.status !=1
},
click: row => {}
click: row => {
cancelLeave(row)
}
}
]
}
@@ -210,6 +214,27 @@ const exportEvent = () => {
})
})
}
/**取消流程操作*/
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 cancelFormData(data)
ElMessage.success('取消成功')
// 加载数据
tableStore.index()
}
onMounted(() => {
tableStore.index()
})
@@ -252,6 +277,4 @@ const getUserTypeName = (userType: any) => {
}
</script>
<style scoped lang="scss">
</style>
<style scoped lang="scss"></style>