Compare commits

...

2 Commits

Author SHA1 Message Date
a0049873 4757078a15 Merge branch 'hi-ucs-dev' of http://192.168.124.50:3000/wuhongjian/hi-ucs into hi-ucs-dev 2022-11-28 11:25:40 +08:00
a0049873 04aacd14a6 添加点击 2022-11-28 11:25:09 +08:00
1 changed files with 188 additions and 162 deletions

View File

@ -17,9 +17,17 @@
<div
v-for="item in navList"
:key="item.key"
@click="jumpPage(item,'headerClick')"
@click="jumpPage(item, 'headerClick')"
class="nav"
:class="[{'select':item.key == select},{'select-inner':(item.key == 'DetailsPageconetent' && item.innerKey && props.targetFlag)}]"
:class="[
{ select: item.key == select },
{
'select-inner':
item.key == 'DetailsPageconetent' &&
item.innerKey &&
props.targetFlag,
},
]"
>
{{ item.name }}
</div>
@ -54,6 +62,7 @@
p-id="2187"
width="0.35rem"
height="0.35rem"
@click="goToView()"
>
<path
d="M544 161.536a330.666667 330.666667 0 0 1 298.666667 329.130667h-0.341334c0.213333 1.493333 0.341333 2.986667 0.341334 4.565333v219.434667h39.68a32 32 0 0 1 0 64h-212.053334a160 160 0 0 1-316.586666 0H141.909333a32 32 0 1 1 0-64h39.424v-219.434667c0-1.578667 0.128-3.072 0.341334-4.565333H181.333333a330.666667 330.666667 0 0 1 298.666667-329.130667V128a32 32 0 1 1 64 0v33.536z m-298.666667 553.130667h533.333334v-219.434667c0-1.578667 0.128-3.072 0.341333-4.565333h-0.341333a266.666667 266.666667 0 1 0-533.333334 0h-0.341333c0.213333 1.493333 0.341333 2.986667 0.341333 4.565333v219.434667z m359.765334 64H418.901333a96 96 0 0 0 186.197334 0z"
@ -90,14 +99,18 @@
</template>
<span
class="name"
@click="jumpPage({ name: '个人中心', key: 'personalCenter' },'headerClick')"
@click="
jumpPage({ name: '个人中心', key: 'personalCenter' }, 'headerClick')
"
>
{{ user.realName }}
</span>
</a-tooltip>
<span @click="logout" class="out">退出</span>
<i
@click="jumpPage({ name: '后台管理', key: 'houtaiguanli' },'headerClick')"
@click="
jumpPage({ name: '后台管理', key: 'houtaiguanli' }, 'headerClick')
"
class="iconTo"
v-show="backFlag"
></i>
@ -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;
}