595 lines
18 KiB
Vue
595 lines
18 KiB
Vue
<!--左侧导航菜单 liuyan -->
|
|
<template>
|
|
<div class="nav-menu v-class" :class="{'is-collapse': isCollapse}">
|
|
<div class="logo">
|
|
<img :src="logo" />
|
|
</div>
|
|
<el-menu
|
|
unique-opened
|
|
:default-active="defaultActive"
|
|
background-color="#013483"
|
|
text-color="#ffffff"
|
|
active-text-color="#ffd04b"
|
|
router
|
|
:collapse="isCollapse"
|
|
>
|
|
<template v-for="(item, index) in navMenuList">
|
|
<el-submenu
|
|
:key="index"
|
|
:index="item.path"
|
|
popper-class="nav-menu-popper"
|
|
v-if="!item.isChildren && (!item.menuId || $hasPermission(item.menuId))"
|
|
>
|
|
<template slot="title">
|
|
<i class="shangqi-icon" :class="item['icon-class']"></i>
|
|
<span>{{ item.title }}</span>
|
|
<el-badge is-dot class="has-no-read" v-if="item.title === '个人中心' && getDynamicTotal.allCount">
|
|
</el-badge>
|
|
</template>
|
|
<el-menu-item
|
|
v-for="(children, childrenIndex) in item.children"
|
|
:key="childrenIndex"
|
|
:index="children.path"
|
|
v-if="!children.menuId || $hasPermission(children.menuId)"itemSplitInfo
|
|
>
|
|
<el-badge :value="getDynamicTotal.msgCount" class="item" v-if="children.title === '我的消息' && getDynamicTotal.msgCount !== 0">
|
|
{{ children.title }}
|
|
</el-badge>
|
|
<el-badge :value="getDynamicTotal.shareCount" class="item" v-else-if="children.title === '我的推送' && getDynamicTotal.shareCount !== 0">
|
|
{{ children.title }}
|
|
</el-badge>
|
|
<el-badge :value="getDynamicTotal.myStandCount" class="item" v-else-if="children.title === '我的企标' && getDynamicTotal.myStandCount !== 0">
|
|
{{ children.title }}
|
|
</el-badge>
|
|
<div v-else>
|
|
{{ children.title }}
|
|
</div>
|
|
</el-menu-item>
|
|
</el-submenu>
|
|
<el-menu-item
|
|
:key="index"
|
|
:index="item.path"
|
|
v-if="item.isChildren && (!item.menuId || $hasPermission(item.menuId))"
|
|
>
|
|
<i class="shangqi-icon" :class="item['icon-class']"></i>
|
|
<span slot="title">{{ item.title }}</span>
|
|
</el-menu-item>
|
|
</template>
|
|
</el-menu>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import { mapGetters } from 'vuex'
|
|
export default {
|
|
name: 'NavMenu',
|
|
data () {
|
|
return {
|
|
defaultActive: null, // 当前激活菜单的 index
|
|
navMenuList: [
|
|
{
|
|
title: '首页',
|
|
path: '/home1',
|
|
isChildren: true, // 判断没有子菜单
|
|
'icon-class': 'home'
|
|
},
|
|
{
|
|
title: '标准法规库',
|
|
path: '/regulatoryRepository',
|
|
'icon-class': 'fagui',
|
|
menuId: '2ewfwfa',
|
|
children: [
|
|
// {
|
|
// title: '动态&资料',
|
|
// path: '/dynamicInformation',
|
|
// menuId: 'RAFQ4N4ARF'
|
|
// },
|
|
{
|
|
title: '国内标准法规',
|
|
path: '/domesticStandardsAndRegulations',
|
|
menuId: '3e3657498664beaa0dc1de1ecb3ae0da'
|
|
},
|
|
// {
|
|
// title: '零部件编号申请',
|
|
// path: '/partCodeApply',
|
|
// menuId: ''
|
|
// },
|
|
// {
|
|
// title: '标准法规工作组数据统计',
|
|
// path: '/dataStatisComments',
|
|
// menuId: ''
|
|
// },
|
|
{
|
|
title: '海外标准法规',
|
|
path: '/foreignStandardsAndRegulations',
|
|
menuId: '18c1e5134ea0cf865e8960b26b81fd8c'
|
|
},
|
|
{
|
|
title: '标准征求意见',
|
|
path: '/standardForComments',
|
|
menuId: '2b25c67f10abbbadf37d60daaaec54d3'
|
|
},
|
|
|
|
// {
|
|
// title: '国内外政策',
|
|
// path: '/foreignRegulationsDatabase',
|
|
// menuId: '4DB4Y2H3NH'
|
|
// },
|
|
// // // {
|
|
// // // title: '标准制修订管理',
|
|
// // // path: '/demo2One'
|
|
// // // },
|
|
{
|
|
title: '标准法规清单',
|
|
path: '/accessStandardsAndRegulations',
|
|
menuId: '08dbd417864b08426034ca56d1fa3d02'
|
|
},
|
|
// // {
|
|
// // title: '标准法规清单详情',
|
|
// // path: '/details'
|
|
// // }
|
|
// // // {
|
|
// // // title: '试验项目库',
|
|
// // // path: '/demo2One'
|
|
// // // },
|
|
// // // {
|
|
// // // title: '本地产品/项目库',
|
|
// // // path: '/localProductsOrProjectLibrary'
|
|
// // // },
|
|
{
|
|
title: '企业标准库',
|
|
path: '/enterpriseStandardDatabase',
|
|
menuId: '01ed8f752748227777b3572d56ee9ab5'
|
|
},
|
|
// {
|
|
// title: '企标制修订计划',
|
|
// path: '/enterBSysRevPlanManaLib',
|
|
// menuId: 'WW7YDHQ9Z679TGMDZMUS'
|
|
// },
|
|
// // {
|
|
// // title: '子公司标准库',
|
|
// // path: '/subsidiaryStandardLibrary'
|
|
// // }
|
|
{
|
|
title: '车型/项目库',
|
|
path: '/localProductsOrProjectLibrary',
|
|
menuId: '42ce39c9f953be65a3e5643a4a2c786f'
|
|
},
|
|
{
|
|
title: '未符合项整改',
|
|
path: '/nonConfomity',
|
|
menuId: '0119abd677e0204e061eb0f0b8cafda0'
|
|
},
|
|
// {
|
|
// title: '标准法规工作组',
|
|
// path: '/workGroup',
|
|
// menuId: 'QYRMD5TUNBP9XXFRNK5S'
|
|
// },
|
|
// {
|
|
// title: '备案产品标准库',
|
|
// path: '/enterpriseStandardFiling',
|
|
// menuId: 'MQBAGJQMSRZDRX3X5AVR'
|
|
// },
|
|
{
|
|
title: '标准合规评估结果', // 把 标准涉及项目 这几个字 改成 标准合规评估结果
|
|
path: '/standInvolveProject',
|
|
menuId: '8a9c87fe06244fb9d55e78fb281f625b'
|
|
}
|
|
// {
|
|
// title: '动态信息',
|
|
// path: '/information',
|
|
// menuId: 'ULUBXHYQB8M3XQ9HS9QG'
|
|
// }
|
|
]
|
|
},
|
|
{
|
|
title: '工作台',
|
|
path: '/processCenter',
|
|
'icon-class': 'liucheng',
|
|
menuId: '3fadf',
|
|
children: [
|
|
{
|
|
title: '流程中心',
|
|
path: '/processCenter',
|
|
menuId: '7455dc97eac2933341e18be659f07e89'
|
|
},
|
|
{
|
|
title: '新建流程',
|
|
path: '/createProcessNew',
|
|
menuId: 'b53e6722b33a37c0fa2d87a9b06cca40'
|
|
}
|
|
]
|
|
},
|
|
{
|
|
title: '本地工具',
|
|
path: '/localTool',
|
|
'icon-class': 'tools',
|
|
menuId: 'afsd12',
|
|
children: [
|
|
// {
|
|
// title: '标准预警',
|
|
// path: '/standardWarning'
|
|
// },
|
|
{
|
|
title: '标准内容自动识别',
|
|
path: '/standardRecognition',
|
|
menuId: '3db80f62af9d96d6dfc6d429eea4b29b'
|
|
},
|
|
{
|
|
title: '标准拆分',
|
|
path: '/standAutoSplit',
|
|
menuId: '0062e261bc65e27e0a968dac67e16a3c'
|
|
},
|
|
{
|
|
title: '标准比对',
|
|
path: '/standContrast',
|
|
menuId: '1d83a6278f781419f628e9f5560f5c86'
|
|
},
|
|
// {
|
|
// title: '标准比对库',
|
|
// path: '/standardComparisonLibrary',
|
|
// menuId: 'AH56UDHHBVF5V7WZFWJQ'
|
|
// }
|
|
// {
|
|
// title: '预警管理',
|
|
// path: '/warningManage'
|
|
// },
|
|
// {
|
|
// title: '动态&通知管理',
|
|
// path: '/dynamicInformationManage'
|
|
// },
|
|
// {
|
|
// title: '标准编号申领',
|
|
// path: '/applicationStandardNumber'
|
|
// },
|
|
]
|
|
},
|
|
{
|
|
title: '标准预警',
|
|
path: '/standardWarning',
|
|
'icon-class': 'warning',
|
|
menuId: 'asfdew33',
|
|
isChildren: true // 判断没有子菜单
|
|
},
|
|
// {
|
|
// title: '技术要求清单',
|
|
// path: '/skillReq',
|
|
// children: [
|
|
// {
|
|
// title: '技术要求清单查看',
|
|
// path: '/SkillReqSee'
|
|
// },
|
|
// {
|
|
// title: '技术要求清单管理',
|
|
// path: '/SkillReqAdd'
|
|
// }
|
|
// ]
|
|
// },
|
|
{
|
|
title: '配置管理',
|
|
path: '/config',
|
|
'icon-class': 'conf',
|
|
menuId: 'adff323',
|
|
children: [
|
|
{
|
|
title: '标准法规属性管理',
|
|
path: '/standLawsAttrManage',
|
|
menuId: '72a24657972d286b8b5d80735cf4eee2'
|
|
},
|
|
// {
|
|
// title: '资料中心管理',
|
|
// path: '/dynamicInformationManage',
|
|
// menuId: '6V2QZ9STRZ'
|
|
// },
|
|
{
|
|
title: '机构管理',
|
|
path: '/MechanismManage',
|
|
menuId: '5a09164da97760846509c5c9dd86b80c'
|
|
},
|
|
{
|
|
title: '角色管理',
|
|
path: '/roleManage',
|
|
menuId: 'd73d0e230eafdb2ddefe1c97daf657ea'
|
|
},
|
|
{
|
|
title: '岗位管理',
|
|
path: '/postManage',
|
|
menuId: 'd2954be3abaaf2de3dc79add4c8ab8cd'
|
|
},
|
|
// {
|
|
// title: '用户管理',
|
|
// path: '/userManage',
|
|
// menuId: 'YRJUEVJVUJ'
|
|
// },
|
|
// {
|
|
// title: '系统配置管理',
|
|
// path: '/warningTimeSetting',
|
|
// menuId: 'H2KC6P3PPM'
|
|
// },
|
|
// {
|
|
// title: '文档转换监控',
|
|
// path: '/convertDocView',
|
|
// menuId: '3F52K25546'
|
|
// },
|
|
/*{
|
|
title: '菜单管理',
|
|
path: '/menuManage',
|
|
menuId: '87b8b4f5817a7829696e63185c744d52'
|
|
},*/
|
|
{
|
|
title: '链接管理',
|
|
path: '/linkManage',
|
|
menuId: 'd3ff92078c53a4d9d1f1a94450fee91e'
|
|
},
|
|
// // {
|
|
// // title: '保密管理',
|
|
// // path: '/convertDocView'
|
|
// // },
|
|
// {
|
|
// title: '动态信息管理',
|
|
// path: '/DynamicInformations',
|
|
// menuId: '3C87BSHJUF'
|
|
// },
|
|
{
|
|
title: '标准属性自定义',
|
|
path: '/attributeCustom',
|
|
menuId: '9cdb9b40157dd967b664b9af462b960b'
|
|
},
|
|
// // {
|
|
// // title: '流程分类管理',
|
|
// // path: '/processClassificationManage',
|
|
// // menuId: 'N323F2UB9FTUV5SD3GTD'
|
|
// // },
|
|
// // {
|
|
// // title: '流程管理',
|
|
// // path: '/processManage',
|
|
// // menuId: 'K5KXSS3X9CF7CS8AMFJ5'
|
|
// // },
|
|
// {
|
|
// title: 'SVPPS',
|
|
// path: '/svpps',
|
|
// menuId: 'AR52RX586LQHVZSVV83K'
|
|
// },
|
|
// {
|
|
// title: '企标编号管理体系',
|
|
// path: '/enterpriseStandardNumberManagement',
|
|
// menuId: '9YSFG39S3CBFUJCEU3QX'
|
|
// }
|
|
]
|
|
},
|
|
{
|
|
title: '个人中心',
|
|
path: '/personal',
|
|
'icon-class': 'ucenter',
|
|
menuId: '32143ffasdf',
|
|
children: [
|
|
// {
|
|
// title: '我的消息',
|
|
// path: '/dynamics',
|
|
// menuId: 'JCEV4AEV32'
|
|
// },
|
|
// {
|
|
// title: '我的企标',
|
|
// path: '/MyEnterpriseStandard',
|
|
// menuId: 'LKU3W23UMEHDM9VLDHGK'
|
|
// },
|
|
{
|
|
title: '我的收藏',
|
|
path: '/collection',
|
|
menuId: '63e999c65b1f2b1339119a00eb1d50cf'
|
|
},
|
|
// {
|
|
// title: '我的浏览',
|
|
// path: '/browsing',
|
|
// menuId: 'HAEY2A4LMX'
|
|
// },
|
|
// {
|
|
// title: '已收分享',
|
|
// path: '/push',
|
|
// menuId: '9F8T7DPYHE'
|
|
// },
|
|
// {
|
|
// title: '已发分享',
|
|
// path: '/forward',
|
|
// menuId: 'K45Y9TGKZV2K4XP4CETD'
|
|
// },
|
|
// {
|
|
// title: '我的问答',
|
|
// path: '/questionsAndAnswers',
|
|
// menuId: '8VKLZATQQG4NQHXV9UDS'
|
|
// },
|
|
{
|
|
title: '我的板块',
|
|
path: '/plate',
|
|
menuId: 'e4a94f03223df6f4ad70732b96f07221'
|
|
}
|
|
// {
|
|
// title: '个人信息',
|
|
// path: '/info',
|
|
// menuId: '8K7FDHG89G'
|
|
// }
|
|
]
|
|
},
|
|
{
|
|
title: '搜索中心',
|
|
path: '/advancedSearch',
|
|
'icon-class': 'search',
|
|
menuId: '1332FSFAD',
|
|
isChildren: true // 判断没有子菜单
|
|
},
|
|
// {
|
|
// title: '标准比对库',
|
|
// path: '/standardComparisonLibrary',
|
|
// 'icon-class': 'search',
|
|
// menuId: 'Q32VBYVGCAE4XXN3XZ8T',
|
|
// isChildren: true // 判断没有子菜单
|
|
// }
|
|
// {
|
|
// title: '自定义报表',
|
|
// path: '/customReport',
|
|
// 'icon-class': 'baobiao',
|
|
// isChildren: true // 判断没有子菜单
|
|
// }
|
|
]
|
|
}
|
|
},
|
|
created () {
|
|
// 获取当前页的path,赋值没左侧菜单,并展开
|
|
if (this.$route.meta.parentPath) {
|
|
this.defaultActive = this.$route.meta.parentPath
|
|
} else {
|
|
this.defaultActive = this.$route.path
|
|
}
|
|
},
|
|
mounted () {
|
|
},
|
|
computed: {
|
|
logo () {
|
|
return this.isCollapse ? require('assets/images/shangqi/img/logo4.png') : require('assets/images/shangqi/img/logo2.png')
|
|
},
|
|
...mapGetters(['getDynamicTotal', 'isCollapse'])
|
|
},
|
|
watch: {
|
|
// 监听路由 重新渲染面包屑
|
|
$route () {
|
|
// 获取当前页的path,赋值没左侧菜单,并展开
|
|
if (this.$route.meta.parentPath) {
|
|
this.defaultActive = this.$route.meta.parentPath
|
|
} else {
|
|
this.defaultActive = this.$route.path
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
<style lang="less" scoped>
|
|
@import '~@/assets/styles/mixins';
|
|
.nav-menu {
|
|
height: 100%;
|
|
overflow-y: auto;
|
|
user-select: none;
|
|
box-sizing: border-box;
|
|
background: url("~assets/images/shangqi/sideBar/newside-bar-bg1.png") no-repeat;
|
|
background-size: 100% 100%;
|
|
&:not(.is-collapse) {
|
|
width: 212px;
|
|
background: url("~assets/images/shangqi/sideBar/side-bar-bg1.png") no-repeat;
|
|
background-size: 100% 100%;
|
|
.logo {
|
|
img {
|
|
width: 115px;
|
|
height: 43px;
|
|
}
|
|
}
|
|
}
|
|
.logo{
|
|
text-align: center;
|
|
padding: 15px 0;
|
|
img {
|
|
width: 36px;
|
|
height: 35px;
|
|
}
|
|
}
|
|
}
|
|
.has-no-read{
|
|
position: relative;
|
|
top:-15px;
|
|
left:10px
|
|
}
|
|
.nav-menu{
|
|
scrollbar-width: none;
|
|
-ms-overflow-style: none; /* IE 10+ */
|
|
}
|
|
.nav-menu::-webkit-scrollbar {
|
|
display: none; /* Chrome Safari */
|
|
}
|
|
.el-menu-item {
|
|
span {
|
|
font-weight: normal;
|
|
margin-left: 5px;
|
|
}
|
|
.shangqi-icon {
|
|
display: inline-block;
|
|
width: 18px;
|
|
height: 18px;
|
|
background-repeat: no-repeat;
|
|
background-size: 85% 85%;
|
|
background-position: center center;
|
|
&.home {
|
|
background-image: url("~assets/images/shangqi/sideBar/home.png");
|
|
}
|
|
&.baobiao {
|
|
background-image: url("~assets/images/shangqi/sideBar/baobiao.png");
|
|
}
|
|
&.ucenter {
|
|
background-image: url("~assets/images/shangqi/sideBar/ucenter.png");
|
|
}
|
|
&.search {
|
|
background-image: url("~assets/images/shangqi/sideBar/search.png");
|
|
}
|
|
&.warning {
|
|
background-image: url("~assets/images/shangqi/sideBar/warning.png");
|
|
}
|
|
&.liucheng {
|
|
background-image: url("~assets/images/shangqi/sideBar/liucheng.png");
|
|
}
|
|
}
|
|
}
|
|
.el-submenu {
|
|
/deep/.el-submenu__title {
|
|
span {
|
|
font-weight: normal;
|
|
margin-left: 5px;
|
|
}
|
|
.shangqi-icon {
|
|
display: inline-block;
|
|
width: 18px;
|
|
height: 18px;
|
|
background-repeat: no-repeat;
|
|
background-size: 85% 85%;
|
|
background-position: center center;
|
|
&.fagui {
|
|
background-image: url("~assets/images/shangqi/sideBar/fagui.png");
|
|
}
|
|
&.tools {
|
|
background-image: url("~assets/images/shangqi/sideBar/tools.png");
|
|
}
|
|
&.ucenter {
|
|
background-image: url("~assets/images/shangqi/sideBar/ucenter.png");
|
|
}
|
|
&.search {
|
|
background-image: url("~assets/images/shangqi/sideBar/search.png");
|
|
}
|
|
&.conf {
|
|
background-image: url("~assets/images/shangqi/sideBar/conf.png");
|
|
}
|
|
&.liucheng {
|
|
background-image: url("~assets/images/shangqi/sideBar/liucheng.png");
|
|
}
|
|
}
|
|
}
|
|
.el-menu-item {
|
|
padding-left: 29px !important;
|
|
div {
|
|
font-weight: normal;
|
|
}
|
|
}
|
|
/deep/.el-menu {
|
|
padding-left: 18px;
|
|
}
|
|
}
|
|
.el-menu--collapse{
|
|
.shangqi-icon{
|
|
width: 24px;
|
|
height: 24px;
|
|
}
|
|
.el-submenu{
|
|
/deep/.el-submenu__title{
|
|
.shangqi-icon{
|
|
width: 24px;
|
|
height: 24px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|