Commit 2372eb28 by caoyanzhi

update: 错误页面加上主菜单

parent 5e67f7f8
<template>
<div class="hb-layout" v-loading="fullLoading.visible">
<main-menu ref="mainMenu" :menu-list="menuList" :actived-code="activedMenu.length > 0 ? activedMenu[0].menuCode : ''" @showLoading="onShowLoading"></main-menu>
<aside-menu :menu-list="activedMenu.length > 0 ? activedMenu[0].childList : []" :actived-code="activedMenu.length > 2 ? activedMenu[2].menuCode : ''"></aside-menu>
<aside-menu v-show="showAside" :menu-list="activedMenu.length > 0 ? activedMenu[0].childList : []" :actived-code="activedMenu.length > 2 ? activedMenu[2].menuCode : ''"></aside-menu>
<div class="hb-layout-content">
<bread-menu v-if="activedMenu.length > 3" :menu-list="activedMenu.slice(2)"></bread-menu>
<div class="hb-layout-pager" :style="{ height: activedMenu.length > 3 ? `calc(100% - 30px)` : '100%' }">
......@@ -36,7 +36,7 @@ export default {
},
data() {
return {
breadShow: true,
showAside: true,
enterpriseId: '',
// 菜单平铺数据
flatMenuList: [],
......@@ -126,7 +126,9 @@ export default {
},
onCommand(command) {
const methods = {
updateApplyCount: () => this.$refs.mainMenu.updateAplyCount()
updateApplyCount: () => this.$refs.mainMenu.updateAplyCount(),
showAside: () => (this.showAside = true),
hideAside: () => (this.showAside = false)
};
if (typeof methods[command] == 'function') {
methods[command]();
......
......@@ -416,8 +416,6 @@ export const constantRouterMap = [
path: '/bad-evaluate',
name: '不良评价回访设置',
component: _import('apps/order-evaluate', 'bad-evaluate-set')
}
]
},
{
......@@ -440,6 +438,8 @@ export const constantRouterMap = [
name: 'error500',
component: errorPage
}
]
}
];
export default new Router({
// mode:'history',
......
......@@ -26,6 +26,7 @@ import img_404 from '@/assets/gic-error.png';
export default {
name: 'page404',
inject: ['layoutVm'],
data() {
return {
img_404
......@@ -36,9 +37,12 @@ export default {
return '登录遇到错误啦!请确认您是否是好办小程序管理员。如不是,请联系管理员在<企业微信-我的企业-权限管理>添加好办管理员。';
}
},
destroyed() {
this.layoutVm.$emit('command', 'showAside');
},
/* eslint-disable */
mounted() {
this.layoutVm.$emit('command', 'hideAside');
}
};
</script>
......
......@@ -28,6 +28,7 @@ import img_500 from '@/assets/500_images/error_500.svg';
export default {
name: 'errpage',
inject: ['layoutVm'],
data() {
return {
imgSrc: '',
......@@ -44,11 +45,15 @@ export default {
}
};
},
destroyed() {
this.layoutVm.$emit('command', 'showAside');
},
mounted() {
var that = this;
var path = that.$route.path.split('/')[1];
that.imgSrc = that.srcList[path];
that.message = that.msgList[path];
this.layoutVm.$emit('command', 'hideAside');
}
};
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment