fix: 修改表单后字段权限需更新

pull/610/head
Lesan 2024-12-04 15:49:58 +08:00
parent abdaf2e0ca
commit c00e6988a5
2 changed files with 15 additions and 10 deletions

View File

@ -270,17 +270,18 @@ const resetCustomConfigList = () => {
// //
if (formType.value === 10) { if (formType.value === 10) {
fieldsPermissionEl.value = elExtensionElements.value.values?.filter( const fieldsPermissionList = elExtensionElements.value.values?.filter(
(ex) => ex.$type === `${prefix}:FieldsPermission` (ex) => ex.$type === `${prefix}:FieldsPermission`
) )
if (fieldsPermissionEl.value.length === 0) { fieldsPermissionEl.value = []
getNodeConfigFormFields() getNodeConfigFormFields()
fieldsPermissionConfig.value.forEach((el) => { fieldsPermissionConfig.value.forEach((element) => {
fieldsPermissionEl.value.push( element.permission =
bpmnInstances().moddle.create(`${prefix}:FieldsPermission`, el) fieldsPermissionList?.find((obj) => obj.field === element.field)?.permission ?? '1'
) fieldsPermissionEl.value.push(
}) bpmnInstances().moddle.create(`${prefix}:FieldsPermission`, element)
} )
})
} }
// 便 // 便

View File

@ -175,7 +175,11 @@ const resetTaskForm = () => {
// input // input
userTaskForm.value.candidateParam = [candidateParamStr] userTaskForm.value.candidateParam = [candidateParamStr]
} else { } 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 { } else {
userTaskForm.value.candidateParam = [] userTaskForm.value.candidateParam = []