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,18 +270,19 @@ 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) {
fieldsPermissionEl.value = []
getNodeConfigFormFields()
fieldsPermissionConfig.value.forEach((el) => {
fieldsPermissionConfig.value.forEach((element) => {
element.permission =
fieldsPermissionList?.find((obj) => obj.field === element.field)?.permission ?? '1'
fieldsPermissionEl.value.push(
bpmnInstances().moddle.create(`${prefix}:FieldsPermission`, el)
bpmnInstances().moddle.create(`${prefix}:FieldsPermission`, element)
)
})
}
}
// 便
otherExtensions.value =

View File

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