This commit is contained in:
shijing 2023-02-03 11:36:28 +08:00
parent 8fc3563a45
commit facd1c081c
2 changed files with 33 additions and 19 deletions

View File

@ -25,8 +25,6 @@
// }]
// }
// ]
// import sysConfig from "@/config";
// const linkUrl = sysConfig.API_URL.slice(0,--3)+"#/bigScreen";
const routes = [
{
@ -50,7 +48,7 @@ const routes = [
},
"component": "home"
},
{
{
"path": "/bigScreen",
"name": "bigScreens",
"meta": {
@ -58,22 +56,33 @@ const routes = [
"icon": "el-icon-position",
"perms": ["bigScreen"],
"fullpage": true,
"hidden":true,
},
"component": "bigScreen"
},
{
"path": "/bigScreen",
"name": "bigScreen",
"meta": {
"title": "驾驶舱",
"icon": "el-icon-position",
"perms": ["bigScreen"],
"type": "link",
"fullpage": true,
// {
// "path": "/bigScreen",
// "name": "bigScreens",
// "meta": {
// "title": "bigScreens",
// "icon": "el-icon-position",
// "perms": ["bigScreen"],
// "fullpage": true,
// "hidden":true,
// },
// "component": "bigScreen"
// },
// {
// "path": "/bigScreen",
// "name": "bigScreen",
// "meta": {
// "title": "驾驶舱",
// "icon": "el-icon-position",
// "perms": ["bigScreen"],
// "type": "link",
// "fullpage": true,
},
},
// },
// },
{
"name": "userCenter",

View File

@ -4,7 +4,7 @@
</div>
<template v-for="navMenu in navMenus" v-bind:key="navMenu">
<el-menu-item v-if="!hasChildren(navMenu)" :index="navMenu.path">
<a v-if="navMenu.meta&&navMenu.meta.type=='link'" target="_blank" @click="blankPageClick(navMenu.path)"></a>
<a v-if="navMenu.meta&&navMenu.meta.type=='link'" href="javascript:void(0)" @click="blankPageClick(navMenu.path)"></a>
<el-icon v-if="navMenu.meta&&navMenu.meta.icon"><component :is="navMenu.meta.icon || 'el-icon-menu'"/></el-icon>
<template #title>
<span>{{navMenu.meta.title}}</span>
@ -21,7 +21,6 @@
</template>
<script>
import sysConfig from "@/config";
export default {
name: 'NavMenu',
@ -36,9 +35,15 @@ import sysConfig from "@/config";
blankPageClick(path){
console.log(window.location);
console.log(path);
debugger;
let linkUrl = window.location.origin+"/#"+path;
window.open(linkUrl);
console.log(linkUrl)
debugger;
let routeUrl = this.$router.resolve({path: path});
window.open(routeUrl.href, '_blank');
// window.open(linkUrl,'_blank');
},
}
}