重写AuditUserFieldsMixin
This commit is contained in:
@@ -7,8 +7,10 @@ export namespace SystemRoleApi {
|
||||
[key: string]: any;
|
||||
id: string;
|
||||
name: string;
|
||||
permissions: [];
|
||||
profile: {
|
||||
create_time: string;
|
||||
permissions: [];
|
||||
remark?: string;
|
||||
status: 0 | 1;
|
||||
};
|
||||
|
||||
@@ -49,7 +49,6 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
fieldName: 'name',
|
||||
label: $t('system.role.roleName'),
|
||||
},
|
||||
{ component: 'Input', fieldName: 'id', label: $t('system.role.id') },
|
||||
{
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
@@ -62,16 +61,6 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
fieldName: 'status',
|
||||
label: $t('system.role.status'),
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'remark',
|
||||
label: $t('system.role.remark'),
|
||||
},
|
||||
{
|
||||
component: 'RangePicker',
|
||||
fieldName: 'createTime',
|
||||
label: $t('system.role.createTime'),
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,6 @@ const [Drawer, drawerApi] = useVbenDrawer({
|
||||
} else {
|
||||
id.value = undefined;
|
||||
}
|
||||
|
||||
if (permissions.value.length === 0) {
|
||||
loadPermissions();
|
||||
}
|
||||
@@ -70,8 +69,7 @@ async function loadPermissions() {
|
||||
loadingPermissions.value = true;
|
||||
try {
|
||||
const res = await getMenuList();
|
||||
console.log(res, 'res')
|
||||
permissions.value = res.items as unknown as DataNode[];
|
||||
permissions.value = res as unknown as DataNode[];
|
||||
} finally {
|
||||
loadingPermissions.value = false;
|
||||
}
|
||||
@@ -99,7 +97,7 @@ function getNodeClass(node: Recordable<any>) {
|
||||
<Drawer :title="getDrawerTitle">
|
||||
<Form>
|
||||
<template #permissions="slotProps">
|
||||
<Spin :spinning="loadingPermissions" wrapper-class-name="w-full">
|
||||
<Spin v-if="permissions.length" :spinning="loadingPermissions" wrapper-class-name="w-full">
|
||||
<VbenTree
|
||||
:tree-data="permissions"
|
||||
multiple
|
||||
|
||||
Reference in New Issue
Block a user