Эх сурвалжийг харах

表格单元格点击变色

zhongxiaoyu 2 жил өмнө
parent
commit
4775a23aaa

+ 26 - 17
src/components/TimeZoneSelector/index.vue

@@ -1,17 +1,21 @@
 <!--
  * @Author: Badguy
  * @Date: 2022-05-17 15:56:46
- * @LastEditTime: 2022-05-17 17:03:28
+ * @LastEditTime: 2022-05-17 18:53:52
  * @LastEditors: your name
  * @Description: 时区下拉选择菜单
  * have a nice day!
 -->
 <template>
-  <el-dropdown :hide-on-click="false" @command="commandHandler">
+  <el-dropdown
+    :hide-on-click="false"
+    @command="commandHandler"
+  >
     <img
-      class="checkTime msgImg"
+      class="btn-img"
       src="../../assets/departure/ic_time.png"
     >
+    <!-- <span class="time-zone-text">{{ currentDropdownItem.text }}</span> -->
     <el-dropdown-menu
       slot="dropdown"
       class="time-zone"
@@ -50,7 +54,10 @@ export default {
     }
   },
   computed: {
-    ...mapGetters(['timeZone'])
+    ...mapGetters(['timeZone']),
+    currentDropdownItem() {
+      return this.DropdownItems.find(item => item.command === this.timeZone)
+    }
   },
   methods: {
     commandHandler(command) {
@@ -61,19 +68,21 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-.time-zone .el-dropdown-menu__item {
-  padding-left: 30px;
-  font-family: Helvetica, 'Microsoft YaHei';
-  font-size: 12px;
-  color: #101116;
-  position: relative;
-  &.is-disabled {
-    color: #909399;
-  }
-  &.time-zone-selected::before {
-    content: '√';
-    position: absolute;
-    left: 10px;
+.time-zone {
+  .el-dropdown-menu__item {
+    padding-left: 30px;
+    font-family: Helvetica, 'Microsoft YaHei';
+    font-size: 12px;
+    color: #101116;
+    position: relative;
+    &.is-disabled {
+      color: #909399;
+    }
+    &.time-zone-selected::before {
+      content: '√';
+      position: absolute;
+      left: 10px;
+    }
   }
 }
 </style>

+ 3 - 2
src/store/getters.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-10-14 17:17:53
- * @LastEditTime: 2022-05-17 15:48:13
+ * @LastEditTime: 2022-05-17 19:14:11
  * @LastEditors: your name
  * @Description: In User Settings Edit
  * @FilePath: \Foshan4A\src\store\getters.js
@@ -31,6 +31,7 @@ const getters = {
   permission_routes: state => state.permission.routes,
   keepAlivePages: state => state.keepAlive.keepAlivePages.map(page => page.name),
   queryForm: state => state.app.queryForm,
-  timeZone: state => state.timeZone.currentTimeZone
+  timeZone: state => state.timeZone.currentTimeZone,
+  clickedCells: state => state.keepAlive.clickedCells
 }
 export default getters

+ 13 - 2
src/store/modules/keepAlive.js

@@ -1,7 +1,7 @@
 /*
  * @Author: Badguy
  * @Date: 2022-03-08 17:31:03
- * @LastEditTime: 2022-05-17 15:37:13
+ * @LastEditTime: 2022-05-17 20:14:20
  * @LastEditors: your name
  * @Description: 页面缓存
  * have a nice day!
@@ -10,7 +10,8 @@ const defaultPages = [{ name: 'BaggageManagement' }]
 const savedPages = JSON.parse(sessionStorage.getItem('keepAlivePages'))
 
 const state = {
-  keepAlivePages: savedPages || defaultPages
+  keepAlivePages: savedPages || defaultPages,
+  clickedCells: JSON.parse(sessionStorage.getItem('clickedCells')) || []
 }
 
 const mutations = {
@@ -37,6 +38,13 @@ const mutations = {
       state.keepAlivePages = defaultPages
     }
     sessionStorage.setItem('keepAlivePages', JSON.stringify(state.keepAlivePages))
+  },
+  ADD_CLICKED_CELL(state, cell) {
+    state.clickedCells.some(item =>
+      Object.keys(item).every(key => {
+        item[key] === cell[key]
+      })
+    ) || (state.clickedCells.push(cell), sessionStorage.setItem('clickedCells', JSON.stringify(state.clickedCells)))
   }
 }
 
@@ -49,6 +57,9 @@ const actions = {
   },
   editPage({ commit }, page) {
     commit('EDIT_PAGE', page)
+  },
+  addClickedCell({ commit }, cell) {
+    commit('ADD_CLICKED_CELL', cell)
   }
 }
 

+ 57 - 19
src/views/advancedQuery/views/advancedHome.vue

@@ -77,9 +77,9 @@
           :filter-method="tableDataFilters[item.prop] && filterHandler"
           filter-placement="top"
         >
-          <template slot-scope="scope">
+          <!-- <template slot-scope="scope">
             <a href="javascript:void(0);">{{ scope.row[item.prop] }}</a>
-          </template>
+          </template> -->
         </el-table-column>
       </el-table>
     </div>
@@ -306,6 +306,7 @@ import Search from '@/layout/components/Search'
 import Dialog from '@/layout/components/Dialog'
 import { parseTime } from '@/utils/index'
 import { queryMap, myQuery } from '@/api/dataIntegration'
+import { mapGetters } from 'vuex'
 export default {
   name: 'Advance',
   components: { Search, Dialog },
@@ -444,6 +445,9 @@ export default {
       contactDot: 0
     }
   },
+  computed: {
+    ...mapGetters(['clickedCells'])
+  },
   created() {
     // console.log(this.$store.state.app.queryForm)
     // 参数顺序   【航班开始日期,航班结束日期,航班号,航班号,行李牌号,行李牌号,起飞站,起飞站,目的站,目的站,特殊行李类型,特殊 行李类型,旅客姓名大写拼音,旅客姓名大写拼音,pnr,pnr,值机号,值机号】
@@ -568,26 +572,55 @@ export default {
         }
       }
     },
-    cellClass(row, column, rowIndex, columnIndex) {
-      if (
-        row.column.property === 'FlightNO' ||
-        row.column.property === 'TransferFlightNO' ||
-        row.column.property === 'BagSN'
-      ) {
-        return 'clickCell'
+    cellClass({ row, column, rowIndex, columnIndex }) {
+      let classString = ''
+      if (['FlightNO', 'TransferFlightNO', 'BagSN'].includes(column.property)) {
+        classString += 'cell-click'
+        if (this.clickedCells.some(cell => cell.pageName === 'advance' && cell.cellValue === row[column.property])) {
+          classString += ' cell-clicked'
+        }
       }
+      return classString
     },
     cellClick(row, column, cell, event) {
-      if (column.property === 'FlightNO') {
-        this.$router.push({ path: '/advance/flightView', query: row })
-      }
-      if (column.property === 'TransferFlightNO') {
-        const row2 = this._.cloneDeep(row)
-        row2.FlightNO = row2.TransferFlightNO
-        this.$router.push({ path: '/advance/flightView', query: row2 })
+      if (['FlightNO', 'TransferFlightNO', 'BagSN'].includes(column.property)) {
+        this.$store.dispatch('keepAlive/addClickedCell', {
+          cellValue: row[column.property],
+          columnProp: column.property,
+          pageName: 'advance'
+        })
       }
-      if (column.property === 'BagSN') {
-        this.$router.push({ path: '/advance/baggageView', query: row })
+      switch (column.property) {
+        case 'FlightNO':
+          this.$router.push({
+            path: '/advance/flightView',
+            query: {
+              FlightNO: row.FlightNO,
+              FlightDate: row.FlightDate
+            }
+          })
+          break
+        case 'TransferFlightNO':
+          this.$router.push({
+            path: '/advance/flightView',
+            query: {
+              FlightNO: row.TransferFlightNO,
+              FlightDate: row.FlightDate
+            }
+          })
+          break
+        case 'BagSN':
+          this.$router.push({
+            path: '/advance/baggageView',
+            query: {
+              FlightNO: row.FlightNO,
+              FlightDate: row.FlightDate,
+              BagSN: row.BagSN
+            }
+          })
+          break
+        default:
+          break
       }
     },
     // 查询
@@ -706,6 +739,7 @@ export default {
     },
     // 数据查询
     async statItemsQueryByStatMain(dataContent) {
+      this.loading = true
       try {
         const result = await myQuery(queryMap.advacedQuery, ...dataContent)
         this.tableData = this._.sortBy(result, ['FlightNO', 'FlightDate'])
@@ -734,6 +768,7 @@ export default {
       } catch (error) {
         console.log('出错了', error)
       }
+      this.loading = false
     },
     // 特殊行李类型下拉选项查询
     async baggageTypeQuery() {
@@ -840,9 +875,12 @@ export default {
       font-family: Helvetica, 'Microsoft YaHei';
       letter-spacing: 0;
     }
-    .clickCell {
+    .cell-click {
       cursor: pointer;
       color: #2d7cff;
+      &.cell-clicked {
+        color: purple;
+      }
     }
     .el-table__header-wrapper {
       .cell {

+ 13 - 7
src/views/baggageManagement/components/arrival/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: zk
  * @Date: 2022-01-17 10:39:22
- * @LastEditTime: 2022-05-17 16:19:19
+ * @LastEditTime: 2022-05-17 20:18:19
  * @LastEditors: your name
  * @Description: 进港01
 -->
@@ -118,7 +118,7 @@
           </el-form-item>
           <el-form-item>
             <img
-              class="msgImg"
+              class="btn-img"
               src="../../../../assets/departure/ic_setting.png"
               @click="show"
             >
@@ -152,9 +152,11 @@
         :row-class-name="tableRowClassName"
         show-summary
         :summary-method="summaryMethod"
+        :cell-class-name="cellClass"
         border
         stripe
-        @row-click="rowClick"
+        fit
+        @cell-click="cellClick"
       >
         <el-table-column
           v-for="(item, index) in tableColsCopy"
@@ -573,10 +575,7 @@ export default {
         }
       }
     }
-    .checkTime {
-      margin: 0 16px;
-    }
-    .msgImg {
+    .btn-img {
       cursor: pointer;
       position: relative;
       top: 6px;
@@ -676,6 +675,13 @@ export default {
       font-family: Helvetica, 'Microsoft YaHei';
       letter-spacing: 0;
     }
+    .cell-click {
+      cursor: pointer;
+      color: #2d7cff;
+      &.cell-clicked {
+        color: purple;
+      }
+    }
     .el-table__header-wrapper {
       .cell {
         font-weight: bold;

+ 16 - 9
src/views/baggageManagement/components/departure/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: zk
  * @Date: 2022-01-17 10:39:22
- * @LastEditTime: 2022-05-17 17:53:25
+ * @LastEditTime: 2022-05-17 20:18:06
  * @LastEditors: your name
  * @Description: 离港01
 -->
@@ -118,7 +118,7 @@
           </el-form-item>
           <el-form-item>
             <img
-              class="msgImg"
+              class="btn-img"
               src="../../../../assets/departure/ic_setting.png"
               @click="show"
             >
@@ -150,13 +150,15 @@
         :data="tableData"
         class="table"
         :height="computedTableHeight"
-        :header-cell-class-name="tableCellClassName"
+        :header-cell-class-name="headerCellClassName"
         :row-class-name="tableRowClassName"
         show-summary
         :summary-method="summaryMethod"
+        :cell-class-name="cellClass"
         border
         stripe
-        @row-click="rowClick"
+        fit
+        @cell-click="cellClick"
       >
         <el-table-column
           v-for="(item,index) in tableColsCopy"
@@ -221,6 +223,7 @@ import formMixin from '../../mixins/form'
 import tableColsMixin from '../../mixins/tableCols'
 import timeZoneMixin from '../../mixins/timeZone'
 import { getQuery } from '@/api/flight'
+import { mapGetters } from 'vuex'
 
 export default {
   name: 'DepartureTerminalView',
@@ -380,7 +383,7 @@ export default {
         }
       }
     },
-    tableCellClassName({ row, column }) {
+    headerCellClassName({ row, column }) {
       if (['riskWarning', 'departureAnomaly', 'midIn'].includes(column.property)) {
         return 'bgl-huang'
       }
@@ -519,10 +522,7 @@ export default {
         }
       }
     }
-    .checkTime {
-      margin: 0 16px;
-    }
-    .msgImg {
+    .btn-img {
       cursor: pointer;
       position: relative;
       top: 6px;
@@ -622,6 +622,13 @@ export default {
       font-family: Helvetica, 'Microsoft YaHei';
       letter-spacing: 0;
     }
+    .cell-click {
+      cursor: pointer;
+      color: #2d7cff;
+      &.cell-clicked {
+        color: purple;
+      }
+    }
     .el-table__header-wrapper {
       .cell {
         font-weight: bold;

+ 55 - 57
src/views/baggageManagement/components/flight/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2022-01-17 10:39:22
- * @LastEditTime: 2022-05-17 17:59:01
+ * @LastEditTime: 2022-05-17 18:35:16
  * @LastEditors: your name
  * @Description: 航班视图
 -->
@@ -185,7 +185,7 @@
             :key="item.id"
             :prop="item.prop"
             :label="item.name"
-            :align="item.align"
+            :align="item.align || 'center'"
             :show-overflow-tooltip="true"
           />
         </el-table>
@@ -213,7 +213,7 @@
             :key="item.id"
             :prop="item.prop"
             :label="item.name"
-            :align="item.align"
+            :align="item.align || 'center'"
             :show-overflow-tooltip="true"
           />
         </el-table>
@@ -241,7 +241,7 @@
             :key="item.id"
             :prop="item.prop"
             :label="item.name"
-            :align="item.align"
+            :align="item.align || 'center'"
             :show-overflow-tooltip="true"
           />
         </el-table>
@@ -291,6 +291,7 @@
           show-summary
           :summary-method="summaryRow(flightBaggageTableData.length)"
           :header-cell-style="{ color: '#101116' }"
+          :cell-class-name="cellClass"
           @row-click="flightBaggageTableClickHandler"
         >
           <el-table-column
@@ -298,7 +299,9 @@
             :key="item.index"
             :prop="item.prop"
             :label="item.name"
-            :align="item.align"
+            :align="item.align || 'center'"
+            :width="item.width"
+            :formatter="tableFormat"
             :filters="flightBaggageTableFilters[item.prop]"
             :filter-method="flightBaggageTableFilters[item.prop] && filterHandler"
             filter-placement="top"
@@ -352,54 +355,50 @@ import tableColsMixin from '../../mixins/tableCols'
 import timeZoneMixin from '../../mixins/timeZone'
 
 // const arrivalBaggageTableColumn = [
-//   { name: '序号', prop: 'index', align: 'center' },
-//   { name: '旅客姓名', prop: 'name', align: 'center', sortable: 'custom' },
-//   { name: '行李牌号', prop: 'bagNo', align: 'center' },
+//   { name: '序号', prop: 'index' },
+//   { name: '旅客姓名', prop: 'name', sortable: 'custom' },
+//   { name: '行李牌号', prop: 'bagNo' },
 //   {
 //     name: '特殊行李类型',
 //     prop: 'specialType',
-//     align: 'center',
 //     sortable: 'custom'
 //   },
 //   {
 //     name: '容器编号',
 //     prop: 'containerNo',
-//     align: 'center',
 //     sortable: 'custom'
 //   },
-//   { name: '装载序号', prop: 'loadSequenceIndex', align: 'center' },
-//   { name: '卸载', prop: 'uninstall', align: 'center' },
-//   { name: '到达', prop: 'arrival', align: 'center' },
-//   { name: '提取', prop: 'extract', align: 'center' },
-//   { name: '旅客仓位', prop: 'positionNo', align: 'center' },
-//   { name: '中转标志', prop: 'transitStatus', align: 'center' },
-//   { name: '卷宗号', prop: 'fileNumber', align: 'center' }
+//   { name: '装载序号', prop: 'loadSequenceIndex' },
+//   { name: '卸载', prop: 'uninstall' },
+//   { name: '到达', prop: 'arrival' },
+//   { name: '提取', prop: 'extract' },
+//   { name: '旅客仓位', prop: 'positionNo' },
+//   { name: '中转标志', prop: 'transitStatus' },
+//   { name: '卷宗号', prop: 'fileNumber' }
 // ]
 const departureBaggageTableColumn = [
-  // { name: '序号', prop: 'index', align: 'center' },
-  { name: '旅客姓名', prop: 'PassengerNameUpcase', align: 'center', sortable: 'custom' },
-  { name: '行李牌号', prop: 'BagSN', align: 'center' },
+  // { name: '序号', prop: 'index' },
+  { name: '旅客姓名', prop: 'PassengerNameUpcase', sortable: 'custom' },
+  { name: '行李牌号', prop: 'BagSN' },
   {
     name: '特殊行李类型',
     prop: 'SpecialType',
-    align: 'center',
     sortable: 'custom'
   },
   {
     name: '容器编号',
     prop: 'U_Device_ID',
-    align: 'center',
     sortable: 'custom'
   },
-  { name: '装载序号', prop: 'LoadSN', align: 'center' },
-  { name: '值机', prop: 'checkIn', align: 'center' },
-  { name: '状态', prop: 'latestStatus', align: 'center' },
-  { name: '安检', prop: 'security', align: 'center' },
-  { name: '分拣', prop: 'sorting', align: 'center' },
-  { name: '装车', prop: 'loading', align: 'center' },
-  { name: '装机', prop: 'installed', align: 'center' },
-  { name: '中转标志', prop: 'transitFlag', align: 'center' },
-  { name: '卷宗号', prop: 'fileNumber', align: 'center' }
+  { name: '装载序号', prop: 'LoadSN' },
+  { name: '值机', prop: 'checkIn', width: 140 },
+  { name: '状态', prop: 'latestStatus' },
+  { name: '安检', prop: 'security', width: 140 },
+  { name: '分拣', prop: 'sorting', width: 140 },
+  { name: '装车', prop: 'loading', width: 140 },
+  { name: '装机', prop: 'installed', width: 140 },
+  { name: '中转标志', prop: 'transitFlag' },
+  { name: '卷宗号', prop: 'fileNumber' }
 ]
 export default {
   name: 'FlightView',
@@ -420,25 +419,25 @@ export default {
       //   { value: 0, label: 'VIP行李' }
       // ],
       containerTableColumn: [
-        { name: '容器编号', prop: 'containerNumber', align: 'center' },
-        { name: '类型', prop: 'style', align: 'center' },
-        { name: '行李数', prop: 'numberOfBags', align: 'center' }
+        { name: '容器编号', prop: 'containerNumber' },
+        { name: '类型', prop: 'style' },
+        { name: '行李数', prop: 'numberOfBags' }
       ],
       transferInTableColumn: [
-        { name: '航班号', prop: 'PreFlightNO', align: 'center' },
-        { name: '日期', prop: 'PreFlightDate', align: 'center' },
-        { name: '时间', prop: 'flightTime', align: 'center' },
-        { name: '始发站', prop: 'PlanDepartureApt', align: 'center' },
-        { name: '航班状态', prop: 'FlightStatus', align: 'center' },
-        { name: '中转数', prop: 'totalNumber', align: 'center' }
+        { name: '航班号', prop: 'PreFlightNO' },
+        { name: '日期', prop: 'PreFlightDate' },
+        { name: '时间', prop: 'flightTime' },
+        { name: '始发站', prop: 'PlanDepartureApt' },
+        { name: '航班状态', prop: 'FlightStatus' },
+        { name: '中转数', prop: 'totalNumber' }
       ],
       transferOutTableColumn: [
-        { name: '航班号', prop: 'TransferFlightNO', align: 'center' },
-        { name: '日期', prop: 'TransferFlightDate', align: 'center' },
-        { name: '时间', prop: 'flightTime', align: 'center' },
-        { name: '始发站', prop: 'PlanDepartureApt', align: 'center' },
-        { name: '目的站', prop: 'PlanLandingApt', align: 'center' },
-        { name: '中转数', prop: 'transferNumber', align: 'center' }
+        { name: '航班号', prop: 'TransferFlightNO' },
+        { name: '日期', prop: 'TransferFlightDate' },
+        { name: '时间', prop: 'flightTime' },
+        { name: '始发站', prop: 'PlanDepartureApt' },
+        { name: '目的站', prop: 'PlanLandingApt' },
+        { name: '中转数', prop: 'transferNumber' }
       ],
       // tableCols:
       //   this.$route.matched[0].path === '/arrival' || this.$route.matched[1].path === '/transfer/arrival'
@@ -469,6 +468,11 @@ export default {
     })
   },
   methods: {
+    cellClass({ row, column, rowIndex, columnIndex }) {
+      if (['checkIn', 'security', 'sorting', 'loading', 'installed'].includes(column.property)) {
+        return 'pre-line'
+      }
+    },
     // 合计行
     summaryMethod({ columns, data }) {
       const sums = []
@@ -616,18 +620,12 @@ export default {
           return item
         })
         this.flightBaggageTableData = flightBaggageTableData.map((item, index) => {
-          item['checkIn'] = `${item['checkIn'] ?? ''} ${item['checkInTime'] ? item['checkInTime'].split('T')[1] : ''}`
+          item['checkIn'] = `${item['checkIn'] ?? ''}\n${item['checkInTime'] ?? ''}`
           item['latestStatus'] = item['Status'] === 'DEL' ? '删除' : item['latestStatus']
-          item['security'] = `${item['DealInfo'] ?? ''} ${item['DealTime'] ? item['DealTime'].split('T')[1] : ''}`
-          item['sorting'] = `${item['sortLocationMark'] ?? ''} ${
-            item['sortDealTime'] ? item['sortDealTime'].split('T')[1] : ''
-          }`
-          item['loading'] = `${item['loadLocationMark'] ?? ''} ${
-            item['loadDealTime'] ? item['loadDealTime'].split('T')[1] : ''
-          }`
-          item['installed'] = `${item['inflLocationMark'] ?? ''} ${
-            item['inflLoadDealTime'] ? item['inflLoadDealTime'].split('T')[1] : ''
-          }`
+          item['security'] = `${item['DealInfo'] ?? ''}\n${item['DealTime'] ?? ''}`
+          item['sorting'] = `${item['sortLocationMark'] ?? ''}\n${item['sortDealTime'] ?? ''}`
+          item['loading'] = `${item['loadLocationMark'] ?? ''}\n${item['loadDealTime'] ?? ''}`
+          item['installed'] = `${item['inflLocationMark'] ?? ''}\n${item['inflLoadDealTime'] ?? ''}`
           item['transitFlag'] = item['preFlightNO'] === 1 ? '是' : '否'
           return item
         })

+ 18 - 8
src/views/baggageManagement/components/transferArrival/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: zk
  * @Date: 2022-01-17 10:39:22
- * @LastEditTime: 2022-05-17 18:01:53
+ * @LastEditTime: 2022-05-17 20:24:51
  * @LastEditors: your name
  * @Description: 离港01
 -->
@@ -150,7 +150,7 @@
           </el-form-item>
           <el-form-item>
             <img
-              class="msgImg"
+              class="btn-img"
               src="../../../../assets/departure/ic_setting.png"
               @click="show"
             >
@@ -426,11 +426,21 @@ export default {
     cellClass({ row, column, rowIndex, columnIndex }) {
       let classString = commonTableCellClass({ row, column, rowIndex, columnIndex })
       if (['FlightNO', 'PreFlightNO', 'inTransferBaggageCount'].includes(column.property)) {
-        classString += '' + 'clickCell'
+        classString += '' + 'cell-click'
+        if (this.clickedCells.some(cell => cell.pageName === this.$route.name && cell.cellValue === row[column.property])) {
+          classString += ' cell-clicked'
+        }
       }
       return classString
     },
     cellClick(row, column, cell, event) {
+      if (['FlightNO'].includes(column.property)) {
+        this.$store.dispatch('keepAlive/addClickedCell', {
+          cellValue: row[column.property],
+          columnProp: column.property,
+          pageName: this.$route.name
+        })
+      }
       switch (column.property) {
         case 'FlightNO':
           this.$router.push({ path: '/transfer/arrival/flightView', query: row })
@@ -768,10 +778,7 @@ export default {
         }
       }
     }
-    .checkTime {
-      margin: 0 16px;
-    }
-    .msgImg {
+    .btn-img {
       cursor: pointer;
       position: relative;
       top: 6px;
@@ -871,9 +878,12 @@ export default {
       font-family: Helvetica, 'Microsoft YaHei';
       letter-spacing: 0;
     }
-    .clickCell {
+    .cell-click {
       cursor: pointer;
       color: #2d7cff;
+      &.cell-clicked {
+        color: purple;
+      }
     }
     .el-table__header-wrapper {
       .cell {

+ 20 - 11
src/views/baggageManagement/components/transferDeparture/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: zk
  * @Date: 2022-01-17 10:39:22
- * @LastEditTime: 2022-05-17 17:08:03
+ * @LastEditTime: 2022-05-17 20:21:01
  * @LastEditors: your name
  * @Description: 离港01
 -->
@@ -32,17 +32,16 @@
           <el-select
             v-model="formData.currentAirport"
             size="small"
-            @change="airPortChange"
             filterable
             placeholder="请选择机场"
+            @change="airPortChange"
           >
             <el-option
               v-for="(item, index) in AirportList"
               :key="index"
               :label="item.PlanDepartureApt"
               :value="item.PlanDepartureApt"
-            >
-            </el-option>
+            />
           </el-select>
         </el-form-item>
         <el-form-item prop="inboundCarrier">
@@ -151,7 +150,7 @@
           </el-form-item>
           <el-form-item>
             <img
-              class="msgImg"
+              class="btn-img"
               src="../../../../assets/departure/ic_setting.png"
               @click="show"
             >
@@ -415,11 +414,21 @@ export default {
     cellClass({ row, column, rowIndex, columnIndex }) {
       let classString = commonTableCellClass({ row, column, rowIndex, columnIndex })
       if (['FlightNO', 'PreFlightNO', 'inTransferBaggageCount'].includes(column.property)) {
-        classString += '' + 'clickCell'
+        classString += '' + 'cell-click'
+        if (this.clickedCells.some(cell => cell.pageName === this.$route.name && cell.cellValue === row[column.property])) {
+          classString += ' cell-clicked'
+        }
       }
       return classString
     },
     cellClick(row, column, cell, event) {
+      if (['FlightNO'].includes(column.property)) {
+        this.$store.dispatch('keepAlive/addClickedCell', {
+          cellValue: row[column.property],
+          columnProp: column.property,
+          pageName: this.$route.name
+        })
+      }
       switch (column.property) {
         case 'FlightNO':
           this.$router.push({ path: '/transfer/departure/flightView', query: row })
@@ -735,10 +744,7 @@ export default {
         }
       }
     }
-    .checkTime {
-      margin: 0 16px;
-    }
-    .msgImg {
+    .btn-img {
       cursor: pointer;
       position: relative;
       top: 6px;
@@ -838,9 +844,12 @@ export default {
       font-family: Helvetica, 'Microsoft YaHei';
       letter-spacing: 0;
     }
-    .clickCell {
+    .cell-click {
       cursor: pointer;
       color: #2d7cff;
+      &.cell-clicked {
+        color: purple;
+      }
     }
     .el-table__header-wrapper {
       .cell {

+ 33 - 10
src/views/baggageManagement/mixins/terminal.js

@@ -1,7 +1,7 @@
 /*
  * @Author: Badguy
  * @Date: 2022-03-04 11:41:55
- * @LastEditTime: 2022-05-17 17:07:07
+ * @LastEditTime: 2022-05-17 20:17:55
  * @LastEditors: your name
  * @Description: 航站视图通用部分
  * have a nice day!
@@ -17,6 +17,7 @@ import {
   IntegratedQuery,
   IntegratedQueryTransfer
 } from '@/api/flight'
+import { mapGetters } from 'vuex'
 
 export default {
   data() {
@@ -35,6 +36,7 @@ export default {
     // this.queryDepartureAirport()
   },
   computed: {
+    ...mapGetters(['clickedCells']),
     dates() {
       return [this.startDate, this.endDate]
     },
@@ -149,16 +151,37 @@ export default {
       }
       return sums
     },
-    // 表格行点击跳转
-    rowClick({ FlightNO, FlightDate }) {
-      this.$router.push({
-        path: `${this.$route.path}/flightView`,
-        query: {
-          FlightNO,
-          FlightDate
+    cellClass({ row, column, rowIndex, columnIndex }) {
+      let classString = ''
+      if (['FlightNO'].includes(column.property)) {
+        classString += 'cell-click'
+        if (this.clickedCells.some(cell => cell.pageName === this.$route.name && cell.cellValue === row[column.property])) {
+          classString += ' cell-clicked'
         }
-      })
-      // this.$router.push({ path: '/departure/flightView', query: row })
+      }
+      return classString
+    },
+    cellClick(row, column, cell, event) {
+      if (['FlightNO'].includes(column.property)) {
+        this.$store.dispatch('keepAlive/addClickedCell', {
+          cellValue: row[column.property],
+          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
+        default:
+          break
+      }
     },
     // 全部机场查询
     async currentAirportQuery() {

+ 7 - 1
src/views/baggageManagement/mixins/timeZone.js

@@ -1,7 +1,7 @@
 /*
  * @Author: Badguy
  * @Date: 2022-05-17 17:04:32
- * @LastEditTime: 2022-05-17 17:53:26
+ * @LastEditTime: 2022-05-17 18:38:03
  * @LastEditors: your name
  * @Description: 时区相关
  * have a nice day!
@@ -26,6 +26,12 @@ export default {
           case 'ActualDepartureTime':
           case 'ActualLandingTime':
             return timeInZone(cellValue.replace('T', ' '), this.timeZone).replace(' ', '\n')
+          case 'checkIn':
+          case 'security':
+          case 'sorting':
+          case 'loading':
+          case 'installed':
+            return cellValue.split('\n')[0] + '\n' + timeInZone(cellValue.split('\n')[1].replace('T', ' '), this.timeZone)
           case 'timeDifference':
             return cellValue <= -120 ? '-2h+' : cellValue >= 120 ? '2h+' : cellValue
           default: