Commit 8b748f15 authored by 高宇's avatar 高宇

关闭标签页清除

parent b798852a
...@@ -310,6 +310,7 @@ export default { ...@@ -310,6 +310,7 @@ export default {
}, },
/** 路由离开前存储筛选条件*/ /** 路由离开前存储筛选条件*/
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
console.log("離開路由前賦值")
this.$store.dispatch('searchSave/searchParamsSet', { this.$store.dispatch('searchSave/searchParamsSet', {
path: this.$route.path, path: this.$route.path,
param: { param: {
......
...@@ -225,7 +225,7 @@ ...@@ -225,7 +225,7 @@
</template> </template>
<script> <script>
import {exportInventoryRecord, exportTest, findSingleLogDetail, listLog} from '@/api/processMangement/InventoryRecord' import { exportInventoryRecord, exportTest, findSingleLogDetail, listLog } from '@/api/processMangement/InventoryRecord'
import BaseTable from '@/components/Table/BaseTable/index.vue' import BaseTable from '@/components/Table/BaseTable/index.vue'
import { BaseTableArgumentsTest } from '@/components/Table/AllTableArguments/BaseTableArguments' import { BaseTableArgumentsTest } from '@/components/Table/AllTableArguments/BaseTableArguments'
import { getDictData } from '@/api/equipment/application' import { getDictData } from '@/api/equipment/application'
...@@ -452,6 +452,7 @@ export default { ...@@ -452,6 +452,7 @@ export default {
}, },
created() { created() {
if (this.$store.getters.searchParams[this.$route.path]) { if (this.$store.getters.searchParams[this.$route.path]) {
console.log('111', this.$store.getters.searchParams[this.$route.path])
const { searchParams } = this.$store.getters; const { path } = this.$route const { searchParams } = this.$store.getters; const { path } = this.$route
const param = JSON.parse(searchParams[path]) // 保留着的查询条件 const param = JSON.parse(searchParams[path]) // 保留着的查询条件
this.queryParams = { ...param } this.queryParams = { ...param }
...@@ -595,7 +596,7 @@ export default { ...@@ -595,7 +596,7 @@ export default {
} }
this.openDetails = true this.openDetails = true
}, },
test(){ test() {
exportTest().then(response => { exportTest().then(response => {
const blob = new Blob([response]) const blob = new Blob([response])
const downloadElement = document.createElement('a') const downloadElement = document.createElement('a')
......
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