Commit 2688f785 authored by 高宇's avatar 高宇

1.设置三级菜单

parent e9ea15f8
...@@ -660,6 +660,16 @@ export default { ...@@ -660,6 +660,16 @@ export default {
} }
} }
}, },
/** 路由离开前存储筛选条件*/
beforeRouteLeave(to, from, next) {
this.$store.dispatch('searchSave/searchParamsSet', {
path: this.$route.path,
param: {
...this.queryParams
}
})
next()
},
computed: { computed: {
// 判断是否禁用输入框并清空值 // 判断是否禁用输入框并清空值
isDisabled() { isDisabled() {
...@@ -675,6 +685,11 @@ export default { ...@@ -675,6 +685,11 @@ export default {
}, },
created() { 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 }
}
this.manufacturer = manufacturer this.manufacturer = manufacturer
this.getList() // 列表查询 this.getList() // 列表查询
this.getwareHouse() // 查询数据字典 this.getwareHouse() // 查询数据字典
...@@ -785,7 +800,7 @@ export default { ...@@ -785,7 +800,7 @@ export default {
formData.append('file', this.files) formData.append('file', this.files)
importJbapplyExcel(formData).then(res => { importJbapplyExcel(formData).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.$message.success('共导入' + res.data.total + '条' + `成功导入` + res.data.rows + `条`) this.$message.success('共' + res.data.total + '条' + `成功导入` + res.data.rows + `条`)
this.importLoading = false this.importLoading = false
this.importControls.open = false this.importControls.open = false
this.files = [] this.files = []
......
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