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

中转视图-已到达/已起飞添加灰色

zhongxiaoyu 2 жил өмнө
parent
commit
daa56834cf

+ 6 - 0
src/views/advancedQuery/views/advancedHome.vue

@@ -387,6 +387,7 @@ export default {
           prop: 'FlightDate',
           label: '航班日期',
           fixed: 'left',
+          width: 110,
           filterable: true,
           sortable: true
         },
@@ -446,30 +447,35 @@ export default {
         {
           prop: 'latestStatus',
           label: '最新状态',
+          width: 110,
           filterable: true,
           sortable: true
         },
         {
           prop: 'bagLocation',
           label: '最新位置',
+          width: 110,
           filterable: true,
           sortable: true
         },
         {
           prop: 'U_Device_ID',
           label: '容器编号',
+          width: 110,
           filterable: true,
           sortable: true
         },
         {
           prop: 'PreFlightNONotNull',
           label: '中转进航班',
+          width: 110,
           filterable: true,
           sortable: true
         },
         {
           prop: 'PreFlightNONull',
           label: '中转出航班',
+          width: 110,
           filterable: true,
           sortable: true
         }

+ 9 - 19
src/views/baggageManagement/components/arrival/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: zk
  * @Date: 2022-01-17 10:39:22
- * @LastEditTime: 2022-06-16 10:51:31
+ * @LastEditTime: 2022-06-21 17:52:33
  * @LastEditors: your name
  * @Description: 进港01
 -->
@@ -140,13 +140,6 @@
               @click="onSubmit(1)"
             >搜索</el-button>
           </el-form-item>
-          <!-- <el-form-item>
-            <el-switch
-              v-model="formData.switch"
-              style="margin-left: 40px"
-              active-text="显示中转"
-            />
-          </el-form-item> -->
           <el-form-item v-is="['i_timeIcon']">
             <TimeZoneSelector />
           </el-form-item>
@@ -232,7 +225,7 @@
             :default-expand-all="true"
             :props="{
               label: 'label',
-              children: 'children',
+              children: 'children'
             }"
             :default-checked-keys="checkedKeysTemp"
             @check="handleCheck"
@@ -264,7 +257,6 @@ import tableColsMixin from '../../mixins/tableCols'
 import { getQuery } from '@/api/flight'
 import TableHeaderCell from '@/components/TableHeaderCell'
 import { setTableFilters } from '@/utils/table'
-// import { parseTime } from '@/utils'
 
 export default {
   name: 'DepartureTerminalView',
@@ -435,6 +427,7 @@ export default {
       tableDataSortRules: {
         flightCanceled: 'ascending'
       },
+      loading: false,
       AirportList: [],
       loopEvent: null,
       arrivalCount: 0,
@@ -458,6 +451,8 @@ export default {
   },
   methods: {
     resetLoopEvent() {
+      this.loading = true
+      this.hasSetTableScroll = false
       if (this.loopEvent) {
         clearInterval(this.loopEvent)
       }
@@ -468,11 +463,9 @@ export default {
       }, 3000)
     },
     airPortChange() {
-      this.hasSetTableScroll = false
       this.resetLoopEvent()
     },
     dateChangeHandler() {
-      this.hasSetTableScroll = false
       this.resetLoopEvent()
     },
     // 选择机场
@@ -546,11 +539,13 @@ export default {
         } else {
           console.log(res.message)
         }
+        this.loading = false
       } catch (error) {
         if (this.loopEvent) {
           clearInterval(this.loopEvent)
           this.loopEvent = null
         }
+        this.loading = false
         console.log('出错了', error)
       }
     },
