Commit 9674b2a4 authored by Hagsn3's avatar Hagsn3

代码提交

parent ba45ae76
......@@ -364,22 +364,22 @@ export default {
return commonField
}
},
// /** 路由离开前存储筛选条件*/
// beforeRouteLeave(to, from, next) {
// this.$store.dispatch('searchSave/searchParamsSet', {
// path: this.$route.path,
// param: {
// ...this.queryParams
// }
// })
// next()
// },
/** 路由离开前存储筛选条件*/
beforeRouteLeave(to, from, next) {
this.$store.dispatch('searchSave/searchParamsSet', {
path: this.$route.path,
param: {
...this.queryParams
}
})
next()
},
created() {
// if (this.$store.getters.searchParams[this.$route.path]) {
// const { searchParams } = this.$store.getters; const { path } = this.$route
// const param = JSON.parse(searchParams[path]) // 保留着的查询条件
// this.queryParams = { ...param }
// }
if (this.$store.getters.searchParams[this.$route.path]) {
const { searchParams } = this.$store.getters; const { path } = this.$route
const param = JSON.parse(searchParams[path]) // 保留着的查询条件
this.queryParams = { ...param }
}
this.getList() // 列表查询
this.getwareHouse()
},
......
......@@ -295,7 +295,7 @@ export default {
apply_create_date: '',
income_create_date: '',
whId: '',
affirmName:'',
affirmName: '',
orderCode: '',
ptype: '',
pn: '',
......@@ -431,21 +431,21 @@ export default {
}
},
/** 路由离开前存储筛选条件*/
// beforeRouteLeave(to, from, next) {
// this.$store.dispatch('searchSave/searchParamsSet', {
// path: this.$route.path,
// param: {
// ...this.queryParams
// }
// })
// next()
// },
beforeRouteLeave(to, from, next) {
this.$store.dispatch('searchSave/searchParamsSet', {
path: this.$route.path,
param: {
...this.queryParams
}
})
next()
},
created() {
// if (this.$store.getters.searchParams[this.$route.path]) {
// const { searchParams } = this.$store.getters; const { path } = this.$route
// const param = JSON.parse(searchParams[path]) // 保留着的查询条件
// this.queryParams = { ...param }
// }
if (this.$store.getters.searchParams[this.$route.path]) {
const { searchParams } = this.$store.getters; const { path } = this.$route
const param = JSON.parse(searchParams[path]) // 保留着的查询条件
this.queryParams = { ...param }
}
this.getList() // 列表查询
this.getwareHouse()
},
......
......@@ -395,22 +395,22 @@ export default {
return commonField
}
},
// /** 路由离开前存储筛选条件*/
// beforeRouteLeave(to, from, next) {
// this.$store.dispatch('searchSave/searchParamsSet', {
// path: this.$route.path,
// param: {
// ...this.queryParams
// }
// })
// next()
// },
/** 路由离开前存储筛选条件*/
beforeRouteLeave(to, from, next) {
this.$store.dispatch('searchSave/searchParamsSet', {
path: this.$route.path,
param: {
...this.queryParams
}
})
next()
},
created() {
// if (this.$store.getters.searchParams[this.$route.path]) {
// const { searchParams } = this.$store.getters; const { path } = this.$route
// const param = JSON.parse(searchParams[path]) // 保留着的查询条件
// this.queryParams = { ...param }
// }
if (this.$store.getters.searchParams[this.$route.path]) {
const { searchParams } = this.$store.getters; const { path } = this.$route
const param = JSON.parse(searchParams[path]) // 保留着的查询条件
this.queryParams = { ...param }
}
this.getList() // 列表查询
this.getwareHouse()
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment