Kaynağa Gözat

临时修改

zhaoke 1 yıl önce
ebeveyn
işleme
0b341f238a

+ 1 - 1
src/api/temp.js

@@ -1,4 +1,4 @@
-import request from '@/utils/requestTemp'
+import request from '@/utils/request'
 import { Message } from 'element-ui'
 
 export function GeneralDataReception (params) {

+ 83 - 259
src/views/baggageManagementTemp/components/transferDeparture/index.vue

@@ -8,17 +8,8 @@
 <template>
   <div class="transfer-out">
     <!--功能区-表单-->
-    <div
-      ref="formWrap"
-      class="terminal-form-wrap"
-    >
-      <el-form
-        ref="form"
-        :inline="true"
-        :model="formData"
-        :rules="rules"
-        class="form"
-      >
+    <div ref="formWrap" class="terminal-form-wrap">
+      <el-form ref="form" :inline="true" :model="formData" :rules="rules" class="form">
         <div class="form-left">
           <el-form-item prop="currentAirport">
             <!-- <el-cascader
@@ -33,55 +24,15 @@
             filterable
             @change="setCurrentAirport"
           /> -->
-            <el-select
-              v-model="formData.currentAirport"
-              class="input-shadow"
-              size="small"
-              style="width: 100px"
-              filterable
-              default-first-option
-              placeholder="请选择机场"
-              @change="airPortChange"
-            >
-              <el-option
-                v-for="(item, index) in AirportList"
-                :key="index"
-                :label="item.planDepartureApt"
-                :value="item.planDepartureApt"
-              />
+            <el-select v-model="formData.currentAirport" class="input-shadow" size="small" style="width: 100px" filterable default-first-option placeholder="请选择机场" @change="airPortChange">
+              <el-option v-for="(item, index) in AirportList" :key="index" :label="item.planDepartureApt" :value="item.planDepartureApt" />
             </el-select>
           </el-form-item>
           <el-form-item prop="inboundCarrier">
-            <el-cascader
-              v-model="formData.inboundCarrier"
-              class="input-shadow"
-              style="width: 140px"
-              size="small"
-              :options="carrierProps"
-              :props="optionProps"
-              placeholder="进港承运航司"
-              collapse-tags
-              clearable
-              filterable
-              default-first-option
-              @change="resetLoopEvent"
-            />
+            <el-cascader v-model="formData.inboundCarrier" class="input-shadow" style="width: 140px" size="small" :options="carrierProps" :props="optionProps" placeholder="进港承运航司" collapse-tags clearable filterable default-first-option @change="resetLoopEvent" />
           </el-form-item>
           <el-form-item prop="outgoingAirline">
-            <el-cascader
-              v-model="formData.outgoingAirline"
-              class="input-shadow"
-              style="width: 140px"
-              size="small"
-              :options="carrierPropsop"
-              :props="optionPropser"
-              placeholder="离港承运航司"
-              collapse-tags
-              clearable
-              filterable
-              default-first-option
-              @change="resetLoopEvent"
-            />
+            <el-cascader v-model="formData.outgoingAirline" class="input-shadow" style="width: 140px" size="small" :options="carrierPropsop" :props="optionPropser" placeholder="离港承运航司" collapse-tags clearable filterable default-first-option @change="resetLoopEvent" />
           </el-form-item>
           <!-- <el-form-item prop="startDate">
             <el-date-picker
@@ -107,84 +58,33 @@
               @change="endDateChangeHandler"
             />
           </el-form-item> -->
-          <el-form-item
-            prop="flightDate"
-            label="航班日期"
-          >
-            <el-date-picker
-              v-model="formData.flightDate"
-              size="small"
-              style="width: 280px"
-              type="daterange"
-              value-format="yyyy-MM-dd"
-              start-placeholder="开始日期"
-              end-placeholder="结束日期"
-              :picker-options="dateRangePickerOptions"
-              @change="dateChangeHandler"
-            />
+          <el-form-item prop="flightDate" label="航班日期">
+            <el-date-picker v-model="formData.flightDate" size="small" style="width: 280px" type="daterange" value-format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="dateRangePickerOptions" @change="dateChangeHandler" />
           </el-form-item>
           <el-form-item>
             <div class="box-item">
               <p>预计中转数:</p>
-              <li
-                v-for="(item, index) in orderNum"
-                :key="index"
-                :class="{ 'number-item': !isNaN(item), 'mark-item': isNaN(item) }"
-              >
+              <li v-for="(item, index) in orderNum" :key="index" :class="{ 'number-item': !isNaN(item), 'mark-item': isNaN(item) }">
                 <span v-if="!isNaN(item)">
                   <i ref="numberItem">0123456789</i>
                 </span>
-                <span
-                  v-else
-                  class="comma"
-                  >{{ item }}</span
-                >
+                <span v-else class="comma">{{ item }}</span>
               </li>
             </div>
           </el-form-item>
         </div>
-        <div
-          class="form-right"
-          @keyup.enter="onSubmit(0)"
-        >
+        <div class="form-right" @keyup.enter="onSubmit(0)">
           <el-form-item prop="search">
-            <el-popover
-              :value="popoverVisible"
-              placement="bottom"
-              trigger="manual"
-            >
+            <el-popover :value="popoverVisible" placement="bottom" trigger="manual">
               <span>请输入航班号(示例:CA1234)或行李牌号(示例:1234567890)</span>
-              <el-input
-                slot="reference"
-                v-model="formData.search"
-                class="input-shadow"
-                style="width: 240px"
-                size="small"
-                placeholder="请输入内容"
-                prefix-icon="el-icon-search"
-                clearable
-                @focus="popoverVisible = true"
-                @blur="popoverVisible = false"
-              />
+              <el-input slot="reference" v-model="formData.search" class="input-shadow" style="width: 240px" size="small" placeholder="请输入内容" prefix-icon="el-icon-search" clearable @focus="popoverVisible = true" @blur="popoverVisible = false" />
             </el-popover>
           </el-form-item>
           <el-form-item>
-            <el-button
-              class="btn-shadow"
-              size="mini"
-              type="primary"
-              @click="onSubmit(0)"
-              >搜索</el-button
-            >
+            <el-button class="btn-shadow" size="mini" type="primary" @click="onSubmit(0)">搜索</el-button>
           </el-form-item>
           <el-form-item v-is="['td_showTransit']">
-            <el-button
-              class="btn-shadow"
-              size="mini"
-              type="primary"
-              @click="changeView"
-              >切换视角</el-button
-            >
+            <el-button class="btn-shadow" size="mini" type="primary" @click="changeView">切换视角</el-button>
           </el-form-item>
           <!-- <el-form-item v-is="['td_timeIcon']">
             <TimeZoneSelector />
@@ -196,79 +96,25 @@
             <img class="btn-img btn-shadow" src="@/assets/baggage/ic_setting.png" title="列设置" @click="show" />
           </el-form-item> -->
           <el-form-item>
-            <img
-              class="btn-img btn-shadow"
-              src="@/assets/baggage/ic_setting.png"
-              title="列设置"
-              @click="show"
-            />
+            <img class="btn-img btn-shadow" src="@/assets/baggage/ic_setting.png" title="列设置" @click="show" />
           </el-form-item>
           <!-- <el-form-item v-is="['dm_dt_columnSettings']">
             <img class="btn-img btn-shadow" src="@/assets/baggage/ic_export.png" title="导出" @click="exportHandler('table', '航站中转进港列表')" />
           </el-form-item> -->
           <el-form-item>
-            <img
-              class="btn-img btn-shadow"
-              src="@/assets/baggage/ic_export.png"
-              title="导出"
-              @click="exportHandler('table', '航站中转进港列表')"
-            />
+            <img class="btn-img btn-shadow" src="@/assets/baggage/ic_export.png" title="导出" @click="exportHandler('table', '航站中转进港列表')" />
           </el-form-item>
         </div>
       </el-form>
     </div>
     <!--表格-->
-    <div
-      v-loading="loading"
-      class="terminal-table"
-      element-loading-text="拼命加载中"
-      element-loading-spinner="el-icon-loading"
-      element-loading-background="rgba(0, 0, 0, 0.8)"
-    >
-      <el-table
-        ref="table"
-        class="table"
-        :data="dealedTableData"
-        :height="computedTableHeight"
-        show-summary
-        :summary-method="summaryMethod"
-        :span-method="arraySpanMethod"
-        :header-cell-class-name="headerCellClass"
-        :row-class-name="tableRowClassName"
-        :cell-class-name="cellClass"
-        border
-        stripe
-        fit
-        @cell-click="cellClickHandler"
-      >
-        <el-table-column
-          v-for="col in tableColsCopy"
-          :key="col.prop"
-          :prop="col.prop"
-          :label="col.label"
-          :width="col.width"
-          :fixed="col.fixed"
-        >
-          <el-table-column
-            v-for="childCol in col.children"
-            :key="childCol.prop"
-            :prop="childCol.prop"
-            :label="childCol.label"
-            :width="childCol.width"
-            :formatter="tableFormat"
-          >
+    <div v-loading="loading" class="terminal-table" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)">
+      <el-table ref="table" class="table" :data="dealedTableData" :height="computedTableHeight" show-summary :summary-method="summaryMethod" :span-method="arraySpanMethod" :header-cell-class-name="headerCellClass" :row-class-name="tableRowClassName" :cell-class-name="cellClass" border stripe fit @cell-click="cellClickHandler">
+        <el-table-column v-for="col in tableColsCopy" :key="col.prop" :prop="col.prop" :label="col.label" :width="col.width" :fixed="col.fixed">
+          <el-table-column v-for="childCol in col.children" :key="childCol.prop" :prop="childCol.prop" :label="childCol.label" :width="childCol.width" :formatter="tableFormat">
             <template #header>
