给系统页头增加公司名称的展示

This commit is contained in:
季圣华
2023-02-25 09:53:15 +08:00
parent a820321b1f
commit a7345d50d2
7 changed files with 30 additions and 7 deletions

View File

@@ -12,7 +12,7 @@
:type="collapsed ? 'menu-fold' : 'menu-unfold'"
@click="toggle"></a-icon>
<span v-if="device === 'desktop'"></span>
<span v-if="device === 'desktop'" class="company-name">{{ companyName }}</span>
<span v-else>{{ systemTitle }}</span>
<user-menu :theme="theme" @searchGlobalHeader="searchGlobalHeader" />
@@ -45,6 +45,7 @@
import UserMenu from '../tools/UserMenu'
import SMenu from '../menu/'
import Logo from '../tools/Logo'
import { getCurrentSystemConfig } from '@/api/api'
import { mixin } from '@/utils/mixin.js'
@@ -86,6 +87,7 @@
return {
headerBarFixed: false,
systemTitle: window.SYS_TITLE,
companyName: '',
//update-begin--author:sunjianlei---date:20190508------for: 顶部导航栏过长时显示更多按钮-----
topMenuStyle: {
headerIndexLeft: {},
@@ -118,6 +120,9 @@
}
//update-end--author:sunjianlei---date:20190508------for: 顶部导航栏过长时显示更多按钮-----
},
created () {
this.initSystemConfig()
},
methods: {
handleScroll() {
if (this.autoHideHeader) {
@@ -154,7 +159,14 @@
},
searchGlobalHeader(key, id, title, component){
this.$emit("searchGlobalLayout", key, id, title, component)
}
},
initSystemConfig() {
getCurrentSystemConfig().then((res) => {
if(res.code === 200 && res.data){
this.companyName = res.data.companyName
}
})
},
//update-begin--author:sunjianlei---date:20190508------for: 顶部导航栏过长时显示更多按钮-----
}
}
@@ -212,6 +224,11 @@
line-height: @height;
}
.company-name {
font-size:16px;
padding-left:10px
}
/* update_end author:scott date:20190220 for: 缩小首页布局顶部的高度*/
</style>