Commit 788b8752 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix:

parent a56f3ab7
......@@ -232,21 +232,16 @@ const MemberDetail: React.FC<{}> = () => {
}, [getButtonAuth, nodeRecord]);
const handleSubmit = () => {
menuActions.submit().then(async ({ values }) => {
values['imFlag'] = values['imFlag'] ? 1 : 0
setErrors(false)
// 如果未点击过操作权限tab, 则无法获取到actionRef实例, 需补充手动补充回显的ids, 新增的时候如果未设置按钮,则返回空数组
const buttonCheckIds = actionRef.current.selected || (formValue && formValue.ids) || []
const treeCheckIds = treeActions.getSelectKeys()
const menuIds = [...buttonCheckIds, ...treeCheckIds]
if (pageStatus === PageStatus.EDIT) {
await PublicApi.postMemberRoleUpdate({
...values,
memberRoleId: id,
menuIds
})
} else {
await PublicApi.postMemberRoleAdd({
menuActions
.submit()
.then(async ({ values }) => {
setErrors(false);
// 如果未点击过操作权限tab, 则无法获取到actionRef实例, 需补充手动补充回显的ids, 新增的时候如果未设置按钮,则返回空数组
const buttonCheckIds =
actionRef.current.selected || (formValue && formValue.ids) || [];
const treeCheckIds = treeActions.getSelectKeys();
const publicParams = {
...values,
hasImAuth: values.hasImAuth ? 1 : 0,
auth: treeCheckIds.map(v => ({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment