2021-03-03 15:06:52 +08:00
|
|
|
<template>
|
|
|
|
<ms-container>
|
|
|
|
|
|
|
|
<ms-aside-container>
|
2021-03-03 18:35:51 +08:00
|
|
|
<group @switchComponent="switchComponent"/>
|
2021-03-03 15:06:52 +08:00
|
|
|
</ms-aside-container>
|
|
|
|
|
|
|
|
<ms-main-container>
|
2021-03-03 18:35:51 +08:00
|
|
|
<!--<router-view/>-->
|
2021-03-03 21:45:30 +08:00
|
|
|
<component :is="component" :param="param" @switchComponent="switchComponent"/>
|
2021-03-03 15:06:52 +08:00
|
|
|
</ms-main-container>
|
|
|
|
</ms-container>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import MsMainContainer from '@/metersphere/common/components/MsMainContainer'
|
|
|
|
import MsContainer from '@/metersphere/common/components/MsContainer'
|
|
|
|
import MsAsideContainer from '@/metersphere/common/components/MsAsideContainer'
|
|
|
|
import Group from './group/Group'
|
|
|
|
|
2021-03-03 18:35:51 +08:00
|
|
|
import DataHome from './data/DataHome'
|
|
|
|
import ViewTable from './data/ViewTable'
|
|
|
|
import AddDB from './add/AddDB'
|
|
|
|
|
2021-03-03 15:06:52 +08:00
|
|
|
export default {
|
|
|
|
name: 'DataSet',
|
2021-03-03 18:35:51 +08:00
|
|
|
components: { MsMainContainer, MsContainer, MsAsideContainer, Group, DataHome, ViewTable, AddDB },
|
2021-03-03 15:06:52 +08:00
|
|
|
data() {
|
2021-03-03 18:35:51 +08:00
|
|
|
return {
|
|
|
|
component: DataHome,
|
|
|
|
param: {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
switchComponent(c) {
|
|
|
|
console.log(c)
|
|
|
|
this.param = c.param
|
|
|
|
switch (c.name) {
|
|
|
|
case 'ViewTable':
|
|
|
|
this.component = ViewTable
|
|
|
|
break
|
|
|
|
case 'AddDB':
|
|
|
|
this.component = AddDB
|
|
|
|
break
|
|
|
|
default:
|
|
|
|
this.component = DataHome
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2021-03-03 15:06:52 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
.ms-aside-container {
|
2021-03-03 18:35:51 +08:00
|
|
|
height: calc(100vh - 56px);
|
2021-03-03 15:06:52 +08:00
|
|
|
padding: 15px;
|
2021-03-03 18:35:51 +08:00
|
|
|
min-width: 260px;
|
|
|
|
max-width: 460px;
|
2021-03-03 15:06:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.ms-main-container {
|
2021-03-03 18:35:51 +08:00
|
|
|
height: calc(100vh - 56px);
|
2021-03-03 15:06:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|