fix: bugs
parent
c38e983e7b
commit
8b10a6f003
|
@ -47,6 +47,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
|
|||
|
||||
const res = await getRole(data.record.id)
|
||||
const menuRes = await listRoleMenus(data.record.id)
|
||||
res.roleId = data.record.id
|
||||
res.menuIds = menuRes
|
||||
setFieldsValue({ ...res })
|
||||
})
|
||||
|
@ -54,6 +55,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
|
|||
async function handleSubmit() {
|
||||
try {
|
||||
const values = await validate()
|
||||
values.menuIds = values.menuIds.checked
|
||||
setModalProps({ confirmLoading: true })
|
||||
await assignRoleMenu(values)
|
||||
closeModal()
|
||||
|
|
|
@ -45,6 +45,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
|
|||
treeData.value = handleTree(res, 'id')
|
||||
}
|
||||
const res = await getRole(data.record.id)
|
||||
res.roleId = data.record.id
|
||||
setFieldsValue({ ...res })
|
||||
})
|
||||
|
||||
|
|
|
@ -122,8 +122,8 @@ export const formSchema: FormSchema[] = [
|
|||
|
||||
export const menuScopeFormSchema: FormSchema[] = [
|
||||
{
|
||||
label: '编号',
|
||||
field: 'id',
|
||||
label: '角色编号',
|
||||
field: 'roleId',
|
||||
show: false,
|
||||
component: 'Input'
|
||||
},
|
||||
|
@ -149,8 +149,8 @@ export const menuScopeFormSchema: FormSchema[] = [
|
|||
|
||||
export const dataScopeFormSchema: FormSchema[] = [
|
||||
{
|
||||
label: '编号',
|
||||
field: 'id',
|
||||
label: '角色编号',
|
||||
field: 'roleId',
|
||||
show: false,
|
||||
component: 'Input'
|
||||
},
|
||||
|
|
|
@ -55,6 +55,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
|
|||
async function handleSubmit() {
|
||||
try {
|
||||
const values = await validate()
|
||||
values.menuIds = values.menuIds.checked
|
||||
setModalProps({ confirmLoading: true })
|
||||
if (unref(isUpdate)) {
|
||||
await updateTenantPackage(values)
|
||||
|
|
Loading…
Reference in New Issue