From 8ff63622ecac6c3523073804c12aa0950d72682c Mon Sep 17 00:00:00 2001 From: LesanOuO <1960681385@qq.com> Date: Fri, 24 Jan 2025 13:11:12 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20BPM-=E6=9B=B4=E5=A4=9A=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE-=E6=91=98=E8=A6=81=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bpm/model/form/ExtraSettings.vue | 89 +++++++++++++++++----- src/views/bpm/model/form/index.vue | 6 +- src/views/bpm/processInstance/index.vue | 9 +++ src/views/bpm/task/done/index.vue | 19 +++-- src/views/bpm/task/todo/index.vue | 15 +++- 5 files changed, 108 insertions(+), 30 deletions(-) diff --git a/src/views/bpm/model/form/ExtraSettings.vue b/src/views/bpm/model/form/ExtraSettings.vue index 0af79d9e..82f0ea67 100644 --- a/src/views/bpm/model/form/ExtraSettings.vue +++ b/src/views/bpm/model/form/ExtraSettings.vue @@ -75,12 +75,12 @@ - +
- +
系统默认 展示流程名称
+ + +
+ +
+ + 系统默认 展示表单前 3 个字段 + + 自定义摘要 +
+
+ + + +
+
@@ -174,21 +206,30 @@ const numberExample = computed(() => { }) /** 表单选项 */ -const formField = ref>([]) -const formFieldOptions = computed(() => { +const formField = ref>([]) +const formFieldOptions4Title = computed(() => { + let cloneFormField = formField.value.map((item) => { + return { + label: item.title, + value: item.field + } + }) // 固定添加发起人 ID 字段 - formField.value.unshift({ - field: ProcessVariableEnum.PROCESS_DEFINITION_NAME, - title: '流程名称' + cloneFormField.unshift({ + label: ProcessVariableEnum.PROCESS_DEFINITION_NAME, + value: '流程名称' }) - formField.value.unshift({ - field: ProcessVariableEnum.START_TIME, - title: '发起时间' + cloneFormField.unshift({ + label: ProcessVariableEnum.START_TIME, + value: '发起时间' }) - formField.value.unshift({ - field: ProcessVariableEnum.START_USER_ID, - title: '发起人' + cloneFormField.unshift({ + label: ProcessVariableEnum.START_USER_ID, + value: '发起人' }) + return cloneFormField +}) +const formFieldOptions4Summary = computed(() => { return formField.value.map((item) => { return { label: item.title, @@ -211,12 +252,18 @@ const initData = () => { if (!modelData.value.autoApprovalType) { modelData.value.autoApprovalType = BpmAutoApproveType.NONE } - if (!modelData.value.customTitleSetting) { - modelData.value.customTitleSetting = { + if (!modelData.value.titleSetting) { + modelData.value.titleSetting = { enable: false, title: '' } } + if (!modelData.value.summarySetting) { + modelData.value.summarySetting = { + enable: false, + summary: [] + } + } } defineExpose({ initData }) @@ -224,9 +271,9 @@ defineExpose({ initData }) watch( () => modelData.value.formId, async (newFormId) => { - if (newFormId && modelData.value.formType === BpmModelFormType.CUSTOM) { + if (newFormId && modelData.value.formType === BpmModelFormType.NORMAL) { const data = await FormApi.getForm(newFormId) - const result: Array<{ field: ProcessVariableEnum; title: string }> = [] + const result: Array<{ field: string; title: string }> = [] if (data.fields) { data.fields.forEach((fieldStr: string) => { parseFormFields(JSON.parse(fieldStr), result) diff --git a/src/views/bpm/model/form/index.vue b/src/views/bpm/model/form/index.vue index 2f90b3c0..a7b20a5e 100644 --- a/src/views/bpm/model/form/index.vue +++ b/src/views/bpm/model/form/index.vue @@ -155,9 +155,13 @@ const formData: any = ref({ length: 5 }, autoApprovalType: BpmAutoApproveType.NONE, - customTitleSetting: { + titleSetting: { enable: false, title: '' + }, + summarySetting: { + enable: false, + summary: [] } }) diff --git a/src/views/bpm/processInstance/index.vue b/src/views/bpm/processInstance/index.vue index a47b8bf7..dc071996 100644 --- a/src/views/bpm/processInstance/index.vue +++ b/src/views/bpm/processInstance/index.vue @@ -130,6 +130,15 @@ + + + - + @@ -77,9 +77,9 @@ > - + + + + - + + + + Date: Fri, 24 Jan 2025 13:19:44 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20label=E6=8B=BC=E5=86=99=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bpm/model/form/ExtraSettings.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/bpm/model/form/ExtraSettings.vue b/src/views/bpm/model/form/ExtraSettings.vue index 82f0ea67..182218e3 100644 --- a/src/views/bpm/model/form/ExtraSettings.vue +++ b/src/views/bpm/model/form/ExtraSettings.vue @@ -134,7 +134,7 @@