feat: 添加系统级管理专属页面权限
This commit is contained in:
parent
52b9e8f3c8
commit
6e6bab05ac
@ -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
|
||||
|
@ -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: 更新用户角色
|
||||
|
@ -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;
|
||||
};
|
||||
/**
|
||||
* 添加权限
|
||||
|
@ -91,6 +91,19 @@ const showParentOptions: Array<OptionsType> = [
|
||||
}
|
||||
];
|
||||
|
||||
const isAdminOptions: Array<OptionsType> = [
|
||||
{
|
||||
label: "是",
|
||||
tip: "只有系统管理员才能查看",
|
||||
value: true
|
||||
},
|
||||
{
|
||||
label: "否",
|
||||
tip: "系统内所有成员可见",
|
||||
value: false
|
||||
}
|
||||
];
|
||||
|
||||
const frameLoadingOptions: Array<OptionsType> = [
|
||||
{
|
||||
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<FormProps>(), {
|
||||
hidden_tag: false,
|
||||
fixed_tag: false,
|
||||
show_link: true,
|
||||
show_parent: false
|
||||
show_parent: false,
|
||||
is_admin: false
|
||||
})
|
||||
});
|
||||
|
||||
@ -418,6 +433,19 @@ defineExpose({ getRef });
|
||||
/>
|
||||
</el-form-item>
|
||||
</re-col>
|
||||
<re-col v-if="newFormInline.menu_type < 3" :value="12" :xs="24" :sm="24">
|
||||
<el-form-item label="管理专属">
|
||||
<Segmented
|
||||
:modelValue="newFormInline.is_admin ? 0 : 1"
|
||||
:options="isAdminOptions"
|
||||
@change="
|
||||
({ option: { value } }) => {
|
||||
newFormInline.is_admin = value;
|
||||
}
|
||||
"
|
||||
/>
|
||||
</el-form-item>
|
||||
</re-col>
|
||||
|
||||
<re-col
|
||||
v-show="newFormInline.menu_type !== 3"
|
||||
|
@ -180,7 +180,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
|
||||
}
|
||||
},
|
||||
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) {
|
||||
// 检查第二个字典是否包含相同的键
|
||||
|
2
types/system.d.ts
vendored
2
types/system.d.ts
vendored
@ -118,6 +118,8 @@ export type PermissionInfo = {
|
||||
show_link: boolean;
|
||||
/** 是否显示父菜单 */
|
||||
show_parent: boolean;
|
||||
/**是否为管理员专属页面 */
|
||||
is_admin: boolean;
|
||||
};
|
||||
|
||||
/**角色信息类型 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user