添加干扰源用户台账流程

This commit is contained in:
GGJ
2024-09-12 11:23:41 +08:00
parent 28d9af0cb4
commit 33d7304c54
2 changed files with 123 additions and 13 deletions

View File

@@ -48,13 +48,16 @@ import { ElMessage, ElMessageBox } from 'element-plus'
import addForm from '@/views/pqs/supervise/interfere/components/undocumented/addForm.vue'
import SensitiveUserPopup from './sensitiveUserPopup.vue'
import { useDictData } from '@/stores/dictData'
import { useRouter } from 'vue-router'
import { downloadSensitiveReportTemplate } from '@/api/supervision-boot/userReport/form'
import DetailInfo from '../../interfere/components/undocumented/detail.vue'
import { cancelFormData } from '@/api/supervision-boot/interfere/index'
const addForms = ref()
const dictData = useDictData()
const sensitiveUserPopup = ref()
const TableHeaderRef = ref()
const areaOptionList = dictData.getBasicData('jibei_area')
const { push, options, currentRoute } = useRouter()
import { useAdminInfo } from '@/stores/adminInfo'
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
@@ -76,7 +79,7 @@ const tableStore = new TableStore({
return getUserTypeName(userType)
}
},
{ field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
{
field: 'userStatus',
@@ -96,6 +99,26 @@ const tableStore = new TableStore({
3: '退运'
}
},
{
field: 'status',
title: '流程状态',
minWidth: 100,
render: 'tag',
custom: {
0: 'warning',
1: 'primary',
2: 'success',
3: 'danger',
4: 'warning'
},
replaceValue: {
0: '待提交审批',
1: '审批中',
2: '审批通过',
3: '审批不通过',
4: '已取消'
}
},
{
field: 'createBy',
title: '填报人',
@@ -121,26 +144,73 @@ const tableStore = new TableStore({
lookInfo(row.id)
}
},
{
name: 'productSetting',
title: '流程详情',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return !row.processInstanceId
},
click: row => {
handleAudit(row.processInstanceId, row.historyInstanceId)
}
},
{
name: 'edit',
title: '编辑',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
showDisabled: row => {
return (
(row.city != adminInfo.$state.deptName && row.createBy != adminInfo.$state.id) ||
!(row.dataType == 1)
)
// showDisabled: row => {
// return (
// (row.city != adminInfo.$state.deptName && row.createBy != adminInfo.$state.id) ||
// !(row.dataType == 1)
// )
// },
disabled: row => {
return !(row.status == 0)
},
click: row => {
addForms.value.filterUsers([6])
addForms.value.open({
title: '编辑',
row: row
})
}
},
{
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 => {
addForms.value.setcontroFlag()
addForms.value.open({
title: '重新发起',
row: 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)
}
}
]
}
@@ -170,6 +240,38 @@ provide('tableStore', tableStore)
onMounted(() => {
tableStore.index()
})
/**取消流程操作*/
const cancelLeave = async (row: any) => {
// 二次确认
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '取消原因不能为空'
})
// 发起取消
let data = {
id: row.id,
processInstanceId: row.processInstanceId,
dataType: 1,
reason: value
}
await cancelFormData(data)
ElMessage.success('取消成功')
// 加载数据
tableStore.index()
}
/** 处理审批按钮 */
const handleAudit = (instanceId: any, historyInstanceId: any) => {
push({
name: 'BpmProcessInstanceDetail',
state: {
id: instanceId,
historyInstanceId
}
})
}
// 新增
const addFormModel = () => {
addForms.value.filterUsers([6])