Răsfoiți Sursa

无值时不跳转

zhongxiaoyu 2 ani în urmă
părinte
comite
88c04f8503

+ 69 - 68
src/views/baggageManagement/components/flight/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2022-01-17 10:39:22
- * @LastEditTime: 2022-06-23 17:11:18
+ * @LastEditTime: 2022-08-09 17:52:42
  * @LastEditors: your name
  * @Description: 航班视图
 -->
@@ -780,79 +780,80 @@ export default {
       if (
         ['preFlightNO', 'totalNumber', 'transferFlightNO', 'transferNumber', 'PassengerNameUpcase', 'BagSN'].includes(
           column.property
-        )
+        ) &&
+        row[column.property]
       ) {
         this.$store.dispatch('keepAlive/addClickedCell', {
           row,
           columnProp: column.property,
           pageName: this.$route.name
         })
-      }
-      switch (column.property) {
-        case 'preFlightNO':
-          this.$router.push({
-            path: '/advance/flightView',
-            query: {
-              flightNO: row.preFlightNO,
-              flightDate: row.preFlightDate
-            }
-          })
-          break
-        case 'totalNumber':
-          this.$router.push({
-            path: '/advance',
-            query: {
-              flightNO: this.queryData.flightNO,
-              startDate: this.queryData.flightDate,
-              endDate: this.queryData.flightDate,
-              transferArrival: row.preFlightNO
-            }
-          })
-          break
-        case 'inFlightNO':
-          this.$router.push({
-            path: '/advance/flightView',
-            query: {
-              flightNO: row.inFlightNO,
-              flightDate: row.inFlightDate
-            }
-          })
-          break
-        case 'transferFlightNO':
-          this.$router.push({
-            path: '/advance/flightView',
-            query: {
-              flightNO: row.transferFlightNO,
-              flightDate: row.transferFlightDate
-            }
-          })
-          break
-        case 'transferNumber':
-          this.$router.push({
-            path: '/advance',
-            query: {
-              flightNO: this.queryData.flightNO,
-              startDate: this.queryData.flightDate,
-              endDate: this.queryData.flightDate,
-              transferDeparture: row.transferFlightNO
-            }
-          })
-          break
-        case 'PassengerNameUpcase':
-          this.$message.info('开发中')
-          break
-        case 'BagSN':
-          this.$router.push({
-            path: `/${this.$route.path.split('/').slice(1, -1).join('/')}/baggageView`,
-            query: {
-              bagSN: row.BagSN,
-              flightNO: this.queryData.flightNO,
-              flightDate: this.queryData.flightDate
-            }
-          })
-          break
-        default:
-          break
+        switch (column.property) {
+          case 'preFlightNO':
+            this.$router.push({
+              path: '/advance/flightView',
+              query: {
+                flightNO: row.preFlightNO,
+                flightDate: row.preFlightDate
+              }
+            })
+            break
+          case 'totalNumber':
+            this.$router.push({
+              path: '/advance',
+              query: {
+                flightNO: this.queryData.flightNO,
+                startDate: this.queryData.flightDate,
+                endDate: this.queryData.flightDate,
+                transferArrival: row.preFlightNO
+              }
+            })
+            break
+          case 'inFlightNO':
+            this.$router.push({
+              path: '/advance/flightView',
+              query: {
+                flightNO: row.inFlightNO,
+                flightDate: row.inFlightDate
+              }
+            })
+            break
+          case 'transferFlightNO':
+            this.$router.push({
+              path: '/advance/flightView',
+              query: {
+                flightNO: row.transferFlightNO,
+                flightDate: row.transferFlightDate
+              }
+            })
+            break
+          case 'transferNumber':
+            this.$router.push({
+              path: '/advance',
+              query: {
+                flightNO: this.queryData.flightNO,
+                startDate: this.queryData.flightDate,
+                endDate: this.queryData.flightDate,
+                transferDeparture: row.transferFlightNO
+              }
+            })
+            break
+          case 'PassengerNameUpcase':
+            this.$message.info('开发中')
+            break
+          case 'BagSN':
+            this.$router.push({
+              path: `/${this.$route.path.split('/').slice(1, -1).join('/')}/baggageView`,
+              query: {
+                bagSN: row.BagSN,
+                flightNO: this.queryData.flightNO,
+                flightDate: this.queryData.flightDate
+              }
+            })
+            break
+          default:
+            break
+        }
       }
     },
     // 合计行