@@ -590,14 +585,9 @@ export default {
       if (scrollParent.scrollHeight <= scrollParent.offsetHeight) {
         return
       }
-      const lastRow = table.querySelectorAll('.el-table__body tr')[this.arrivalCount]
-      // if (this.arrivalCount === this.tableData.length) {
-      //   lastRow = table.querySelectorAll('.el-table__body tr')[this.arrivalCount - 1]
-      // } else {
-      //   lastRow = table.querySelectorAll('.el-table__body tr')[this.arrivalCount]
-      // }
+      const lastRow = table.querySelectorAll('.el-table__body tr')[this.arrivalCount - 1]
       setTimeout(() => {
-        const scrollMid = lastRow.offsetTop + (lastRow.offsetHeight - scrollParent.offsetHeight) / 2
+        const scrollMid = lastRow.offsetTop + lastRow.offsetHeight - scrollParent.offsetHeight / 2
         const scrollMax = scrollParent.scrollHeight - scrollParent.offsetHeight
         if (scrollMid > 0) {
           const scrollHeight = Math.min(scrollMid, scrollMax)

+ 15 - 14
src/views/baggageManagement/components/departure/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: zk
  * @Date: 2022-01-17 10:39:22
- * @LastEditTime: 2022-06-16 10:52:35
+ * @LastEditTime: 2022-06-21 18:00:28
  * @LastEditors: your name
  * @Description: 离港01
 -->
@@ -42,7 +42,7 @@
               @change="airPortChange"
             >
               <el-option
-                v-for="(item,index) in AirportList"
+                v-for="(item, index) in AirportList"
                 :key="index"
                 :label="item.PlanDepartureApt"
                 :value="item.PlanDepartureApt"
@@ -92,9 +92,9 @@
             <div class="box-item">
               <p>预计装载总数:</p>
               <li
-                v-for="(item,index) in orderNum"
+                v-for="(item, index) in orderNum"
                 :key="index"
-                :class="{'number-item': !isNaN(item), 'mark-item': isNaN(item) }"
+                :class="{ 'number-item': !isNaN(item), 'mark-item': isNaN(item) }"
               >
                 <span v-if="!isNaN(item)">
                   <i ref="numberItem">0123456789</i>
@@ -168,9 +168,9 @@
         :data="dealedTableData"
         :header-cell-class-name="headerCellClass"
         :row-class-name="tableRowClassName"
+        :cell-class-name="cellClass"
         show-summary
         :summary-method="summaryMethod"
-        :cell-class-name="cellClass"
         border
         stripe
         fit
@@ -373,6 +373,7 @@ export default {
       tableDataSortRules: {
         flightCanceled: 'ascending'
       },
+      loading: false,
       AirportList: [],
       loopEvent: null,
       leaveCount: 0,
@@ -396,6 +397,8 @@ export default {
   },
   methods: {
     resetLoopEvent() {
+      this.loading = true
+      this.hasSetTableScroll = false
       if (this.loopEvent) {
         clearInterval(this.loopEvent)
       }
@@ -406,11 +409,9 @@ export default {
       }, 3000)
     },
     airPortChange() {
-      this.hasSetTableScroll = false
       this.resetLoopEvent()
     },
     dateChangeHandler() {
-      this.hasSetTableScroll = false
       this.resetLoopEvent()
     },
     async getAirPortData() {
@@ -483,11 +484,13 @@ export default {
         } else {
           console.log(res.message)
         }
+        this.loading = false
       } catch (error) {
         if (this.loopEvent) {
           clearInterval(this.loopEvent)
           this.loopEvent = null
         }
+        this.loading = false
         console.log('出错了', error)
       }
     },
@@ -522,14 +525,9 @@ export default {
       if (scrollParent.scrollHeight <= scrollParent.offsetHeight) {
         return
       }
-      const lastRow = table.querySelectorAll('.el-table__body tr')[this.leaveCount]
-      // if (this.leaveCount === this.tableData.length) {
-      //   lastRow = table.querySelectorAll('.el-table__body tr')[this.leaveCount - 1]
-      // } else {
-      //   lastRow = table.querySelectorAll('.el-table__body tr')[this.leaveCount]
-      // }
+      const lastRow = table.querySelectorAll('.el-table__body tr')[this.leaveCount - 1]
       setTimeout(() => {
-        const scrollMid = lastRow.offsetTop + (lastRow.offsetHeight - scrollParent.offsetHeight) / 2
+        const scrollMid = lastRow.offsetTop + lastRow.offsetHeight - scrollParent.offsetHeight / 2
         const scrollMax = scrollParent.scrollHeight - scrollParent.offsetHeight
         if (scrollMid > 0) {
           const scrollHeight = Math.min(scrollMid, scrollMax)
@@ -755,6 +753,9 @@ export default {
           border: 2px dashed #f58c31;
         }
       }
+      .el-table__cell.is-hidden > * {
+        visibility: visible;
+      }
     }
   }
 }

+ 92 - 101
src/views/baggageManagement/components/transferArrival/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: zk
  * @Date: 2022-01-17 10:39:22
- * @LastEditTime: 2022-06-10 10:21:34
+ * @LastEditTime: 2022-06-21 17:51:56
  * @LastEditors: your name
  * @Description: 中转进港
 -->
@@ -61,7 +61,7 @@
               collapse-tags
               clearable
               filterable
-              @change="getTableData"
+              @change="resetLoopEvent"
             />
           </el-form-item>
           <el-form-item prop="outgoingAirline">
@@ -76,7 +76,7 @@
               collapse-tags
               clearable
               filterable
-              @change="getTableData"
+              @change="resetLoopEvent"
             />
           </el-form-item>
           <!-- <el-form-item prop="startDate">
@@ -115,6 +115,7 @@
               start-placeholder="开始日期"
               end-placeholder="结束日期"
               :picker-options="dateRangePickerOptions"
+              @change="dateChangeHandler"
             />
           </el-form-item>
         </div>
@@ -153,20 +154,10 @@
                 placeholder="请输入内容"
                 prefix-icon="el-icon-search"
                 clearable
-                @clear="inputClear"
                 @focus="popoverVisible = true"
                 @blur="popoverVisible = false"
               />
             </el-popover>
-            <!-- <el-input
-              v-model="formData.search"
-              style="width: 240px; margin-left: 105px"
-              size="small"
-              placeholder="请输入内容"
-              prefix-icon="el-icon-search"
-              clearable
-              @clear="inputClear"
-            /> -->
           </el-form-item>
           <el-form-item>
             <el-button
@@ -214,6 +205,7 @@
         :summary-method="summaryMethod"
         :span-method="arraySpanMethod"
         :header-cell-class-name="headerCellClass"
+        :row-class-name="tableRowClassName"
         :cell-class-name="cellClass"
         border
         stripe
@@ -449,12 +441,14 @@ export default {
           ]
         }
       ],
+      loading: false,
       AirportList: [],
       carrierProps: [],
       carrierPropsop: [],
       loopEvent: null,
-      leaveCount: 0,
+      arrivalCount: 0,
       baggageCount: 0,
+      hasSetTableScroll: false,
       spanArr: [],
       contactDot: 0,
       flag: 0
@@ -477,15 +471,32 @@ export default {
   },
   mounted() {
     this.$refs['form'].validateField('FlightDate')
-    const that = this
-    this.loopEvent = setInterval(function () {
-      that.getTableData()
-    }, 3000)
+    this.getAirPortData()
   },
   beforeDestroy() {
-    clearInterval(this.loopEvent)
+    if (this.loopEvent) {
+      clearInterval(this.loopEvent)
+      this.loopEvent = null
+    }
+  },
+  computed: {
+    singleDay() {
+      return this.startDate === this.endDate
+    }
   },
   methods: {
+    resetLoopEvent() {
+      this.loading = true
+      this.hasSetTableScroll = false
+      if (this.loopEvent) {
+        clearInterval(this.loopEvent)
+      }
+      this.getTableData()
+      const that = this
+      this.loopEvent = setInterval(function () {
+        that.getTableData()
+      }, 3000)
+    },
     headerCellClass({ row, column }) {
       const classes = []
       const rule = this.tableDataSortRules[column.property]
@@ -494,6 +505,16 @@ export default {
       }
       return classes.join(' ')
     },
+    tableRowClassName({ row, rowIndex }) {
+      const classes = []
+      if (row.hasArrived) {
+        classes.push('bgl-hui')
+        if (rowIndex === this.arrivalCount - 1) {
+          classes.push('redBorder')
+        }
+      }
+      return classes.join(' ')
+    },
     changeView() {
       const query = {
         ...this.formData,
@@ -509,7 +530,12 @@ export default {
     airPortChange() {
       this.getAviationData()
       this.upAviationData()
-      // this.getTableData();
+      this.resetLoopEvent()
+    },
+    dateChangeHandler() {
+      this.getAviationData()
+      this.upAviationData()
+      this.resetLoopEvent()
     },
     // 选择机场
     async getAirPortData() {
@@ -523,7 +549,7 @@ export default {
           this.formData.currentAirport = 'PEK'
           this.getAviationData()
           this.upAviationData()
-          this.getTableData()
+          this.resetLoopEvent()
         } else {
           this.$message.error(res.message)
         }
@@ -540,7 +566,6 @@ export default {
         })
         if (Number(res.code) === 0) {
           this.carrierProps = res.returnData
-          // this.getTableData();
         } else {
           this.$message.error(res.message)
         }
@@ -557,7 +582,6 @@ export default {
         })
         if (Number(res.code) === 0) {
           this.carrierPropsop = res.returnData
-          // this.getTableData();
         } else {
           this.$message.error(res.message)
         }
@@ -565,24 +589,6 @@ export default {
         console.log('出错了', error)
       }
     },
-    tableRowClassName({ row, rowIndex }) {
-      if (row.hasTakenOff === 0) {
-        if (rowIndex === this.leaveCount - 1) {
-          return 'bgl-hui redBorder'
-        } else {
-          return 'bgl-hui'
-        }
-      }
-    },
-    tableCellClassName({ row, column }) {
-      if (
-        column.property === 'transfer_all' ||
-        column.property === 'departureAnomaly' ||
-        column.property === 'riskWarning'
-      ) {
-        return 'bgl-huang'
-      }
-    },
     // 获取表单下拉框数据
     // getFormData(params) {
     //   this.relatedAirportQuery({
@@ -621,28 +627,29 @@ export default {
           dataContent: [...arr]
         })
         if (Number(res.code) === 0) {
-          // this.tableData = this._.sortBy(res.returnData, [
-          //   "FlightDate",
-          //   "PlanDepartureTime",
-          // ]);
           this.initTableData(res.returnData)
         } else {
           console.log(res.message)
         }
+        this.loading = false
       } catch (error) {
-        clearInterval(this.loopEvent)
+        if (this.loopEvent) {
+          clearInterval(this.loopEvent)
+          this.loopEvent = null
+        }
+        this.loading = false
         console.log('出错了', error)
       }
     },
     initTableData(tableData) {
-      // this.leaveCount = 0
+      this.arrivalCount = 0
       // this.baggageCount = 0
-      // tableData.forEach(item => {
-      //   if (item.hasTakenOff === 0) {
-      //     this.leaveCount++
-      //   }
-      //   this.baggageCount = this.baggageCount + item.preLoad
-      // })
+      tableData.forEach(item => {
+        if (this.hasArrived(item)) {
+          this.arrivalCount++
+        }
+        // this.baggageCount = this.baggageCount + item.preLoad
+      })
       this.tableData = this._.sortBy(tableData, [
         'PreFlightDate',
         'ActualLandingTime',
@@ -655,6 +662,36 @@ export default {
       //   this.baggageCount = this.baggageCount+1;
       //    // 这里输入数字即可调用
       // }, 2000);
+      this.$nextTick(() => {
+        this.setTableScroll()
+      })
+    },
+    hasArrived(flight) {
+      const now = new Date()
+      const ActualLandingTime = new Date(flight.ActualLandingTime.replace('T', ' '))
+      flight['hasArrived'] = now > ActualLandingTime && !flight['flightCanceled']
+      return flight['hasArrived']
+    },
+    setTableScroll() {
+      if (!this.singleDay || this.hasSetTableScroll || this.arrivalCount === 0) {
+        return
+      }
+      const table = this.$refs['table'].$el
+      const scrollParent = table.querySelector('.el-table__body-wrapper')
+      if (scrollParent.scrollHeight <= scrollParent.offsetHeight) {
+        return
+      }
+      const lastRow = table.querySelectorAll('.el-table__body tr')[this.arrivalCount - 1]
+      setTimeout(() => {
+        const scrollMid = lastRow.offsetTop + lastRow.offsetHeight - scrollParent.offsetHeight / 2
+        const scrollMax = scrollParent.scrollHeight - scrollParent.offsetHeight
+        console.log(scrollMid, scrollMax)
+        if (scrollMid > 0) {
+          const scrollHeight = Math.min(scrollMid, scrollMax)
+          scrollParent.scrollTo(0, scrollHeight)
+        }
+      }, 0)
+      this.hasSetTableScroll = true
     },
     setNumberTransform() {
       const numberItems = this.$refs.numberItem // 拿到数字的ref,计算元素数量
@@ -679,38 +716,6 @@ export default {
       }
       this.setNumberTransform()
     },
-    tableSpanMethod({ row, column, rowIndex, columnIndex }) {
-      if (
-        [
-          'PreFlightNO',
-          'PreFlightDate',
-          'PreAirport',
-          'ActualLandingTime',
-          'LandingBuild',
-          'Carousel',
-          'StandForLanding'
-          // 'inTransferBaggageCount',
-          // 'inTransferredBaggageCount',
-          // 'FlightNO',
-          // 'FlightDate',
-          // 'ActualDepartureTime',
-          // 'TargetAirport',
-          // 'DepartureBuild',
-          // 'BordingGate',
-          // 'StandForDepartrue',
-          // 'outTransferBaggageCount',
-          // 'outTransferredBaggageCount',
-          // 'timeDifference'
-        ].includes(column['property'])
-      ) {
-        const _row = this.spanArr[rowIndex]
-        const _col = _row > 0 ? 1 : 0
-        return {
-          rowspan: _row,
-          colspan: _col
-        }
-      }
-    },
     arraySpanMethod({ row, column, rowIndex, columnIndex }) {
       for (let i = 0; i < 7; i++) {
         if (columnIndex === i) {
@@ -722,21 +727,6 @@ export default {
           }
         }
       }
-      // if (columnIndex === 0) {
-      //   if (rowIndex == 0) {
-      //     return [3, 1];
-      //   } else if (rowIndex >= 3) {
-      //     return [1, 2];
-      //   } else {
-      //     return [0, 0];
-      //   }
-      // } else if (columnIndex == 1) {
-      //   // 第二列的大于3行的清除,避免影响样式
-
-      //   if (rowIndex >= 3) {
-      //     return [0, 0];
-      //   }
-      // }
     }
   }
 }
@@ -893,7 +883,8 @@ export default {
         }
       }
     }
