Merge branch 'master-dev' into feature-Beta-dev-renpy
This commit is contained in:
commit
3b8c23bc96
|
@ -28,9 +28,9 @@
|
||||||
</a-layout-sider>
|
</a-layout-sider>
|
||||||
<a-layout style="background-color: aliceblue">
|
<a-layout style="background-color: aliceblue">
|
||||||
<keep-alive>
|
<keep-alive>
|
||||||
<router-view v-if="keepAlive" />
|
<router-view />
|
||||||
</keep-alive>
|
</keep-alive>
|
||||||
<router-view v-if="!keepAlive" />
|
<!-- <router-view v-if="!keepAlive" /> -->
|
||||||
</a-layout>
|
</a-layout>
|
||||||
</a-layout>
|
</a-layout>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
@ -72,11 +72,11 @@ const SubMenu = {
|
||||||
export default {
|
export default {
|
||||||
name: 'menuTree',
|
name: 'menuTree',
|
||||||
components: { 'sub-menu': SubMenu },
|
components: { 'sub-menu': SubMenu },
|
||||||
computed: {
|
// computed: {
|
||||||
keepAlive() {
|
// keepAlive() {
|
||||||
return this.$route.meta.keepAlive
|
// return this.$route.meta.keepAlive
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
data() {
|
data() {
|
||||||
const collapsed = false
|
const collapsed = false
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -1592,4 +1592,12 @@ export default {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
/deep/.ant-spin-nested-loading {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
/deep/.ant-spin-container {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
|
@ -1,8 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<a-card :bordered="false" style="height: 100%;">
|
<a-card :bordered="false" style="height: 100%">
|
||||||
<a-layout id="components-layout-demo-custom-trigger" style="height: 100%">
|
<a-layout id="components-layout-demo-custom-trigger" style="height: 100%">
|
||||||
<a-layout-sider theme="light" v-model="collapsed" :trigger="null" collapsible width="350px">
|
<a-layout-sider theme="light" v-model="collapsed" :trigger="null" collapsible width="350px">
|
||||||
<div style="height:100%">
|
<div style="height: 100%">
|
||||||
<!-- :defaultSelectedKeys="defaultSelectedKeys" -->
|
<!-- :defaultSelectedKeys="defaultSelectedKeys" -->
|
||||||
<!-- :defaultOpenKeys="defaultOpenKeys" -->
|
<!-- :defaultOpenKeys="defaultOpenKeys" -->
|
||||||
<a-menu
|
<a-menu
|
||||||
|
@ -30,9 +30,9 @@
|
||||||
</a-layout-sider>
|
</a-layout-sider>
|
||||||
<a-layout style="background-color: aliceblue">
|
<a-layout style="background-color: aliceblue">
|
||||||
<keep-alive>
|
<keep-alive>
|
||||||
<router-view v-if="keepAlive" />
|
<router-view />
|
||||||
</keep-alive>
|
</keep-alive>
|
||||||
<router-view v-if="!keepAlive" />
|
<!-- <router-view v-if="!keepAlive" /> -->
|
||||||
</a-layout>
|
</a-layout>
|
||||||
</a-layout>
|
</a-layout>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
@ -74,11 +74,11 @@ const SubMenu = {
|
||||||
export default {
|
export default {
|
||||||
name: 'menuTree',
|
name: 'menuTree',
|
||||||
components: { 'sub-menu': SubMenu },
|
components: { 'sub-menu': SubMenu },
|
||||||
computed: {
|
// computed: {
|
||||||
keepAlive() {
|
// keepAlive() {
|
||||||
return this.$route.meta.keepAlive
|
// return this.$route.meta.keepAlive
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
data() {
|
data() {
|
||||||
const collapsed = false
|
const collapsed = false
|
||||||
return {
|
return {
|
||||||
|
@ -104,30 +104,29 @@ export default {
|
||||||
this.menus = f.children
|
this.menus = f.children
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log("路由信息",this.menus);
|
|
||||||
// this.initDefaultKeys(this.menus[0])
|
// this.initDefaultKeys(this.menus[0])
|
||||||
// 将从缓存中取出openKeys
|
// 将从缓存中取出openKeys
|
||||||
const openKeys = window.sessionStorage.getItem('openKeys')
|
const openKeys = window.sessionStorage.getItem('openKeys')
|
||||||
const selectedKeys = window.sessionStorage.getItem('currMenu_web')
|
const selectedKeys = window.sessionStorage.getItem('currMenu_web')
|
||||||
if (selectedKeys) {
|
if (selectedKeys) {
|
||||||
this.currSlecteKey=[]
|
this.currSlecteKey = []
|
||||||
// this.defaultSelectedKeys.push(selectedKeys)
|
// this.defaultSelectedKeys.push(selectedKeys)
|
||||||
this.currSlecteKey.push(selectedKeys)
|
this.currSlecteKey.push(selectedKeys)
|
||||||
} else {
|
} else {
|
||||||
this.currSlecteKey=[]
|
this.currSlecteKey = []
|
||||||
this.initDefaultKeys(this.menus[0])
|
this.initDefaultKeys(this.menus[0])
|
||||||
this.menus.forEach(item => {
|
this.menus.forEach((item) => {
|
||||||
if (item.name!=="istatistics-data") {
|
if (item.name !== 'istatistics-data') {
|
||||||
// this.defaultOpenKeys.push(item.path)
|
// this.defaultOpenKeys.push(item.path)
|
||||||
this.openKeys.push(item.path)
|
this.openKeys.push(item.path)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
window.sessionStorage.setItem('openKeys', JSON.stringify(this.openKeys))
|
window.sessionStorage.setItem('openKeys', JSON.stringify(this.openKeys))
|
||||||
}
|
}
|
||||||
// if (openKeys) {
|
// if (openKeys) {
|
||||||
// // 存在即赋值
|
// // 存在即赋值
|
||||||
// this.defaultOpenKeys = JSON.parse(openKeys)
|
// this.defaultOpenKeys = JSON.parse(openKeys)
|
||||||
// }
|
// }
|
||||||
if (openKeys) {
|
if (openKeys) {
|
||||||
// 存在即赋值
|
// 存在即赋值
|
||||||
this.openKeys = JSON.parse(openKeys)
|
this.openKeys = JSON.parse(openKeys)
|
||||||
|
@ -151,25 +150,25 @@ export default {
|
||||||
// this.defaultOpenKeys.push(data.path)
|
// this.defaultOpenKeys.push(data.path)
|
||||||
this.openKeys.push(data.path)
|
this.openKeys.push(data.path)
|
||||||
// if (data.children) {
|
// if (data.children) {
|
||||||
if (data.name!=="istatistics-StateOfHealth-alerts") {
|
if (data.name !== 'istatistics-StateOfHealth-alerts') {
|
||||||
data.children.some((f) => {
|
data.children.some((f) => {
|
||||||
if (f.name!=="istatistics-met") {
|
if (f.name !== 'istatistics-met') {
|
||||||
if (f.children) {
|
if (f.children) {
|
||||||
// 第一个节点展开
|
// 第一个节点展开
|
||||||
// this.defaultOpenKeys.push(f.path)
|
// this.defaultOpenKeys.push(f.path)
|
||||||
this.openKeys.push(f.path)
|
this.openKeys.push(f.path)
|
||||||
this.initDefaultKeys(f.children[0])
|
this.initDefaultKeys(f.children[0])
|
||||||
} else {
|
} else {
|
||||||
// 选中
|
// 选中
|
||||||
// this.defaultSelectedKeys.push(f.path)
|
// this.defaultSelectedKeys.push(f.path)
|
||||||
this.currSlecteKey.push(f.path)
|
this.currSlecteKey.push(f.path)
|
||||||
return true
|
return true
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
}
|
})
|
||||||
|
}
|
||||||
// } else {
|
// } else {
|
||||||
// this.defaultOpenKeys.push(data.path)
|
// this.defaultOpenKeys.push(data.path)
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
onOpenChange(openKeys) {
|
onOpenChange(openKeys) {
|
||||||
|
@ -193,7 +192,7 @@ export default {
|
||||||
background: none;
|
background: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
::v-deep .ant-card-body{
|
::v-deep .ant-card-body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
.ant-menu {
|
.ant-menu {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user