diff --git a/ui/src/stores/user.js b/ui/src/stores/user.js index ab96620..43e8fef 100644 --- a/ui/src/stores/user.js +++ b/ui/src/stores/user.js @@ -101,6 +101,113 @@ const userStore = defineStore( children: [], props: true } + + // 添加除gm后台资源操作外的菜单 + const biDashboardRoute = { + path: projectRoute.path + "/bi_dashboard", + name: projectRoute.name + "_bi_dashboard", + meta: { + desc: "看板", + projectId: project.project_id, + }, + component: () => import('@/views/bi/dashboardIndex.vue'), + props: true + } + const biAnalyseRoutePath = projectRoute.path + "/bi_analyse" + const biAnalyseRoute = { + path: biAnalyseRoutePath, + name: projectRoute.name + "_bi_analyse", + meta: { + desc: "数据分析", + projectId: project.project_id, + }, + component: () => import('@/views/bi/analyseIndex.vue'), + props: true, + children: [ + { + path: biAnalyseRoutePath + "/analyse", + name: biAnalyseRoutePath + "/analyse", + meta: { + desc: "分析" + }, + children: [ + { + path: biAnalyseRoutePath + "/analyse/event", + name: biAnalyseRoutePath + "/analyse/event", + meta: { + desc: "事件分析" + }, + component: () => import('@/views/bi/components/event.vue'), + }, + { + path: biAnalyseRoutePath + "/analyse/retention", + name: biAnalyseRoutePath + "/analyse/retention", + meta: { + desc: "留存分析" + }, + component: () => import('@/views/bi/components/retention.vue'), + }, + ], + }, + { + path: biAnalyseRoutePath + "/bi_user", + name: biAnalyseRoutePath + "/bi_user", + meta: { + desc: "用户" + }, + children: [ + { + path: biAnalyseRoutePath + "/bi_user/event", + name: biAnalyseRoutePath + "/bi_user/event", + meta: { + desc: "事件分析" + }, + component: () => import('@/views/bi/components/event.vue'), + }, + { + path: biAnalyseRoutePath + "/bi_user/retention", + name: biAnalyseRoutePath + "/bi_user/retention", + meta: { + desc: "留存分析" + }, + component: () => import('@/views/bi/components/retention.vue'), + }, + ], + }, + { + path: biAnalyseRoutePath + "/bi_data", + name: biAnalyseRoutePath + "/bi_data", + meta: { + desc: "数据" + }, + children: [ + { + path: biAnalyseRoutePath + "/bi_data/event", + name: biAnalyseRoutePath + "/bi_data/event", + meta: { + desc: "事件分析" + }, + component: () => import('@/views/bi/components/event.vue'), + }, + { + path: biAnalyseRoutePath + "/bi_data/retention", + name: biAnalyseRoutePath + "/bi_data/retention", + meta: { + desc: "留存分析" + }, + component: () => import('@/views/bi/components/retention.vue'), + }, + ], + }, + ] + } + + projectRoute.children.push(biDashboardRoute) + projectRoute.children.push(biAnalyseRoute) + this.pushDynamicRouteChildren(biDashboardRoute) + this.pushDynamicRouteChildren(biAnalyseRoute) + + // 添加游戏后台gm管理资源菜单 const resourceList = project.resource_list resourceList.forEach((resource) => { const routePath = projectRoute.path + "/" + resource.resource diff --git a/ui/src/views/Home.vue b/ui/src/views/Home.vue index ba0f221..f38b304 100644 --- a/ui/src/views/Home.vue +++ b/ui/src/views/Home.vue @@ -35,7 +35,7 @@ const handleMenuSelect = (clickResource) => { hasClickedMenu.value = true } -function handleCommand(command) { +function handleAvatarCommand(command) { switch (command) { case "logout": logout(); @@ -67,13 +67,32 @@ function logout() {