2021-06-17 18:58:46 +08:00
|
|
|
<template>
|
2021-06-22 11:19:58 +08:00
|
|
|
<de-container v-loading="$store.getters.loadingMap[$store.getters.currentPath]">
|
2021-07-01 10:47:28 +08:00
|
|
|
<de-aside-container style="padding: 0 0;">
|
2021-06-17 19:34:46 +08:00
|
|
|
<ds-tree ref="dsTree" @switch-main="switchMain" />
|
2021-06-17 18:58:46 +08:00
|
|
|
</de-aside-container>
|
|
|
|
<de-main-container>
|
2021-06-17 19:34:46 +08:00
|
|
|
<component :is="component" v-if="!!component" :params="param" @refresh-left-tree="refreshTree" @switch-component="switchMain" />
|
2021-06-17 18:58:46 +08:00
|
|
|
</de-main-container>
|
|
|
|
</de-container>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import DeMainContainer from '@/components/dataease/DeMainContainer'
|
|
|
|
import DeContainer from '@/components/dataease/DeContainer'
|
|
|
|
import DeAsideContainer from '@/components/dataease/DeAsideContainer'
|
|
|
|
import DsTree from './DsTree'
|
|
|
|
import DsForm from './form'
|
|
|
|
import DataHome from './DataHome'
|
|
|
|
export default {
|
|
|
|
name: 'DsMain',
|
|
|
|
components: { DeMainContainer, DeContainer, DeAsideContainer, DsTree, DataHome },
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
component: DataHome,
|
|
|
|
param: null
|
|
|
|
}
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
// this.clear()
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
// 切换main区内容
|
|
|
|
switchMain(param) {
|
|
|
|
const { component, componentParam } = param
|
2021-06-17 19:34:46 +08:00
|
|
|
this.component = DataHome
|
|
|
|
this.param = null
|
|
|
|
this.$nextTick(() => {
|
|
|
|
switch (component) {
|
|
|
|
case 'DsForm':
|
|
|
|
this.component = DsForm
|
|
|
|
this.param = componentParam
|
|
|
|
break
|
|
|
|
default:
|
|
|
|
this.component = DataHome
|
|
|
|
this.param = null
|
|
|
|
break
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
refreshTree() {
|
|
|
|
this.$refs.dsTree && this.$refs.dsTree.queryTreeDatas()
|
2021-06-17 18:58:46 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
.ms-aside-container {
|
|
|
|
height: calc(100vh - 56px);
|
|
|
|
padding: 0px;
|
|
|
|
min-width: 260px;
|
|
|
|
max-width: 460px;
|
|
|
|
}
|
|
|
|
.ms-main-container {
|
|
|
|
height: calc(100vh - 56px);
|
|
|
|
padding: 0px;
|
|
|
|
}
|
|
|
|
</style>
|