ソースを参照

Merge branch 'master' of http://120.26.64.82:3000/BFFE/CABaggageData2.0

chenjun 2 年 前
コミット
2a0148bb41

+ 6 - 2
src/layout/components/Search/index.vue

@@ -1,8 +1,8 @@
 <!--
  * @Author: your name
  * @Date: 2021-10-18 17:44:42
- * @LastEditTime: 2022-02-22 14:30:38
- * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2022-05-06 18:03:23
+ * @LastEditors: your name
  * @Description: In User Settings Edit
  * @FilePath: \Foshan4A\src\views\account\components\search.vue
 -->
@@ -105,6 +105,10 @@ export default {
     clearSearch () {
       this.$emit("clearSearchData", this.input);
     },
+    setSearch(val) {
+      this.input = val
+      this.$emit('getSearchData', this.input)
+    }
   },
 };
 </script>

+ 32 - 11
src/layout/components/Sidebar/SidebarItem.vue

@@ -1,8 +1,13 @@
 <template>
   <div v-if="!item.hidden">
-    <template v-if="hasOneShowingChild(item.children, item) && !item.alwaysShow">
+    <template
+      v-if="hasOneShowingChild(item.children, item) && !item.alwaysShow"
+    >
       <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
-        <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{ 'submenu-title-noDropdown': !isNest }">
+        <el-menu-item
+          :index="resolvePath(onlyOneChild.path)"
+          :class="{ 'submenu-title-noDropdown': !isNest }"
+        >
           <!-- <item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" /> -->
           <!-- <item :icon="onlyOneChild.meta.title||(item.meta&&item.meta.title)"/> -->
           <!-- <el-tooltip
@@ -14,8 +19,16 @@
           <!-- <img class="nav_item" :src="onlyOneChild.meta.imger" /> -->
           <!-- <span class="pathName" :class="getClass(item.path)"></span>
           </el-tooltip> -->
-          <span class="pathName" v-if="!leup" :class="getClass(item.path)"></span>
-          <span class="pathNamecosy" v-if="leup" :class="getClass(item.path)"></span>
+          <span
+            class="pathName"
+            v-if="!leup"
+            :class="getClass(item.path)"
+          ></span>
+          <span
+            class="pathNamecosy"
+            v-if="leup"
+            :class="getClass(item.path)"
+          ></span>
           <span class="pathNameer" v-if="leup">{{
             onlyOneChild.meta.title
           }}</span>
@@ -23,7 +36,12 @@
       </app-link>
     </template>
 
-    <el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
+    <el-submenu
+      v-else
+      ref="subMenu"
+      :index="resolvePath(item.path)"
+      popper-append-to-body
+    >
       <template slot="title">
         <img class="nav_item" :src="onlyOneChild.meta.imger" />
       </template>
@@ -64,19 +82,19 @@ export default {
       default: true,
     },
   },
