diff --git a/front/src/views/home/components/header.vue b/front/src/views/home/components/header.vue
index e3d618fe..cdf61897 100644
--- a/front/src/views/home/components/header.vue
+++ b/front/src/views/home/components/header.vue
@@ -17,9 +17,17 @@
{{ item.name }}
@@ -54,6 +62,7 @@
p-id="2187"
width="0.35rem"
height="0.35rem"
+ @click="goToView()"
>
{{ user.realName }}
退出
@@ -135,19 +148,19 @@
const mynoticeFlag = ref(false)
const mynoticeData = ref([])
const navList = ref(navListManagement.navList)
- const targetRouter= ref('')
+ const targetRouter = ref('')
const backFlag = ref(false)
getUserInfo().then((res) => {
- if(res.data.data.superAdmin =='1'){
+ if (res.data.data.superAdmin == '1') {
backFlag.value = true
} else {
- res.data.data.roleIdList.map((val) => {
- getRole(val).then((role) => {
- if (role.data.data.name === '后台管理员') {
- backFlag.value = true
- }
+ res.data.data.roleIdList.map((val) => {
+ getRole(val).then((role) => {
+ if (role.data.data.name === '后台管理员') {
+ backFlag.value = true
+ }
+ })
})
- })
}
})
console.log('navList------------>', navList)
@@ -188,140 +201,145 @@
window.open('http://15.72.177.175:18460/analystrunner/tonglan', '_blank')
}
// 跳转页面
- const jumpPage = (item,type) => {
- if(type == 'headerClick'){
- // 西海岸
- if (itShowXiHaiAn.value) {
- let _arr = ['共享门户', '能力云图', '能力统计', '需求中心', '赋能案例']
- if (
- _arr.includes(item.name) &&
- !xhaHasPermissionUser.list.includes(user.value.username)
- ) {
- return message.warn('暂无权限')
+ const jumpPage = (item, type) => {
+ if (type == 'headerClick') {
+ // 西海岸
+ if (itShowXiHaiAn.value) {
+ let _arr = ['共享门户', '能力云图', '能力统计', '需求中心', '赋能案例']
+ if (
+ _arr.includes(item.name) &&
+ !xhaHasPermissionUser.list.includes(user.value.username)
+ ) {
+ return message.warn('暂无权限')
+ }
+ }
+ select.value = item.key
+ switch (item.name) {
+ case '个人中心':
+ window.sessionStorage.setItem(
+ 'type',
+ JSON.stringify('PurchaseVehicle')
+ )
+ router.push({
+ path: '/personalCenter',
+ })
+ break
+ case '能力统计':
+ router.push({
+ path: '/abilityStatistics',
+ })
+ break
+ case '能力集市':
+ router.push({
+ path: '/DetailsPageconetent',
+ query: {
+ select: DETAIL_PAGE_CONTENT_DEFAULT_TAB,
+ },
+ })
+ break
+ case '能力云图':
+ router.push({
+ path: '/capabilityCloud',
+ })
+ break
+ // case '技术文档':
+ // router.push({
+ // path: '/developmentGuide',
+ // })
+ // break
+ case '新手指南':
+ router.push({
+ path: '/instructionManual',
+ })
+ break
+ case '需求中心':
+ router.push({
+ path: '/demandCenter',
+ })
+ break
+ case '区市站点':
+ router.push({
+ path: '/mapTest',
+ })
+ break
+ case '后台管理':
+ Cookies.remove('JSESSIONID')
+ window.open(window.SITE_CONFIG.backUrl + '/#/workBench-workBench')
+ // window.reload('http://15.2.21.238:9797')
+ break
+ case '赋能案例':
+ router.push({
+ path: '/assignCase',
+ })
+ break
+ case '典型赋能案例':
+ router.push({
+ path: '/assignCase',
+ })
+ break
+ case '融合服务':
+ router.push({
+ path: '/integrationServices',
+ })
+ break
+ case 'CIM专区':
+ router.push({
+ path: '/cimSpecialArea',
+ })
+ break
+ default:
+ router.push('/home')
+ break
+ }
+ } else if (type == 'innerClick') {
+ //select.value = item.key
+ switch (item.name) {
+ case '个人中心':
+ window.sessionStorage.setItem(
+ 'type',
+ JSON.stringify('PurchaseVehicle')
+ )
+ router.push({
+ path: '/personalCenter',
+ })
+ break
+ case '能力统计':
+ router.push({
+ path: '/abilityStatistics',
+ })
+ break
+ case '能力集市':
+ router.push({
+ path: targetRouter.value.path,
+ query: {
+ id: targetRouter.value.id,
+ },
+ })
+ break
+ case '能力云图':
+ router.push({
+ path: '/capabilityCloud',
+ })
+ break
+ case '后台管理':
+ Cookies.remove('JSESSIONID')
+ window.open(window.SITE_CONFIG.backUrl + '/#/workBench-workBench')
+ // window.reload('http://15.2.21.238:9797')
+ break
+ case '融合服务':
+ router.push({
+ path: '/integrationServices',
+ })
+ break
+ case 'CIM专区':
+ router.push({
+ path: '/cimSpecialArea',
+ })
+ break
+ default:
+ router.push('/home')
+ break
}
- }
- select.value = item.key
- switch (item.name) {
- case '个人中心':
- window.sessionStorage.setItem('type', JSON.stringify('PurchaseVehicle'))
- router.push({
- path: '/personalCenter',
- })
- break
- case '能力统计':
- router.push({
- path: '/abilityStatistics',
- })
- break
- case '能力集市':
- router.push({
- path: '/DetailsPageconetent',
- query: {
- select: DETAIL_PAGE_CONTENT_DEFAULT_TAB,
- },
- })
- break
- case '能力云图':
- router.push({
- path: '/capabilityCloud',
- })
- break
- // case '技术文档':
- // router.push({
- // path: '/developmentGuide',
- // })
- // break
- case '新手指南':
- router.push({
- path: '/instructionManual',
- })
- break
- case '需求中心':
- router.push({
- path: '/demandCenter',
- })
- break
- case '区市站点':
- router.push({
- path: '/mapTest',
- })
- break
- case '后台管理':
- Cookies.remove('JSESSIONID')
- window.open(window.SITE_CONFIG.backUrl + '/#/workBench-workBench')
- // window.reload('http://15.2.21.238:9797')
- break
- case '赋能案例':
- router.push({
- path: '/assignCase',
- })
- break
- case '典型赋能案例':
- router.push({
- path: '/assignCase',
- })
- break
- case '融合服务':
- router.push({
- path: '/integrationServices',
- })
- break
- case 'CIM专区':
- router.push({
- path: '/cimSpecialArea',
- })
- break
- default:
- router.push('/home')
- break
- }
- }else if(type == 'innerClick'){
- //select.value = item.key
- switch (item.name) {
- case '个人中心':
- window.sessionStorage.setItem('type', JSON.stringify('PurchaseVehicle'))
- router.push({
- path: '/personalCenter',
- })
- break
- case '能力统计':
- router.push({
- path: '/abilityStatistics',
- })
- break
- case '能力集市':
- router.push({
- path: targetRouter.value.path,
- query: {
- id: targetRouter.value.id,
- },
- });
- break
- case '能力云图':
- router.push({
- path: '/capabilityCloud',
- })
- break
- case '后台管理':
- Cookies.remove('JSESSIONID')
- window.open(window.SITE_CONFIG.backUrl + '/#/workBench-workBench')
- // window.reload('http://15.2.21.238:9797')
- break
- case '融合服务':
- router.push({
- path: '/integrationServices',
- })
- break
- case 'CIM专区':
- router.push({
- path: '/cimSpecialArea',
- })
- break
- default:
- router.push('/home')
- break
- }
-
}
}
const scrollTop = ref(0)
@@ -403,24 +421,32 @@
mybus.on('changeMenuStyle', (data) => {
debugger
- targetRouter.value = data;
- if(data.path=='/algorithmCompare'){
- jumpPage({
- "name": "能力集市",
- "key": "DetailsPageconetent",
- "innerKey":"algorithmCompare"
- },'innerClick');
- } else if(data.path =='/DetailsPageconetent'){
- jumpPage({ name: '能力集市', key: 'DetailsPageconetent' },'headerClick')
- } else if(data.path =='/details'){
- jumpPage({
- "name": "能力集市",
- "key": "DetailsPageconetent",
- "innerKey":"details"
- },'innerClick');
+ targetRouter.value = data
+ if (data.path == '/algorithmCompare') {
+ jumpPage(
+ {
+ name: '能力集市',
+ key: 'DetailsPageconetent',
+ innerKey: 'algorithmCompare',
+ },
+ 'innerClick'
+ )
+ } else if (data.path == '/DetailsPageconetent') {
+ jumpPage(
+ { name: '能力集市', key: 'DetailsPageconetent' },
+ 'headerClick'
+ )
+ } else if (data.path == '/details') {
+ jumpPage(
+ {
+ name: '能力集市',
+ key: 'DetailsPageconetent',
+ innerKey: 'details',
+ },
+ 'innerClick'
+ )
}
})
-
})
onBeforeUnmount(() => {
mybus.off('getSgcNum')
@@ -507,7 +533,7 @@
background: #0058e1;
color: #fff !important;
}
- .select-inner {
+ .select-inner {
background: #0058e1;
color: #fff !important;
}