|
@@ -11,6 +11,7 @@ import { initLoadResouce } from '@/utils/resource'
|
|
|
|
|
|
const { selectInfo } = useCommonStore()
|
|
|
const isCollapse = ref(false)
|
|
|
+const navBarSelect = ref<string>('appAnalyse')
|
|
|
const menuList = [
|
|
|
{
|
|
|
title: '数据总览',
|
|
@@ -52,6 +53,73 @@ const menuList = [
|
|
|
}
|
|
|
]
|
|
|
|
|
|
+const menuInfo: Record<string, Array<any>> = {
|
|
|
+ appAnalyse: [
|
|
|
+ {
|
|
|
+ title: '数据总览',
|
|
|
+ icon: 'PieChart',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ pathName: 'OverView',
|
|
|
+ title: '工作台'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '信息管理',
|
|
|
+ icon: 'Histogram',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ pathName: 'GameManageView',
|
|
|
+ title: '游戏管理'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ pathName: 'PlayerManageView',
|
|
|
+ title: '玩家管理'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '数据分析',
|
|
|
+ icon: 'DataAnalysis',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ pathName: 'KeepView',
|
|
|
+ title: '留存分析'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ pathName: 'UserTrendView',
|
|
|
+ title: '用户趋势'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ appManage: [
|
|
|
+ {
|
|
|
+ title: '基本信息',
|
|
|
+ icon: 'PieChart',
|
|
|
+ pathName: 'GameBaseInfo'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '事件管理',
|
|
|
+ icon: 'PieChart',
|
|
|
+ pathName: 'EventManage'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+}
|
|
|
+
|
|
|
+const navBarMenuList = [
|
|
|
+ {
|
|
|
+ name: 'appAnalyse',
|
|
|
+ title: '应用分析'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ name: 'appManage',
|
|
|
+ title: '应用管理'
|
|
|
+ }
|
|
|
+]
|
|
|
+
|
|
|
const changeCollapse = () => {
|
|
|
isCollapse.value = !isCollapse.value
|
|
|
}
|
|
@@ -75,6 +143,7 @@ const gameSelectInfo = reactive<DropDownInfo>({
|
|
|
optionsList: []
|
|
|
})
|
|
|
|
|
|
+// 游戏信息是否加载成功
|
|
|
const gameinfoLoad = ref(false)
|
|
|
|
|
|
/**
|
|
@@ -86,6 +155,10 @@ const changeGame = (gid: any) => {
|
|
|
selectInfo.gid = gid
|
|
|
}
|
|
|
|
|
|
+const changeNavBar = (val: string) => {
|
|
|
+ navBarSelect.value = val
|
|
|
+}
|
|
|
+
|
|
|
getAllGameInfo().then((data) => {
|
|
|
if (data) {
|
|
|
data.map((item) => {
|
|
@@ -117,25 +190,11 @@ onMounted(() => {
|
|
|
|
|
|
<template>
|
|
|
<div class="body">
|
|
|
- <div class="sideBarBox">
|
|
|
- <el-menu :router="true" :default-active="$route.name" class="sideBar" :collapse="isCollapse">
|
|
|
- <el-menu-item index="/" class="logoBox">
|
|
|
- <el-image :fit="'fill'" class="logoImg" :src="blobUrlInfo.logo"></el-image>
|
|
|
- <template #title><span class="logoText">淳皓科技</span></template>
|
|
|
- </el-menu-item>
|
|
|
- <el-sub-menu v-for="item in menuList" :index="item.title">
|
|
|
- <template #title>
|
|
|
- <el-icon><component :is="item.icon" /></el-icon>
|
|
|
- <span class="menuTitle">{{ item.title }}</span>
|
|
|
- </template>
|
|
|
- <el-menu-item v-for="v in item.children" :index="v.pathName">{{ v.title }}</el-menu-item>
|
|
|
- </el-sub-menu>
|
|
|
- <div class="sideBarFold" @click="changeCollapse">
|
|
|
- <el-icon :size="25"><Fold /></el-icon>
|
|
|
- </div>
|
|
|
- </el-menu>
|
|
|
- </div>
|
|
|
<div class="navBarBox">
|
|
|
+ <div class="logoBox">
|
|
|
+ <el-image :fit="'fill'" class="logoImg" :src="blobUrlInfo.logo"></el-image>
|
|
|
+ <span>淳皓科技</span>
|
|
|
+ </div>
|
|
|
<div class="gameSelect">
|
|
|
<el-icon class="gameIcon" :size="20">
|
|
|
<icon-icon-park-game-three></icon-icon-park-game-three>
|
|
@@ -148,6 +207,18 @@ onMounted(() => {
|
|
|
@change-select="changeGame"
|
|
|
></DropDownSelection>
|
|
|
</div>
|
|
|
+ <div class="navBarMenu">
|
|
|
+ <el-menu
|
|
|
+ :default-active="navBarSelect"
|
|
|
+ class="el-menu-demo"
|
|
|
+ mode="horizontal"
|
|
|
+ @select="changeNavBar"
|
|
|
+ >
|
|
|
+ <el-menu-item v-for="item in navBarMenuList" class="navBarMenuItem" :index="item.name">{{
|
|
|
+ item.title
|
|
|
+ }}</el-menu-item>
|
|
|
+ </el-menu>
|
|
|
+ </div>
|
|
|
<div class="headPortraitBox">
|
|
|
<el-popover popper-class="headPopper" placement="bottom-end" trigger="click">
|
|
|
<template #reference>
|
|
@@ -162,6 +233,28 @@ onMounted(() => {
|
|
|
</el-popover>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="sideBarBox">
|
|
|
+ <el-menu :router="true" :default-active="$route.name" class="sideBar" :collapse="isCollapse">
|
|
|
+ <el-sub-menu v-for="item in menuInfo[navBarSelect]" :index="item.title">
|
|
|
+ <template #title>
|
|
|
+ <el-icon><component :is="item.icon" /></el-icon>
|
|
|
+ <span class="menuTitle">{{ item.title }}</span>
|
|
|
+ </template>
|
|
|
+ <span v-if="item.children">
|
|
|
+ <el-menu-item v-for="v in item.children" :index="v.pathName">{{
|
|
|
+ v.title
|
|
|
+ }}</el-menu-item>
|
|
|
+ </span>
|
|
|
+ <span v-else>
|
|
|
+ <el-menu-item :index="item.pathName">{{ item.title }}</el-menu-item>
|
|
|
+ </span>
|
|
|
+ </el-sub-menu>
|
|
|
+ <div class="sideBarFold" @click="changeCollapse">
|
|
|
+ <el-icon :size="25"><Fold /></el-icon>
|
|
|
+ </div>
|
|
|
+ </el-menu>
|
|
|
+ </div>
|
|
|
+
|
|
|
<!-- <div class="content">
|
|
|
<RouterView v-if="gameinfoLoad" />
|
|
|
</div> -->
|
|
@@ -191,32 +284,13 @@ onMounted(() => {
|
|
|
height: 100vh;
|
|
|
}
|
|
|
|
|
|
-.gameSelect {
|
|
|
- position: absolute;
|
|
|
- top: 50%;
|
|
|
- transform: translateY(-50%);
|
|
|
- /* width: 10%; */
|
|
|
- height: 80%;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- right: 10%;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
-
|
|
|
- /* background-color: lightblue; */
|
|
|
-}
|
|
|
-.gameIcon {
|
|
|
- /* box-sizing: border-box; */
|
|
|
- /* padding-right: 12px; */
|
|
|
- margin-right: 12px;
|
|
|
-}
|
|
|
-
|
|
|
/* 设置宽度后,content无法适应宽度,只能去间接的调整内部元素的宽度 */
|
|
|
.sideBarBox {
|
|
|
position: relative;
|
|
|
/* width: 12%; */
|
|
|
- z-index: 2;
|
|
|
- height: 100vh;
|
|
|
+ z-index: 1;
|
|
|
+ margin-top: 7vh;
|
|
|
+ height: 93vh;
|
|
|
top: 0;
|
|
|
}
|
|
|
|
|
@@ -234,13 +308,6 @@ onMounted(() => {
|
|
|
/* color: red; */
|
|
|
}
|
|
|
|
|
|
-/* 调整LOGO */
|
|
|
-.logoBox {
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
-}
|
|
|
-
|
|
|
.logoImg {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
@@ -274,8 +341,10 @@ onMounted(() => {
|
|
|
|
|
|
.navBarBox {
|
|
|
position: fixed;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
width: 100vw;
|
|
|
- z-index: 1;
|
|
|
+ z-index: 2;
|
|
|
height: 7vh;
|
|
|
top: 0;
|
|
|
background-color: white;
|
|
@@ -283,6 +352,40 @@ onMounted(() => {
|
|
|
border-bottom: 1px solid gainsboro;
|
|
|
}
|
|
|
|
|
|
+/* 调整LOGO */
|
|
|
+.logoBox {
|
|
|
+ box-sizing: border-box;
|
|
|
+ left: 30px;
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.gameSelect {
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ height: 80%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ left: 5%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.gameIcon {
|
|
|
+ /* box-sizing: border-box; */
|
|
|
+ /* padding-right: 12px; */
|
|
|
+ margin-right: 12px;
|
|
|
+}
|
|
|
+
|
|
|
+.navBarMenu {
|
|
|
+ width: 60%;
|
|
|
+ position: relative;
|
|
|
+ left: 6%;
|
|
|
+}
|
|
|
+
|
|
|
.headPortraitBox {
|
|
|
position: absolute;
|
|
|
right: 3%;
|