+ 265 - 264
src/views/baggageManagement/mixins/terminal.js

@@ -1,7 +1,7 @@
 /*
  * @Author: Badguy
  * @Date: 2022-03-04 11:41:55
- * @LastEditTime: 2022-08-09 17:40:33
+ * @LastEditTime: 2022-08-09 17:49:56
  * @LastEditors: your name
  * @Description: 航站视图通用部分
  * have a nice day!
@@ -267,203 +267,86 @@ export default {
           'loadedQuantity',
           'numberOfDestinationArrivals',
           'noBSM'
-        ].includes(column.property)
+        ].includes(column.property) &&
+        row[column.property]
       ) {
         this.$store.dispatch('keepAlive/addClickedCell', {
           row,
           columnProp: column.property,
           pageName: this.$route.name
         })
-      }
-      switch (column.property) {
-        case 'flightNO':
-          this.$router.push({
-            path: `${this.$route.path}/flightView`,
-            query: {
-              flightNO: row.flightNO,
-              flightDate: row.flightDate
-            }
-          })
-          break
-        case 'preFlightNO':
-          this.$router.push({
-            path: '/transfer/arrival/flightView',
-            query: {
-              flightNO: row.preFlightNO,
-              flightDate: row.flightDate
-            }
-          })
-          break
-        case 'inTransferBaggageCount':
-          this.$router.push({
-            path: '/advance',
-            query: {
-              flightNO: row.preFlightNO,
-              transferDeparture: row.flightNO,
-              startDate: row.preFlightDate,
-              endDate: row.preFlightDate,
-              departureStation: row.preAirport,
-              destination: this.formData.currentAirport
-            }
-          })
-          break
-        case 'inTransferredBaggageCount':
-          this.$router.push({
-            path: '/advance',
-            query: {
-              flightNO: row.flightNO,
-              transferArrival: row.preFlightNO,
-              startDate: row.flightDate,
-              endDate: row.flightDate,
-              departureStation: this.formData.currentAirport,
-              destination: row.targetAirport
-            }
-          })
-          break
-        case 'outTransferBaggageCount':
-          this.$router.push({
-            path: '/advance',
-            query: {
-              flightNO: row.preFlightNO,
-              transferDeparture: row.flightNO,
-              startDate: row.preFlightDate,
-              endDate: row.preFlightDate,
-              departureStation: row.preAirport,
-              destination: this.formData.currentAirport
-            }
-          })
-          break
-        case 'outTransferredBaggageCount':
-          this.$router.push({
-            path: '/advance',
-            query: {
-              flightNO: row.flightNO,
-              transferArrival: row.preFlightNO,
-              startDate: row.flightDate,
-              endDate: row.flightDate,
-              departureStation: this.formData.currentAirport,
-              destination: row.targetAirport
-            }
-          })
-          break
-        case 'tounLoad':
-          this.$router.push({
-            path: '/advance',
-            query: {
-              flightNO: row.flightNO,
-              startDate: row.flightDate,
-              endDate: row.flightDate,
-              departureStation: this.formData.currentAirport,
-              destination: row.targetAirport,
-              unLoad: 0
-            }
-          })
-          break
-        case 'unLoad':
-          this.$router.push({
-            path: '/advance',
-            query: {
-              flightNO: row.flightNO,
-              startDate: row.flightDate,
-              endDate: row.flightDate,
-              departureStation: this.formData.currentAirport,
-              destination: row.targetAirport,
-              unLoad: 1
-            }
-          })
-          break
-        // case 'checkInNumber':
-        //   this.$router.push({
-        //     path: '/advance',
-        //     query: {
-        //       flightNO: row.flightNO,
-        //       startDate: row.flightDate,
-        //       endDate: row.flightDate,
-        //       departureStation: this.formData.currentAirport,
-        //       destination: row.targetAirport,
-        //       checkIn: 1
-        //     }
-        //   })
-        //   break
-        case 'unActive':
-          this.$router.push({
-            path: '/advance',
-            query: {
-              flightNO: row.flightNO,
-              startDate: row.flightDate,
-              endDate: row.flightDate,
-              departureStation: this.formData.currentAirport,
-              destination: row.targetAirport,
-              active: 0
-            }
-          })
-          break
-        case 'preLoad':
-          this.$router.push({
-            path: '/advance',
-            query: {
-              flightNO: row.flightNO,
-              startDate: row.flightDate,
-              endDate: row.flightDate,
-              departureStation: this.formData.currentAirport,
-              destination: row.targetAirport,
-              active: 1,
-              canceled: 0
-            }
-          })
-          break
-        case 'midIn':
-          this.$router.push({
-            path: '/advance',
-            query: {
-              flightNO: row.flightNO,
-              startDate: row.flightDate,
-              endDate: row.flightDate,
-              departureStation: this.formData.currentAirport,
-              destination: row.targetAirport,
-              transferIn: 1
-            }
-          })
-          break
-        case 'noCheckInNumber':
-          this.$router.push({
-            path: '/advance',
-            query: {
-              flightNO: row.flightNO,
-              startDate: row.flightDate,
-              endDate: row.flightDate,
-              departureStation: this.formData.currentAirport,
-              destination: row.targetAirport,
-              canceled: 1
-            }
-          })
-          break
-        case 'noBSM':
-          this.$router.push({
-            path: '/advance',
-            query: {
-              flightNO: row.flightNO,
-              startDate: row.flightDate,
-              endDate: row.flightDate,
-              departureStation: this.formData.currentAirport,
-              destination: row.targetAirport,
-              noBSM: 0
-            }
-          })
-          break
-        case 'checkInNumber':
-        case 'checkNumber':
-        case 'sortNumber':
-        case 'loadNumber':
-        case 'boardID':
-          {
-            const reflect = {
-              checkInNumber: '值机',
-              checkNumber: '安检',
-              sortNumber: '分拣',
-              loadNumber: '装车',
-              boardID: '装机'
-            }
+        switch (column.property) {
+          case 'flightNO':
+            this.$router.push({
+              path: `${this.$route.path}/flightView`,
+              query: {
+                flightNO: row.flightNO,
+                flightDate: row.flightDate
+              }
+            })
+            break
+          case 'preFlightNO':
+            this.$router.push({
+              path: '/transfer/arrival/flightView',
+              query: {
+                flightNO: row.preFlightNO,
+                flightDate: row.flightDate
+              }
+            })
+            break
+          case 'inTransferBaggageCount':
+            this.$router.push({
+              path: '/advance',
+              query: {
+                flightNO: row.preFlightNO,
+                transferDeparture: row.flightNO,
+                startDate: row.preFlightDate,
+                endDate: row.preFlightDate,
+                departureStation: row.preAirport,
+                destination: this.formData.currentAirport
+              }
+            })
+            break
+          case 'inTransferredBaggageCount':
+            this.$router.push({
+              path: '/advance',
+              query: {
+                flightNO: row.flightNO,
+                transferArrival: row.preFlightNO,
+                startDate: row.flightDate,
+                endDate: row.flightDate,
+                departureStation: this.formData.currentAirport,
+                destination: row.targetAirport
+              }
+            })
+            break
+          case 'outTransferBaggageCount':
+            this.$router.push({
+              path: '/advance',
+              query: {
+                flightNO: row.preFlightNO,
+                transferDeparture: row.flightNO,
+                startDate: row.preFlightDate,
+                endDate: row.preFlightDate,
+                departureStation: row.preAirport,
+                destination: this.formData.currentAirport
+              }
+            })
+            break
+          case 'outTransferredBaggageCount':
+            this.$router.push({
+              path: '/advance',
+              query: {
+                flightNO: row.flightNO,
+                transferArrival: row.preFlightNO,
+                startDate: row.flightDate,
+                endDate: row.flightDate,
+                departureStation: this.formData.currentAirport,
+                destination: row.targetAirport
+              }
+            })
+            break
+          case 'tounLoad':
             this.$router.push({
               path: '/advance',
               query: {
@@ -472,81 +355,199 @@ export default {
                 endDate: row.flightDate,
                 departureStation: this.formData.currentAirport,
                 destination: row.targetAirport,
-                status: reflect[column.property]
+                unLoad: 0
               }
             })
-          }
-          break
-        case 'checkIns':
-          this.$router.push({
-            path: '/advance',
-            query: {
-              flightNO: row.flightNO,
-              startDate: row.flightDate,
-              endDate: row.flightDate,
-              departureStation: row.departureAirport,
-              destination: this.formData.currentAirport,
-              status: '值机'
-            }
-          })
-          break
-        case 'projectedLoad':
-          this.$router.push({
-            path: '/advance',
-            query: {
-              flightNO: row.flightNO,
-              startDate: row.flightDate,
-              endDate: row.flightDate,
-              departureStation: row.departureAirport,
-              destination: this.formData.currentAirport,
-              active: 1,
-              canceled: 0
-            }
-          })
-          break
-        case 'loadedQuantity':
-          this.$router.push({
-            path: '/advance',
-            query: {
-              flightNO: row.flightNO,
-              startDate: row.flightDate,
-              endDate: row.flightDate,
-              departureStation: row.departureAirport,
-              destination: this.formData.currentAirport,
-              status: '装车',
-              canceled: 0
-            }
-          })
-          break
-        case 'numberOfDestinationArrivals':
-          this.$router.push({
-            path: '/advance',
-            query: {
-              flightNO: row.flightNO,
-              startDate: row.flightDate,
-              endDate: row.flightDate,
-              departureStation: row.departureAirport,
-              destination: this.formData.currentAirport,
-              status: '到达'
-            }
-          })
-          break
-        case 'terminateArrivalQuantity':
-          this.$router.push({
-            path: '/advance',
-            query: {
-              flightNO: row.flightNO,
-              startDate: row.flightDate,
-              endDate: row.flightDate,
-              departureStation: row.departureAirport,
-              destination: this.formData.currentAirport,
-              status: '到达',
-              transferIn: 0
+            break
+          case 'unLoad':
+            this.$router.push({
+              path: '/advance',
+              query: {
+                flightNO: row.flightNO,
+                startDate: row.flightDate,
+                endDate: row.flightDate,
+                departureStation: this.formData.currentAirport,
+                destination: row.targetAirport,
+                unLoad: 1
+              }
+            })
+            break
+          // case 'checkInNumber':
+          //   this.$router.push({
+          //     path: '/advance',
+          //     query: {
+          //       flightNO: row.flightNO,
+          //       startDate: row.flightDate,
+          //       endDate: row.flightDate,
+          //       departureStation: this.formData.currentAirport,
+          //       destination: row.targetAirport,
+          //       checkIn: 1
+          //     }
+          //   })
+          //   break
+          case 'unActive':
+            this.$router.push({
+              path: '/advance',
+              query: {
+                flightNO: row.flightNO,
+                startDate: row.flightDate,
+                endDate: row.flightDate,
+                departureStation: this.formData.currentAirport,
+                destination: row.targetAirport,
+                active: 0
+              }
+            })
+            break
+          case 'preLoad':
+            this.$router.push({
+              path: '/advance',
+              query: {
+                flightNO: row.flightNO,
+                startDate: row.flightDate,
+                endDate: row.flightDate,
+                departureStation: this.formData.currentAirport,
+                destination: row.targetAirport,
+                active: 1,
+                canceled: 0
+              }
+            })
+            break
+          case 'midIn':
+            this.$router.push({
+              path: '/advance',
+              query: {
+                flightNO: row.flightNO,
+                startDate: row.flightDate,
+                endDate: row.flightDate,
+                departureStation: this.formData.currentAirport,
+                destination: row.targetAirport,
+                transferIn: 1
+              }
+            })
+            break
+          case 'noCheckInNumber':
+            this.$router.push({
+              path: '/advance',
+              query: {
+                flightNO: row.flightNO,
+                startDate: row.flightDate,
+                endDate: row.flightDate,
+                departureStation: this.formData.currentAirport,
+                destination: row.targetAirport,
+                canceled: 1
+              }
+            })
+            break
+          case 'noBSM':
+            this.$router.push({
+              path: '/advance',
+              query: {
+                flightNO: row.flightNO,
+                startDate: row.flightDate,
+                endDate: row.flightDate,
+                departureStation: this.formData.currentAirport,
+                destination: row.targetAirport,
+                noBSM: 0
+              }
+            })
+            break
+          case 'checkInNumber':
+          case 'checkNumber':
+          case 'sortNumber':
+          case 'loadNumber':
+          case 'boardID':
+            {
+              const reflect = {
+                checkInNumber: '值机',
+                checkNumber: '安检',
+                sortNumber: '分拣',
+                loadNumber: '装车',
+                boardID: '装机'
+              }
+              this.$router.push({
+                path: '/advance',
+                query: {
+                  flightNO: row.flightNO,
+                  startDate: row.flightDate,
+                  endDate: row.flightDate,
+                  departureStation: this.formData.currentAirport,
+                  destination: row.targetAirport,
+                  status: reflect[column.property]
+                }
+              })
             }
-          })
-          break
-        default:
-          break
+            break
+          case 'checkIns':
+            this.$router.push({
+              path: '/advance',
+              query: {
+                flightNO: row.flightNO,
+                startDate: row.flightDate,
+                endDate: row.flightDate,
+                departureStation: row.departureAirport,
+                destination: this.formData.currentAirport,
+                status: '值机'
+              }
+            })
+            break
+          case 'projectedLoad':
+            this.$router.push({
+              path: '/advance',
+              query: {
+                flightNO: row.flightNO,
+                startDate: row.flightDate,
+                endDate: row.flightDate,
+                departureStation: row.departureAirport,
+                destination: this.formData.currentAirport,
+                active: 1,
+                canceled: 0
+              }
+            })
+            break
+          case 'loadedQuantity':
+            this.$router.push({
+              path: '/advance',
+              query: {
+                flightNO: row.flightNO,
+                startDate: row.flightDate,
+                endDate: row.flightDate,
+                departureStation: row.departureAirport,
+                destination: this.formData.currentAirport,
+                status: '装车',
+                canceled: 0
+              }
+            })
+            break
+          case 'numberOfDestinationArrivals':
+            this.$router.push({
+              path: '/advance',
+              query: {
+                flightNO: row.flightNO,
+                startDate: row.flightDate,
+                endDate: row.flightDate,
+                departureStation: row.departureAirport,
+                destination: this.formData.currentAirport,
+                status: '到达'
+              }
+            })
+            break
+          case 'terminateArrivalQuantity':
+            this.$router.push({
+              path: '/advance',
+              query: {
+                flightNO: row.flightNO,
+                startDate: row.flightDate,
+                endDate: row.flightDate,
+                departureStation: row.departureAirport,
+                destination: this.formData.currentAirport,
+                status: '到达',
+                transferIn: 0
+              }
+            })
+            break
+          default:
+            break
+        }
       }
     }
   }