mirror of
https://gitee.com/JavaLionLi/plus-ui.git
synced 2025-10-17 07:03:58 +00:00
add 增加下一节点执行人是当前任务处理人自动审批
fix 修复已完成的实例删除失败
This commit is contained in:
@@ -159,7 +159,7 @@
|
|||||||
<!-- 新增/编辑流程定义 -->
|
<!-- 新增/编辑流程定义 -->
|
||||||
<el-dialog v-model="modelDialog.visible" :title="modelDialog.title" width="650px" append-to-body :close-on-click-modal="false">
|
<el-dialog v-model="modelDialog.visible" :title="modelDialog.title" width="650px" append-to-body :close-on-click-modal="false">
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-form ref="defFormRef" :model="form" :rules="rules" label-width="110px">
|
<el-form ref="defFormRef" :model="form" :rules="rules" label-width="120px">
|
||||||
<el-form-item label="流程类别" prop="category">
|
<el-form-item label="流程类别" prop="category">
|
||||||
<el-tree-select
|
<el-tree-select
|
||||||
v-model="form.category"
|
v-model="form.category"
|
||||||
@@ -178,6 +178,15 @@
|
|||||||
<el-form-item label="流程名称" prop="flowName">
|
<el-form-item label="流程名称" prop="flowName">
|
||||||
<el-input v-model="form.flowName" placeholder="请输入流程名称" maxlength="100" show-word-limit />
|
<el-input v-model="form.flowName" placeholder="请输入流程名称" maxlength="100" show-word-limit />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="流程配置">
|
||||||
|
<el-checkbox v-model="autoPass" label="下一节点执行人是当前任务处理人自动审批" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否动态表单" prop="formCustom">
|
||||||
|
<el-radio-group v-model="form.formCustom">
|
||||||
|
<el-radio value="Y" size="large" border>是</el-radio>
|
||||||
|
<el-radio value="N" size="large" border>否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="表单路径" prop="formPath">
|
<el-form-item label="表单路径" prop="formPath">
|
||||||
<el-input v-model="form.formPath" placeholder="请输入表单路径" maxlength="100" show-word-limit />
|
<el-input v-model="form.formPath" placeholder="请输入表单路径" maxlength="100" show-word-limit />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -215,6 +224,7 @@ const uploadDialogLoading = ref(false);
|
|||||||
const processDefinitionList = ref<FlowDefinitionVo[]>([]);
|
const processDefinitionList = ref<FlowDefinitionVo[]>([]);
|
||||||
const categoryOptions = ref<CategoryTreeVO[]>([]);
|
const categoryOptions = ref<CategoryTreeVO[]>([]);
|
||||||
const categoryName = ref('');
|
const categoryName = ref('');
|
||||||
|
const autoPass = ref(false);
|
||||||
/** 部署文件分类选择 */
|
/** 部署文件分类选择 */
|
||||||
const selectCategory = ref();
|
const selectCategory = ref();
|
||||||
const defFormRef = ref<ElFormInstance>();
|
const defFormRef = ref<ElFormInstance>();
|
||||||
@@ -245,6 +255,7 @@ const queryParams = ref<FlowDefinitionQuery>({
|
|||||||
const rules = {
|
const rules = {
|
||||||
category: [{ required: true, message: '分类名称不能为空', trigger: 'blur' }],
|
category: [{ required: true, message: '分类名称不能为空', trigger: 'blur' }],
|
||||||
flowName: [{ required: true, message: '流程定义名称不能为空', trigger: 'blur' }],
|
flowName: [{ required: true, message: '流程定义名称不能为空', trigger: 'blur' }],
|
||||||
|
formCustom: [{ required: true, message: '请选择是否动态表单', trigger: 'change' }],
|
||||||
flowCode: [{ required: true, message: '流程定义编码不能为空', trigger: 'blur' }]
|
flowCode: [{ required: true, message: '流程定义编码不能为空', trigger: 'blur' }]
|
||||||
};
|
};
|
||||||
const initFormData: FlowDefinitionForm = {
|
const initFormData: FlowDefinitionForm = {
|
||||||
@@ -252,7 +263,9 @@ const initFormData: FlowDefinitionForm = {
|
|||||||
flowName: '',
|
flowName: '',
|
||||||
flowCode: '',
|
flowCode: '',
|
||||||
category: '',
|
category: '',
|
||||||
formPath: ''
|
ext: '',
|
||||||
|
formPath: '',
|
||||||
|
formCustom: ''
|
||||||
};
|
};
|
||||||
//流程定义参数
|
//流程定义参数
|
||||||
const form = ref<FlowDefinitionForm>({
|
const form = ref<FlowDefinitionForm>({
|
||||||
@@ -260,7 +273,9 @@ const form = ref<FlowDefinitionForm>({
|
|||||||
flowName: '',
|
flowName: '',
|
||||||
flowCode: '',
|
flowCode: '',
|
||||||
category: '',
|
category: '',
|
||||||
formPath: ''
|
ext: '',
|
||||||
|
formPath: '',
|
||||||
|
formCustom: ''
|
||||||
});
|
});
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getPageList();
|
getPageList();
|
||||||
@@ -478,6 +493,13 @@ const handleUpdate = async (row?: FlowDefinitionVo) => {
|
|||||||
const id = row?.id || ids.value[0];
|
const id = row?.id || ids.value[0];
|
||||||
const res = await getInfo(id);
|
const res = await getInfo(id);
|
||||||
Object.assign(form.value, res.data);
|
Object.assign(form.value, res.data);
|
||||||
|
autoPass.value = false;
|
||||||
|
if (form.value.ext != null && form.value.ext != '') {
|
||||||
|
const extJson = JSON.parse(form.value.ext);
|
||||||
|
if (extJson.autoPass != null && extJson.autoPass != '') {
|
||||||
|
autoPass.value = extJson.autoPass;
|
||||||
|
}
|
||||||
|
}
|
||||||
modelDialog.visible = true;
|
modelDialog.visible = true;
|
||||||
modelDialog.title = '修改流程';
|
modelDialog.title = '修改流程';
|
||||||
};
|
};
|
||||||
@@ -486,6 +508,9 @@ const handleSubmit = async () => {
|
|||||||
defFormRef.value.validate(async (valid: boolean) => {
|
defFormRef.value.validate(async (valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
|
const ext = {};
|
||||||
|
ext.autoPass = autoPass.value;
|
||||||
|
form.value.ext = JSON.stringify(ext);
|
||||||
if (form.value.id) {
|
if (form.value.id) {
|
||||||
await edit(form.value).finally(() => (loading.value = false));
|
await edit(form.value).finally(() => (loading.value = false));
|
||||||
} else {
|
} else {
|
||||||
|
@@ -181,7 +181,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { pageByRunning, pageByFinish, deleteByInstanceIds, instanceVariable, invalid, updateVariable } from '@/api/workflow/instance';
|
import {
|
||||||
|
pageByRunning,
|
||||||
|
pageByFinish,
|
||||||
|
deleteByInstanceIds,
|
||||||
|
deleteHisByInstanceIds,
|
||||||
|
instanceVariable,
|
||||||
|
invalid,
|
||||||
|
updateVariable
|
||||||
|
} from '@/api/workflow/instance';
|
||||||
import { categoryTree } from '@/api/workflow/category';
|
import { categoryTree } from '@/api/workflow/category';
|
||||||
import { CategoryTreeVO } from '@/api/workflow/category/types';
|
import { CategoryTreeVO } from '@/api/workflow/category/types';
|
||||||
import { FlowInstanceQuery, FlowInstanceVO } from '@/api/workflow/instance/types';
|
import { FlowInstanceQuery, FlowInstanceVO } from '@/api/workflow/instance/types';
|
||||||
@@ -346,7 +354,7 @@ const handleDelete = async (row: FlowInstanceVO) => {
|
|||||||
await deleteByInstanceIds(instanceIdList).finally(() => (loading.value = false));
|
await deleteByInstanceIds(instanceIdList).finally(() => (loading.value = false));
|
||||||
getProcessInstanceRunningList();
|
getProcessInstanceRunningList();
|
||||||
} else {
|
} else {
|
||||||
await deleteByInstanceIds(instanceIdList).finally(() => (loading.value = false));
|
await deleteHisByInstanceIds(instanceIdList).finally(() => (loading.value = false));
|
||||||
getProcessInstanceFinishList();
|
getProcessInstanceFinishList();
|
||||||
}
|
}
|
||||||
proxy?.$modal.msgSuccess('删除成功');
|
proxy?.$modal.msgSuccess('删除成功');
|
||||||
|
Reference in New Issue
Block a user