From 0439ad29ba37337dc9a4d952dfacde665dc7c797 Mon Sep 17 00:00:00 2001 From: Lesan <1960681385@qq.com> Date: Mon, 17 Mar 2025 08:55:19 +0800 Subject: [PATCH 01/10] =?UTF-8?q?feat:=20=E4=BB=BB=E5=8A=A1=E5=89=8D?= =?UTF-8?q?=E5=90=8E=E7=BD=AE=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bpm/model/form/ExtraSettings.vue | 86 ++++++++++++++++++++-- 1 file changed, 81 insertions(+), 5 deletions(-) diff --git a/src/views/bpm/model/form/ExtraSettings.vue b/src/views/bpm/model/form/ExtraSettings.vue index 3c8e689b..fa6947d4 100644 --- a/src/views/bpm/model/form/ExtraSettings.vue +++ b/src/views/bpm/model/form/ExtraSettings.vue @@ -148,7 +148,7 @@
流程启动后通知
@@ -168,9 +168,9 @@
-
流程启动后通知
+
流程结束后通知
+ + +
+
+ +
任务执行时通知
+
+ +
+
+ + +
+
+ +
任务结束后通知
+
+ +
+
@@ -248,7 +288,7 @@ const numberExample = computed(() => { /** 是否开启流程前置通知 */ const processBeforeTriggerEnable = ref(false) -const handlePreProcessNotifyEnableChange = (val: boolean | string | number) => { +const handleProcessBeforeTriggerEnableChange = (val: boolean | string | number) => { if (val) { modelData.value.processBeforeTriggerSetting = { url: '', @@ -263,7 +303,7 @@ const handlePreProcessNotifyEnableChange = (val: boolean | string | number) => { /** 是否开启流程后置通知 */ const processAfterTriggerEnable = ref(false) -const handlePostProcessNotifyEnableChange = (val: boolean | string | number) => { +const handleProcessAfterTriggerEnableChange = (val: boolean | string | number) => { if (val) { modelData.value.processAfterTriggerSetting = { url: '', @@ -276,6 +316,36 @@ const handlePostProcessNotifyEnableChange = (val: boolean | string | number) => } } +/** 是否开启任务前置通知 */ +const taskBeforeTriggerEnable = ref(false) +const handleTaskBeforeTriggerEnableChange = (val: boolean | string | number) => { + if (val) { + modelData.value.taskBeforeTriggerSetting = { + url: '', + header: [], + body: [], + response: [] + } + } else { + modelData.value.taskBeforeTriggerSetting = null + } +} + +/** 是否开启任务后置通知 */ +const taskAfterTriggerEnable = ref(false) +const handleTaskAfterTriggerEnableChange = (val: boolean | string | number) => { + if (val) { + modelData.value.taskAfterTriggerSetting = { + url: '', + header: [], + body: [], + response: [] + } + } else { + modelData.value.taskAfterTriggerSetting = null + } +} + /** 表单选项 */ const formField = ref>([]) const formFieldOptions4Title = computed(() => { @@ -341,6 +411,12 @@ const initData = () => { if (modelData.value.processAfterTriggerSetting) { processAfterTriggerEnable.value = true } + if (modelData.value.taskBeforeTriggerSetting) { + taskBeforeTriggerEnable.value = true + } + if (modelData.value.taskAfterTriggerSetting) { + taskAfterTriggerEnable.value = true + } } defineExpose({ initData }) From 1b3cbfc8819fe03510d41bcc6b84f9f78707cc70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E5=A8=81?= Date: Mon, 17 Mar 2025 15:33:11 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E3=80=90Simple=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E3=80=91=E6=B5=81=E7=A8=8B=E6=A8=A1=E5=9E=8B->?= =?UTF-8?q?=E5=9F=BA=E6=9C=AC=E4=BF=A1=E6=81=AF->=E8=B0=81=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E5=8F=91=E8=B5=B7=EF=BC=8C=E6=94=AF=E6=8C=81=E6=8C=87?= =?UTF-8?q?=E5=AE=9A=E5=A4=9A=E4=B8=AA=E9=83=A8=E9=97=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 指定部门可以在部门新增成员后无需重新修改相关流程 # Conflicts: # src/components/SimpleProcessDesignerV2/src/nodes-config/StartUserNodeConfig.vue # src/views/bpm/model/form/index.vue --- src/components/DeptSelectForm/index.vue | 120 ++++++++++++++++++ .../src/SimpleProcessDesigner.vue | 6 + .../src/nodes-config/StartUserNodeConfig.vue | 65 +++++++--- .../bpm/model/CategoryDraggableModel.vue | 15 ++- src/views/bpm/model/form/BasicInfo.vue | 74 ++++++++++- src/views/bpm/model/form/ProcessDesign.vue | 1 + src/views/bpm/model/form/index.vue | 18 ++- src/views/bpm/simple/SimpleModelDesign.vue | 2 + 8 files changed, 279 insertions(+), 22 deletions(-) create mode 100644 src/components/DeptSelectForm/index.vue diff --git a/src/components/DeptSelectForm/index.vue b/src/components/DeptSelectForm/index.vue new file mode 100644 index 00000000..9c6868fa --- /dev/null +++ b/src/components/DeptSelectForm/index.vue @@ -0,0 +1,120 @@ + + + \ No newline at end of file diff --git a/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue b/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue index e9a9b3f5..7823c2f8 100644 --- a/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue +++ b/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue @@ -59,6 +59,11 @@ const props = defineProps({ startUserIds: { type: Array, required: false + }, + // 可发起流程的部门编号 + startDeptIds: { + type: Array, + required: false } }) @@ -82,6 +87,7 @@ provide('deptList', deptOptions) provide('userGroupList', userGroupOptions) provide('deptTree', deptTreeOptions) provide('startUserIds', props.startUserIds) +provide('startDeptIds', props.startDeptIds) provide('tasks', []) provide('processInstance', {}) const message = useMessage() // 国际化 diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/StartUserNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/StartUserNodeConfig.vue index 663b4db0..f1100d24 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes-config/StartUserNodeConfig.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/StartUserNodeConfig.vue @@ -25,21 +25,38 @@ - 全部成员可以发起流程 - - {{ getUserNicknames(startUserIds) }} 可发起流程 - - - - {{ getUserNicknames(startUserIds.slice(0, 2)) }} 等 - {{ startUserIds.length }} 人可发起流程 - - + 全部成员可以发起流程 +
+ + {{ getUserNicknames(startUserIds) }} 可发起流程 + + + + {{ getUserNicknames(startUserIds.slice(0,2)) }} 等 {{ startUserIds.length }} 人可发起流程 + + +
+
+ + {{ getDeptNames(startDeptIds) }} 可发起流程 + + + + {{ getDeptNames(startDeptIds.slice(0,2)) }} 等 {{ startDeptIds.length }} 个部门的人可发起流程 + + +
+
@@ -107,6 +124,7 @@ import { SimpleFlowNode, NodeType, FieldPermissionType, START_USER_BUTTON_SETTING } from '../consts' import { useWatchNode, useDrawer, useNodeName, useFormFieldsPermission } from '../node' import * as UserApi from '@/api/system/user' +import * as DeptApi from '@/api/system/dept' defineOptions({ name: 'StartUserNodeConfig' }) @@ -118,8 +136,12 @@ const props = defineProps({ }) // 可发起流程的用户编号 const startUserIds = inject>('startUserIds') +// 可发起流程的部门编号 +const startDeptIds = inject>('startDeptIds') // 用户列表 const userOptions = inject>('userList') +// 部门列表 +const deptOptions = inject>('deptList') // 抽屉配置 const { settingVisible, closeDrawer, openDrawer } = useDrawer() // 当前节点 @@ -145,6 +167,19 @@ const getUserNicknames = (userIds: number[]): string => { }) return nicknames.join(',') } +const getDeptNames = (deptIds: number[]): string => { + if (!deptIds || deptIds.length === 0) { + return '' + } + const deptNames: string[] = [] + deptIds.forEach((deptId) => { + const found = deptOptions?.value.find((item) => item.id === deptId) + if (found && found.name) { + deptNames.push(found.name) + } + }) + return deptNames.join(',') +} // 保存配置 const saveConfig = async () => { activeTabName.value = 'user' diff --git a/src/views/bpm/model/CategoryDraggableModel.vue b/src/views/bpm/model/CategoryDraggableModel.vue index 4e4c1827..89a3217e 100644 --- a/src/views/bpm/model/CategoryDraggableModel.vue +++ b/src/views/bpm/model/CategoryDraggableModel.vue @@ -97,10 +97,23 @@ From a5c533bff034ffd4e7b87ea9b33dcdb0ef6e4828 Mon Sep 17 00:00:00 2001 From: lizhixian <18210040298@163.com> Date: Fri, 21 Mar 2025 10:24:16 +0800 Subject: [PATCH 04/10] =?UTF-8?q?feat=EF=BC=9A=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=A1=88=E4=BE=8B=E6=B5=81=E7=A8=8B=EF=BC=8C=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E5=8F=91=E8=B5=B7=E6=97=B6=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=AE=A1=E6=89=B9=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bpm/oa/leave/create.vue | 175 +++++++++++++++++------------- 1 file changed, 97 insertions(+), 78 deletions(-) diff --git a/src/views/bpm/oa/leave/create.vue b/src/views/bpm/oa/leave/create.vue index 4160fb03..b0d66f4a 100644 --- a/src/views/bpm/oa/leave/create.vue +++ b/src/views/bpm/oa/leave/create.vue @@ -1,70 +1,75 @@ From 913c995562ecbb826d0db2f0041b888d5795fa11 Mon Sep 17 00:00:00 2001 From: lizhixian <18210040298@163.com> Date: Fri, 21 Mar 2025 11:48:13 +0800 Subject: [PATCH 05/10] =?UTF-8?q?feat=EF=BC=9A=E5=A2=9E=E5=8A=A0=E6=A1=88?= =?UTF-8?q?=E4=BE=8B=E6=B5=81=E7=A8=8B=EF=BC=8C=E4=B8=9A=E5=8A=A1=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E5=8F=91=E8=B5=B7=E6=97=B6=E9=80=89=E6=8B=A9=E5=AE=A1?= =?UTF-8?q?=E6=89=B9=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bpm/oa/leave/create.vue | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/views/bpm/oa/leave/create.vue b/src/views/bpm/oa/leave/create.vue index b0d66f4a..2bd2aa74 100644 --- a/src/views/bpm/oa/leave/create.vue +++ b/src/views/bpm/oa/leave/create.vue @@ -138,12 +138,12 @@ const submitForm = async () => { // 新增 ====== begin ======== /** 获取审批详情 */ -const getApprovalDetail = async (row: any) => { +const getApprovalDetail = async () => { try { const data = await ProcessInstanceApi.getApprovalDetail({ - processDefinitionId: row.id, + processDefinitionId: processDefinitionId.value, activityId: NodeId.START_USER_NODE_ID, - processVariablesStr: row.processVariablesStr // 解决 GET 无法传递对象的问题,后端 String 再转 JSON + processVariablesStr: JSON.stringify({ day: daysDifference() }) // 解决 GET 无法传递对象的问题,后端 String 再转 JSON }) if (!data) { @@ -178,6 +178,13 @@ const getApprovalDetail = async (row: any) => { const selectUserConfirm = (id: string, userList: any[]) => { startUserSelectAssignees.value[id] = userList?.map((item: any) => item.id) } + +// 计算天数差 +const daysDifference = () => { + const oneDay = 24 * 60 * 60 * 1000 // 一天的毫秒数 + const diffTime = Math.abs(Number(formData.value.endTime) - Number(formData.value.startTime)) + return Math.floor(diffTime / oneDay) +} // 新增 ====== end ======== /** 初始化 */ @@ -194,15 +201,12 @@ onMounted(async () => { processDefinitionId.value = processDefinitionDetail.id startUserSelectTasks.value = processDefinitionDetail.startUserSelectTasks // 新增 ====== begin ======== - // 查询流程预测节点 - getApprovalDetail({ - id: processDefinitionId.value, - processVariablesStr: JSON.stringify(formData.value) - }) + // 加载最新的审批详情,主要用于节点预测 + getApprovalDetail() // 新增 ====== end ======== }) // 新增 ====== begin ======== -/** 预测流程节点会因为输入的参数值而产生新的预测结果值,所以需重新预测一次 */ +/** 预测流程节点会因为输入的参数值而产生新的预测结果值,所以需重新预测一次, formData.value可改成实际业务中的特定字段 */ watch( formData.value, (newValue, oldValue) => { @@ -213,11 +217,8 @@ watch( // 记录之前的节点审批人 tempStartUserSelectAssignees.value = startUserSelectAssignees.value startUserSelectAssignees.value = {} - // 加载最新的审批详情 - getApprovalDetail({ - id: processDefinitionId.value, - processVariablesStr: JSON.stringify(newValue) // 解决 GET 无法传递对象的问题,后端 String 再转 JSON - }) + // 加载最新的审批详情,主要用于节点预测 + getApprovalDetail() } }, { From a186806456cbf625196e42ff39fd216aba9c0ec0 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 23 Mar 2025 07:54:42 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E3=80=91BPM=EF=BC=9AOA=20=E8=AF=B7=E5=81=87=E7=95=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bpm/oa/leave/create.vue | 72 ++++++++++++++++--------------- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/src/views/bpm/oa/leave/create.vue b/src/views/bpm/oa/leave/create.vue index 2bd2aa74..cf4a13e2 100644 --- a/src/views/bpm/oa/leave/create.vue +++ b/src/views/bpm/oa/leave/create.vue @@ -1,8 +1,8 @@ From 7508eb5998b1c14ee598258e6aa151f890201fb1 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 23 Mar 2025 08:58:04 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E3=80=91BPM=EF=BC=9A=E5=88=9B=E5=BB=BA=E6=B5=81?= =?UTF-8?q?=E7=A8=8B-SIMPLE=E8=AE=BE=E8=AE=A1=E5=99=A8-=E5=A4=9A=E4=B8=AA?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E6=97=B6-=E6=9C=80=E6=96=B0=E7=9A=84?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E4=BC=9A=E8=A6=86=E7=9B=96=E4=B8=8A=E5=B1=82?= =?UTF-8?q?=E6=89=80=E6=9C=89=E7=9A=84=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SimpleProcessDesignerV2/src/NodeHandler.vue | 5 +++-- .../src/nodes-config/TriggerNodeConfig.vue | 11 ++++++----- .../src/nodes-config/components/Condition.vue | 3 ++- .../nodes-config/components/ConditionDialog.vue | 7 ++++--- .../src/nodes/ExclusiveNode.vue | 14 +++++++++++--- .../src/nodes/InclusiveNode.vue | 14 +++++++++++--- 6 files changed, 37 insertions(+), 17 deletions(-) diff --git a/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue b/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue index 25e4ed74..439ea980 100644 --- a/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue +++ b/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue @@ -91,6 +91,7 @@ import { DEFAULT_CONDITION_GROUP_VALUE } from './consts' import { generateUUID } from '@/utils' +import { cloneDeep } from 'lodash-es' defineOptions({ name: 'NodeHandler' @@ -184,7 +185,7 @@ const addNode = (type: number) => { conditionSetting: { defaultFlow: false, conditionType: ConditionType.RULE, - conditionGroups: DEFAULT_CONDITION_GROUP_VALUE + conditionGroups: cloneDeep(DEFAULT_CONDITION_GROUP_VALUE) } }, { @@ -242,7 +243,7 @@ const addNode = (type: number) => { conditionSetting: { defaultFlow: false, conditionType: ConditionType.RULE, - conditionGroups: DEFAULT_CONDITION_GROUP_VALUE + conditionGroups: cloneDeep(DEFAULT_CONDITION_GROUP_VALUE) } }, { diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/TriggerNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/TriggerNodeConfig.vue index 19e59438..2baac8d2 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes-config/TriggerNodeConfig.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/TriggerNodeConfig.vue @@ -254,6 +254,7 @@ import { import { useWatchNode, useDrawer, useNodeName, useFormFields, getConditionShowText } from '../node' import HttpRequestSetting from './components/HttpRequestSetting.vue' import ConditionDialog from './components/ConditionDialog.vue' +import { cloneDeep } from 'lodash-es' const { proxy } = getCurrentInstance() as any defineOptions({ @@ -290,7 +291,7 @@ const configForm = ref({ }, formSettings: [ { - conditionGroups: DEFAULT_CONDITION_GROUP_VALUE, + conditionGroups: cloneDeep(DEFAULT_CONDITION_GROUP_VALUE), updateFormFields: {}, deleteFields: [] } @@ -346,7 +347,7 @@ const changeTriggerType = () => { ? originalSetting.formSettings : [ { - conditionGroups: DEFAULT_CONDITION_GROUP_VALUE, + conditionGroups: cloneDeep(DEFAULT_CONDITION_GROUP_VALUE), updateFormFields: {}, deleteFields: [] } @@ -361,7 +362,7 @@ const changeTriggerType = () => { ? originalSetting.formSettings : [ { - conditionGroups: DEFAULT_CONDITION_GROUP_VALUE, + conditionGroups: cloneDeep(DEFAULT_CONDITION_GROUP_VALUE), updateFormFields: undefined, deleteFields: [] } @@ -374,7 +375,7 @@ const changeTriggerType = () => { /** 添加新的修改表单设置 */ const addFormSetting = () => { configForm.value.formSettings!.push({ - conditionGroups: DEFAULT_CONDITION_GROUP_VALUE, + conditionGroups: cloneDeep(DEFAULT_CONDITION_GROUP_VALUE), updateFormFields: {}, deleteFields: [] }) @@ -509,7 +510,7 @@ const showTriggerNodeConfig = (node: SimpleFlowNode) => { }, formSettings: node.triggerSetting.formSettings || [ { - conditionGroups: DEFAULT_CONDITION_GROUP_VALUE, + conditionGroups: cloneDeep(DEFAULT_CONDITION_GROUP_VALUE), updateFormFields: {}, deleteFields: [] } diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/components/Condition.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/components/Condition.vue index 36690848..7ef092d9 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes-config/components/Condition.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/components/Condition.vue @@ -154,6 +154,7 @@ import { } from '../../consts' import { BpmModelFormType } from '@/utils/constants' import { useFormFieldsAndStartUser } from '../../node' +import { cloneDeep } from 'lodash-es' const props = defineProps({ modelValue: { @@ -196,7 +197,7 @@ const formRef = ref() // 表单 Ref const changeConditionType = () => { if (condition.value.conditionType === ConditionType.RULE) { if (!condition.value.conditionGroups) { - condition.value.conditionGroups = DEFAULT_CONDITION_GROUP_VALUE + condition.value.conditionGroups = cloneDeep(DEFAULT_CONDITION_GROUP_VALUE) } } } diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/components/ConditionDialog.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/components/ConditionDialog.vue index 9d6260d5..79816c68 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes-config/components/ConditionDialog.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/components/ConditionDialog.vue @@ -1,5 +1,5 @@ - + - 全部成员可以发起流程 + + 全部成员可以发起流程 +
{{ getUserNicknames(startUserIds) }} 可发起流程 @@ -37,7 +44,8 @@ placement="top" :content="getUserNicknames(startUserIds)" > - {{ getUserNicknames(startUserIds.slice(0,2)) }} 等 {{ startUserIds.length }} 人可发起流程 + {{ getUserNicknames(startUserIds.slice(0, 2)) }} 等 + {{ startUserIds.length }} 人可发起流程
@@ -52,11 +60,11 @@ placement="top" :content="getDeptNames(startDeptIds)" > - {{ getDeptNames(startDeptIds.slice(0,2)) }} 等 {{ startDeptIds.length }} 个部门的人可发起流程 + {{ getDeptNames(startDeptIds.slice(0, 2)) }} 等 + {{ startDeptIds.length }} 个部门可发起流程
-
@@ -170,7 +178,7 @@ const getUserNicknames = (userIds: number[]): string => { const getDeptNames = (deptIds: number[]): string => { if (!deptIds || deptIds.length === 0) { return '' - } + } const deptNames: string[] = [] deptIds.forEach((deptId) => { const found = deptOptions?.value.find((item) => item.id === deptId) diff --git a/src/views/bpm/model/form/index.vue b/src/views/bpm/model/form/index.vue index 2da0db49..42183e4d 100644 --- a/src/views/bpm/model/form/index.vue +++ b/src/views/bpm/model/form/index.vue @@ -94,7 +94,6 @@ import * as FormApi from '@/api/bpm/form' import { CategoryApi, CategoryVO } from '@/api/bpm/category' import * as UserApi from '@/api/system/user' import * as DeptApi from '@/api/system/dept' -import { useUserStoreWithOut } from '@/store/modules/user' import * as DefinitionApi from '@/api/bpm/definition' import { BpmModelFormType, BpmModelType, BpmAutoApproveType } from '@/utils/constants' import BasicInfo from './BasicInfo.vue' @@ -205,14 +204,16 @@ const initData = async () => { data.simpleModel = JSON.parse(data.simpleModel) } formData.value = data - formData.value.startUserType = formData.value.startUserIds?.length > 0 ? 1 : formData.value?.startDeptIds?.length > 0 ? 2 : 0 + formData.value.startUserType = + formData.value.startUserIds?.length > 0 ? 1 : formData.value?.startDeptIds?.length > 0 ? 2 : 0 } else if (['update', 'copy'].includes(actionType)) { // 情况二:修改场景/复制场景 const modelId = route.params.id as string formData.value = await ModelApi.getModel(modelId) - formData.value.startUserType = formData.value.startUserIds?.length > 0 ? 1 : formData.value?.startDeptIds?.length > 0 ? 2 : 0 + formData.value.startUserType = + formData.value.startUserIds?.length > 0 ? 1 : formData.value?.startDeptIds?.length > 0 ? 2 : 0 - // 复制场景 + // 特殊:复制场景 if (route.params.type === 'copy') { delete formData.value.id formData.value.name += '副本' @@ -233,7 +234,7 @@ const initData = async () => { userList.value = await UserApi.getSimpleUserList() // 获取部门列表 deptList.value = await DeptApi.getSimpleDeptList() - + // 最终,设置 currentStep 切换到第一步 currentStep.value = 0 From cf122fa344e86d3df21a07e85ced31ced15be4b5 Mon Sep 17 00:00:00 2001 From: Lesan <1960681385@qq.com> Date: Tue, 25 Mar 2025 11:07:42 +0800 Subject: [PATCH 09/10] =?UTF-8?q?feat:=20=E6=B5=81=E7=A8=8B=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E7=BA=BF=E9=80=82=E9=85=8D=E5=AD=90=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E8=8A=82=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../detail/ProcessInstanceTimeline.vue | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue b/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue index 110b8bd6..9bdbd855 100644 --- a/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue +++ b/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue @@ -37,6 +37,9 @@ {{ getApprovalNodeTime(activity) }}
+
+ 点击跳转子流程 +
{ customApproveUsers.value[activityId] = userList || [] emit('selectUserConfirm', activityId, userList) } + +/** 跳转子流程 */ +const handleChildProcess = (activity: any) => { + push({ + name: 'BpmProcessInstanceDetail', + query: { + id: activity.processInstanceId + } + }) +} From e75dbd67626ef682bbf448413f06789419fec378 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 25 Mar 2025 12:57:56 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84?= =?UTF-8?q?=E5=AE=A1=E3=80=91BPM=EF=BC=9A=E5=AD=90=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bpm/processInstance/detail/ProcessInstanceTimeline.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue b/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue index 9bdbd855..6b80b4e4 100644 --- a/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue +++ b/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue @@ -38,7 +38,9 @@
- 点击跳转子流程 + + 查看子流程 +
{ /** 跳转子流程 */ const handleChildProcess = (activity: any) => { + // TODO @lesan:貌似跳不过去?! push({ name: 'BpmProcessInstanceDetail', query: {