标准清单 高级检索
This commit is contained in:
@@ -54,6 +54,25 @@ export default {
|
||||
watch: {},
|
||||
|
||||
mounted() {
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
const toName = ['ListOfStandardsAndRegulationsDetails', 'Details', 'ProjectAddEit', 'OtherAddEit']
|
||||
// 离开此页面之前,记录tabName以便返回使用,如果将要访问的页面不是这两个,则清空tabName
|
||||
if (toName.includes(to.name)) {
|
||||
this.$store.commit('SET_ACCESS_STANDARD_REG_TABS', this.tabValue)
|
||||
} else {
|
||||
this.$store.commit('SET_ACCESS_STANDARD_REG_TABS')
|
||||
}
|
||||
setTimeout(() => {
|
||||
next()
|
||||
}, 100)
|
||||
},
|
||||
beforeRouteEnter(to, from, next) {
|
||||
next(vm => {
|
||||
if (vm.$store.state.accessStandRegTabName !== '') {
|
||||
vm.tabValue = vm.$store.state.accessStandRegTabName
|
||||
}
|
||||
})
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user