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