diff --git a/locales/en.yaml b/locales/en.yaml index 298fb33..3417ed0 100644 --- a/locales/en.yaml +++ b/locales/en.yaml @@ -1,6 +1,7 @@ title: HTS Code Query System buttons:AccountSettings: Account buttons:LoginOut: LoginOut +buttons:Cancell: Cancell Account buttons:Login: Login buttons:OpenSystemSet: Open System Configs buttons:Reload: Reload @@ -177,6 +178,10 @@ logout:message: Whether to exit the system? logout:success: Logout Success logout:fail: Logout Fail logout:cancel: Logout Cancel +logout:cancellMessage: Would you like to deactivate your account? +logout:cancellSuccess: Deletion successful +logout:cancellFail: Failed to cancell +logout:cancellCancel: cancell Cancel user:buttons:addRole: Add User Role user:buttons:deleteRole: Delete User Role user:buttons:updateRole: Update User Role diff --git a/locales/zh-CN.yaml b/locales/zh-CN.yaml index 57c17ef..8e3ac1f 100644 --- a/locales/zh-CN.yaml +++ b/locales/zh-CN.yaml @@ -1,6 +1,7 @@ title: 清关编码查询系统 buttons:AccountSettings: 账户设置 buttons:LoginOut: 退出系统 +buttons:Cancell: 注销账号 buttons:Login: 登录 buttons:OpenSystemSet: 打开系统配置 buttons:Reload: 重新加载 @@ -177,6 +178,10 @@ logout:message: 是否退出当前系统? logout:success: 退出成功 logout:fail: 退出失败 logout:cancel: 退出取消 +logout:cancellMessage: 是否注销账号? +logout:cancellSuccess: 注销成功 +logout:cancellFail: 注销失败 +logout:cancellCancel: 注销取消 user:buttons:addRole: 添加用户角色 user:buttons:deleteRole: 删除用户角色 user:buttons:updateRole: 更新用户角色 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/system/permission/components/form.vue b/src/views/system/permission/components/form.vue index c7c37ae..c62ca5c 100644 --- a/src/views/system/permission/components/form.vue +++ b/src/views/system/permission/components/form.vue @@ -91,6 +91,19 @@ const showParentOptions: Array = [ } ]; +const isAdminOptions: Array = [ + { + label: "是", + tip: "只有系统管理员才能查看", + value: true + }, + { + label: "否", + tip: "系统内所有成员可见", + value: false + } +]; + const frameLoadingOptions: Array = [ { 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; }; /**角色信息类型 */