-              <el-tooltip
-                :content="childCol.desc || childCol.label"
-                placement="top"
-              >
-                <TableHeaderCell
-                  :label="childCol.label"
-                  :filter-options="tableDataFilters[childCol.prop]"
-                  :filter-values.sync="filterValues[childCol.prop]"
-                  :sortable="childCol.sortable"
-                  :sort-rule.sync="tableDataSortRules[childCol.prop]"
-                />
+              <el-tooltip :content="childCol.desc || childCol.label" placement="top">
+                <TableHeaderCell :label="childCol.label" :filter-options="tableDataFilters[childCol.prop]" :filter-values.sync="filterValues[childCol.prop]" :sortable="childCol.sortable" :sort-rule.sync="tableDataSortRules[childCol.prop]" />
               </el-tooltip>
             </template>
           </el-table-column>
@@ -276,41 +122,18 @@
       </el-table>
     </div>
     <!--列设置-->
-    <Dialog
-      :flag="dialogFlag"
-      class="dialog-check-group"
-    >
+    <Dialog :flag="dialogFlag" class="dialog-check-group">
       <div class="dialog-wrapper">
         <div class="title">列设置</div>
         <div class="content">
-          <el-tree
-            ref="columnSetTree"
-            :data="tableCols"
-            :class="colsCheckClass"
-            show-checkbox
-            node-key="index"
-            :default-expand-all="true"
-            :props="{
+          <el-tree ref="columnSetTree" :data="tableCols" :class="colsCheckClass" show-checkbox node-key="index" :default-expand-all="true" :props="{
               label: 'label',
               children: 'children'
