update menu
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
<div class="management-tab">
|
<div class="management-tab">
|
||||||
<t-cell-group class="user-card" theme="card">
|
<t-cell-group class="user-card" theme="card">
|
||||||
<t-cell
|
<t-cell
|
||||||
|
class="cell"
|
||||||
:title="currentUserName"
|
:title="currentUserName"
|
||||||
arrow
|
arrow
|
||||||
hover
|
hover
|
||||||
@@ -91,7 +92,42 @@ const visibleMenuGroupList = computed<MenuGroup[]>(() => menuGroupList.value
|
|||||||
|
|
||||||
const menuGroupList = computed<MenuGroup[]>(() => [
|
const menuGroupList = computed<MenuGroup[]>(() => [
|
||||||
{
|
{
|
||||||
title: "设置",
|
title: "客户",
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
icon: "usergroup",
|
||||||
|
path: "/management/customers",
|
||||||
|
title: "客户管理",
|
||||||
|
visible: userStore.hasPermissions(gaoPermissionCodes.customer.read)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "task",
|
||||||
|
path: "/management/registration-events",
|
||||||
|
title: "登记事件",
|
||||||
|
visible: userStore.hasPermissions([gaoPermissionCodes.registrationEvent.read, gaoPermissionCodes.user.read], "and")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "history",
|
||||||
|
path: "/management/registration-event-records",
|
||||||
|
title: "登记事件记录",
|
||||||
|
visible: userStore.hasPermissions(gaoPermissionCodes.registrationEventRecord.read)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "usergroup",
|
||||||
|
path: "/management/customer-data-charts",
|
||||||
|
title: "客户统计数据",
|
||||||
|
visible: userStore.hasPermissions(gaoPermissionCodes.stat.read)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "chart",
|
||||||
|
path: "/management/data-charts",
|
||||||
|
title: "全局统计数据",
|
||||||
|
visible: userStore.hasPermissions(gaoPermissionCodes.stat.read)
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "系统",
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
icon: "setting",
|
icon: "setting",
|
||||||
@@ -104,17 +140,6 @@ const menuGroupList = computed<MenuGroup[]>(() => [
|
|||||||
path: "/management/permissions",
|
path: "/management/permissions",
|
||||||
title: "权限设置",
|
title: "权限设置",
|
||||||
visible: canManagePermission.value
|
visible: canManagePermission.value
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "用户与客户",
|
|
||||||
items: [
|
|
||||||
{
|
|
||||||
icon: "usergroup",
|
|
||||||
path: "/management/customers",
|
|
||||||
title: "客户管理",
|
|
||||||
visible: userStore.hasPermissions(gaoPermissionCodes.customer.read)
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "root-list",
|
icon: "root-list",
|
||||||
@@ -130,40 +155,6 @@ const menuGroupList = computed<MenuGroup[]>(() => [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: "登记管理",
|
|
||||||
items: [
|
|
||||||
{
|
|
||||||
icon: "task",
|
|
||||||
path: "/management/registration-events",
|
|
||||||
title: "登记事件",
|
|
||||||
visible: userStore.hasPermissions([gaoPermissionCodes.registrationEvent.read, gaoPermissionCodes.user.read], "and")
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: "history",
|
|
||||||
path: "/management/registration-event-records",
|
|
||||||
title: "登记事件记录",
|
|
||||||
visible: userStore.hasPermissions(gaoPermissionCodes.registrationEventRecord.read)
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "统计",
|
|
||||||
items: [
|
|
||||||
{
|
|
||||||
icon: "usergroup",
|
|
||||||
path: "/management/customer-data-charts",
|
|
||||||
title: "客户数据",
|
|
||||||
visible: userStore.hasPermissions(gaoPermissionCodes.stat.read)
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: "chart",
|
|
||||||
path: "/management/data-charts",
|
|
||||||
title: "全局数据",
|
|
||||||
visible: userStore.hasPermissions(gaoPermissionCodes.stat.read)
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
function buildFallbackAvatar(name: string): string {
|
function buildFallbackAvatar(name: string): string {
|
||||||
@@ -195,17 +186,20 @@ async function go(path: string): Promise<void> {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
.user-card {
|
.user-card {
|
||||||
margin: 0 0 1rem 0;
|
|
||||||
|
|
||||||
.avatar {
|
.cell {
|
||||||
width: 3.5rem;
|
padding: 10px;
|
||||||
height: 3.5rem;
|
|
||||||
border-radius: .875rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
.avatar {
|
||||||
gap: .5rem;
|
width: 4rem;
|
||||||
display: flex;
|
height: 4rem;
|
||||||
|
border-radius: .875rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
gap: .5rem;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user