diff --git a/src/api/system.ts b/src/api/system.ts index 7c3cc06..695f93d 100644 --- a/src/api/system.ts +++ b/src/api/system.ts @@ -139,6 +139,8 @@ type GetPermissionListParams = { fixedTag?: boolean; /** 隐藏标签页 */ hiddenTag?: boolean; + /** 是否为管理员专属页面 */ + isAdmin?: boolean; }; /**获取权限列表 */ @@ -196,6 +198,8 @@ type AddPermissionParams = { parent_id: string; /** 菜单类型 */ menu_type: number; + /**是否为管理员专属页面 */ + is_admin: boolean; }; /** * 添加权限 diff --git a/src/views/account-settings/components/Profile.vue b/src/views/account-settings/components/Profile.vue index 47506d5..a6c9207 100644 --- a/src/views/account-settings/components/Profile.vue +++ b/src/views/account-settings/components/Profile.vue @@ -94,7 +94,7 @@ const onSubmit = async (formEl: FormInstance) => { >

个人信息

- + { - + { = [ { label: "开启", @@ -128,6 +141,7 @@ interface FormItemProps { fixed_tag: boolean; show_link: boolean; show_parent: boolean; + is_admin: boolean; } interface FormProps { formInline: FormItemProps; @@ -169,7 +183,8 @@ const props = withDefaults(defineProps(), { hidden_tag: false, fixed_tag: false, show_link: true, - show_parent: false + show_parent: false, + is_admin: false }) }); @@ -418,6 +433,19 @@ defineExpose({ getRef }); /> + + + + + { hidden_tag: row?.hidden_tag ?? false, fixed_tag: row?.fixed_tag ?? false, show_link: row?.show_link ?? true, - show_parent: row?.show_parent ?? false + show_parent: row?.show_parent ?? false, + is_admin: row?.is_admin ?? false } }, width: "45%", @@ -214,7 +215,8 @@ export const usePermission = () => { hidden_tag: row?.hidden_tag ?? false, fixed_tag: row?.fixed_tag ?? false, show_link: row?.show_link ?? true, - show_parent: row?.show_parent ?? false + show_parent: row?.show_parent ?? false, + is_admin: row?.is_admin ?? false } }), beforeSure: (done, { options }) => { @@ -257,7 +259,8 @@ export const usePermission = () => { hidden_tag: false, fixed_tag: false, show_link: true, - show_parent: false + show_parent: false, + is_admin: false }; for (let key in addForm) { // 检查第二个字典是否包含相同的键 @@ -295,7 +298,8 @@ export const usePermission = () => { hidden_tag: false, fixed_tag: false, show_link: true, - show_parent: false + show_parent: false, + is_admin: false }; for (let key in updateForm) { // 检查第二个字典是否包含相同的键 diff --git a/types/system.d.ts b/types/system.d.ts index 967b5ab..6de293b 100644 --- a/types/system.d.ts +++ b/types/system.d.ts @@ -118,6 +118,8 @@ export type PermissionInfo = { show_link: boolean; /** 是否显示父菜单 */ show_parent: boolean; + /**是否为管理员专属页面 */ + is_admin: boolean; }; /**角色信息类型 */