|
@@ -16,9 +16,12 @@
|
|
|
@mouseenter="showBizIdSelect = true"
|
|
|
@mouseleave="showBizIdSelect = false"
|
|
|
>
|
|
|
- <img src="../../assets/业务线选择.png" class="business-logo"><span v-show="showBizIdSelect">项目管理首页</span>
|
|
|
+ <img src="../../assets/业务线选择.png" class="business-logo"><span
|
|
|
+ v-show="showBizIdSelect"
|
|
|
+ >项目管理首页</span
|
|
|
+ >
|
|
|
</div>
|
|
|
- <span style="font-size: 16px;">{{ bizName }}</span>
|
|
|
+ <span style="font-size: 16px">{{ bizName }}</span>
|
|
|
<div
|
|
|
class="icon-select"
|
|
|
@mouseenter="showBizIdSelect = true"
|
|
@@ -37,11 +40,22 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<ul class="all-pages-list">
|
|
|
- <li v-for="item in routesList" :key="item.path" @click="handleClickRouter(item)">
|
|
|
+ <li
|
|
|
+ v-for="item in routesList"
|
|
|
+ :key="item.path"
|
|
|
+ @click="handleClickRouter(item)"
|
|
|
+ >
|
|
|
<template v-if="!item.hidden">
|
|
|
<div v-if="item.cutOff" class="cut-off" />
|
|
|
- <div class="page-item" :class="{ 'active-page': activePage === item.name }">
|
|
|
- <svg-icon v-if="item.icon" v-show="navTagType === 1" :icon-class="item.icon" />
|
|
|
+ <div
|
|
|
+ class="page-item"
|
|
|
+ :class="{ 'active-page': activePage === item.name }"
|
|
|
+ >
|
|
|
+ <svg-icon
|
|
|
+ v-if="item.icon"
|
|
|
+ v-show="navTagType === 1"
|
|
|
+ :icon-class="item.icon"
|
|
|
+ />
|
|
|
{{ item.name }}
|
|
|
</div>
|
|
|
</template>
|
|
@@ -51,14 +65,20 @@
|
|
|
<img src="../../assets/expand.png" @click="toggleCollapsed()">
|
|
|
</div>
|
|
|
</section>
|
|
|
- <section v-show="collapsed && navTagType === 1 && showNavTag" class="left-aside-collapsed">
|
|
|
- <div class="button-collapsed" @click="toggleCollapsed()"><i class="el-icon-arrow-right" /></div>
|
|
|
+ <section
|
|
|
+ v-show="collapsed && navTagType === 1 && showNavTag"
|
|
|
+ class="left-aside-collapsed"
|
|
|
+ >
|
|
|
+ <div class="button-collapsed" @click="toggleCollapsed()">
|
|
|
+ <i class="el-icon-arrow-right" />
|
|
|
+ </div>
|
|
|
</section>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import { mapGetters } from 'vuex'
|
|
|
import routes from '@/router/newRouter'
|
|
|
+
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -68,7 +88,14 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(['bizId', 'bizName', 'activeNavTag', 'navTagType', 'showNavTag', 'collapsed'])
|
|
|
+ ...mapGetters([
|
|
|
+ 'bizId',
|
|
|
+ 'bizName',
|
|
|
+ 'activeNavTag',
|
|
|
+ 'navTagType',
|
|
|
+ 'showNavTag',
|
|
|
+ 'collapsed'
|
|
|
+ ])
|
|
|
},
|
|
|
watch: {
|
|
|
// 当前2级导航栏对应的1级导航
|
|
@@ -96,7 +123,7 @@ export default {
|
|
|
const config = routes.find(item => item.name === this.activeNavTag)
|
|
|
this.routesList = config.children
|
|
|
// 子路由数量小于1,隐藏二级侧边栏控制
|
|
|
- if (this.routesList.length <= 1) {
|
|
|
+ if (this.routesList.length <= 1 || config.name.search(/质量月报/) > -1) {
|
|
|
this.$store.dispatch('global/setShowNavTag', false) // 不展示二级侧边栏
|
|
|
this.$store.dispatch('global/setCollapsed', true) // 二级侧边栏收起
|
|
|
} else {
|
|
@@ -119,14 +146,17 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
-ul,li{
|
|
|
+ul,
|
|
|
+li {
|
|
|
list-style: none;
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
}
|
|
|
+
|
|
|
section {
|
|
|
height: 100%;
|
|
|
}
|
|
|
+
|
|
|
@keyframes expande {
|
|
|
0% {
|
|
|
width: 0;
|
|
@@ -135,6 +165,7 @@ section {
|
|
|
width: 135px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
@keyframes close {
|
|
|
0% {
|
|
|
width: 135px;
|
|
@@ -143,6 +174,7 @@ section {
|
|
|
width: 0;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
@keyframes topExpande {
|
|
|
0% {
|
|
|
height: 0;
|
|
@@ -151,14 +183,17 @@ section {
|
|
|
height: 60px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.left-aside {
|
|
|
width: 135px;
|
|
|
// animation: 0.5s expande linear;
|
|
|
}
|
|
|
+
|
|
|
.hidden-left-aside {
|
|
|
width: 0;
|
|
|
// animation: 0.5s close linear;
|
|
|
}
|
|
|
+
|
|
|
//左边导航栏样式
|
|
|
.left-aside,
|
|
|
.hidden-left-aside {
|
|
@@ -166,6 +201,7 @@ section {
|
|
|
position: relative;
|
|
|
overflow: hidden;
|
|
|
background-color: #ffffff;
|
|
|
+
|
|
|
.business {
|
|
|
position: relative;
|
|
|
width: 100%;
|
|
@@ -178,12 +214,15 @@ section {
|
|
|
font-size: 18px;
|
|
|
border-bottom: 1px solid #eeeeee;
|
|
|
white-space: nowrap;
|
|
|
+
|
|
|
svg {
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
+
|
|
|
.icon-select {
|
|
|
margin-left: 2px;
|
|
|
}
|
|
|
+
|
|
|
.business-select {
|
|
|
cursor: pointer;
|
|
|
position: absolute;
|
|
@@ -195,21 +234,25 @@ section {
|
|
|
padding-left: 5px;
|
|
|
background-color: #f2f8ff;
|
|
|
border-radius: 0px 0px 10px 0px;
|
|
|
+
|
|
|
span {
|
|
|
margin-right: 5px;
|
|
|
font-size: 12px;
|
|
|
color: #565656;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.show-business-all {
|
|
|
width: 100px;
|
|
|
}
|
|
|
+
|
|
|
.business-logo {
|
|
|
height: 15px;
|
|
|
width: 15px;
|
|
|
margin-right: 2px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.all-pages-list {
|
|
|
margin-top: 10px;
|
|
|
display: flex;
|
|
@@ -219,30 +262,37 @@ section {
|
|
|
color: #444444;
|
|
|
height: calc(100vh - 110px);
|
|
|
overflow-y: auto;
|
|
|
+
|
|
|
li {
|
|
|
width: 100%;
|
|
|
}
|
|
|
+
|
|
|
.page-item {
|
|
|
width: 100%;
|
|
|
white-space: nowrap;
|
|
|
padding: 5px 0 0px 27px;
|
|
|
margin-bottom: 10px;
|
|
|
cursor: pointer;
|
|
|
+
|
|
|
svg {
|
|
|
margin-right: 5px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.active-page {
|
|
|
color: #409eff;
|
|
|
}
|
|
|
+
|
|
|
.cut-off {
|
|
|
border-top: 1px solid #eeeeee;
|
|
|
margin: 5px 25px 10px 25px;
|
|
|
}
|
|
|
+
|
|
|
.page-item:hover {
|
|
|
background-color: rgba(64, 158, 255, 0.1);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.bottom-collapsed {
|
|
|
height: 40px;
|
|
|
padding: 0px;
|
|
@@ -256,6 +306,7 @@ section {
|
|
|
justify-content: flex-end;
|
|
|
font-size: 30px;
|
|
|
background: #fff;
|
|
|
+
|
|
|
img {
|
|
|
cursor: pointer;
|
|
|
height: 20px;
|
|
@@ -264,6 +315,7 @@ section {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
//顶部导航栏样式
|
|
|
.top-aside {
|
|
|
width: calc(100% - 80px);
|
|
@@ -278,7 +330,8 @@ section {
|
|
|
overflow: hidden;
|
|
|
background-color: #ffffff;
|
|
|
// animation: 0.5s topExpande linear;
|
|
|
- border-bottom: 10px solid #F2F3F6;
|
|
|
+ border-bottom: 10px solid #f2f3f6;
|
|
|
+
|
|
|
.business {
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
@@ -293,12 +346,15 @@ section {
|
|
|
font-size: 18px;
|
|
|
border-right: 1px solid #eeeeee;
|
|
|
white-space: nowrap;
|
|
|
+
|
|
|
svg {
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
+
|
|
|
.icon-select {
|
|
|
margin-left: 2px;
|
|
|
}
|
|
|
+
|
|
|
.business-select {
|
|
|
cursor: pointer;
|
|
|
position: absolute;
|
|
@@ -310,32 +366,38 @@ section {
|
|
|
padding-left: 5px;
|
|
|
background-color: #f2f8ff;
|
|
|
border-radius: 0px 0px 10px 0px;
|
|
|
+
|
|
|
span {
|
|
|
margin-right: 5px;
|
|
|
font-size: 12px;
|
|
|
color: #565656;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.show-business-all {
|
|
|
width: 100px;
|
|
|
}
|
|
|
+
|
|
|
.business-logo {
|
|
|
height: 15px;
|
|
|
width: 15px;
|
|
|
margin-right: 2px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.all-pages-list {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
font-size: 14px;
|
|
|
color: #444444;
|
|
|
height: 100%;
|
|
|
+
|
|
|
li {
|
|
|
height: 100%;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
}
|
|
|
+
|
|
|
.page-item {
|
|
|
height: 100%;
|
|
|
display: flex;
|
|
@@ -345,9 +407,11 @@ section {
|
|
|
margin-right: 10px;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
+
|
|
|
.active-page {
|
|
|
color: #409eff;
|
|
|
}
|
|
|
+
|
|
|
.cut-off {
|
|
|
height: 60%;
|
|
|
margin: auto;
|
|
@@ -355,15 +419,18 @@ section {
|
|
|
margin-left: 10px;
|
|
|
margin-right: 20px;
|
|
|
}
|
|
|
+
|
|
|
.page-item:hover {
|
|
|
background-color: rgba(64, 158, 255, 0.1);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.left-aside-collapsed {
|
|
|
background-color: #f7f8fc;
|
|
|
color: #409eff;
|
|
|
height: 100%;
|
|
|
+
|
|
|
.button-collapsed {
|
|
|
cursor: pointer;
|
|
|
position: absolute;
|
|
@@ -376,16 +443,18 @@ section {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
border-bottom: 1px solid #409eff;
|
|
|
- border-top: 1px solid#409eff;
|
|
|
+ border-top: 1px solid #409eff;
|
|
|
border-right: 1px solid #409eff;
|
|
|
border-top-right-radius: 4px;
|
|
|
border-bottom-right-radius: 4px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.iconFont {
|
|
|
font-size: 14px;
|
|
|
margin: 3px 4px 0;
|
|
|
}
|
|
|
+
|
|
|
.iconFont:hover {
|
|
|
cursor: pointer;
|
|
|
color: #409eff;
|