This commit is contained in:
zhutianqi
2021-11-04 11:18:12 +08:00
parent d172c99d49
commit bb292f1c0a
3 changed files with 123 additions and 94 deletions
+43 -10
View File
@@ -16,9 +16,9 @@
<el-menu <el-menu
unique-opened unique-opened
:default-active="defaultActive" :default-active="defaultActive"
background-color="#f00" background-color="#0068B7"
text-color="#fff" text-color="#fff"
active-text-color="#ff0" active-text-color="#000"
router router
:collapse="isCollapse" :collapse="isCollapse"
> >
@@ -91,12 +91,12 @@ export default {
title: '首页', title: '首页',
path: '/home2', path: '/home2',
isChildren: true, // 判断没有子菜单 isChildren: true, // 判断没有子菜单
'icon-class': 'home' 'icon-class': 'el-icon-s-home'
}, },
{ {
title: '标准法规库', title: '标准法规库',
path: '/regulatoryRepository', path: '/regulatoryRepository',
'icon-class': 'fagui', 'icon-class': 'el-icon-s-management',
menuId: '2ewfwfa', menuId: '2ewfwfa',
children: [ children: [
// { // {
@@ -204,7 +204,7 @@ export default {
{ {
title: '我的工作', title: '我的工作',
path: '/processCenter', path: '/processCenter',
'icon-class': 'liucheng', 'icon-class': 'el-icon-s-platform',
menuId: '3fadf', menuId: '3fadf',
children: [ children: [
{ {
@@ -222,7 +222,7 @@ export default {
{ {
title: '本地工具', title: '本地工具',
path: '/localTool', path: '/localTool',
'icon-class': 'tools', 'icon-class': 'el-icon-s-tools',
menuId: 'afsd12', menuId: 'afsd12',
children: [ children: [
// { // {
@@ -266,7 +266,7 @@ export default {
{ {
title: '标准预警', title: '标准预警',
path: '/standardWarning', path: '/standardWarning',
'icon-class': 'warning', 'icon-class': 'el-icon-warning',
menuId: 'asfdew33', menuId: 'asfdew33',
isChildren: true // 判断没有子菜单 isChildren: true // 判断没有子菜单
}, },
@@ -287,7 +287,7 @@ export default {
{ {
title: '配置管理', title: '配置管理',
path: '/config', path: '/config',
'icon-class': 'conf', 'icon-class': 'el-icon-s-operation',
menuId: 'adff323', menuId: 'adff323',
children: [ children: [
{ {
@@ -379,7 +379,7 @@ export default {
{ {
title: '个人中心', title: '个人中心',
path: '/personal', path: '/personal',
'icon-class': 'ucenter', 'icon-class': 'el-icon-s-check',
menuId: '32143ffasdf', menuId: '32143ffasdf',
children: [ children: [
// { // {
@@ -496,6 +496,18 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@import '~@/assets/styles/mixins'; @import '~@/assets/styles/mixins';
/deep/.el-menu--popup > div {
border-radius: 5px;
}
.el-menu--collapse {
.is-active {
background-color: #fff !important;
.shangqi-icon {
color: #0068B7 !important;
}
color: #0068B7 !important;
}
}
.nav-menu { .nav-menu {
width: 58px; width: 58px;
height: 100%; height: 100%;
@@ -565,10 +577,31 @@ export default {
top:-15px; top:-15px;
left:10px left:10px
} }
/*.el-menu--collapse {*/
/* .shangqi-icon {*/
/* color: #4091FF !important;*/
/* }*/
/* .is-active /deep/.shangqi-icon {*/
/* color: #4091FF !important;*/
/* }*/
/* /deep/.el-submenu__title i {*/
/* color: #fff;*/
/* }*/
/* /deep/.el-submenu__title i {*/
/* color: #fff;*/
/* }*/
/*}*/
.is-active /deep/.shangqi-icon {
color: #4091FF;
}
/deep/.el-submenu__title i {
color: #fff;
}
.nav-menu /deep/.el-submenu__title i { .nav-menu /deep/.el-submenu__title i {
color: #000; color: #fff;
} }
.nav-menu{ .nav-menu{
background-color: #4091FF;
scrollbar-width: none; scrollbar-width: none;
-ms-overflow-style: none; /* IE 10+ */ -ms-overflow-style: none; /* IE 10+ */
} }
+1
View File
@@ -64,6 +64,7 @@
height: 70px; height: 70px;
background: #fff; background: #fff;
border: 2px dashed #E4E4E4; border: 2px dashed #E4E4E4;
border-radius: 5px;
div { div {
width: 100%; width: 100%;
height: 100%; height: 100%;
+30 -35
View File
@@ -1,16 +1,13 @@
<!-- 尾部链接 --> <!-- 尾部链接 -->
<template> <template>
<div class="link"> <div class="link" id="link">
<div class="title">友情链接</div> <div>
<ul> <span class="title borderRight">友情链接</span>
<li class="myLi1" v-for="(link, index) in linkList" v-if="index<5" :key="index" @click="openLinkUrl(link.url)"> <span class="myLi1 borderRight" v-for="(link, index) in linkList" :key="index" @click="openLinkUrl(link.url)" :title="link.name" >
<a v-if="link.name.length>10" v-html="link.name.substring(0,10)+'...'" :title="link.name"></a> {{ link.name }}
<a v-else v-html="link.name" :title="link.name"></a> </span>
</li> <span class="myLi1" @click="$router.push('linkManage')">更多链接 ⋙</span>
<li class="myLi2"> </div>
<span @click="$router.push('linkManage')">更多链接 ⋙</span>
</li>
</ul>
</div> </div>
</template> </template>
@@ -42,12 +39,25 @@ export default {
}, },
// 获取链接数据 // 获取链接数据
getLink () { getLink () {
var width = document.getElementById("link").offsetWidth
this.$http.get('sarUrl/tsUrl', { this.$http.get('sarUrl/tsUrl', {
}, { }, {
_this: this, _this: this,
loading: 'Loading' loading: 'Loading'
}, res=> { }, res=> {
this.linkList = res.data let b = 0
let c = 0
for (let a = 0; a < res.data.length; a++) {
b += res.data[a].name.length * 14 + 100
if (b > width) {
c = a - 1
} else {
c = a
}
}
let list
list = res.data.slice(0, c)
this.linkList = list
}) })
} }
}, },
@@ -60,36 +70,21 @@ export default {
display: flex; display: flex;
border-radius: 3px; border-radius: 3px;
height: 100%; height: 100%;
align-items: center;
justify-content: space-around;
.borderRight {
padding-right: 30px;
margin-right: 30px;
border-right: 2px dotted #aaa;
}
.title { .title {
font-weight: bold; font-weight: bold;
padding-left: 10px; padding-left: 10px;
width: 80px; width: 80px;
} }
ul {
width: calc(~'100% - 80px');
display: flex;
height: 100%;
text-align: center;
user-select: none;
.myLi1 { .myLi1 {
border-right: 2px solid #f4f4f4;
flex: 1;
a {
color: #333333;
}
}
.myLi1:hover {
background: #5ea9f6;
a {
color: #fff;
text-decoration: none;
}
}
.myLi2 {
padding: 0 10px;
cursor: pointer; cursor: pointer;
color: #5ea9f6 !important; color: #0068B7;
}
} }
} }
</style> </style>