<template>
|
<div class="avue-logo">
|
<transition-group name="fade">
|
<template v-if="!keyCollapse">
|
<!--<span
|
key="1"
|
class="avue-logo_title" @click="goIndex"><span
|
class="logo-lg">{{sysTitle&&sysTitle!='null'?sysTitle:'ASUN-MES'}}</span></span>-->
|
<!--<span key="1" class="avue-logo_title" @click="goIndex">
|
<el-image
|
style="width: 220px;"
|
src="/images/Sun-Mes-Logo-Normal.png"
|
/></span>-->
|
<div key="1" style="width:220px;height:60px;background-color:white;position: relative;">
|
<el-image
|
v-if="logSrc != null"
|
style="width:200px;position: absolute;"
|
class="left-logo-image"
|
:src="logSrc"
|
/>
|
<!--<el-image
|
v-else
|
style="width: 220px;position: absolute;"
|
class="left-logo-image"
|
src="/images/Sun-Mes-Logo-Normal.png"
|
/>-->
|
<div
|
style="box-sizing:border-box;width:220px;height:60px;position: absolute;padding-left:70px;"
|
>
|
<div
|
style="text-align:left;height: 30px;font-size:13px;line-height:60px;"
|
>
|
{{ iconNameCn != null ? iconNameCn : '' }}
|
</div>
|
<div
|
style="text-align:left;height: 30px;font-size:12px;line-height:30px;"
|
>
|
{{ iconNameEn != null ? iconNameEn : '' }}
|
</div>
|
</div>
|
</div>
|
</template>
|
<template v-if="keyCollapse">
|
<span key="1" class="avue-logo_title" @click="goIndex"
|
><el-image
|
style="width: 60px; height: 50px"
|
src="/images/Asun-Mes-Logo-small.png"
|
/>
|
</span>
|
</template>
|
</transition-group>
|
</div>
|
</template>
|
|
<script>
|
import { getByStaffId } from '@/api/basic/company'
|
import { mapGetters } from 'vuex'
|
|
export default {
|
name: 'Logo',
|
data() {
|
return {
|
sysTitle: 'ASUN-MES',
|
logSrc: '/img/logo1.png',
|
iconNameCn: '',
|
iconNameEn: ''
|
}
|
},
|
computed: {
|
...mapGetters(['userInfo', 'website', 'keyCollapse'])
|
},
|
created() {
|
this.sysTitle = localStorage.getItem('SYSTEM_LOGO_TITLE')
|
console.log('userInfouserInfo', this.userInfo)
|
// this.getLogoInfo()
|
},
|
methods: {
|
getLogoInfo() {
|
this.logSrc = null
|
this.iconNameCn = null
|
this.iconNameEn = null
|
getByStaffId(this.userInfo.staffId).then((response) => {
|
const resData = response.data.data
|
console.log('resData', resData)
|
if (resData != null) {
|
this.logSrc = resData.fileAddress
|
this.iconNameCn = resData.iconNameCn
|
this.iconNameEn = resData.iconNameEn
|
}
|
})
|
},
|
goIndex: function() {
|
window.location.href = '/'
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss">
|
.left-logo-image .el-image__inner {
|
vertical-align: top !important;
|
}
|
.fade-leave-active {
|
transition: opacity 0.2s;
|
}
|
|
.fade-enter-active {
|
transition: opacity 2.5s;
|
}
|
|
.fade-enter,
|
.fade-leave-to {
|
opacity: 0;
|
}
|
|
.avue-logo {
|
position: fixed;
|
top: 0;
|
left: 0;
|
width: 220px;
|
height: 64px;
|
line-height: 64px;
|
background-color: #006eff;
|
font-size: 20px;
|
overflow: hidden;
|
box-sizing: border-box;
|
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);
|
color: rgba(255, 255, 255, 0.8);
|
z-index: 1024;
|
|
&_title {
|
display: block;
|
text-align: center;
|
font-weight: 300;
|
font-size: 16px;
|
}
|
|
.fade-enter-active {
|
transition: opacity 2.5s;
|
}
|
|
.fade-enter,
|
.fade-leave-to {
|
opacity: 0;
|
}
|
|
.avue-logo {
|
position: fixed;
|
top: 0;
|
left: 0;
|
width: 220px;
|
height: 64px;
|
line-height: 64px;
|
background-color: #006eff;
|
font-size: 20px;
|
overflow: hidden;
|
box-sizing: border-box;
|
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);
|
color: rgba(255, 255, 255, 0.8);
|
z-index: 1024;
|
|
&_title {
|
display: block;
|
text-align: center;
|
font-weight: 300;
|
font-size: 16px;
|
}
|
|
&_subtitle {
|
display: block;
|
text-align: center;
|
font-size: 18px;
|
font-weight: bold;
|
color: #fff;
|
}
|
}
|
}
|
</style>
|