597 lines
18 KiB
Vue
597 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: 'PMYP5AG3M2',
|
|
children: [
|
|
// {
|
|
// title: '动态&资料',
|
|
// path: '/dynamicInformation',
|
|
// menuId: 'RAFQ4N4ARF'
|
|
// },
|
|
{
|
|
title: '国内标准法规',
|
|
path: '/domesticStandardsAndRegulations',
|
|
menuId: 'A59EFAQ7AC'
|
|
},
|
|
{
|
|
title: '标准征求意见',
|
|
path: '/standardForComments',
|
|
menuId: ''
|
|
},
|
|
// {
|
|
// title: '海外标准法规',
|
|
// path: '/foreignStandardsAndRegulations',
|
|
// menuId: '6K8A2RZYRE'
|
|
// },
|
|
// {
|
|
// title: '国内外政策',
|
|
// path: '/foreignRegulationsDatabase',
|
|
// menuId: '4DB4Y2H3NH'
|
|
// },
|
|
// // // {
|
|
// // // title: '标准制修订管理',
|
|
// // // path: '/demo2One'
|
|
// // // },
|
|
{
|
|
title: '标准法规清单',
|
|
path: '/accessStandardsAndRegulations',
|
|
menuId: 'UR3CSDWEQM6Q2GEW339L'
|
|
},
|
|
// // {
|
|
// // title: '标准法规清单详情',
|
|
// // path: '/details'
|
|
// // }
|
|
// // // {
|
|
// // // title: '试验项目库',
|
|
// // // path: '/demo2One'
|
|
// // // },
|
|
// // // {
|
|
// // // title: '本地产品/项目库',
|
|
// // // path: '/localProductsOrProjectLibrary'
|
|
// // // },
|
|
// {
|
|
// title: '企业标准库',
|
|
// path: '/enterpriseStandardDatabase',
|
|
// menuId: '3YVZP8R4TC'
|
|
// },
|
|
// {
|
|
// title: '企标制修订计划',
|
|
// path: '/enterBSysRevPlanManaLib',
|
|
// menuId: 'WW7YDHQ9Z679TGMDZMUS'
|
|
// },
|
|
// // {
|
|
// // title: '子公司标准库',
|
|
// // path: '/subsidiaryStandardLibrary'
|
|
// // }
|
|
// {
|
|
// title: '车型/项目库',
|
|
// path: '/localProductsOrProjectLibrary',
|
|
// menuId: 'PCZKM8TQJAH5UP5EAXTJ'
|
|
// },
|
|
// {
|
|
// title: '未符合项跟踪',
|
|
// path: '/nonConfomity',
|
|
// menuId: 'HQSK8WWPDJG7R5F53LTK'
|
|
// },
|
|
// {
|
|
// title: '标准法规工作组',
|
|
// path: '/workGroup',
|
|
// menuId: 'QYRMD5TUNBP9XXFRNK5S'
|
|
// },
|
|
// {
|
|
// title: '备案产品标准库',
|
|
// path: '/enterpriseStandardFiling',
|
|
// menuId: 'MQBAGJQMSRZDRX3X5AVR'
|
|
// },
|
|
{
|
|
title: '标准合规评估结果', // 把 标准涉及项目 这几个字 改成 标准合规评估结果
|
|
path: '/standInvolveProject',
|
|
menuId: 'JURHS3LVP35US88ABULS'
|
|
}
|
|
// {
|
|
// title: '动态信息',
|
|
// path: '/information',
|
|
// menuId: 'ULUBXHYQB8M3XQ9HS9QG'
|
|
// }
|
|
]
|
|
},
|
|
// {
|
|
// title: '工作台',
|
|
// path: '/processCenter',
|
|
// 'icon-class': 'liucheng',
|
|
// menuId: '6GDJ5JDHUS',
|
|
// children: [
|
|
// {
|
|
// title: '流程中心',
|
|
// path: '/processCenter'
|
|
// },
|
|
// {
|
|
// title: '发起流程',
|
|
// path: '/createProcessNew'
|
|
// },
|
|
// // {
|
|
// // title: '标准法规管理流程',
|
|
// // path: '/newProcess/1'
|
|
// // },
|
|
// // {
|
|
// // title: '政策管理流程',
|
|
// // path: '/newProcess/2'
|
|
// // },
|
|
// // {
|
|
// // title: '企标管理流程',
|
|
// // path: '/newProcess/3'
|
|
// // },
|
|
// // {
|
|
// // title: '标准采购翻译申请流程',
|
|
// // path: '/newProcess/4'
|
|
// // },
|
|
// // {
|
|
// // title: '工作组会议管理流程',
|
|
// // path: '/newProcess/5'
|
|
// // },
|
|
// // {
|
|
// // title: '标准法规清单管理流程',
|
|
// // path: '/newProcess/6'
|
|
// // }
|
|
// ]
|
|
// },
|
|
|
|
{
|
|
title: '本地工具',
|
|
path: '/localTool',
|
|
'icon-class': 'tools',
|
|
menuId: 'F3RJJEMLK8',
|
|
children: [
|
|
// {
|
|
// title: '标准预警',
|
|
// path: '/standardWarning'
|
|
// },
|
|
{
|
|
title: '标准内容自动识别',
|
|
path: '/standardRecognition',
|
|
menuId: '27RCLPSNL22JAMJ2MBTZ'
|
|
},
|
|
{
|
|
title: '标准拆分',
|
|
path: '/standAutoSplit',
|
|
menuId: 'B8UYM3WFCMGXR2BPF9JA'
|
|
},
|
|
{
|
|
title: '标准比对',
|
|
path: '/standContrast',
|
|
menuId: '3RYN5FLTTDYP7D2PJ44H'
|
|
},
|
|
// {
|
|
// title: '标准比对库',
|
|
// path: '/standardComparisonLibrary',
|
|
// menuId: 'AH56UDHHBVF5V7WZFWJQ'
|
|
// }
|
|
// {
|
|
// title: '预警管理',
|
|
// path: '/warningManage'
|
|
// },
|
|
// {
|
|
// title: '动态&通知管理',
|
|
// path: '/dynamicInformationManage'
|
|
// },
|
|
// {
|
|
// title: '标准编号申领',
|
|
// path: '/applicationStandardNumber'
|
|
// },
|
|
]
|
|
},
|
|
{
|
|
title: '标准预警',
|
|
path: '/standardWarning',
|
|
'icon-class': 'warning',
|
|
menuId: 'ABCLRLJUQN44ENBS93CQ',
|
|
isChildren: true // 判断没有子菜单
|
|
},
|
|
// {
|
|
// title: '技术要求清单',
|
|
// path: '/skillReq',
|
|
// children: [
|
|
// {
|
|
// title: '技术要求清单查看',
|
|
// path: '/SkillReqSee'
|
|
// },
|
|
// {
|
|
// title: '技术要求清单管理',
|
|
// path: '/SkillReqAdd'
|
|
// }
|
|
// ]
|
|
// },
|
|
// {
|
|
// title: '配置管理',
|
|
// path: '/config',
|
|
// 'icon-class': 'conf',
|
|
// menuId: '95KGANGWCV',
|
|
// children: [
|
|
// {
|
|
// title: '标准法规属性管理',
|
|
// path: '/standLawsAttrManage',
|
|
// menuId: 'C5VHBSYRMA'
|
|
// },
|
|
// {
|
|
// title: '资料中心管理',
|
|
// path: '/dynamicInformationManage',
|
|
// menuId: '6V2QZ9STRZ'
|
|
// },
|
|
// {
|
|
// title: '机构管理',
|
|
// path: '/MechanismManage',
|
|
// menuId: '7MWCQK6NNH'
|
|
// },
|
|
// {
|
|
// title: '角色管理',
|
|
// path: '/roleManage',
|
|
// menuId: 'NVU76EMB7N'
|
|
// },
|
|
// {
|
|
// title: '用户管理',
|
|
// path: '/userManage',
|
|
// menuId: 'YRJUEVJVUJ'
|
|
// },
|
|
// {
|
|
// title: '系统配置管理',
|
|
// path: '/warningTimeSetting',
|
|
// menuId: 'H2KC6P3PPM'
|
|
// },
|
|
// {
|
|
// title: '文档转换监控',
|
|
// path: '/convertDocView',
|
|
// menuId: '3F52K25546'
|
|
// },
|
|
// // {
|
|
// // title: '菜单管理',
|
|
// // path: '/menuManage'
|
|
// // },
|
|
// // {
|
|
// // title: '保密管理',
|
|
// // path: '/convertDocView'
|
|
// // },
|
|
// {
|
|
// title: '动态信息管理',
|
|
// path: '/DynamicInformations',
|
|
// menuId: '3C87BSHJUF'
|
|
// },
|
|
// {
|
|
// title: '标准属性自定义',
|
|
// path: '/attributeCustom',
|
|
// menuId: 'PGPZXNUFEXC85BVPV9AU'
|
|
// },
|
|
// // {
|
|
// // 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: 'ZY9RFA4M35',
|
|
// children: [
|
|
// {
|
|
// title: '我的消息',
|
|
// path: '/dynamics',
|
|
// menuId: 'JCEV4AEV32'
|
|
// },
|
|
// {
|
|
// title: '我的企标',
|
|
// path: '/MyEnterpriseStandard',
|
|
// menuId: 'LKU3W23UMEHDM9VLDHGK'
|
|
// },
|
|
// {
|
|
// title: '我的收藏',
|
|
// path: '/collection',
|
|
// menuId: 'JY5LKL2HPD'
|
|
// },
|
|
//
|
|
// {
|
|
// title: '我的浏览',
|
|
// path: '/browsing',
|
|
// menuId: 'HAEY2A4LMX'
|
|
// },
|
|
// {
|
|
// title: '已收分享',
|
|
// path: '/push',
|
|
// menuId: '9F8T7DPYHE'
|
|
// },
|
|
// {
|
|
// title: '已发分享',
|
|
// path: '/forward',
|
|
// menuId: 'K45Y9TGKZV2K4XP4CETD'
|
|
// },
|
|
// {
|
|
// title: '我的问答',
|
|
// path: '/questionsAndAnswers',
|
|
// menuId: '8VKLZATQQG4NQHXV9UDS'
|
|
// },
|
|
// {
|
|
// title: '我的板块',
|
|
// path: '/plate',
|
|
// menuId: 'TUYHX8JBWV'
|
|
// }
|
|
// // {
|
|
// // title: '个人信息',
|
|
// // path: '/info',
|
|
// // menuId: '8K7FDHG89G'
|
|
// // }
|
|
// ]
|
|
// },
|
|
// {
|
|
// title: '搜索中心',
|
|
// path: '/advancedSearch',
|
|
// 'icon-class': 'search',
|
|
// menuId: 'K9BAYUPZBC',
|
|
// 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/logo-isCollapse.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/side-bar-isCollapse-bg.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>
|