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 = []