diff --git a/src/views/bpm/processInstance/report/index.vue b/src/views/bpm/processInstance/report/index.vue index a7ab685c..939c0bde 100644 --- a/src/views/bpm/processInstance/report/index.vue +++ b/src/views/bpm/processInstance/report/index.vue @@ -125,7 +125,27 @@ {{ scope.row.formVariables[item.field] ?? '' }} - + + + { } /** 重置按钮操作 */ -// TODO @lesan:动态表单的 search ,无法重置的样子 const resetQuery = () => { queryFormRef.value.resetFields() - queryFormRef.value.formFieldsParams = {} + queryParams.formFieldsParams = {} handleQuery() } +/** 查看详情 */ +const handleDetail = (row) => { + router.push({ + name: 'BpmProcessInstanceDetail', + query: { + id: row.id + } + }) +} + +/** 取消按钮操作 */ +const handleCancel = async (row) => { + // 二次确认 + const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', { + confirmButtonText: t('common.ok'), + cancelButtonText: t('common.cancel'), + inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格 + inputErrorMessage: '取消原因不能为空' + }) + // 发起取消 + await ProcessInstanceApi.cancelProcessInstanceByAdmin(row.id, value) + message.success('取消成功') + // 刷新列表 + await getList() +} + /** 初始化 **/ onMounted(async () => { // 获取流程定义,用于 table column 的展示