-            }"
-            :default-checked-keys="checkedKeysTemp"
-            @check="handleCheck"
-          />
+            }" :default-checked-keys="checkedKeysTemp" @check="handleCheck" />
         </div>
         <div class="foot right t30">
-          <el-button
-            size="medium"
-            class="r24"
-            type="primary"
-            @click="onCheck"
-            >确定</el-button
-          >
-          <el-button
-            size="medium"
-            @click="hide"
-            >取消</el-button
-          >
+          <el-button size="medium" class="r24" type="primary" @click="onCheck">确定</el-button>
+          <el-button size="medium" @click="hide">取消</el-button>
         </div>
       </div>
     </Dialog>
@@ -325,7 +148,7 @@ import formMixin from '../../mixins/form'
 import tableColsMixin from '../../mixins/tableCols'
 import timeZoneMixin from '../../mixins/timeZone'
 import pf from '@/layout/mixin/publicFunc'
-import { TempQuery } from '@/api/temp'
+import { TempQuery, WhatQuery } from '@/api/temp'
 import { GeneralDataReception } from '@/api/temp'
 import TableHeaderCell from '@/components/TableHeaderCell'
 import { setTableFilters, throttledExportToExcel, timeInZone } from '@/utils/table'
@@ -335,7 +158,7 @@ export default {
   name: 'DepartureTerminalView',
   components: { Dialog, TimeZoneSelector, TableHeaderCell },
   mixins: [terminalMixin, formMixin, tableColsMixin, timeZoneMixin, pf],
-  data() {
+  data () {
     return {
       optionProps: {
         value: 'inAicompanyCode2',
@@ -511,15 +334,15 @@ export default {
     }
   },
   computed: {
-    singleDay() {
+    singleDay () {
       return this.startDate === this.endDate
     },
     ...mapGetters(['timeZone'])
   },
-  created() {
+  created () {
     // this.getAirPortData()
   },
-  mounted() {
+  mounted () {
     this.$refs['form'].validateField('flightDate')
     this.getAirPortData()
     this.table = this.$refs.table.bodyWrapper
@@ -528,7 +351,7 @@ export default {
       that.scrollTop = this.table.scrollTop
     })
   },
-  activated() {
+  activated () {
     this.table.scrollTop = this.scrollTop
     this.getTableData()
     this.getWarningData()
@@ -546,20 +369,20 @@ export default {
     //   this.formData.flightDate[1] = endDate
     // }
   },
-  deactivated() {
+  deactivated () {
     if (this.loopEvent) {
       clearInterval(this.loopEvent)
       this.loopEvent = null
     }
   },
-  beforeDestroy() {
+  beforeDestroy () {
     if (this.loopEvent) {
       clearInterval(this.loopEvent)
       this.loopEvent = null
     }
   },
   methods: {
-    async getWarningData() {
+    async getWarningData () {
       try {
         // const res = await TempQuery({
         //   id: SERVICE_ID.departureWarningId,
@@ -576,14 +399,14 @@ export default {
         this.$message.error('失败')
       }
     },
-    resetLoopEvent() {
+    resetLoopEvent () {
       this.loading = true
       this.hasSetTableScroll = false
       this.loopEvent && clearInterval(this.loopEvent)
       this.getTableData()
       this.loopEvent = setInterval(this.getTableData, LOOP_INTERVAL.transferDepartureTable)
     },
-    headerCellClass({ row, column }) {
+    headerCellClass ({ row, column }) {
       const classes = []
       const rule = this.tableDataSortRules[column.property]
       if (rule) {
@@ -591,7 +414,7 @@ export default {
       }
       return classes.join(' ')
     },
-    tableRowClassName({ row, rowIndex }) {
+    tableRowClassName ({ row, rowIndex }) {
       const classes = []
       if (row.hasTakeOff) {
         classes.push('bgl-hui')
@@ -601,7 +424,7 @@ export default {
       }
       return classes.join(' ')
     },
-    changeView() {
+    changeView () {
       // const query = {
       //   ...this.formData,
       //   startDate: this.startDate,
@@ -614,18 +437,18 @@ export default {
       // })
       this.$router.push('/transfer/arrival')
     },
-    airPortChange() {
+    airPortChange () {
       this.getAviationData()
       this.upAviationData()
       this.resetLoopEvent()
     },
-    dateChangeHandler() {
+    dateChangeHandler () {
       this.getAviationData()
       this.upAviationData()
       this.resetLoopEvent()
     },
     // 选择机场
-    async getAirPortData() {
+    async getAirPortData () {
       try {
         // const res = await TempQuery({
         //   id: SERVICE_ID.departureAirLtId,
@@ -646,7 +469,7 @@ export default {
       }
     },
     // 选择航司
-    async getAviationData() {
+    async getAviationData () {
       try {
         // const res = await TempQuery({
         //   id: SERVICE_ID.departureAviJoinLtId,
@@ -663,7 +486,7 @@ export default {
       }
     },
     // 选择航司
-    async upAviationData() {
+    async upAviationData () {
       try {
         // const res = await TempQuery({
         //   id: SERVICE_ID.departureAviLeaveLtId,
@@ -690,39 +513,40 @@ export default {
     //   this.flightAttrQuery(params)
     // },
     // 获取表格数据
-    async getTableData() {
+    async getTableData () {
       if (!this.formData.currentAirport || !this.startDate || !this.endDate) {
         return
       }
-      // const arrs1 = [this.formData.inboundCarrier.length === 0 ? '' : this.formData.inboundCarrier[0]]
-      // const arrs2 = [this.formData.outgoingAirline.length === 0 ? '' : this.formData.outgoingAirline[0]]
-      // const arr = [
-      //   this.formData.currentAirport,
-      //   this.startDate,
-      //   this.endDate,
-      //   ...arrs1,
-      //   ...arrs1,
-      //   ...arrs1,
-      //   ...arrs2,
-      //   ...arrs2,
-      //   ...arrs2
-      //   // this.formData.inboundCarrier,
-      //   // this.formData.outgoingAirline,
-      //   // JSON.stringify(this.formData.inboundCarrier),
-      //   // JSON.stringify(this.formData.outgoingAirline),
-      // ]
+      const arrs1 = [this.formData.inboundCarrier.length === 0 ? '' : this.formData.inboundCarrier[0]]
+      const arrs2 = [this.formData.outgoingAirline.length === 0 ? '' : this.formData.outgoingAirline[0]]
+      const arr = [
+        this.formData.currentAirport,
+        this.startDate,
+        this.endDate,
+        ...arrs1,
+        ...arrs1,
+        ...arrs1,
+        ...arrs2,
+        ...arrs2,
+        ...arrs2
+        // this.formData.inboundCarrier,
+        // this.formData.outgoingAirline,
+        // JSON.stringify(this.formData.inboundCarrier),
+        // JSON.stringify(this.formData.outgoingAirline),
+      ]
       try {
-        // const res = await TempQuery({
-        //   id: SERVICE_ID.departureTableLtId,
-        //   dataContent: [...arr]
-        // })
-        const res = await this.getQueryList(SERVICE_ID.departureTableLtId, { departureAirport: this.formData.currentAirport, flightDateStart: this.startDate, flightDateEnd: this.endDate, inFlightNO: null, flightNO: null }, 1, 9999)
+        const res = await TempQuery({
+          id: SERVICE_ID.departureTableLtId,
+          dataContent: [...arr]
+        })
+        // const res = await this.getQueryList(SERVICE_ID.departureTableLtId, { departureAirport: this.formData.currentAirport, flightDateStart: this.startDate, flightDateEnd: this.endDate, inFlightNO: null, flightNO: null }, 1, 9999)
         if (Number(res.code) === 0) {
           this.initTableData(res.returnData.listValues)
         } else {
         }
         this.loading = false
       } catch (error) {
+        console.log(error)
         if (this.loopEvent) {
           clearInterval(this.loopEvent)
           this.loopEvent = null
@@ -730,7 +554,7 @@ export default {
         this.loading = false
       }
     },
-    initTableData(tableData) {
+    initTableData (tableData) {
       const currentTime = new Date()
       const curTime = this.formatTime(currentTime)
       this.baggageCount = 0
@@ -794,7 +618,7 @@ export default {
         this.setTableScroll()
       })
     },
-    formatTime(date, type = 1) {
+    formatTime (date, type = 1) {
       let time = null
       if (type == 1) {
         time = parseTime(date, '{y}-{m}-{d} {h}:{i}:{s}')
@@ -804,7 +628,7 @@ export default {
       const newTimt = new Date(time)
       return newTimt.getTime()
     },
-    async sendLog(obj) {
+    async sendLog (obj) {
       try {
         const newObj = {
           logTime: parseTime(new Date(), '{y}-{m}-{d} {h}:{i}:{s}'),
@@ -823,7 +647,7 @@ export default {
         this.$message.error('失败')
       }
     },
-    setTableScroll() {
+    setTableScroll () {
       this.leaveCount = 0
       this.dealedTableData.forEach(row => {
         if (row['hasTakeOff'] && !row['flightCanceled']) {
@@ -849,7 +673,7 @@ export default {
       }, 0)
       this.hasSetTableScroll = true
     },
-    setNumberTransform() {
+    setNumberTransform () {
       const numberItems = this.$refs.numberItem // 拿到数字的ref,计算元素数量
       const numberArr = this.orderNum.filter(item => !isNaN(item))
       // 结合CSS 对数字字符进行滚动,显示订单数量
@@ -859,7 +683,7 @@ export default {
       }
     },
 
-    toOrderNum(num) {
+    toOrderNum (num) {
       num = num.toString()
       if (num.length < 6) {
         num = '0' + num // 如未满八位数,添加"0"补位
@@ -872,7 +696,7 @@ export default {
       }
       this.setNumberTransform()
     },
-    arraySpanMethod({ row, column, rowIndex, columnIndex }) {
+    arraySpanMethod ({ row, column, rowIndex, columnIndex }) {
       for (let i = 0; i < 7; i++) {
         if (columnIndex === i) {
           const _row = this.spanArr[rowIndex]
@@ -884,7 +708,7 @@ export default {
         }
       }
     },
-    exportHandler(refName, tableName) {
+    exportHandler (refName, tableName) {
       if (this.loading) {
         return
       }
@@ -920,7 +744,7 @@ export default {
       optgroup,
       select,
       textarea {
-        font-family: Helvetica, 'Microsoft YaHei';
+        font-family: Helvetica, "Microsoft YaHei";
         font-size: 14px;
       }
       .el-switch__label {
@@ -1026,7 +850,7 @@ export default {
       padding: 0;
       text-align: center;
       font-size: 14px;
-      font-family: Helvetica, 'Microsoft YaHei';
+      font-family: Helvetica, "Microsoft YaHei";
       letter-spacing: 0;
     }
     .cell-click {
@@ -1060,7 +884,7 @@ export default {
         &.redBorder {
           position: relative;
           &::after {
-            content: '';
+            content: "";
             position: absolute;
             left: 0;
             bottom: 0;
@@ -1075,7 +899,7 @@ export default {
       background: lightcoral !important;
       position: relative;
       &::after {
-        content: '';
+        content: "";
         display: block;
         width: 100%;
         height: 100%;
@@ -1089,7 +913,7 @@ export default {
       background: #fcf0b1 !important;
       position: relative;
       &::after {
-        content: '';
+        content: "";
         display: block;
         width: 100%;
         height: 100%;