|
@@ -27,11 +27,53 @@ function getNavList(){
|
|
|
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:'权限管理',
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
]
|
|
|
return
|
|
|
apiSystemRole.menuData().then(res=>{
|
|
@@ -63,11 +105,17 @@ function logout() {
|
|
|
}
|
|
|
|
|
|
function getMenuIcon(item){
|
|
|
- if(item.Name==='用户列表') return 'menu/user'
|
|
|
- if(item.Name==='潜在用户列表') return 'menu/usergroup'
|
|
|
- if(item.Name==='PDF报告') return 'menu/pdf'
|
|
|
- if(item.Name==='全局检索') return 'menu/usersearch'
|
|
|
- return 'menu/setting'
|
|
|
+ const iconMap = {
|
|
|
+ '客户管理':'menu/custom',
|
|
|
+ '研究员管理':'menu/author',
|
|
|
+ '音视频管理':'menu/media',
|
|
|
+ '消息推送管理':'menu/message',
|
|
|
+ '图片资源库':'menu/piclib',
|
|
|
+ '客户反馈':'menu/feedback',
|
|
|
+ '系统设置':'menu/setting'
|
|
|
+ }
|
|
|
+ return iconMap[item]||'menu/setting'
|
|
|
+
|
|
|
}
|
|
|
|
|
|
</script>
|
|
@@ -77,7 +125,6 @@ function getMenuIcon(item){
|
|
|
<el-menu
|
|
|
class="menu-wrap"
|
|
|
mode="vertical"
|
|
|
- unique-opened
|
|
|
router
|
|
|
:default-active="$route.path"
|
|
|
:collapse="menuClose"
|
|
@@ -87,36 +134,29 @@ function getMenuIcon(item){
|
|
|
:index="level1.Path"
|
|
|
v-if="level1.Children.length===0"
|
|
|
>
|
|
|
- <svg-icon :name="getMenuIcon(level1)" style="font-size:16px;"></svg-icon>
|
|
|
- <span>{{ level1.Name }}</span>
|
|
|
+ <svg-icon
|
|
|
+ :name="getMenuIcon(level1.Name)" :color="$route.path===level1.Path?'#086CE0':'#333'" style="font-size:16px;"></svg-icon>
|
|
|
+ <span style="margin-left: 5px;">{{ level1.Name }}</span>
|
|
|
</el-menu-item>
|
|
|
<el-sub-menu
|
|
|
:index="level1.Path"
|
|
|
v-if="level1.Children.length>0"
|
|
|
>
|
|
|
<template #title>
|
|
|
- <svg-icon :name="getMenuIcon(level1)" style="font-size:16px"></svg-icon>
|
|
|
- <span>{{ level1.Name }}</span>
|
|
|
+ <svg-icon :name="getMenuIcon(level1.Name)" :color="$route.path===level1.Path?'#086CE0':'#333'" style="font-size:16px"></svg-icon>
|
|
|
+ <span style="margin-left: 5px;">{{ level1.Name }}</span>
|
|
|
</template>
|
|
|
<el-menu-item
|
|
|
v-for="child in level1.Children"
|
|
|
:index="child.Path"
|
|
|
:key="child.Path"
|
|
|
>
|
|
|
- <el-icon></el-icon>
|
|
|
- <span>{{ child.Name }}</span>
|
|
|
+ <svg-icon name="menu/submenu" :color="$route.path===child.Path?'#086CE0':'#333'" style="font-size:16px;"></svg-icon>
|
|
|
+ <span style="margin-left: 5px;">{{ child.Name }}</span>
|
|
|
</el-menu-item>
|
|
|
</el-sub-menu>
|
|
|
</template>
|
|
|
</el-menu>
|
|
|
- <div class="user-box" v-if="!menuClose">
|
|
|
- <div class="name-box">
|
|
|
- <svg-icon name="person" size="18px"></svg-icon>
|
|
|
- <span>{{userName}}</span>
|
|
|
- </div>
|
|
|
- <div class="opt" @click="resetpwd">修改密码</div>
|
|
|
- <div class="opt" @click="logout">退出登录</div>
|
|
|
- </div>
|
|
|
<el-popover placement="right" :width="100" trigger="click">
|
|
|
<template #reference>
|
|
|
<div style="text-align: center">
|
|
@@ -133,18 +173,19 @@ function getMenuIcon(item){
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.left-wrap {
|
|
|
- --el-menu-bg-color: #086CE0;
|
|
|
+ --el-menu-bg-color: #fff;
|
|
|
--el-menu-hover-bg-color: rgba(255, 255, 255, 0.15);
|
|
|
- --el-menu-text-color: #ffffff;
|
|
|
- --el-menu-active-color: #ffae4f;
|
|
|
+ --el-menu-text-color: #333;
|
|
|
+ --el-menu-active-color: #086CE0;
|
|
|
+ --el-menu-item-font-size:16px;
|
|
|
width: 180px;
|
|
|
z-index: 50;
|
|
|
position: fixed;
|
|
|
- top: 60px;
|
|
|
+ top: 48px;
|
|
|
left: 0;
|
|
|
bottom: 0;
|
|
|
padding: 8px;
|
|
|
- background-color: #086CE0;
|
|
|
+ background-color: #fff;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
padding-bottom: 111px;
|
|
@@ -153,10 +194,23 @@ function getMenuIcon(item){
|
|
|
flex: 1;
|
|
|
height: 100%;
|
|
|
border: none;
|
|
|
+ .el-sub-menu{
|
|
|
+ :deep(.el-menu-item){
|
|
|
+ padding-left: var(--el-menu-base-level-padding);
|
|
|
+ }
|
|
|
+ :deep(.el-sub-menu__icon-arrow){
|
|
|
+ transform: rotateZ(-90deg) !important;
|
|
|
+ }
|
|
|
+ &.is-opened{
|
|
|
+ :deep(.el-sub-menu__icon-arrow){
|
|
|
+ transform: rotateZ(0deg) !important;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
.user-box {
|
|
|
background-color: var(--el-menu-hover-bg-color);
|
|
|
- color: #fff;
|
|
|
+ color: #333;
|
|
|
text-align: center;
|
|
|
padding: 20px;
|
|
|
.name-box {
|