|
@@ -1,210 +1,66 @@
|
|
|
<script setup>
|
|
|
import { useRouter } from 'vue-router'
|
|
|
import { useLayoutState } from '../hooks/index'
|
|
|
-// import {apiSystemRole} from '@/api/system'
|
|
|
+import {apiSystemCommon} from '@/api/system'
|
|
|
|
|
|
const router = useRouter()
|
|
|
|
|
|
const { menuClose } = useLayoutState()
|
|
|
|
|
|
const navList = ref([
|
|
|
- {
|
|
|
- name: '客户管理',
|
|
|
- path: '/customer',
|
|
|
- IsLevel: 2,
|
|
|
- Children: [
|
|
|
- {
|
|
|
- name: '商家管理',
|
|
|
- path: '/business'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '用户管理',
|
|
|
- path: '/customer/userList'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'ETA客户行为统计',
|
|
|
- path: '/customer',
|
|
|
- IsLevel: 1,
|
|
|
- Children: [
|
|
|
- {
|
|
|
- name: 'ETA客户行为统计',
|
|
|
- path: '/customer/userActionStatistic',
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'ETA试用管理',
|
|
|
- path: '/',
|
|
|
- IsLevel: 1,
|
|
|
- Children: [
|
|
|
- {
|
|
|
- name: 'ETA试用管理',
|
|
|
- path: '/',
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'ETA社区管理',
|
|
|
- path: '/etaChart',
|
|
|
- IsLevel: 1,
|
|
|
- Children: [
|
|
|
- {
|
|
|
- name: 'ETA社区管理',
|
|
|
- path: '/etaChart/index',
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'ETA菜单配置',
|
|
|
- path: '/',
|
|
|
- IsLevel: 1,
|
|
|
- Children: [
|
|
|
- {
|
|
|
- name: 'ETA菜单配置',
|
|
|
- path: '/',
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- name: '培训管理',
|
|
|
- path: '/',
|
|
|
- IsLevel: 2,
|
|
|
- Children: [
|
|
|
- {
|
|
|
- name: '视频管理',
|
|
|
- path: '/',
|
|
|
- },
|
|
|
- {
|
|
|
- name: '标签管理',
|
|
|
- path: '/',
|
|
|
- },
|
|
|
- {
|
|
|
- name: '分类管理',
|
|
|
- path: '/',
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- name: '个性化设置',
|
|
|
- path: '/',
|
|
|
- IsLevel: 1,
|
|
|
- Children: [
|
|
|
- {
|
|
|
- name: '个性化设置',
|
|
|
- path: '/',
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- name: '权限配置',
|
|
|
- path: '/',
|
|
|
- IsLevel: 1,
|
|
|
- Children: [
|
|
|
- {
|
|
|
- name: '权限配置',
|
|
|
- path: '/',
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- name: '系统设置',
|
|
|
- path: '/',
|
|
|
- IsLevel: 2,
|
|
|
- Children: [
|
|
|
- {
|
|
|
- name: '更新日志配置',
|
|
|
- path: '/',
|
|
|
- },
|
|
|
- {
|
|
|
- name: '帮助中心配置',
|
|
|
- path: '/',
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // name: '客户管理',
|
|
|
+ // path: '/customer',
|
|
|
+ // IsLevel: 2,
|
|
|
+ // Children: [
|
|
|
+ // {
|
|
|
+ // name: '商家管理',
|
|
|
+ // path: '/'
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // name: '用户管理',
|
|
|
+ // path: '/customer/userList'
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // name: 'ETA客户行为统计',
|
|
|
+ // path: '/customer',
|
|
|
+ // IsLevel: 1,
|
|
|
+ // Children: [
|
|
|
+ // {
|
|
|
+ // name: 'ETA客户行为统计',
|
|
|
+ // path: '/customer/userActionStatistic',
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // },
|
|
|
])
|
|
|
|
|
|
function getNavList() {
|
|
|
- //mock navList
|
|
|
- /* navList.value = [
|
|
|
- {
|
|
|
- Path:'/customer',
|
|
|
- Name:'客户管理',
|
|
|
- Children:[
|
|
|
- {
|
|
|
- Path:'/customer/tempUserList',
|
|
|
- Name:'临时用户列表',
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- Path:'/authorMgt/authorList',
|
|
|
- Name:'研究员管理',
|
|
|
- Children:[]
|
|
|
- },
|
|
|
- {
|
|
|
- Path:'/mediaMgt',
|
|
|
- Name:'音视频管理',
|
|
|
- Children:[
|
|
|
- {
|
|
|
- Path:'/mediaMgt/audioList',
|
|
|
- Name:'音频管理',
|
|
|
- },
|
|
|
- {
|
|
|
- Path:'/mediaMgt/videoList',
|
|
|
- Name:'视频管理',
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- Path:'/customer/notification',
|
|
|
- Name:'消息推送管理',
|
|
|
- Children:[]
|
|
|
- },
|
|
|
- {
|
|
|
- Path:'/mediaMgt/pictureLib',
|
|
|
- Name:'图片资源库',
|
|
|
- Children:[]
|
|
|
- },
|
|
|
- {
|
|
|
- Path:'/customer/feedbackList',
|
|
|
- Name:'客户反馈',
|
|
|
- Children:[]
|
|
|
- },
|
|
|
- {
|
|
|
- Path:'/system',
|
|
|
- Name:'系统设置',
|
|
|
- Children:[
|
|
|
- {
|
|
|
- Path:'/system/userList',
|
|
|
- Name:'用户列表',
|
|
|
- },
|
|
|
- {
|
|
|
- Path:'/system/roleList',
|
|
|
- Name:'角色管理',
|
|
|
- },
|
|
|
- {
|
|
|
- Path:'/system/authSet',
|
|
|
- Name:'权限管理',
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- ] */
|
|
|
-
|
|
|
- // apiSystemRole.menuData().then(res=>{
|
|
|
- // if(res.Ret===200){
|
|
|
- // navList.value=res.Data||[]
|
|
|
- // }
|
|
|
- // })
|
|
|
+ apiSystemCommon.menuList().then(res=>{
|
|
|
+ if(res.Ret===200){
|
|
|
+ navList.value=res.Data.List||[]
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
getNavList()
|
|
|
|
|
|
+function handleClickMenu(path){
|
|
|
+ router.push(path)
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
|
|
|
function getMenuIcon(item) {
|
|
|
const iconMap = {
|
|
|
- '/customer': 'menu/customer',
|
|
|
+ '客户管理': 'menu/customer',
|
|
|
+ 'ETA客户行为统计':'menu/menu02',
|
|
|
+ 'ETA试用管理':'menu/menu03',
|
|
|
+ 'ETA社区管理':'menu/menu04',
|
|
|
+ 'ETA菜单配置':'menu/menu05',
|
|
|
+ '培训管理':'menu/menu06',
|
|
|
+ '个性化设置':'menu/menu07',
|
|
|
+ '系统设置':'menu/menu08',
|
|
|
}
|
|
|
return iconMap[item] || 'menu/setting'
|
|
|
|
|
@@ -220,28 +76,29 @@ function getMenuIcon(item) {
|
|
|
:collapsed="menuClose"
|
|
|
:width="['200px', '80px']"
|
|
|
>
|
|
|
- <template v-for="level1 in navList" :key="level1.SysMenuId">
|
|
|
- <t-menu-item :value="level1.Children[0].path" v-if="level1.IsLevel === 1">
|
|
|
+ <template v-for="level1 in navList" :key="level1.MenuId">
|
|
|
+ <t-menu-item :value="level1.children[0].path" v-if="level1.IsLevel === 1" @click="handleClickMenu(level1.children[0].path)">
|
|
|
<svg-icon
|
|
|
- :name="getMenuIcon(level1.Children[0].path)"
|
|
|
- :color="$route.path === level1.Children[0].path ? '#086CE0' : '#333'"
|
|
|
- style="font-size: 16px"
|
|
|
+ :name="getMenuIcon(level1.children[0].name)"
|
|
|
+ :color="$route.path === level1.children[0].path ? '#086CE0' : '#333'"
|
|
|
+ style="font-size: 20px;position: relative;top:5px"
|
|
|
></svg-icon>
|
|
|
- <span style="margin-left: 5px">{{ level1.Children[0].name }}</span>
|
|
|
+ <span style="margin-left: 5px">{{ level1.children[0].name }}</span>
|
|
|
</t-menu-item>
|
|
|
- <t-submenu :value="level1.path" v-if="level1.IsLevel === 2">
|
|
|
+ <t-submenu :value="level1.MenuId" v-if="level1.IsLevel === 2">
|
|
|
<template #title>
|
|
|
<svg-icon
|
|
|
- :name="getMenuIcon(level1.path)"
|
|
|
+ :name="getMenuIcon(level1.name)"
|
|
|
:color="$route.path === level1.path ? '#086CE0' : '#333'"
|
|
|
- style="font-size: 16px"
|
|
|
+ style="font-size: 20px;position: relative;top:5px"
|
|
|
></svg-icon>
|
|
|
<span style="margin-left: 5px">{{ level1.name }}</span>
|
|
|
</template>
|
|
|
<t-menu-item
|
|
|
- v-for="child in level1.Children"
|
|
|
+ v-for="child in level1.children"
|
|
|
:value="child.path"
|
|
|
:key="child.path"
|
|
|
+ @click="handleClickMenu(child.path)"
|
|
|
>
|
|
|
<span style="margin-left: 5px">{{ child.name }}</span>
|
|
|
</t-menu-item>
|