[fix 83044] 跳转待办参数补充
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
<component
|
||||
:is="comp"
|
||||
ref="compModel"
|
||||
:useRouteQuery="useRouteQuery"
|
||||
v-if="comp">
|
||||
</component>
|
||||
</keep-alive>
|
||||
@@ -31,6 +32,7 @@ export default {
|
||||
return {
|
||||
comp: null,
|
||||
activeTab: '',
|
||||
useRouteQuery: true,
|
||||
tabList: [
|
||||
{ // 待办流程
|
||||
component: 'TodoList',
|
||||
@@ -60,6 +62,8 @@ export default {
|
||||
this.comp = resolve => require([`@views/workCenter/processCenter/table/${this.activeTab}.vue`], resolve)
|
||||
setTimeout(() => {
|
||||
this.$refs.compModel.loadData()
|
||||
// 切换tab后就不使用路由参数,页面会有缓存
|
||||
this.useRouteQuery = false
|
||||
}, 100)
|
||||
}
|
||||
},
|
||||
@@ -77,9 +81,16 @@ export default {
|
||||
// },
|
||||
activated () {
|
||||
console.log('---------activated')
|
||||
if (this.$refs.compModel && this.$refs.compModel.loadData) {
|
||||
this.$refs.compModel.loadData()
|
||||
// 如果有路由参数,则使用路由参数跳转对应页签
|
||||
if (this.$route.query.activeTab) {
|
||||
this.activeTab = this.$route.query.activeTab
|
||||
this.comp = resolve => require([`@views/workCenter/processCenter/table/${this.activeTab}.vue`], resolve)
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.compModel && this.$refs.compModel.loadData) {
|
||||
this.$refs.compModel.loadData()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -121,6 +121,14 @@ export default {
|
||||
name: 'TodoList',
|
||||
components: { JTable, UserSelectModal },
|
||||
mixins: [JeroListMixin],
|
||||
props: {
|
||||
// 从路由中读取参数
|
||||
useRouteQuery: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
labelCol: {
|
||||
@@ -272,9 +280,11 @@ export default {
|
||||
disableMixinCreated: true
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
activated () {
|
||||
// 初始化查询参数
|
||||
this.initQueryParam()
|
||||
if (this.useRouteQuery) {
|
||||
this.initQueryParam()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 初始化查询参数
|
||||
|
||||
Reference in New Issue
Block a user