refactor event
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useUserStore } from "timi-web";
|
||||
import { gaoPermissionCodes } from "@/utils/gaoPermission";
|
||||
import { permissionCodes } from "@/utils/permission";
|
||||
|
||||
defineOptions({
|
||||
name: "CustomerTab"
|
||||
@@ -26,28 +26,28 @@ const userStore = useUserStore();
|
||||
const entryList = [
|
||||
{
|
||||
path: "/customer/quick-entry",
|
||||
permission: gaoPermissionCodes.registrationEventRecord.create,
|
||||
permission: permissionCodes.eventRecord.create,
|
||||
icon: "scan",
|
||||
title: "快速补录登记",
|
||||
desc: "对以往未绑定二维码的客户进行快速补录和登记"
|
||||
},
|
||||
{
|
||||
path: "/customer/quick-sign-in",
|
||||
permission: gaoPermissionCodes.registrationEventRecord.create,
|
||||
permission: permissionCodes.eventRecord.create,
|
||||
icon: "scan",
|
||||
title: "快速扫码登记",
|
||||
desc: "扫码选择客户并按配置事件登记"
|
||||
},
|
||||
{
|
||||
path: "/management/customers/create?redirect=/customers",
|
||||
permission: gaoPermissionCodes.customer.create,
|
||||
permission: permissionCodes.customer.create,
|
||||
icon: "edit-1",
|
||||
title: "录入",
|
||||
desc: "新建客户档案并完善基础资料"
|
||||
},
|
||||
{
|
||||
path: "/customer/registration",
|
||||
permission: gaoPermissionCodes.registrationEventRecord.create,
|
||||
permission: permissionCodes.eventRecord.create,
|
||||
icon: "task-checked",
|
||||
title: "登记",
|
||||
desc: "按流程完成客户登记"
|
||||
@@ -127,3 +127,4 @@ async function go(path: string): Promise<void> {
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { UserAPI, useUserStore } from "timi-web";
|
||||
import { corePermissionCodes, coreRoleCodes, gaoPermissionCodes } from "@/utils/gaoPermission";
|
||||
import { corePermissionCodes, coreRoleCodes, permissionCodes } from "@/utils/permission";
|
||||
|
||||
type UserAvatarSource = Parameters<typeof UserAPI.getAvatarURL>[0];
|
||||
|
||||
@@ -98,31 +98,31 @@ const menuGroupList = computed<MenuGroup[]>(() => [
|
||||
icon: "usergroup",
|
||||
path: "/management/customers",
|
||||
title: "客户管理",
|
||||
visible: userStore.hasPermissions(gaoPermissionCodes.customer.read)
|
||||
visible: userStore.hasPermissions(permissionCodes.customer.read)
|
||||
},
|
||||
{
|
||||
icon: "task",
|
||||
path: "/management/registration-events",
|
||||
title: "登记事件",
|
||||
visible: userStore.hasPermissions([gaoPermissionCodes.registrationEvent.read, gaoPermissionCodes.user.read], "and")
|
||||
visible: userStore.hasPermissions([permissionCodes.event.read, permissionCodes.user.read], "and")
|
||||
},
|
||||
{
|
||||
icon: "history",
|
||||
path: "/management/registration-event-records",
|
||||
title: "登记事件记录",
|
||||
visible: userStore.hasPermissions(gaoPermissionCodes.registrationEventRecord.read)
|
||||
visible: userStore.hasPermissions(permissionCodes.eventRecord.read)
|
||||
},
|
||||
{
|
||||
icon: "usergroup",
|
||||
path: "/management/customer-data-charts",
|
||||
title: "客户统计数据",
|
||||
visible: userStore.hasPermissions(gaoPermissionCodes.stat.read)
|
||||
visible: userStore.hasPermissions(permissionCodes.stat.read)
|
||||
},
|
||||
{
|
||||
icon: "chart",
|
||||
path: "/management/data-charts",
|
||||
title: "全局统计数据",
|
||||
visible: userStore.hasPermissions(gaoPermissionCodes.stat.read)
|
||||
visible: userStore.hasPermissions(permissionCodes.stat.read)
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -145,13 +145,13 @@ const menuGroupList = computed<MenuGroup[]>(() => [
|
||||
icon: "root-list",
|
||||
path: "/management/users",
|
||||
title: "用户管理",
|
||||
visible: userStore.hasPermissions(gaoPermissionCodes.user.read)
|
||||
visible: userStore.hasPermissions(permissionCodes.user.read)
|
||||
},
|
||||
{
|
||||
icon: "qrcode",
|
||||
path: "/management/qr-code",
|
||||
title: "生成客户二维码",
|
||||
visible: userStore.hasPermissions(gaoPermissionCodes.qrCode.create)
|
||||
visible: userStore.hasPermissions(permissionCodes.qrCode.create)
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -228,3 +228,4 @@ async function go(path: string): Promise<void> {
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user