From c00e6988a511e1d0411255151a3057c2dcd45ac5 Mon Sep 17 00:00:00 2001 From: Lesan <1960681385@qq.com> Date: Wed, 4 Dec 2024 15:49:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E5=90=8E=E5=AD=97=E6=AE=B5=E6=9D=83=E9=99=90=E9=9C=80=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../custom-config/components/UserTask.vue | 19 ++++++++++--------- .../penal/task/task-components/UserTask.vue | 6 +++++- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/components/bpmnProcessDesigner/package/penal/custom-config/components/UserTask.vue b/src/components/bpmnProcessDesigner/package/penal/custom-config/components/UserTask.vue index eb1c218c..4e1e3f14 100644 --- a/src/components/bpmnProcessDesigner/package/penal/custom-config/components/UserTask.vue +++ b/src/components/bpmnProcessDesigner/package/penal/custom-config/components/UserTask.vue @@ -270,17 +270,18 @@ const resetCustomConfigList = () => { // 字段权限 if (formType.value === 10) { - fieldsPermissionEl.value = elExtensionElements.value.values?.filter( + const fieldsPermissionList = elExtensionElements.value.values?.filter( (ex) => ex.$type === `${prefix}:FieldsPermission` ) - if (fieldsPermissionEl.value.length === 0) { - getNodeConfigFormFields() - fieldsPermissionConfig.value.forEach((el) => { - fieldsPermissionEl.value.push( - bpmnInstances().moddle.create(`${prefix}:FieldsPermission`, el) - ) - }) - } + fieldsPermissionEl.value = [] + getNodeConfigFormFields() + fieldsPermissionConfig.value.forEach((element) => { + element.permission = + fieldsPermissionList?.find((obj) => obj.field === element.field)?.permission ?? '1' + fieldsPermissionEl.value.push( + bpmnInstances().moddle.create(`${prefix}:FieldsPermission`, element) + ) + }) } // 保留剩余扩展元素,便于后面更新该元素对应属性 diff --git a/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue b/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue index 3def6a28..ecd6fbf4 100644 --- a/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue +++ b/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue @@ -175,7 +175,11 @@ const resetTaskForm = () => { // 特殊:流程表达式,只有一个 input 输入框 userTaskForm.value.candidateParam = [candidateParamStr] } else { - userTaskForm.value.candidateParam = candidateParamStr.split(',').map((item) => item) + userTaskForm.value.candidateParam = candidateParamStr.split(',').map((item) => { + // 如果数字超出了最大安全整数范围,则将其作为字符串处理 + let num = Number(item) + return num > Number.MAX_SAFE_INTEGER || num < -Number.MAX_SAFE_INTEGER ? item : num + }) } } else { userTaskForm.value.candidateParam = []