dataease/frontend/src/views/system/datasource/index.vue

60 lines
1.5 KiB
Vue
Raw Normal View History

2021-03-03 15:06:52 +08:00
<template>
2021-10-08 17:22:21 +08:00
<de-container v-loading="$store.getters.loadingMap[$store.getters.currentPath]">
<de-main-container>
2021-11-24 18:49:41 +08:00
<ds-main ref="dsMain"/>
</de-main-container>
</de-container>
2021-03-03 15:06:52 +08:00
</template>
<script>
import DeMainContainer from '@/components/dataease/DeMainContainer'
import DeContainer from '@/components/dataease/DeContainer'
import DsMain from './DsMain'
2021-08-27 17:56:10 +08:00
import bus from '@/utils/bus'
2021-11-24 18:49:41 +08:00
2021-03-03 15:06:52 +08:00
export default {
name: 'Panel',
2021-11-24 18:49:41 +08:00
components: {DeMainContainer, DeContainer, DsMain},
2021-03-03 15:06:52 +08:00
data() {
return {
component: DsMain,
componentName: 'DsMain',
param: {}
2021-03-03 15:06:52 +08:00
}
},
mounted() {
2021-08-27 17:56:10 +08:00
bus.$on('to-msg-ds', params => {
this.toMsgDs(params)
})
},
created() {
this.$store.dispatch('app/toggleSideBarHide', true)
const routerParam = this.$router.currentRoute.params
this.toMsgDs(routerParam)
2021-03-03 15:06:52 +08:00
},
methods: {
2021-08-27 17:56:10 +08:00
toMsgDs(routerParam) {
if (routerParam !== null && routerParam.msgNotification) {
const panelShareTypeIds = [7, 8]
// 说明是从消息通知跳转过来的
if (panelShareTypeIds.includes(routerParam.msgType)) { // 是数据集同步
if (routerParam.sourceParam) {
try {
this.$nextTick(() => {
this.$refs.dsMain && this.$refs.dsMain.msg2Current && this.$refs.dsMain.msg2Current(routerParam.sourceParam)
})
} catch (error) {
console.error(error)
}
}
}
}
}
2021-03-03 15:06:52 +08:00
}
}
</script>
<style scoped>
</style>