修改登录涟计划以及大屏等其他系统时,主系统也跳转的问题
This commit is contained in:
parent
9c51afb419
commit
dbd1193679
@ -3,16 +3,25 @@
|
|||||||
<el-menu-item v-for="item in entryList" :key="item.name" class="avatar-wrapper" index="" @click="item.handle">
|
<el-menu-item v-for="item in entryList" :key="item.name" class="avatar-wrapper" index="" @click="item.handle">
|
||||||
<span style="color: white;">{{ item.name }}</span>
|
<span style="color: white;">{{ item.name }}</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
|
<deomon-list ref="deomonList" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import DeomonList from '@/views/demonstration/deomonList';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Entry',
|
name: 'Entry',
|
||||||
|
components: {
|
||||||
|
DeomonList
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
entryList: [
|
entryList: [
|
||||||
|
{
|
||||||
|
name: '快速入口',
|
||||||
|
handle: this.quickEntry
|
||||||
|
}
|
||||||
],
|
],
|
||||||
stomp: null,
|
stomp: null,
|
||||||
header: null
|
header: null
|
||||||
@ -28,6 +37,9 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
quickEntry() {
|
||||||
|
this.$refs.deomonList.doShow();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -8,58 +8,63 @@
|
|||||||
text-color="#fff"
|
text-color="#fff"
|
||||||
active-text-color="#ffd04b"
|
active-text-color="#ffd04b"
|
||||||
>
|
>
|
||||||
<template v-for="item in routers" v-if="!item.hidden&&item.children">
|
<template v-for="(item,idx) in routers">
|
||||||
<template v-if="hasOneScreenShowingChildren(item.children) &&!item.alwaysShow">
|
<template v-if="!item.hidden&&item.children">
|
||||||
<el-menu-item :index="item.redirect">
|
<template v-if="hasOneScreenShowingChildren(item.children) &&!item.alwaysShow">
|
||||||
<a
|
<template>
|
||||||
:href="item.redirect ? item.redirect : (item.path+'/'+item.children[0].path)"
|
<el-menu-item :key="idx" index="">
|
||||||
target="_blank"
|
<a
|
||||||
style="width: 100%; height: 100%; display: block;"
|
:href="item.redirect ? item.redirect : (item.path+'/'+item.children[0].path)"
|
||||||
>{{ item.children[0].meta.title || $t(item.children[0].meta.i18n) }}</a>
|
target="_blank"
|
||||||
</el-menu-item>
|
style="width: 100%; height: 100%; display: block;"
|
||||||
</template>
|
>{{ $t(item.children[0].meta.i18n) }}</a>
|
||||||
<template
|
|
||||||
v-else-if="hasOneShowingChildren(item.children) &&!item.alwaysShow"
|
|
||||||
:to="item.path+'/'+item.children[0].path"
|
|
||||||
>
|
|
||||||
<el-menu-item :index="item.redirect ? item.redirect : (item.path+'/'+item.children[0].path)">
|
|
||||||
<span
|
|
||||||
v-if="item.children[0].meta"
|
|
||||||
slot="title"
|
|
||||||
>{{ item.children[0].meta.title || $t(item.children[0].meta.i18n) }}</span>
|
|
||||||
</el-menu-item>
|
|
||||||
</template>
|
|
||||||
<el-submenu v-else :key="item.name" :index="item.name||item.path" :show-timeout="100">
|
|
||||||
<template slot="title">
|
|
||||||
<span v-if="item.meta" slot="title">{{ $t(item.meta.i18n) || item.meta.title }}</span>
|
|
||||||
</template>
|
|
||||||
<template v-for="child in item.children" v-if="!child.hidden">
|
|
||||||
<template v-if="child.children&&child.children.length>0&&hasShowingChildren(child.children)">
|
|
||||||
<el-submenu :key="child.name" :index="child.name||child.path" :show-timeout="100">
|
|
||||||
<template slot="title">
|
|
||||||
<span v-if="child.meta" slot="title">{{ child.meta.title || $t(item.meta.i18n) }}</span>
|
|
||||||
</template>
|
|
||||||
<template v-for="grandchild in child.children" v-if="!grandchild.hidden">
|
|
||||||
<template :to="child.path+'/'+grandchild.path">
|
|
||||||
<el-menu-item
|
|
||||||
:index="item.redirect ? item.redirect : (child.path+'/'+grandchild.path)"
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
v-if="grandchild.meta"
|
|
||||||
slot="title"
|
|
||||||
>{{ $t(grandchild.meta.title || grandchild.meta.i18n) }}</span>
|
|
||||||
</el-menu-item>
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
</el-submenu>
|
|
||||||
</template>
|
|
||||||
<template v-else :to="item.path+'/'+child.path">
|
|
||||||
<el-menu-item :index="item.redirect ? item.redirect : (item.path+'/'+child.path)">
|
|
||||||
<span v-if="child.meta" slot="title">{{ child.meta.title || $t(child.meta.i18n) }}</span>
|
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</el-submenu>
|
<template v-else-if="hasOneShowingChildren(item.children) &&!item.alwaysShow">
|
||||||
|
<template :to="item.path+'/'+item.children[0].path">
|
||||||
|
<el-menu-item :key="idx" :index="item.redirect ? item.redirect : (item.path+'/'+item.children[0].path)">
|
||||||
|
<span
|
||||||
|
v-if="item.children[0].meta&&item.children[0].meta.i18n"
|
||||||
|
slot="title"
|
||||||
|
>{{ $t(item.children[0].meta.i18n) }}</span>
|
||||||
|
</el-menu-item>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
<el-submenu v-else :key="idx" :index="item.name||item.path" :show-timeout="100">
|
||||||
|
<template slot="title">
|
||||||
|
<span v-if="item.meta" slot="title">{{ $t(item.meta.i18n) }}</span>
|
||||||
|
</template>
|
||||||
|
<template v-for="(child,cdx) in item.children">
|
||||||
|
<template v-if="!child.hidden">
|
||||||
|
<template v-if="child.children&&child.children.length>0&&hasShowingChildren(child.children)">
|
||||||
|
<el-submenu :key="cdx" :index="child.name||child.path" :show-timeout="100">
|
||||||
|
<template slot="title">
|
||||||
|
<span v-if="child.meta" slot="title">{{ $t(child.meta.i18n) }}</span>
|
||||||
|
</template>
|
||||||
|
<template v-for="(grandchild,gdx) in child.children">
|
||||||
|
<template v-if="!grandchild.hidden">
|
||||||
|
<template :to="child.path+'/'+grandchild.path">
|
||||||
|
<el-menu-item :key="gdx" :index="item.redirect ? item.redirect : (child.path+'/'+grandchild.path)">
|
||||||
|
<span
|
||||||
|
v-if="grandchild.meta"
|
||||||
|
slot="title"
|
||||||
|
>{{ $t(grandchild.meta.i18n) }}</span>
|
||||||
|
</el-menu-item>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</el-submenu>
|
||||||
|
</template>
|
||||||
|
<template v-else :to="item.path+'/'+child.path">
|
||||||
|
<el-menu-item :key="cdx" :index="item.redirect ? item.redirect : (item.path+'/'+child.path)">
|
||||||
|
<span v-if="child.meta" slot="title">{{ $t(child.meta.i18n) }}</span>
|
||||||
|
</el-menu-item>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</el-submenu>
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<quick-entry ref="quickEntry" />
|
<quick-entry ref="quickEntry" />
|
||||||
<user-logout ref="userLogout" />
|
<user-logout ref="userLogout" />
|
||||||
|
@ -1,36 +1,37 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="menu-wrapper">
|
<div class="menu-wrapper">
|
||||||
<template v-for="item in routes" v-if="!item.hidden&&item.children">
|
<template v-if="!item.hidden&&item.children">
|
||||||
|
<template v-for="item in routes">
|
||||||
|
<router-link
|
||||||
|
v-if="hasOneShowingChildren(item.children) && !item.children[0].children&&!item.alwaysShow"
|
||||||
|
:key="item.children[0].name"
|
||||||
|
:to="item.path+'/'+item.children[0].path"
|
||||||
|
>
|
||||||
|
<el-menu-item :index="item.path+'/'+item.children[0].path" :class="{'submenu-title-noDropdown':!isNest}">
|
||||||
|
<svg-icon v-if="item.children[0].meta&&item.children[0].meta.icon" :icon-class="item.children[0].meta.icon" />
|
||||||
|
<span v-if="item.children[0].meta&&item.children[0].meta.title" slot="title">{{ item.children[0].meta.title }}</span>
|
||||||
|
</el-menu-item>
|
||||||
|
</router-link>
|
||||||
|
|
||||||
<router-link
|
<el-submenu v-else :key="item.name" :index="item.name||item.path">
|
||||||
v-if="hasOneShowingChildren(item.children) && !item.children[0].children&&!item.alwaysShow"
|
<template slot="title">
|
||||||
:key="item.children[0].name"
|
<svg-icon v-if="item.meta&&item.meta.icon" :icon-class="item.meta.icon" />
|
||||||
:to="item.path+'/'+item.children[0].path"
|
<span v-if="item.meta&&item.meta.title" slot="title">{{ item.meta.title }}</span>
|
||||||
>
|
</template>
|
||||||
<el-menu-item :index="item.path+'/'+item.children[0].path" :class="{'submenu-title-noDropdown':!isNest}">
|
|
||||||
<svg-icon v-if="item.children[0].meta&&item.children[0].meta.icon" :icon-class="item.children[0].meta.icon" />
|
|
||||||
<span v-if="item.children[0].meta&&item.children[0].meta.title" slot="title">{{ item.children[0].meta.title }}</span>
|
|
||||||
</el-menu-item>
|
|
||||||
</router-link>
|
|
||||||
|
|
||||||
<el-submenu v-else :key="item.name" :index="item.name||item.path">
|
|
||||||
<template slot="title">
|
|
||||||
<svg-icon v-if="item.meta&&item.meta.icon" :icon-class="item.meta.icon" />
|
|
||||||
<span v-if="item.meta&&item.meta.title" slot="title">{{ item.meta.title }}</span>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template v-for="child in item.children" v-if="!child.hidden">
|
|
||||||
<sidebar-item v-if="child.children&&child.children.length>0" :key="child.path" :is-nest="true" class="nest-menu" :routes="[child]" />
|
|
||||||
|
|
||||||
<router-link v-else :key="child.name" :to="item.path+'/'+child.path">
|
|
||||||
<el-menu-item :index="item.path+'/'+child.path">
|
|
||||||
<svg-icon v-if="child.meta&&child.meta.icon" :icon-class="child.meta.icon" />
|
|
||||||
<span v-if="child.meta&&child.meta.title" slot="title">{{ child.meta.title }}</span>
|
|
||||||
</el-menu-item>
|
|
||||||
</router-link>
|
|
||||||
</template>
|
|
||||||
</el-submenu>
|
|
||||||
|
|
||||||
|
<template v-if="!child.hidden">
|
||||||
|
<template v-for="child in item.children">
|
||||||
|
<sidebar-item v-if="child.children&&child.children.length>0" :key="child.path" :is-nest="true" class="nest-menu" :routes="[child]" />
|
||||||
|
<router-link v-else :key="child.name" :to="item.path+'/'+child.path">
|
||||||
|
<el-menu-item :index="item.path+'/'+child.path">
|
||||||
|
<svg-icon v-if="child.meta&&child.meta.icon" :icon-class="child.meta.icon" />
|
||||||
|
<span v-if="child.meta&&child.meta.title" slot="title">{{ child.meta.title }}</span>
|
||||||
|
</el-menu-item>
|
||||||
|
</router-link>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</el-submenu>
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -63,9 +63,9 @@ function convertRouterRoles({ roles, permissionType }) {
|
|||||||
*/
|
*/
|
||||||
function filterAsyncRouter(asyncRouter, roles, parentsRoles) {
|
function filterAsyncRouter(asyncRouter, roles, parentsRoles) {
|
||||||
return asyncRouter.filter(route => {
|
return asyncRouter.filter(route => {
|
||||||
if (route.name === '大屏系统' && roles.indexOf(admin)===-1 && roles.indexOf(userScreen) ===-1){
|
if (route.name === '大屏系统' && roles.indexOf(admin)===-1 && roles.indexOf(userScreen) ===-1) {
|
||||||
route.hidden = true;
|
route.hidden = true;
|
||||||
}
|
}
|
||||||
if (hasPermission(roles, route, parentsRoles)) {
|
if (hasPermission(roles, route, parentsRoles)) {
|
||||||
if (route.children && route.children.length) {
|
if (route.children && route.children.length) {
|
||||||
route.children = filterAsyncRouter(route.children, roles, route.meta ? route.meta.roles : undefined);
|
route.children = filterAsyncRouter(route.children, roles, route.meta ? route.meta.roles : undefined);
|
||||||
|
@ -100,8 +100,8 @@ const user = {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
// 设置user域token值
|
// 设置user域token值
|
||||||
commit(token.key, token.value);
|
commit(token.key, token.value);
|
||||||
// let header = { group: '', 'X-Token': token.value };
|
const header = { group: '', 'X-Token': token.value };
|
||||||
// creatSubscribe(perpetualTopic, header);
|
creatSubscribe(perpetualTopic, header);
|
||||||
// 获取用户参数
|
// 获取用户参数
|
||||||
dispatch('GetUserConfigInfo').then(response => {
|
dispatch('GetUserConfigInfo').then(response => {
|
||||||
resolve(response);
|
resolve(response);
|
||||||
|
Loading…
Reference in New Issue
Block a user