fix: 修改表单后字段权限需更新
parent
abdaf2e0ca
commit
c00e6988a5
|
@ -270,18 +270,19 @@ 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) => {
|
||||||
|
element.permission =
|
||||||
|
fieldsPermissionList?.find((obj) => obj.field === element.field)?.permission ?? '1'
|
||||||
fieldsPermissionEl.value.push(
|
fieldsPermissionEl.value.push(
|
||||||
bpmnInstances().moddle.create(`${prefix}:FieldsPermission`, el)
|
bpmnInstances().moddle.create(`${prefix}:FieldsPermission`, element)
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// 保留剩余扩展元素,便于后面更新该元素对应属性
|
// 保留剩余扩展元素,便于后面更新该元素对应属性
|
||||||
otherExtensions.value =
|
otherExtensions.value =
|
||||||
|
|
|
@ -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 = []
|
||||||
|
|
Loading…
Reference in New Issue