a74568a4 by renchao@pashanhoo.com

style:头部样式的修改

1 parent c94a2161
......@@ -23,3 +23,5 @@ yarn-error.log*
*.sw?
package-lock.json
public/config.json
......
......@@ -9,17 +9,16 @@
</div>
<div class="right-menu">
<svg-icon class="function" icon-class='function' />
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="hover" @command="handleCommand">
<div class="avatar-wrapper">
<span style="padding-right:10px">{{ name }}</span>
<img :src="avatar + '?imageView2/1/w/80/h/80'" class="user-avatar" />
<!-- <i class="el-icon-caret-bottom" /> -->
</div>
<!-- <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="hover" @command="handleCommand">
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="a">个人中心</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown> -->
<div class="avatar-wrapper">
<span style="padding-right:10px">{{ name }}</span>
<img :src="avatar + '?imageView2/1/w/80/h/80'" class="user-avatar" />
<!-- <i class="el-icon-caret-bottom" /> -->
</div>
<svg-icon class="shutdown" @click.native="logout" icon-class='shutdown' />
</div>
......@@ -28,242 +27,243 @@
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import NoticeBar from '@/components/NoticeBar/index'
import {
getHomeNoticeList
} from "@/api/user"
export default {
components: {
NoticeBar
},
computed: {
...mapGetters(['sidebar', 'avatar', 'name']),
baseUrl () {
return window.baseUrl;
import { mapGetters } from 'vuex'
import NoticeBar from '@/components/NoticeBar/index'
import {
getHomeNoticeList
} from "@/api/user"
export default {
components: {
NoticeBar
},
},
data () {
return {
logo: require('../../image/logo.png'),
noticeList: []
}
},
created () {
this.queryNoticeList()
},
mounted () {
let that = this
window.addEventListener('message', function (messageEvent) {
if (messageEvent.data.update) {
that.queryNoticeList()
computed: {
...mapGetters(['sidebar', 'avatar', 'name']),
baseUrl () {
return window.baseUrl;
},
},
data () {
return {
logo: require('../../image/logo.png'),
noticeList: []
}
})
},
destroyed () {
window.removeEventListener('message')
},
methods: {
queryNoticeList () {
getHomeNoticeList().then(res => {
if (res.result) {
this.noticeList = res.result.noticeList
},
created () {
this.queryNoticeList()
},
mounted () {
let that = this
window.addEventListener('message', function (messageEvent) {
if (messageEvent.data.update) {
that.queryNoticeList()
}
})
},
logout () {
const url = baseUrl + "/sso-logout?redirect_uri=" + baseUrl + "/bdcdj";
window.open(url, "_self");
sessionStorage.removeItem("navList");
destroyed () {
window.removeEventListener('message')
},
methods: {
themeChange (val) {
this.$store.dispatch('app/updateTheme', val)
},
searchMessageCenter () {
this.$router.push({ name: 'messagecenter' })
},
handleCommand (command) {
if (command == 'a') {
//个人中心
this.$router.push({ name: 'personal' })
queryNoticeList () {
getHomeNoticeList().then(res => {
if (res.result) {
this.noticeList = res.result.noticeList
}
})
},
logout () {
const url = baseUrl + "/sso-logout?redirect_uri=" + baseUrl + "/bdcdj";
window.open(url, "_self");
sessionStorage.removeItem("navList");
},
themeChange (val) {
this.$store.dispatch('app/updateTheme', val)
},
searchMessageCenter () {
this.$router.push({ name: 'messagecenter' })
},
handleCommand (command) {
if (command == 'a') {
//个人中心
this.$router.push({ name: 'personal' })
}
}
}
}
}
</script>
<style lang="scss" scoped>
.navbar-con {
position: relative;
}
.NoticeBar {
position: absolute;
bottom: 0;
}
.el-dropdown-menu {
padding: 0 !important;
border: 1px solid #EBEEF5;
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.12);
border-radius: 4px 0 0 4px 4px;
.el-dropdown-menu__item {
text-align: center;
margin-top: 0 !important;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #4A4A4A;
width: 140px;
height: 36px;
line-height: 36px;
}
.el-dropdown-menu__item:nth-child(6) {
border-top: 1px solid #EBEEF5;
}
.popper__arrow {
top: -11px !important;
left: 110px !important;
transform: rotate(0deg) scale(2);
.navbar-con {
position: relative;
}
.el-dropdown-menu__item:not(.is-disabled):hover,
.el-dropdown-menu__item:focus {
background: #F6F7F9;
color: #4A4A4A;
.NoticeBar {
position: absolute;
bottom: 0;
}
}
.navbar {
height: $headerHeight;
overflow: hidden;
position: relative;
background: #fff;
// background: linear-gradient(270deg, #148CEE 0%, #1870E3 100%); //默认颜色
box-shadow: 0 1px 0px rgba(0, 21, 41, 0.08);
display: flex;
align-items: center;
padding: 0 20px;
justify-content: space-between;
.el-dropdown-menu {
padding: 0 !important;
border: 1px solid #ebeef5;
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.12);
border-radius: 4px 0 0 4px 4px;
.header-logo {
width: 300px;
}
.backdrop {
flex: 1;
width: 60%;
background: url('../../image/backdrop.png');
background-size: 100% 100%;
height: $headerHeight;
}
.el-dropdown-menu__item {
text-align: center;
margin-top: 0 !important;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #4a4a4a;
width: 140px;
height: 36px;
line-height: 36px;
}
.hamburger-container {
line-height: 43px;
height: 100%;
float: left;
cursor: pointer;
transition: background 0.3s;
-webkit-tap-highlight-color: transparent;
.el-dropdown-menu__item:nth-child(6) {
border-top: 1px solid #ebeef5;
}
&:hover {
background: rgba(0, 0, 0, 0.025);
.popper__arrow {
top: -11px !important;
left: 110px !important;
transform: rotate(0deg) scale(2);
}
}
.breadcrumb-container {
float: left;
.el-dropdown-menu__item:not(.is-disabled):hover,
.el-dropdown-menu__item:focus {
background: #f6f7f9;
color: #4a4a4a;
}
}
.right-menu {
float: right;
height: 100%;
line-height: 50px;
.navbar {
height: $headerHeight;
overflow: hidden;
position: relative;
background: #fff;
// background: linear-gradient(270deg, #148CEE 0%, #1870E3 100%); //默认颜色
box-shadow: 0 1px 0px rgba(0, 21, 41, 0.08);
display: flex;
align-items: center;
padding: 0 20px;
justify-content: space-between;
.function {
margin: 0 15px;
cursor: pointer;
.header-logo {
width: 300px;
}
.backdrop {
flex: 1;
width: 60%;
background: url("../../image/backdrop.png");
background-size: 100% 100%;
height: $headerHeight;
}
.shutdown {
font-size: 20px;
margin-left: 15px;
.hamburger-container {
line-height: 43px;
height: 100%;
float: left;
cursor: pointer;
transition: background 0.3s;
-webkit-tap-highlight-color: transparent;
&:hover {
background: rgba(0, 0, 0, 0.025);
}
}
.organization-item {
margin-right: 40px;
margin-top: -40px !important;
.breadcrumb-container {
float: left;
}
.item {
margin-right: 40px;
margin-top: -20px;
line-height: 18.4px;
cursor: pointer;
position: relative;
.right-menu {
float: right;
height: 100%;
line-height: 50px;
display: flex;
align-items: center;
.item-box {
position: absolute;
top: -5px;
left: 3px;
width: 100%;
min-width: 25px;
height: 25px;
.function {
margin: 0 15px;
cursor: pointer;
z-index: 100;
}
}
&:focus {
outline: none;
}
.shutdown {
font-size: 20px;
margin-left: 15px;
cursor: pointer;
}
.right-menu-item {
display: inline-block;
font-size: 18px;
color: #fff;
vertical-align: text-bottom;
.organization-item {
margin-right: 40px;
margin-top: -40px !important;
}
&.hover-effect {
.item {
margin-right: 40px;
margin-top: -20px;
line-height: 18.4px;
cursor: pointer;
transition: background 0.3s;
display: flex;
align-items: center;
position: relative;
&:hover {
background: rgba(0, 0, 0, 0.025);
.item-box {
position: absolute;
top: -5px;
left: 3px;
width: 100%;
min-width: 25px;
height: 25px;
cursor: pointer;
z-index: 100;
}
}
}
.avatar-wrapper {
position: relative;
display: flex;
height: 40px;
align-items: center;
&:focus {
outline: none;
}
.user-avatar {
cursor: pointer;
width: 35px;
height: 35px;
border-radius: 50%;
.right-menu-item {
display: inline-block;
font-size: 18px;
color: #fff;
vertical-align: text-bottom;
&.hover-effect {
cursor: pointer;
transition: background 0.3s;
display: flex;
align-items: center;
&:hover {
background: rgba(0, 0, 0, 0.025);
}
}
}
.el-icon-caret-bottom {
cursor: pointer;
position: absolute;
right: -15px;
top: 17px;
font-size: 12px;
.avatar-wrapper {
position: relative;
display: flex;
height: 40px;
align-items: center;
color: #ffffff;
.user-avatar {
cursor: pointer;
width: 35px;
height: 35px;
border-radius: 50%;
}
.el-icon-caret-bottom {
cursor: pointer;
position: absolute;
right: -15px;
top: 17px;
font-size: 12px;
}
}
}
}
}
</style>
......