Merge pull request #292 from dataease/pr@dev@fix_数据集消息跳转

fix: 完善数据集消息任务跳转
This commit is contained in:
fit2cloud-chenyw 2021-07-22 18:10:17 +08:00 committed by GitHub
commit fc4e032e72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 2 deletions

View File

@ -72,7 +72,7 @@ export const fillMeta = (router) => {
router.name.includes('system-user-form') && (router.meta.activeMenu = '/system/user')
router.name.includes('system-role-form') && (router.meta.activeMenu = '/system/role')
router.name.includes('system-dept-form') && (router.meta.activeMenu = '/system/dept')
router.name.includes('sys-task-dataset') && (router.meta.activeMenu = '/system/system-task')
// router.name.includes('sys-task-dataset') && (router.meta.activeMenu = '/system/dstask')
// return router
}

View File

@ -25,6 +25,7 @@ import TaskRecord from '@/views/system/task/TaskRecord'
import TabDataPreview from '@/views/dataset/data/TabDataPreview'
import DatasetTableData from '@/views/dataset/common/DatasetTableData'
import bus from '@/utils/bus'
import { mapGetters } from 'vuex'
export default {
components: { DatasetTableData, LayoutContent, ComplexTable, UnionView, UpdateInfo, TabDataPreview, DatasetTaskList, TaskRecord },
data() {
@ -32,6 +33,11 @@ export default {
tabActive: 'DatasetTaskList'
}
},
computed: {
...mapGetters([
'permission_routes'
])
},
mounted() {
bus.$on('to-msg-dataset', params => {
this.toMsgShare(params)
@ -39,7 +45,9 @@ export default {
},
created() {
const routerParam = this.$router.currentRoute.params
this.toMsgShare(routerParam)
routerParam && this.$nextTick(() => {
this.toMsgShare(routerParam)
})
},
methods: {
@ -49,6 +57,7 @@ export default {
//
if (panelShareTypeIds.includes(routerParam.msgType)) { //
if (routerParam.sourceParam) {
this.openSystem()
try {
const msgParam = JSON.parse(routerParam.sourceParam)
// this.param = msgParam.tableId
@ -62,6 +71,18 @@ export default {
}
}
}
},
openSystem() {
const path = '/system'
let route = this.permission_routes.find(
item => item.path === '/' + path.split('/')[1]
)
//
if (!route) {
route = this.permission_routes.find(item => item.path === '/')
}
this.$store.commit('permission/SET_CURRENT_ROUTES', route)
// this.setSidebarHide(route)
}
}