-    .el-table__body-wrapper {
+    .el-table__body-wrapper,
+    .el-table__fixed-body-wrapper {
       tr.bgl-hui {
         background: #d2d6df;
         td {

+ 93 - 69
src/views/baggageManagement/components/transferDeparture/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: zk
  * @Date: 2022-01-17 10:39:22
- * @LastEditTime: 2022-06-10 10:21:44
+ * @LastEditTime: 2022-06-21 17:58:36
  * @LastEditors: your name
  * @Description: 中转离港
 -->
@@ -61,7 +61,7 @@
               collapse-tags
               clearable
               filterable
-              @change="getTableData"
+              @change="resetLoopEvent"
             />
           </el-form-item>
           <el-form-item prop="outgoingAirline">
@@ -76,7 +76,7 @@
               collapse-tags
               clearable
               filterable
-              @change="getTableData"
+              @change="resetLoopEvent"
             />
           </el-form-item>
           <!-- <el-form-item prop="startDate">
@@ -115,6 +115,7 @@
               start-placeholder="开始日期"
               end-placeholder="结束日期"
               :picker-options="dateRangePickerOptions"
+              @change="dateChangeHandler"
             />
           </el-form-item>
         </div>
@@ -153,7 +154,6 @@
                 placeholder="请输入内容"
                 prefix-icon="el-icon-search"
                 clearable
-                @clear="inputClear"
                 @focus="popoverVisible = true"
                 @blur="popoverVisible = false"
               />
@@ -161,7 +161,8 @@
           </el-form-item>
           <el-form-item>
             <el-button
-              size="small"
+              class="btn-shadow"
+              size="mini"
               type="primary"
               @click="onSubmit(0)"
             >搜索</el-button>
@@ -204,6 +205,7 @@
         :summary-method="summaryMethod"
         :span-method="arraySpanMethod"
         :header-cell-class-name="headerCellClass"
+        :row-class-name="tableRowClassName"
         :cell-class-name="cellClass"
         border
         stripe
@@ -439,12 +441,14 @@ export default {
           ]
         }
       ],
+      loading: false,
       AirportList: [],
       carrierProps: [],
       carrierPropsop: [],
       loopEvent: null,
       leaveCount: 0,
       baggageCount: 0,
+      hasSetTableScroll: false,
       spanArr: [],
       contactDot: 0,
       flag: 0
@@ -467,15 +471,32 @@ export default {
   },
   mounted() {
     this.$refs['form'].validateField('FlightDate')
-    const that = this
-    this.loopEvent = setInterval(function () {
-      that.getTableData()
-    }, 3000)
+    this.getAirPortData()
   },
   beforeDestroy() {
-    clearInterval(this.loopEvent)
+    if (this.loopEvent) {
+      clearInterval(this.loopEvent)
+      this.loopEvent = null
+    }
+  },
+  computed: {
+    singleDay() {
+      return this.startDate === this.endDate
+    }
   },
   methods: {
+    resetLoopEvent() {
+      this.loading = true
+      this.hasSetTableScroll = false
+      if (this.loopEvent) {
+        clearInterval(this.loopEvent)
+      }
+      this.getTableData()
+      const that = this
+      this.loopEvent = setInterval(function () {
+        that.getTableData()
+      }, 3000)
+    },
     headerCellClass({ row, column }) {
       const classes = []
       const rule = this.tableDataSortRules[column.property]
@@ -484,6 +505,16 @@ export default {
       }
       return classes.join(' ')
     },
+    tableRowClassName({ row, rowIndex }) {
+      const classes = []
+      if (row.hasTakenOff) {
+        classes.push('bgl-hui')
+        if (rowIndex === this.leaveCount - 1) {
+          classes.push('redBorder')
+        }
+      }
+      return classes.join(' ')
+    },
     changeView() {
       const query = {
         ...this.formData,
@@ -499,7 +530,12 @@ export default {
     airPortChange() {
       this.getAviationData()
       this.upAviationData()
-      // this.getTableData();
+      this.resetLoopEvent()
+    },
+    dateChangeHandler() {
+      this.getAviationData()
+      this.upAviationData()
+      this.resetLoopEvent()
     },
     // 选择机场
     async getAirPortData() {
@@ -513,7 +549,7 @@ export default {
           this.formData.currentAirport = 'PEK'
           this.getAviationData()
           this.upAviationData()
-          this.getTableData()
+          this.resetLoopEvent()
         } else {
           this.$message.error(res.message)
         }
@@ -530,7 +566,6 @@ export default {
         })
         if (Number(res.code) === 0) {
           this.carrierProps = res.returnData
-          // this.getTableData();
         } else {
           this.$message.error(res.message)
         }
@@ -547,7 +582,6 @@ export default {
         })
         if (Number(res.code) === 0) {
           this.carrierPropsop = res.returnData
-          // this.getTableData();
         } else {
           this.$message.error(res.message)
         }
@@ -555,24 +589,6 @@ export default {
         console.log('出错了', error)
       }
     },
-    tableRowClassName({ row, rowIndex }) {
-      if (row.hasTakenOff === 0) {
-        if (rowIndex === this.leaveCount - 1) {
-          return 'bgl-hui redBorder'
-        } else {
-          return 'bgl-hui'
-        }
-      }
-    },
-    tableCellClassName({ row, column }) {
-      if (
-        column.property === 'transfer_all' ||
-        column.property === 'departureAnomaly' ||
-        column.property === 'riskWarning'
-      ) {
-        return 'bgl-huang'
-      }
-    },
     // 获取表单下拉框数据
     // getFormData(params) {
     //   this.relatedAirportQuery({
@@ -622,21 +638,25 @@ export default {
         } else {
           console.log(res.message)
         }
+        this.loading = false
       } catch (error) {
-        clearInterval(this.loopEvent)
+        if (this.loopEvent) {
+          clearInterval(this.loopEvent)
+          this.loopEvent = null
+        }
+        this.loading = false
         console.log('出错了', error)
       }
     },
     initTableData(tableData) {
-      // this.leaveCount = 0
+      this.leaveCount = 0
       // this.baggageCount = 0
-      // tableData.forEach(item => {
-      //   if (item.hasTakenOff === 0) {
-      //     this.leaveCount++
-      //   }
-      //   // item["waitfanj"] = item["noCheckInNumber"] - item["unLoad"];
-      //   this.baggageCount = this.baggageCount + item.preLoad
-      // })
+      tableData.forEach(item => {
+        if (this.hasTakenOff(item)) {
+          this.leaveCount++
+        }
+        // this.baggageCount = this.baggageCount + item.preLoad
+      })
       this.tableData = this._.sortBy(tableData, [
         'FlightDate',
         'ActualDepartureTime',
@@ -649,6 +669,36 @@ export default {
       //   this.baggageCount = this.baggageCount+1;
       //    // 这里输入数字即可调用
       // }, 2000);
+      this.$nextTick(() => {
+        this.setTableScroll()
+      })
+    },
+    hasTakenOff(flight) {
+      const now = new Date()
+      const ActualDepartureTime = new Date(flight.ActualDepartureTime.replace('T', ' '))
+      flight['hasTakenOff'] = now > ActualDepartureTime && !flight['flightCanceled']
+      return flight['hasTakenOff']
+    },
+    setTableScroll() {
+      if (!this.singleDay || this.hasSetTableScroll || this.leaveCount === 0) {
+        return
+      }
+      const table = this.$refs['table'].$el
+      const scrollParent = table.querySelector('.el-table__body-wrapper')
+      if (scrollParent.scrollHeight <= scrollParent.offsetHeight) {
+        return
+      }
+      const lastRow = table.querySelectorAll('.el-table__body tr')[this.leaveCount - 1]
+      setTimeout(() => {
+        const scrollMid = lastRow.offsetTop + lastRow.offsetHeight - scrollParent.offsetHeight / 2
+        const scrollMax = scrollParent.scrollHeight - scrollParent.offsetHeight
+        console.log(scrollMid, scrollMax)
+        if (scrollMid > 0) {
+          const scrollHeight = Math.min(scrollMid, scrollMax)
+          scrollParent.scrollTo(0, scrollHeight)
+        }
+      }, 0)
+      this.hasSetTableScroll = true
     },
     setNumberTransform() {
       const numberItems = this.$refs.numberItem // 拿到数字的ref,计算元素数量
@@ -673,31 +723,6 @@ export default {
       }
       this.setNumberTransform()
     },
-    tableSpanMethod({ row, column, rowIndex, columnIndex }) {
-      if (
-        [
-          'FlightNO',
-          'FlightDate',
-          'PlanLandingTime',
-          'PlanDepartureApt',
-          'LandingBuild',
-          'Carousel',
-          'StandForLanding',
-          'outTransferBaggageCount',
-          'outTransferredBaggageCount',
-          'positionDistribution',
-          'expect_load',
-          'loadflight'
-        ].includes(column['property'])
-      ) {
-        const _row = this.spanArr[rowIndex]
-        const _col = _row > 0 ? 1 : 0
-        return {
-          rowspan: _row,
-          colspan: _col
-        }
-      }
-    },
     arraySpanMethod({ row, column, rowIndex, columnIndex }) {
       for (let i = 0; i < 9; i++) {
         if (columnIndex === i) {
@@ -857,7 +882,6 @@ export default {
         font-weight: bold;
         color: #101116;
       }
-
       .has-gutter {
         tr {
           .bgl-huang {
@@ -866,8 +890,8 @@ export default {
         }
       }
     }
-
-    .el-table__body-wrapper {
+    .el-table__body-wrapper,
+    .el-table__fixed-body-wrapper {
       tr.bgl-hui {
         background: #d2d6df;
         td {