chenrui  2 年之前
父节点
当前提交
8c24a6f939

+ 13 - 13
src/views/system/securityCheck/components/securityCheckHeader.vue

@@ -317,26 +317,26 @@ export default {
     },
   },
   mounted() {
-    if (Object.keys(this.$route.query).length == 0) {
+    if (Object.keys(this.$route.params).length == 0) {
       this.formData.dateRangeRadio = '当日'
     } else {
-      this.formData.beginDate = this.$route.query.startTime
-      this.formData.endDate = this.$route.query.endTime
-      if (this.$route.query.beginDate) {
-        this.formData.beginDate = this.$route.query.beginDate
+      this.formData.beginDate = this.$route.params.startTime
+      this.formData.endDate = this.$route.params.endTime
+      if (this.$route.params.beginDate) {
+        this.formData.beginDate = this.$route.params.beginDate
       }
-      if (this.$route.query.endDate) {
-        this.formData.endDate = this.$route.query.endDate
+      if (this.$route.params.endDate) {
+        this.formData.endDate = this.$route.params.endDate
       }
       // this.formData.selection = this.$route.query.levelId
       //   ? this.$route.query.levelId
       //   : this.$route.query.agentLevel;
-      this.formData.selection = this.$route.query.places
-        ? this.$route.query.places
-        : this.$route.query.levelId
-        ? this.$route.query.levelId
-        : this.$route.query.agentLevel
-      this.formData.searchText = this.$route.query.proxyId ? this.$route.query.proxyId : this.$route.query.agentCode
+      this.formData.selection = this.$route.params.places
+        ? this.$route.params.places
+        : this.$route.params.levelId
+        ? this.$route.params.levelId
+        : this.$route.params.agentLevel
+      this.formData.searchText = this.$route.params.proxyId ? this.$route.params.proxyId : this.$route.params.agentCode
       // this.formData.agentLevel = this.$route.query.agentLevel;
       // this.formData.agentCode = this.$route.query.agentCode;
     }

+ 28 - 14
src/views/system/securityCheck/views/agentHome.vue

@@ -254,12 +254,10 @@ export default {
   // created() {
   //   this.getData();
   // },
-  mounted() {
-    
-  },
-  activated(){
-    if (Object.keys(this.$route.query).length !== 0) {
-      const { startTime, endTime, agentLevel, agentCode } = this.$route.query
+  mounted() {},
+  activated() {
+    if (Object.keys(this.$route.params).length !== 0) {
+      const { startTime, endTime, agentLevel, agentCode } = this.$route.params
       this.queryData.startTime = startTime
       this.queryData.endTime = endTime
       this.queryData.agentLevel = agentLevel
@@ -280,17 +278,25 @@ export default {
     echarfuck(data) {
       this.queryData.openResult = ''
       this.queryData.riskClassification = data.namech
+      // this.$router.push({
+      //   path: '/securityCheck/waybillTable',
+      //   query: this.queryData,
+      // })
+      let param = JSON.parse(JSON.stringify(this.queryData))
       this.$router.push({
-        path: '/securityCheck/waybillTable',
-        query: this.queryData,
+        path: './waybillTable',
+        name: 'WaybillTable',
+        params: param,
       })
     },
     echarup(data, item) {
       this.queryData.riskClassification = item
       this.queryData.openResult = data.name ? data.name : data
+      let param = JSON.parse(JSON.stringify(this.queryData))
       this.$router.push({
-        path: '/securityCheck/waybillTable',
-        query: this.queryData,
+        path: './waybillTable',
+        name: 'WaybillTable',
+        params: param,
       })
     },
     //点击跳转
@@ -299,15 +305,23 @@ export default {
         this.queryData.riskClassification = data.namefa
         this.queryData.openResult = data.namech
       }
+      let param = JSON.parse(JSON.stringify(this.queryData))
       this.$router.push({
-        path: '/securityCheck/waybillTable',
-        query: this.queryData,
+        path: './waybillTable',
+        name: 'WaybillTable',
+        params: param,
       })
     },
     change() {
+      // this.$router.push({
+      //   path: '/securityCheck/agentTable',
+      //   query: this.queryData,
+      // })
+      let param = JSON.parse(JSON.stringify(this.queryData))
       this.$router.push({
-        path: '/securityCheck/agentTable',
-        query: this.queryData,
+        path: './agentTable',
+        name: 'AgentTable',
+        params: param,
       })
     },
     async getData() {

+ 23 - 14
src/views/system/securityCheck/views/agentTable.vue

@@ -53,8 +53,9 @@ export default {
           title: '货物件数',
           clickHandler: (row, rowIndex) => {
             this.$router.push({
-              path: '/securityCheck/waybillTable',
-              query: {
+              path: './waybillTable',
+              name: 'WaybillTable',
+              params: {
                 startTime: this.FormData.startTime,
                 endTime: this.FormData.endTime,
                 destination: this.FormData.destination,
@@ -83,8 +84,9 @@ export default {
               title: '放行',
               clickHandler: (row, rowIndex) => {
                 this.$router.push({
-                  path: '/securityCheck/waybillTable',
-                  query: {
+                  path: './waybillTable',
+                  name: 'WaybillTable',
+                  params: {
                     startTime: this.FormData.startTime,
                     endTime: this.FormData.endTime,
                     destination: this.FormData.destination,
@@ -103,8 +105,9 @@ export default {
               title: '拒运',
               clickHandler: (row, rowIndex) => {
                 this.$router.push({
-                  path: '/securityCheck/waybillTable',
-                  query: {
+                  path: './waybillTable',
+                  name: 'WaybillTable',
+                  params: {
                     startTime: this.FormData.startTime,
                     endTime: this.FormData.endTime,
                     destination: this.FormData.destination,
@@ -123,8 +126,9 @@ export default {
               title: '移交',
               clickHandler: (row, rowIndex) => {
                 this.$router.push({
-                  path: '/securityCheck/waybillTable',
-                  query: {
+                  path: './waybillTable',
+                  name: 'WaybillTable',
+                  params: {
                     startTime: this.FormData.startTime,
                     endTime: this.FormData.endTime,
                     destination: this.FormData.destination,
@@ -166,11 +170,10 @@ export default {
   created() {
     this.formatDate()
   },
-  mounted() {
-  },
-  activated(){
-    if (Object.keys(this.$route.query).length !== 0) {
-      const { startTime, endTime, agentLevel, agentCode } = this.$route.query
+  mounted() {},
+  activated() {
+    if (Object.keys(this.$route.params).length !== 0) {
+      const { startTime, endTime, agentLevel, agentCode } = this.$route.params
       this.FormData.startTime = startTime
       this.FormData.endTime = endTime
       this.FormData.agentLevel = agentLevel
@@ -248,9 +251,15 @@ export default {
       }
     },
     changeHandler() {
+      // this.$router.push({
+      //   path: './agent',
+      //   query: this.FormData,
+      // })
+      let param = JSON.parse(JSON.stringify(this.FormData))
       this.$router.push({
         path: './agent',
-        query: this.FormData,
+        name: 'Agent',
+        params: param,
       })
     },
     searchHandler(arr) {

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

@@ -222,17 +222,16 @@ export default {
     this.formatDate()
     this.routdata()
   },
-  mounted() {
-  },
-  activated(){
+  mounted() {},
+  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 (places&&typeof places == 'string') {
+      if (places && typeof places == 'string') {
         this.FormData.places = [places]
-      } 
-      if(places&&typeof places != 'string') {
+      }
+      if (places && typeof places != 'string') {
         this.FormData.places = places
       }
       this.queryData.proxyId = proxyId
@@ -282,9 +281,15 @@ export default {
       if (data == '总数') {
         params.riskRating = ''
       }
+      // this.$router.push({
+      //   path: '/securityCheck/waybillTable',
+      //   query: params,
+      // })
+      let param = JSON.parse(JSON.stringify(params))
       this.$router.push({
-        path: '/securityCheck/waybillTable',
-        query: params,
+        path: './waybillTable',
+        name: 'WaybillTable',
+        params: param,
       })
     },
     //货物关联统计接口
@@ -427,7 +432,7 @@ export default {
       let param = JSON.parse(JSON.stringify(this.queryData))
       this.$router.push({
         path: './cargoRelevanceTable',
-        name:'CargoRelevanceTable',
+        name: 'CargoRelevanceTable',
         params: param,
       })
     },

+ 23 - 19
src/views/system/securityCheck/views/cargoRelevanceTable.vue

@@ -52,8 +52,9 @@ export default {
           title: '总件数',
           clickHandler: (row, rowIndex) => {
             this.$router.push({
-              path: '/securityCheck/waybillTable',
-              query: {
+              path: './waybillTable',
+              name: 'WaybillTable',
+              params: {
                 startTime: this.FormData.beginDate,
                 endTime: this.FormData.endDate,
                 destination: row.flightLine == '合计' ? '' : row.flightLine,
@@ -75,8 +76,9 @@ export default {
               title: '件数',
               clickHandler: (row, rowIndex) => {
                 this.$router.push({
-                  path: '/securityCheck/waybillTable',
-                  query: {
+                  path: './waybillTable',
+                  name: 'WaybillTable',
+                  params: {
                     startTime: this.FormData.beginDate,
                     endTime: this.FormData.endDate,
                     destination: row.flightLine == '合计' ? '' : row.flightLine,
@@ -105,8 +107,9 @@ export default {
               title: '件数',
               clickHandler: (row, rowIndex) => {
                 this.$router.push({
-                  path: '/securityCheck/waybillTable',
-                  query: {
+                  path: './waybillTable',
+                  name: 'WaybillTable',
+                  params: {
                     startTime: this.FormData.beginDate,
                     endTime: this.FormData.endDate,
                     destination: row.flightLine == '合计' ? '' : row.flightLine,
@@ -137,8 +140,9 @@ export default {
               title: '件数',
               clickHandler: (row, rowIndex) => {
                 this.$router.push({
-                  path: '/securityCheck/waybillTable',
-                  query: {
+                  path: './waybillTable',
+                  name: 'WaybillTable',
+                  params: {
                     startTime: this.FormData.beginDate,
                     endTime: this.FormData.endDate,
                     destination: row.flightLine == '合计' ? '' : row.flightLine,
@@ -170,8 +174,9 @@ export default {
               title: '件数',
               clickHandler: (row, rowIndex) => {
                 this.$router.push({
-                  path: '/securityCheck/waybillTable',
-                  query: {
+                  path: './waybillTable',
+                  name: 'WaybillTable',
+                  params: {
                     startTime: this.FormData.beginDate,
                     endTime: this.FormData.endDate,
                     destination: row.flightLine == '合计' ? '' : row.flightLine,
@@ -203,8 +208,9 @@ export default {
               title: '件数',
               clickHandler: (row, rowIndex) => {
                 this.$router.push({
-                  path: '/securityCheck/waybillTable',
-                  query: {
+                  path: './waybillTable',
+                  name: 'WaybillTable',
+                  params: {
                     startTime: this.FormData.beginDate,
                     endTime: this.FormData.endDate,
                     destination: row.flightLine == '合计' ? '' : row.flightLine,
@@ -244,7 +250,6 @@ export default {
     }
   },
   created() {
-    
     this.formatDate()
     this.routdata()
   },
@@ -252,15 +257,15 @@ export default {
     this.setTableHeight()
     window.addEventListener('resize', this.setTableHeight)
   },
-  activated(){
+  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 (places&&typeof places == 'string') {
+      if (places && typeof places == 'string') {
         this.FormData.places = [places]
-      } 
-      if(places&&typeof places != 'string') {
+      }
+      if (places && typeof places != 'string') {
         this.FormData.places = places
       }
       this.FormData.proxyId = proxyId
@@ -437,11 +442,10 @@ export default {
     },
     changeHandler() {
       let param = JSON.parse(JSON.stringify(this.FormData))
-      console.log(param)
       param.places = param.places[0]
       this.$router.push({
         path: './cargoCharts',
-        name:'CargoCharts',
+        name: 'CargoCharts',
         params: this.FormData,
       })
     },

+ 30 - 16
src/views/system/securityCheck/views/cargoStatisticsHome.vue

@@ -417,15 +417,13 @@ export default {
   created() {
     // 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
-      this.queryData.agentLevel = this.$route.query.agentLevel
-      this.queryData.agentCode = this.$route.query.agentCode
+  mounted() {},
+  activated() {
+    if (Object.keys(this.$route.params).length !== 0) {
+      this.queryData.startTime = this.$route.params.startTime
+      this.queryData.endTime = this.$route.params.endTime
+      this.queryData.agentLevel = this.$route.params.agentLevel
+      this.queryData.agentCode = this.$route.params.agentCode
     }
     this.getData()
   },
@@ -442,17 +440,25 @@ export default {
     echarfuck(data) {
       this.queryData.openResult = ''
       this.queryData.riskRating = data.namech
+      // this.$router.push({
+      //   path: '/securityCheck/waybillTable',
+      //   query: this.queryData,
+      // })
+      let param = JSON.parse(JSON.stringify(this.queryData))
       this.$router.push({
-        path: '/securityCheck/waybillTable',
-        query: this.queryData,
+        path: './waybillTable',
+        name: 'WaybillTable',
+        params: param,
       })
     },
     echarup(data, item) {
       this.queryData.riskRating = item
       this.queryData.openResult = data.name ? data.name : data
+      let param = JSON.parse(JSON.stringify(this.queryData))
       this.$router.push({
-        path: '/securityCheck/waybillTable',
-        query: this.queryData,
+        path: './waybillTable',
+        name: 'WaybillTable',
+        params: param,
       })
     },
     //点击跳转
@@ -471,15 +477,23 @@ export default {
           this.queryData.openResult = data.namech
         }
       }
+      let param = JSON.parse(JSON.stringify(this.queryData))
       this.$router.push({
-        path: '/securityCheck/waybillTable',
-        query: this.queryData,
+        path: './waybillTable',
+        name: 'WaybillTable',
+        params: param,
       })
     },
     change() {
+      // this.$router.push({
+      //   path: './cargoTable',
+      //   query: this.queryData,
+      // })
+      let param = JSON.parse(JSON.stringify(this.queryData))
       this.$router.push({
         path: './cargoTable',
-        query: this.queryData,
+        name: 'CargoTable',
+        params: param,
       })
     },
     async getData() {

+ 22 - 12
src/views/system/securityCheck/views/cargoTable.vue

@@ -53,8 +53,9 @@ export default {
           title: '货物件数',
           clickHandler: (row, rowIndex) => {
             this.$router.push({
-              path: '/securityCheck/waybillTable',
-              query: {
+              path: './waybillTable',
+              name: 'WaybillTable',
+              params: {
                 startTime: this.FormData.startTime,
                 endTime: this.FormData.endTime,
                 destination: this.FormData.destination,
@@ -82,8 +83,9 @@ export default {
               title: '放行',
               clickHandler: (row, rowIndex) => {
                 this.$router.push({
-                  path: '/securityCheck/waybillTable',
-                  query: {
+                  path: './waybillTable',
+                  name: 'WaybillTable',
+                  params: {
                     startTime: this.FormData.startTime,
                     endTime: this.FormData.endTime,
                     destination: this.FormData.destination,
@@ -101,8 +103,9 @@ export default {
               title: '拒运',
               clickHandler: (row, rowIndex) => {
                 this.$router.push({
-                  path: '/securityCheck/waybillTable',
-                  query: {
+                  path: './waybillTable',
+                  name: 'WaybillTable',
+                  params: {
                     startTime: this.FormData.startTime,
                     endTime: this.FormData.endTime,
                     destination: this.FormData.destination,
@@ -120,8 +123,9 @@ export default {
               title: '移交',
               clickHandler: (row, rowIndex) => {
                 this.$router.push({
-                  path: '/securityCheck/waybillTable',
-                  query: {
+                  path: './waybillTable',
+                  name: 'WaybillTable',
+                  params: {
                     startTime: this.FormData.startTime,
                     endTime: this.FormData.endTime,
                     destination: this.FormData.destination,
@@ -159,9 +163,9 @@ export default {
     this.setTableHeight()
     window.addEventListener('resize', this.setTableHeight)
   },
-  activated(){
-    if (Object.keys(this.$route.query).length !== 0) {
-      const { startTime, endTime, agentLevel, agentCode } = this.$route.query
+  activated() {
+    if (Object.keys(this.$route.params).length !== 0) {
+      const { startTime, endTime, agentLevel, agentCode } = this.$route.params
       this.FormData.startTime = startTime
       this.FormData.endTime = endTime
       this.FormData.agentLevel = agentLevel
@@ -248,9 +252,15 @@ export default {
       }
     },
     changeHandler() {
+      // this.$router.push({
+      //   path: './cargoStatistics',
+      //   query: this.FormData,
+      // })
+      let param = JSON.parse(JSON.stringify(this.FormData))
       this.$router.push({
         path: './cargoStatistics',
-        query: this.FormData,
+        name: 'CargoStatistics',
+        params: param,
       })
     },
     searchHandler(arr) {

+ 8 - 2
src/views/system/securityCheck/views/comprehensiveHome.vue

@@ -53,9 +53,15 @@ export default {
     },
     //点击跳转
     echar() {
+      // this.$router.push({
+      //   path: '/securityCheck/waybillTable',
+      //   query: this.queryData,
+      // })
+      let param = JSON.parse(JSON.stringify(this.queryData))
       this.$router.push({
-        path: '/securityCheck/waybillTable',
-        query: this.queryData,
+        path: './waybillTable',
+        name: 'WaybillTable',
+        params: param,
       })
     },
     async relationDate(data) {

+ 10 - 10
src/views/system/securityCheck/views/waybillTable.vue

@@ -45,10 +45,10 @@ import { waybill } from '@/api/statistics/statistics.js'
 import XLSX from 'xlsx'
 import FileSaver from 'file-saver'
 export default {
-  components: { SecurityCheckHeader, SecurityCheckTable,PrintTable },
+  components: { SecurityCheckHeader, SecurityCheckTable, PrintTable },
   data() {
     return {
-      printTableId:"printTableId",
+      printTableId: 'printTableId',
       loading: false,
       pagination: {
         showSizeChanger: true,
@@ -139,7 +139,7 @@ export default {
           dataIndex: 'weight',
           key: 'weight',
           title: '重量',
-          width:70
+          width: 70,
         },
       ],
       FormData: {
@@ -156,7 +156,7 @@ export default {
         pageSize: '20', // /** 每页显示记录数 */
       },
       tableData: [],
-      tableDataPrint:[]
+      tableDataPrint: [],
     }
   },
   created() {},
@@ -165,7 +165,7 @@ export default {
     window.addEventListener('resize', this.setTableHeight)
   },
   activated() {
-    let queryData = this.$route.query
+    let queryData = this.$route.params
     const {
       waybillNo,
       destination,
@@ -191,7 +191,7 @@ export default {
       pageSize: '20',
     }
     this.getData()
-    this.getPrintData();
+    this.getPrintData()
   },
   beforeDestroy() {
     window.removeEventListener('resize', this.setTableHeight)
@@ -220,11 +220,11 @@ export default {
       }
       return wbout
     },
-    async getPrintData(){
+    async getPrintData() {
       try {
-        let queryData = JSON.parse(JSON.stringify(this.FormData));
-        queryData.pageNum = "1";
-        queryData.pageSize = "999999";
+        let queryData = JSON.parse(JSON.stringify(this.FormData))
+        queryData.pageNum = '1'
+        queryData.pageSize = '999999'
         const result = await waybill(queryData)
         if (result.code === 200) {
           this.tableDataPrint = result.data.list