chenjun 2 years ago
parent
commit
66d924e322

+ 3 - 0
src/views/system/securityCheck/views/agentHome.vue

@@ -255,6 +255,9 @@ export default {
   //   this.getData();
   // },
   mounted() {
+    
+  },
+  activated(){
     if (Object.keys(this.$route.query).length !== 0) {
       const { startTime, endTime, agentLevel, agentCode } = this.$route.query
       this.queryData.startTime = startTime

+ 2 - 0
src/views/system/securityCheck/views/agentTable.vue

@@ -167,6 +167,8 @@ export default {
     this.formatDate()
   },
   mounted() {
+  },
+  activated(){
     if (Object.keys(this.$route.query).length !== 0) {
       const { startTime, endTime, agentLevel, agentCode } = this.$route.query
       this.FormData.startTime = startTime

+ 12 - 9
src/views/system/securityCheck/views/cargoCharts.vue

@@ -220,20 +220,23 @@ export default {
   },
   created() {
     this.formatDate()
+    this.routdata()
   },
   mounted() {
-    if (Object.keys(this.$route.query).length !== 0) {
-      const { beginDate, endDate, places, proxyId } = this.$route.query
+  },
+  activated(){
+    if (Object.keys(this.$route.params).length !== 0) {
+      const { beginDate, endDate, places, proxyId } = this.$route.params
       this.queryData.beginDate = beginDate
       this.queryData.endDate = endDate
-      if (typeof places == 'string') {
-        this.queryData.places = [places]
-      } else {
-        this.queryData.places = places
+      if (places&&typeof places == 'string') {
+        this.FormData.places = [places]
+      } 
+      if(places&&typeof places != 'string') {
+        this.FormData.places = places
       }
       this.queryData.proxyId = proxyId
     }
-    this.routdata()
     this.relationDate()
   },
   methods: {
@@ -422,10 +425,10 @@ export default {
     },
     change() {
       let param = JSON.parse(JSON.stringify(this.queryData))
-      param.places = param.places[0]
       this.$router.push({
         path: './cargoRelevanceTable',
-        query: this.queryData,
+        name:'CargoRelevanceTable',
+        params: param,
       })
     },
     init(arr, arrx, Low, firs, pt, strictly, datas) {

+ 15 - 9
src/views/system/securityCheck/views/cargoRelevanceTable.vue

@@ -5,7 +5,7 @@
         title="航线货物关联统计"
         @change="changeHandler"
         @search="searchHandler"
-        mode="combobox"
+        mode="multiple"
         selectPlaceholder="目的地"
         :optionLists="destination"
         @exportex="exportex"
@@ -244,23 +244,27 @@ export default {
     }
   },
   created() {
+    
     this.formatDate()
+    this.routdata()
   },
   mounted() {
-    if (Object.keys(this.$route.query).length !== 0) {
-      const { beginDate, endDate, places, proxyId } = this.$route.query
+    this.setTableHeight()
+    window.addEventListener('resize', this.setTableHeight)
+  },
+  activated(){
+    if (Object.keys(this.$route.params).length !== 0) {
+      const { beginDate, endDate, places, proxyId } = this.$route.params
       this.FormData.beginDate = beginDate
       this.FormData.endDate = endDate
-      if (typeof places == 'string') {
+      if (places&&typeof places == 'string') {
         this.FormData.places = [places]
-      } else {
+      } 
+      if(places&&typeof places != 'string') {
         this.FormData.places = places
       }
       this.FormData.proxyId = proxyId
     }
-    this.setTableHeight()
-    window.addEventListener('resize', this.setTableHeight)
-    this.routdata()
     this.getData()
   },
   beforeDestroy() {
@@ -433,10 +437,12 @@ export default {
     },
     changeHandler() {
       let param = JSON.parse(JSON.stringify(this.FormData))
+      console.log(param)
       param.places = param.places[0]
       this.$router.push({
         path: './cargoCharts',
-        query: this.FormData,
+        name:'CargoCharts',
+        params: this.FormData,
       })
     },
     searchHandler(arr) {

+ 3 - 0
src/views/system/securityCheck/views/cargoStatisticsHome.vue

@@ -418,6 +418,9 @@ export default {
     // this.getData();
   },
   mounted() {
+    
+  },
+  activated(){
     if (Object.keys(this.$route.query).length !== 0) {
       this.queryData.startTime = this.$route.query.startTime
       this.queryData.endTime = this.$route.query.endTime

+ 4 - 2
src/views/system/securityCheck/views/cargoTable.vue

@@ -156,6 +156,10 @@ export default {
     this.formatDate()
   },
   mounted() {
+    this.setTableHeight()
+    window.addEventListener('resize', this.setTableHeight)
+  },
+  activated(){
     if (Object.keys(this.$route.query).length !== 0) {
       const { startTime, endTime, agentLevel, agentCode } = this.$route.query
       this.FormData.startTime = startTime
@@ -163,8 +167,6 @@ export default {
       this.FormData.agentLevel = agentLevel
       this.FormData.agentCode = agentCode
     }
-    this.setTableHeight()
-    window.addEventListener('resize', this.setTableHeight)
     this.getData()
   },
   beforeDestroy() {