chenjun 3 жил өмнө
parent
commit
2c4e684e53

+ 2 - 1
src/store/getters.js

@@ -29,6 +29,7 @@ const getters = {
   userRole: state => state.app.OpenRole,
   userPowerList: state => state.user.userPoewrList,
   permission_routes: state => state.permission.routes,
-  keepAlivePages: state => state.keepAlive.keepAlivePages.map(page => page.name)
+  keepAlivePages: state => state.keepAlive.keepAlivePages.map(page => page.name),
+  queryForm:state => state.app.queryForm
 }
 export default getters

+ 1 - 0
src/store/modules/app.js

@@ -19,6 +19,7 @@ const state = {
   outflag: false,
   outcheck: false,
   systemSet: Cookies.get('systemSet') != null ? Cookies.get('systemSet') : null,
+  queryForm:null
 }
 const mutations = {
   TOGGLE_SIDEBAR: state => {

+ 16 - 0
src/views/advancedQuery/views/advancedHome.vue

@@ -438,12 +438,18 @@ export default {
     }
   },
   created() {
+    console.log(this.$store.state.app.queryForm)
     // 参数顺序   【航班开始日期,航班结束日期,航班号,航班号,行李牌号,行李牌号,起飞站,起飞站,目的站,目的站,特殊行李类型,特殊 行李类型,旅客姓名大写拼音,旅客姓名大写拼音,pnr,pnr,值机号,值机号】
     // const dataContent = [this.time[0], this.time[1]]
     // for (let i = 0; i < 18; i++) {
     //   dataContent.push(null)
     // }
     // this.statItemsQueryByStatMain(dataContent);
+    if(this.$store.state.app.queryForm){
+      this.form = this.$store.state.app.queryForm;
+      this.time = this.form.time;
+      this.onCheckGj()
+    }
   },
   mounted() {
     this.baggageTypeQuery()
@@ -769,6 +775,16 @@ export default {
         return ['合计', `共${num}件`]
       }
     }
+  },
+  beforeDestroy(){
+    console.log(this.$route.matched.filter((item) => item.name && item.meta.title))
+    this.form.time = this.time;
+    if(this.$route.matched.filter((item) => item.name && item.meta.title).length>1){
+      this.$store.state.app.queryForm = this.form
+    }
+    else{
+      this.$store.state.app.queryForm = null
+    }
   }
 }
 </script>