Browse Source

容器视图修改

zhongxiaoyu 2 years ago
parent
commit
1eafaa42e7
1 changed files with 42 additions and 14 deletions
  1. 42 14
      src/views/baggageManagement/components/container/index.vue

+ 42 - 14
src/views/baggageManagement/components/container/index.vue

@@ -69,7 +69,7 @@
     <div class="container-table">
       <div class="title">
         <div class="manageTitle">容器行李列表</div>
-        <TimeZoneSelector />
+        <!-- <TimeZoneSelector /> -->
         <img
           class="btn-square btn-shadow"
           src="@/assets/baggage/ic_export.png"
@@ -163,7 +163,7 @@
 
 <script>
 import Dialog from '@/layout/components/Dialog/index.vue'
-import TimeZoneSelector from '@/components/TimeZoneSelector'
+// import TimeZoneSelector from '@/components/TimeZoneSelector'
 import { myQuery } from '@/api/dataIntegration'
 import tableColsMixin from '../../mixins/tableCols'
 import timeZoneMixin from '../../mixins/timeZone'
@@ -174,7 +174,7 @@ import { throttledExportToExcel } from '@/utils/table'
 export default {
   name: 'ContainerView',
   components: {
-    TimeZoneSelector,
+    // TimeZoneSelector,
     Dialog,
     TableHeaderCell
   },
@@ -396,17 +396,12 @@ export default {
       }
       if (
         [
-          'preFlightNO',
-          'totalNumber',
-          'inFlightNO',
-          'transferFlightNO',
-          'transferNumber',
           'passengerName',
-          'luggageSN',
-          'U_Device_ID'
+          'luggageSN'
+          // 'inFlightNO',
+          // 'transferFlightNO'
         ].includes(column.property) &&
-        row[column.property] &&
-        row[column.property] !== 'FBULK'
+        row[column.property]
       ) {
         classes.push('cell-click')
         if (
@@ -422,7 +417,40 @@ export default {
       }
       return classes.join(' ')
     },
-    cellClickHandler(row, column, cell, event) {},
+    cellClickHandler(row, column, cell, event) {
+      if (
+        [
+          'passengerName',
+          'luggageSN'
+          // 'inFlightNO',
+          //  'transferFlightNO'
+        ].includes(column.property) &&
+        row[column.property]
+      ) {
+        this.$store.dispatch('keepAlive/addClickedCell', {
+          row,
+          columnProp: column.property,
+          pageName: this.$route.name
+        })
+        switch (column.property) {
+          case 'passengerName':
+            this.$message.info('开发中')
+            break
+          case 'luggageSN':
+            this.$router.push({
+              path: `${this.$route.path.split('/').slice(0, -1).join('/')}/baggageView`,
+              query: {
+                bagSN: row.luggageSN,
+                flightNO: this.queryData.flightNO,
+                flightDate: this.queryData.flightDate
+              }
+            })
+            break
+          default:
+            break
+        }
+      }
+    },
     toContainerHistory() {
       this.$router.push({
         path: `${this.$route.path.split('/').slice(0, -1).join('/')}/containerHistory`,
@@ -439,7 +467,7 @@ export default {
     },
     exportHandler(refName, tableName) {
       const table = this.$refs[refName].$el.cloneNode(true)
-      const fileName = `${tableName}-${Object.keys(this.queryData).join('-')}.xlsx`
+      const fileName = `${tableName}-${Object.values(this.queryData).join('-')}.xlsx`
       throttledExportToExcel(table, tableName, fileName)
     },
     async queryContainerBaggage(dataContent) {