szh_zidingyibiaoti
张同海 2 years ago
parent 7f97d6093c
commit deb5961757

@ -48,7 +48,10 @@ export default {
onEdit(targetKey, action) { onEdit(targetKey, action) {
const _that = this const _that = this
if (targetKey.includes('BookingDetail')) { if (targetKey.includes('BookingDetail')) {
if (Object.keys(this.needSavePages).includes(targetKey) && (this.needSavePages[targetKey].details || this.needSavePages[targetKey].hbList)) { if (
Object.keys(this.needSavePages).includes(targetKey) &&
(this.needSavePages[targetKey].details || this.needSavePages[targetKey].hbList)
) {
this.$confirm({ this.$confirm({
title: '请确认无未保存数据!', title: '请确认无未保存数据!',
content: '当点击确定按钮时,此页面 将会关闭。', content: '当点击确定按钮时,此页面 将会关闭。',
@ -207,12 +210,13 @@ export default {
$data: { pages } $data: { pages }
} = this } = this
const panes = pages.map(page => { const panes = pages.map(page => {
console.log(pages)
return ( return (
<a-tab-pane <a-tab-pane
style={{ height: 0 }} style={{ height: 0 }}
tab={this.renderTabPane(page.meta.customTitle || page.meta.title, page.fullPath)} tab={this.renderTabPane(page.meta.customTitle || page.meta.title, page.fullPath)}
key={page.fullPath} key={page.fullPath}
closable={pages.length > 1} closable={pages.length > 1 && page.meta.title != '首页'}
></a-tab-pane> ></a-tab-pane>
) )
}) })

@ -3,7 +3,6 @@ import { UserLayout, BasicLayout, RouteView, BlankLayout, PageView } from '@/lay
import { bxAnaalyse } from '@/core/icons' import { bxAnaalyse } from '@/core/icons'
export const asyncRouterMap = [ export const asyncRouterMap = [
{ {
path: '/', path: '/',
name: 'MenuIndex.vue', name: 'MenuIndex.vue',
@ -32,14 +31,16 @@ export const asyncRouterMap = [
name: 'Workplace', name: 'Workplace',
component: () => import('@/views/system/dashboard/Workplace'), component: () => import('@/views/system/dashboard/Workplace'),
// eslint-disable-next-line standard/object-curly-even-spacing // eslint-disable-next-line standard/object-curly-even-spacing
meta: { title: '工作台', keepAlive: false/*, permission: [ 'dashboard' ] */ } meta: { title: '工作台', keepAlive: false /*, permission: [ 'dashboard' ] */ }
} }
] ]
} }
] ]
}, },
{ {
path: '*', redirect: '/404', hidden: true path: '*',
redirect: '/404',
hidden: true
} }
] ]
@ -80,5 +81,4 @@ export const constantRouterMap = [
path: '/404', path: '/404',
component: () => import(/* webpackChunkName: "fail" */ '@/views/system/exception/404') component: () => import(/* webpackChunkName: "fail" */ '@/views/system/exception/404')
} }
] ]

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save