feat: 审批接口

pull/11/head
lizijiee 1 year ago
parent 55533ff3f9
commit de6e957668

@ -312,12 +312,7 @@ function approvalHandler(items?: any) {
processItems = selectItems.value processItems = selectItems.value
} }
else if (overTask.value) { else if (overTask.value) {
// => => /
cloneItem = clone(overTask.value) cloneItem = clone(overTask.value)
//
// if (!cloneItem.taskId) {
// cloneItem.taskId = "taskIdtaskIdtaskIdtaskIdtaskId"
// }
processItems = [cloneItem] processItems = [cloneItem]
} }
// => => / // => => /
@ -331,31 +326,37 @@ function approvalHandler(items?: any) {
return return
} }
const list: any = []
processItems.forEach((item) => {
list.push({
formId: item.id,
taskId: item.taskId,
taskName: item.fromTaskName,
})
})
const param = {
result: true,
comment: '',
disposeType: '',
disposeTypeId: '',
failCauseId: '',
failCauseName: '',
flowTaskInfoList: list,
}
dialog.info({ dialog.info({
title: '确认提示', title: '确认提示',
content: '确认给该任务审批为【通过】吗?', content: '确认给该任务审批为【通过】吗?',
positiveText: '确定', positiveText: '确定',
negativeText: '取消', negativeText: '取消',
onPositiveClick: () => { onPositiveClick: () => {
approval() doAudit(param)
}, },
onNegativeClick: () => { }, onNegativeClick: () => { },
}) })
} }
function approval() {
const formIds: string[] = processItems.map(item => item.id)
const taskIds: string[] = processItems.map(item => item.taskId)
const tasknames: string[] = processItems.map(item => item.taskname)
const param: ApprovalParam = {
formid: formIds,
taskId: taskIds,
approvd: true,
taskComment: 'approval',
taskname: tasknames,
}
doAudit(param)
}
function doAudit(param: any) { function doAudit(param: any) {
audit(param).then((res) => { audit(param).then((res) => {
const { code } = res const { code } = res

Loading…
Cancel
Save