-  data () {
+  data() {
     // To fix https://github.com/PanJiaChen/vue-admin-template/issues/237
     // TODO: refactor with render function
     this.onlyOneChild = null;
     return {};
   },
-  mounted () {
+  mounted() {
     // console.log(this.item, 'item')
     // const vnodes
     // vnodes.push(<span slot='title'>{(title)}</span>)
   },
   methods: {
-    hasOneShowingChild (children = [], parent) {
+    hasOneShowingChild(children = [], parent) {
       // console.log(this.item,'item')
       const showingChildren = children.filter((item) => {
         if (item.hidden) {
@@ -117,7 +135,7 @@ export default {
 
       return false;
     },
-    resolvePath (routePath) {
+    resolvePath(routePath) {
       if (isExternal(routePath)) {
         return routePath;
       }
@@ -126,7 +144,7 @@ export default {
       }
       return path.resolve(this.basePath, routePath);
     },
-    getClass (path) {
+    getClass(path) {
       const p = path.split("/").join("");
       if (p) {
         return p;
@@ -161,7 +179,7 @@ export default {
 // //   background: red !important;
 // // }
 ::v-deep .el-menu-item:hover {
-  background: #2d67e3 !important;
+  // background: #2d67e3 !important;
   color: #fff !important;
   .account {
     background: url("../../../assets/nav/ic_list_nav_account_check.png");
@@ -217,6 +235,9 @@ export default {
 // ::v-deep .el-submenu__title.is-active {
 //   background-color: #6db6ff !important;
 // }
+// .pathNamecosy:hover {
+//   background-image: #2d67e3 !important;
+// }
 .nav_item {
   width: 36px;
   height: 36px;

+ 6 - 5
src/styles/sidebar.scss

@@ -86,11 +86,12 @@
       }
     }
 
-    // .submenu-title-noDropdown {
-    //   &:hover {
-    //     background-color: initial !important;
-    //   }
-    // }
+    .submenu-title-noDropdown {
+      &:hover {
+        // background-color: initial !important;
+        background: #2d67e3 !important;
+      }
+    }
 
     .is-active > .el-submenu__title {
       color: $subMenuActiveText !important;

+ 9 - 1
src/views/advancedQuery/views/advancedHome.vue

@@ -21,6 +21,7 @@
         </div>
       </div>
       <Search
+        ref="search"
         :isTitle="false"
         :isSlot="true"
         @getSearchData="getSearchData"
@@ -408,7 +409,7 @@ export default {
   },
   created() {
     // 参数顺序   【航班开始日期,航班结束日期,航班号,航班号,行李牌号,行李牌号,起飞站,起飞站,目的站,目的站,特殊行李类型,特殊 行李类型,旅客姓名大写拼音,旅客姓名大写拼音,pnr,pnr,值机号,值机号】
-    const dataContent = [this.timeStart, this.timeEnd]
+    // const dataContent = [this.timeStart, this.timeEnd]
     // for (let i = 0; i < 18; i++) {
     //   dataContent.push(null)
     // }
@@ -420,6 +421,13 @@ export default {
     document.querySelector('.interfaceLog_head_time_start .el-input__prefix').innerHTML = '开始:'
     document.querySelector('.interfaceLog_head_time_end .el-input__prefix i').remove()
     document.querySelector('.interfaceLog_head_time_end .el-input__prefix').innerHTML = '结束:'
+    const { FlightNO, FlightDate } = this.$route.query
+    if (FlightNO && FlightDate) {
+      this.$router.replace(this.$route.path)
+      const parsedTime = parseTime(new Date(FlightDate), '{y}-{m}-{d}')
+      this.timeStart = this.timeEnd = parsedTime
+      this.$refs['search'].setSearch(FlightNO)
+    }
   },
   updated() {
     // table数据更新

+ 45 - 16
src/views/baggageManagement/components/flight/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2022-01-17 10:39:22
- * @LastEditTime: 2022-05-06 16:02:54
+ * @LastEditTime: 2022-05-06 18:20:55
  * @LastEditors: your name
  * @Description: 航班视图
 -->
@@ -20,7 +20,7 @@
                 <span>起飞机场简称:</span>
               </el-col>
               <el-col :span="12">
-                <span>{{ flightInfo.Name }}</span>
+                <span>{{ flightInfo.departureName }}</span>
               </el-col>
             </el-row>
 
@@ -59,7 +59,7 @@
 
             <el-row>
               <el-col :span="12">
-                <span>登机口:{{ flightInfo.Carousel }}</span>
+                <span>登机口:{{ flightInfo.BordingGate }}</span>
               </el-col>
               <el-col :span="12">
                 <span>停机位:{{ flightInfo.StandForDepartrue }}</span>
@@ -81,7 +81,7 @@
                 <span>航班状态:</span>
               </el-col>
               <el-col :span="12">
-                <span>{{ flightInfo.FlightStatus }}</span>
+                <span>{{ flightInfo.FlightStatus || '正常' }}</span>
               </el-col>
             </el-row>
 
@@ -118,7 +118,7 @@
                 <span>降落机场简称:</span>
               </el-col>
               <el-col :span="12">
-                <span>{{ flightInfo.PlanLandingaptName }}</span>
+                <span>{{ flightInfo.landingName }}</span>
               </el-col>
             </el-row>
 
@@ -205,6 +205,7 @@
           show-summary
           :summary-method="summaryMethod"
           :header-cell-style="{ color: '#101116' }"
+          @row-click="transferBaggageInTableClickHandler"
         >
           <el-table-column
             v-for="item in transferInTableColumn"
@@ -232,6 +233,7 @@
           show-summary
           :summary-method="summaryMethod"
           :header-cell-style="{ color: '#101116' }"
+          @row-click="transferBaggageOutTableClickHandler"
         >
           <el-table-column
             v-for="item in transferOutTableColumn"
@@ -285,7 +287,7 @@
           />
         </div>
         <el-table
-          ref="baggageTable"
+          ref="flightBaggageTable"
           :data="flightBaggageTableData"
           border
           style="width: 100%"
@@ -293,9 +295,9 @@
           stripe
           size="mini"
           show-summary
-          :summary-method="summaryMethod"
+          :summary-method="summaryRow(flightBaggageTableData.length)"
           :header-cell-style="{ color: '#101116' }"
-          @row-click="rowClick"
+          @row-click="flightBaggageTableClickHandler"
         >
           <el-table-column
             v-for="item in tableColsCopy"
@@ -354,6 +356,7 @@ import { queryMap, myQuery } from '@/api/dataIntegration'
 import tableColsMixin from '../../mixins/tableCols'
 
 // const arrivalBaggageTableColumn = [
+//   { name: '序号', prop: 'index', align: 'center' },
 //   { name: '旅客姓名', prop: 'name', align: 'center', sortable: 'custom' },
 //   { name: '行李牌号', prop: 'bagNo', align: 'center' },
 //   {
@@ -377,6 +380,7 @@ import tableColsMixin from '../../mixins/tableCols'
 //   { name: '卷宗号', prop: 'fileNumber', align: 'center' }
 // ]
 const departureBaggageTableColumn = [
+  // { name: '序号', prop: 'index', align: 'center' },
   { name: '旅客姓名', prop: 'PassengerNameUpcase', align: 'center', sortable: 'custom' },
   { name: '行李牌号', prop: 'BagSN', align: 'center' },
   {
@@ -391,13 +395,13 @@ const departureBaggageTableColumn = [
     align: 'center',
     sortable: 'custom'
   },
-  { name: '装载序号', prop: 'loadSequenceIndex', align: 'center' },
+  { name: '装载序号', prop: 'LoadSN', align: 'center' },
   { name: '值机', prop: 'checkIn', align: 'center' },
   { name: '安检', prop: 'security', align: 'center' },
   { name: '分拣', prop: 'sorting', align: 'center' },
   { name: '装车', prop: 'loading', align: 'center' },
   { name: '装机', prop: 'installed', align: 'center' },
-  { name: '中转标志', prop: 'transitStatus', align: 'center' },
+  { name: '中转标志', prop: 'transitFlag', align: 'center' },
   { name: '卷宗号', prop: 'fileNumber', align: 'center' }
 ]
 export default {
@@ -457,7 +461,7 @@ export default {
   },
   created() {
     this.queryData = this._.cloneDeep(this.$route.query)
-    console.log(this.queryData)
+    // console.log(this.queryData)
     const queryData = [this.queryData.FlightNO, this.queryData.FlightDate]
     this.queryAll(queryData)
   },
@@ -466,7 +470,7 @@ export default {
       this.$refs['containerTable'].doLayout()
       this.$refs['transferInBaggageTable'].doLayout()
       this.$refs['transferOutBaggageTable'].doLayout()
-      this.$refs['baggageTable'].doLayout()
+      this.$refs['flightBaggageTable'].doLayout()
     })
   },
   methods: {
@@ -502,6 +506,12 @@ export default {
       }
       return sums
     },
+    // 统计行数
+    summaryRow(num) {
+      return function () {
+        return ['合计', `共${num}件`]
+      }
+    },
     // 表格添加过滤条件
     setTableFilters() {
       this.flightBaggageTableData.forEach(item => {
@@ -570,11 +580,29 @@ export default {
     //     console.log(error)
     //   }
     // },
-    rowClick(row) {
+    transferBaggageInTableClickHandler(row) {
+      this.$router.push({
+        path: '/advance',
+        query: {
+          FlightNO: row.PreFlightNO,
+          FlightDate: row.PreFlightDate
+        }
+      })
+    },
+    transferBaggageOutTableClickHandler(row) {
+      this.$router.push({
+        path: '/advance',
+        query: {
+          FlightNO: row.TransferFlightNO,
+          FlightDate: row.TransferFlightDate
+        }
+      })
+    },
+    flightBaggageTableClickHandler(row) {
       this.$router.push({
         path: `/${this.$route.path.split('/').slice(1, -1).join('/')}/baggageView`,
         query: {
-          BagSN: this.queryData.BagSN,
+          BagSN: row.BagSN,
           FlightNO: this.queryData.FlightNO,
           FlightDate: this.queryData.FlightDate
         }
@@ -610,14 +638,14 @@ export default {
           this.queryTrasferInBaggage(dataContent),
           this.queryBaggageByFlightNO(dataContent)
         ])
-        this.flightInfo = flightInfo[0]
+        flightInfo.length && (this.flightInfo = flightInfo[0])
         this.containerTableData = containerTableDataData
         this.transferOutBaggageTableData = transferOutBaggageTableData.map(item => {
           item['flightTime'] = item['flightDate'].split('T')[1]
           return item
         })
         this.transferInBaggageTableData = transferInBaggageTableData
-        this.flightBaggageTableData = flightBaggageTableData.map(item => {
+        this.flightBaggageTableData = flightBaggageTableData.map((item, index) => {
           item['checkIn'] = `${item['checkIn'] ?? ''}\n${item['checkInTime'] ? item['checkInTime'].split('T')[1] : ''}`
           item['security'] = `${item['DealInfo'] ?? ''}\n${item['DealTime'] ? item['DealTime'].split('T')[1] : ''}`
           item['sorting'] = `${item['sortLocationMark'] ?? ''}\n${
@@ -629,6 +657,7 @@ export default {
           item['installed'] = `${item['inflLocationMark'] ?? ''}\n${
             item['inflLoadDealTime'] ? item['inflLoadDealTime'].split('T')[1] : ''
           }`
+          item['transitFlag'] = item['preFlightNO'] === 1 ? '是' : '否'
           return item
         })