|
@@ -13,7 +13,7 @@
|
|
}"
|
|
}"
|
|
v-for="(obj, index) in appSystem"
|
|
v-for="(obj, index) in appSystem"
|
|
:key="index"
|
|
:key="index"
|
|
- v-if="index < numerous"
|
|
|
|
|
|
+ v-if="showBackground||obj.key!=7"
|
|
>
|
|
>
|
|
<div class="MainHead-title">{{ obj.title }}</div>
|
|
<div class="MainHead-title">{{ obj.title }}</div>
|
|
</div>
|
|
</div>
|
|
@@ -99,20 +99,26 @@
|
|
<script>
|
|
<script>
|
|
import elementResizeDetectorMaker from 'element-resize-detector'
|
|
import elementResizeDetectorMaker from 'element-resize-detector'
|
|
import { mapMutations, mapState } from 'vuex'
|
|
import { mapMutations, mapState } from 'vuex'
|
|
|
|
+import api from '@/api/login.js'
|
|
export default {
|
|
export default {
|
|
name: 'MainHead',
|
|
name: 'MainHead',
|
|
props: ['menus', 'background', 'appKey'],
|
|
props: ['menus', 'background', 'appKey'],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ showBackground:false,
|
|
show: false, //是否打开更多应用
|
|
show: false, //是否打开更多应用
|
|
numerous: 5, //默认展示几个
|
|
numerous: 5, //默认展示几个
|
|
customArr: ['customIcon', 'userCustomIcon'], //自定义图标
|
|
customArr: ['customIcon', 'userCustomIcon'], //自定义图标
|
|
- appSystem: [{'key':1,'title':'首页','component':'/knowledgePage/home','menuNavType':2},
|
|
|
|
- {'key':2,'title':'知识仓库','component':'/knowledgePage/warehouseIndex','menuNavType':2},
|
|
|
|
- {'key':3,'title':'知识地图','component':'/knowledgePage/mapIndex','menuNavType':2},
|
|
|
|
- {'key':4,'title':'知识专辑','component':'/knowledgePage/albumIndex','menuNavType':2},
|
|
|
|
- {'key':5,'title':'知识学习','component':'http://www.hkcqjy.com.cn:8088/learning/','menuNavType':2},
|
|
|
|
- {'key':6,'title':'统计分析','component':'/knowledgePage/analysis','menuNavType':2},
|
|
|
|
|
|
+ appSystem: [{'key':1,'title':'首页','component':'/knowledgePage/home','menuNavType':2,'initArr':['home','']},
|
|
|
|
+ {'key':2,'title':'知识仓库','component':'/knowledgePage/warehouseIndex','menuNavType':2,
|
|
|
|
+ 'initArr':['warehouseIndex','searchData','contentData','knowledgeAddUpdate','knowledgeContentInfo','knowledgeAuditInfo']},
|
|
|
|
+ {'key':3,'title':'知识地图','component':'/knowledgePage/mapIndex','menuNavType':2,
|
|
|
|
+ 'initArr':['mapList','mapIndex']},
|
|
|
|
+ {'key':4,'title':'知识专辑','component':'/knowledgePage/albumIndex','menuNavType':2,
|
|
|
|
+ 'initArr':['albumDetail','albumIndex']},
|
|
|
|
+ {'key':5,'title':'知识学习','component':'http://www.hkcqjy.com.cn:8088/learning/','menuNavType':2,'initArr':[]},
|
|
|
|
+ {'key':6,'title':'统计分析','component':'/knowledgePage/analysis','menuNavType':2,'initArr':['analysis']},
|
|
|
|
+ {'key':7,'title':'管理后台','component':'/knowledge/knowledge','menuNavType':2,'initArr':[]},
|
|
], //系统应用
|
|
], //系统应用
|
|
appSystemMore: [],
|
|
appSystemMore: [],
|
|
appAdhibition: [], //应用
|
|
appAdhibition: [], //应用
|
|
@@ -142,8 +148,22 @@ export default {
|
|
this.watchSize() //计算展示几个头部栏目
|
|
this.watchSize() //计算展示几个头部栏目
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- ...mapMutations('appSetting', ['setAppUse']),
|
|
|
|
|
|
+ ...mapMutations('appSetting', ['setAppUse','setAppKey']),
|
|
init() {
|
|
init() {
|
|
|
|
+ let urlData = location.href.split("/").pop()
|
|
|
|
+ urlData=urlData.split("?")[0]
|
|
|
|
+ let that = this
|
|
|
|
+ this.appSystem.forEach(function(item){
|
|
|
|
+ if(item.initArr.indexOf(urlData)>-1){
|
|
|
|
+ that.setAppKey(item.key)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ api.getLoginUserAndMenu().then((res) => {
|
|
|
|
+ let nemuArr=res.data.menus.filter((item) => {return item.parentId=='1605810703702851585'})
|
|
|
|
+ if(nemuArr.length!=0){
|
|
|
|
+ this.showBackground=true
|
|
|
|
+ }
|
|
|
|
+ })
|
|
// console.log(this.menus)
|
|
// console.log(this.menus)
|
|
//张立注释,截图
|
|
//张立注释,截图
|
|
/*this.appSystem = this.menus.filter((res) => {
|
|
/*this.appSystem = this.menus.filter((res) => {
|
|
@@ -191,6 +211,11 @@ export default {
|
|
//location.href=value.component
|
|
//location.href=value.component
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
+ if(value.key==7){
|
|
|
|
+ window.open(value.component)
|
|
|
|
+ //location.href=value.component
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
this.$emit('handClick', value)
|
|
this.$emit('handClick', value)
|
|
this.setAppUse(!head)
|
|
this.setAppUse(!head)
|
|
this.show = false
|
|
this.show = false
|
|
@@ -237,7 +262,7 @@ export default {
|
|
<style scoped>
|
|
<style scoped>
|
|
.MainHead {
|
|
.MainHead {
|
|
height: 80px;
|
|
height: 80px;
|
|
- max-width: 880px;
|
|
|
|
|
|
+ max-width: 70vw;
|
|
min-width: 660px;
|
|
min-width: 660px;
|
|
padding-top: 1.09375vw;
|
|
padding-top: 1.09375vw;
|
|
}
|
|
}
|