Просмотр исходного кода

高级查询跳转行李视图

zhongxiaoyu 2 лет назад
Родитель
Сommit
02553a7339

+ 1 - 1
public/config.js

@@ -2,4 +2,4 @@ var PLATFROM_CONFIG = {};
 PLATFROM_CONFIG.baseUrl = "http://106.14.243.117:9111"; // http请求地址
 PLATFROM_CONFIG.appSecret = "9inu7zpllz1folzsljm498dcpi0lsog1"; //appSecret
 PLATFROM_CONFIG.appId = "q7kdjmmaf0kerwpf"; //appid
-PLATFROM_CONFIG.baseURLCA = "http://192.168.3.74:8888";
+PLATFROM_CONFIG.baseURLCA = "http://106.14.243.117:9114";

+ 3 - 3
src/router/index.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2021-10-14 17:17:53
- * @LastEditTime: 2022-04-25 16:08:49
+ * @LastEditTime: 2022-05-03 16:59:33
  * @LastEditors: your name
  * @Description: In User Settings Edit
  * @FilePath: \Foshan4A\src\router\index.js
@@ -18,7 +18,7 @@ import routesOne from "./routes/routes-file-one";
 import routesTwo from "./routes/routes-file-two";
 import routesThree from "./routes/routes-file-three";
 import routesFileFour from "./routes/routes-file-four";
-// import routesFive from "./routes/routes-file-five";
+import routesFive from "./routes/routes-file-five";
 /**
  * Note: sub-menu only appear when route children.length >= 1
  * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
@@ -74,7 +74,7 @@ routesPush(
     ...routesTwo,
     ...routesThree,
     ...routesFileFour,
-    // ...routesFive,
+    ...routesFive
   ],
   asyncRoutes
 );

+ 184 - 47
src/router/routes/routes-file-five.js

@@ -1,38 +1,38 @@
 /*
  * @Author: zk
  * @Date: 2022-01-17 10:40:48
- * @LastEditTime: 2022-03-09 17:28:35
+ * @LastEditTime: 2022-05-03 15:07:36
  * @LastEditors: your name
  * @Description: 离港路由
  */
-import Layout from "@/layout";
+import Layout from '@/layout'
 
-const auditRoutes = {
-  path: "/departure",
+const departureRoutes = {
+  path: '/departure',
   component: Layout,
-  meta: { roles: ["departure_menu"] },
+  meta: { roles: ['departure_menu'] },
   children: [
     {
-      path: "/departure",
-      component: () => import("@/views/baggageManagement"),
+      path: '/departure',
+      component: () => import('@/views/baggageManagement'),
       meta: {
-        title: "离港管理",
-        imgstyle: "ic_list_nav_leave_default.png",
-        imgstyleup: "ic_list_nav_leave_check.png",
+        title: '离港管理',
+        imgstyle: 'ic_list_nav_leave_default.png',
+        imgstyleup: 'ic_list_nav_leave_check.png'
       },
       children: [
         {
-          path: "/departure",
-          name: "DepartureOne",
-          component: () => import("@/views/baggageManagement"),
+          path: '/departure',
+          name: 'DepartureOne',
+          component: () => import('@/views/baggageManagement'),
           meta: {
-            title: "离港视图",
+            title: '离港视图',
             // title: "行李视图",
-            roles: ["departure_page"],
+            roles: ['departure_page'],
             keepAlive: true,
-            deepth: 1,
+            deepth: 1
           },
-          redirect: "/departure/terminalView",
+          redirect: '/departure/terminalView',
           // redirect: "/departure/baggageView",
           children: [
             // {
@@ -45,43 +45,180 @@ const auditRoutes = {
             //   meta: { keepAlive: true, deepth: 2 },
             // },
             {
-              path: "/departure/terminalView",
-              name: "DepartureTerminalView",
-              component: () =>
-                import("@/views/baggageManagement/components/departure"),
-              meta: { keepAlive: true, deepth: 2 },
+              path: '/departure/terminalView',
+              name: 'DepartureTerminalView',
+              component: () => import('@/views/baggageManagement/components/departure'),
+              meta: { keepAlive: true, deepth: 2 }
             },
             {
-              path: "/departure/flightView",
-              name: "DepartureTwo",
-              component: () => import("@/views/baggageManagement"),
-              meta: { title: "航班视图", keepAlive: true, deepth: 2 },
+              path: '/departure/flightView',
+              name: 'DepartureTwo',
+              component: () => import('@/views/baggageManagement'),
+              meta: { title: '航班视图', keepAlive: true, deepth: 2 },
               children: [
                 {
-                  path: "/departure/flightView",
-                  name: "DepartureFlightView",
-                  component: () =>
-                    import(
-                      "@/views/baggageManagement/components/departure/flight"
-                    ),
-                  meta: { keepAlive: true, deepth: 3 },
+                  path: '/departure/flightView',
+                  name: 'DepartureFlightView',
+                  component: () => import('@/views/baggageManagement/components/departure/flight'),
+                  meta: { keepAlive: true, deepth: 3 }
                 },
                 {
-                  path: "/departure/baggageView",
-                  name: "DepartureBaggageView",
-                  component: () =>
-                    import(
-                      "@/views/baggageManagement/components/departure/baggage"
-                    ),
-                  meta: { title: "行李视图", keepAlive: true, deepth: 4 },
+                  path: '/departure/baggageView',
+                  name: 'DepartureBaggageView',
+                  component: () => import('@/views/baggageManagement/components/departure/baggage'),
+                  meta: { title: '行李视图', keepAlive: true, deepth: 4 }
+                }
+              ]
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}
+
+const arrivalRoutes = {
+  path: '/arrival',
+  component: Layout,
+  meta: { roles: ['inbound_management'] },
+  children: [
+    {
+      path: '/arrival',
+      component: () => import('@/views/baggageManagement'),
+      meta: {
+        title: '进港管理',
+        imgstyle: 'ic_list_nav_arrive_default.png',
+        imgstyleup: 'ic_list_nav_arrive_check.png'
+      },
+      children: [
+        {
+          path: '/arrival',
+          name: 'ArrivalOne',
+          component: () => import('@/views/baggageManagement'),
+          meta: { title: '进港视图', roles: ['departure_page'], keepAlive: true, deepth: 1 },
+          redirect: '/arrival/teminalView',
+          children: [
+            {
+              path: '/arrival/teminalView',
+              name: 'ArrivalTerminalView',
+              component: () => import('@/views/baggageManagement/components/arrival'),
+              meta: { keepAlive: true, deepth: 2 }
+            },
+            {
+              path: '/arrival/flightView',
+              name: 'ArrivalFlightTwo',
+              component: () => import('@/views/baggageManagement'),
+              meta: { title: '航班视图', keepAlive: true, deepth: 2 },
+              children: [
+                {
+                  path: '/arrival/flightView',
+                  name: 'ArrivalFlightView',
+                  component: () => import('@/views/baggageManagement/components/arrival/flight'),
+                  meta: { keepAlive: true, deepth: 3 }
                 },
-              ],
+                {
+                  path: '/arrival/baggageView',
+                  name: 'ArrivalBaggageView',
+                  component: () => import('@/views/baggageManagement/components/arrival/baggage'),
+                  meta: { title: '行李视图', deepth: 4 }
+                }
+              ]
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}
+
+const transferRoutes = {
+  path: '/transfer',
+  component: Layout,
+  meta: { roles: ['transit'] },
+  children: [
+    {
+      path: '/transfer',
+      component: () => import('@/views/baggageManagement'),
+      meta: {
+        title: '中转管理',
+        imgstyle: 'ic_list_nav_transit_default.png',
+        imgstyleup: 'ic_list_nav_transit_check.png'
+      },
+      redirect: '/transfer/arrival',
+      children: [
+        {
+          path: '/transfer/arrival',
+          name: 'TransferArrivalOne',
+          component: () => import('@/views/baggageManagement'),
+          meta: { title: '中转进港', roles: ['transit_inbound_page'], keepAlive: true, deepth: 1 },
+          redirect: '/transfer/arrival/terminalView',
+          children: [
+            {
+              path: '/transfer/arrival/terminalView',
+              name: 'TransferArrivalTerminalView',
+              component: () => import('@/views/baggageManagement/components/transferArrival'),
+              meta: { keepAlive: true, deepth: 2 }
             },
-          ],
+            {
+              path: '/transfer/arrival/flightView',
+              name: 'TransferArrivalTwo',
+              component: () => import('@/views/baggageManagement'),
+              meta: { title: '航班视图', keepAlive: true, deepth: 2 },
+              children: [
+                {
+                  path: '/transfer/arrival/flightView',
+                  name: 'TransferArrivalFlightView',
+                  component: () => import('@/views/baggageManagement/components/transferArrival/flight'),
+                  meta: { keepAlive: true, deepth: 3 }
+                },
+                {
+                  path: '/transfer/arrival/baggageView',
+                  name: 'TransferArrivalBaggageView',
+                  component: () => import('@/views/baggageManagement/components/transferArrival/baggage'),
+                  meta: { title: '行李视图', keepAlive: true, deepth: 4 }
+                }
+              ]
+            }
+          ]
         },
-      ],
-    },
-  ],
-};
+        {
+          path: '/transfer/departure',
+          name: 'TransferDepartureOne',
+          component: () => import('@/views/baggageManagement'),
+          meta: { title: '中转离港', roles: ['transit_departure_page'], keepAlive: true, deepth: 1 },
+          redirect: '/transfer/departure/terminalView',
+          children: [
+            {
+              path: '/transfer/departure/terminalView',
+              name: 'TransferDepartureTerminalView',
+              component: () => import('@/views/baggageManagement/components/transferDeparture'),
+              meta: { keepAlive: true, deepth: 2 }
+            },
+            {
+              path: '/transfer/departure/flightView',
+              name: 'TransferDepartureTwo',
+              component: () => import('@/views/baggageManagement'),
+              meta: { title: '航班视图', keepAlive: true, deepth: 2 },
+              children: [
+                {
+                  path: '/transfer/departure/flightView',
+                  name: 'TransferDepartureFlightView',
+                  component: () => import('@/views/baggageManagement/components/transferDeparture/flight'),
+                  meta: { keepAlive: true, deepth: 3 }
+                },
+                {
+                  path: '/transfer/departure/baggageView',
+                  name: 'TransferDepartureBaggageView',
+                  component: () => import('@/views/baggageManagement/components/transferDeparture/baggage'),
+                  meta: { title: '行李视图', keepAlive: true, deepth: 4 }
+                }
+              ]
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}
 
-export default [auditRoutes];
+export default [departureRoutes, arrivalRoutes, transferRoutes]

+ 20 - 26
src/views/advancedQuery/views/advancedBag.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2022-01-17 10:39:22
- * @LastEditTime: 2022-03-14 12:04:16
+ * @LastEditTime: 2022-05-03 16:57:24
  * @LastEditors: your name
  * @Description: 行李视图
 -->
@@ -25,9 +25,7 @@
         <el-row :gutter="50">
           <el-col :span="3">行李牌号:{{ infoData.BagSN }}</el-col>
           <el-col :span="3">特殊行李类型:{{ infoData.SpecialType }}</el-col>
-          <el-col :span="3"
-            >旅客姓名:{{ infoData.PassengerNameUpcase, }}</el-col
-          >
+          <el-col :span="3">旅客姓名:{{ infoData.PassengerNameUpcase }}</el-col>
           <el-col :span="3">行李异常分类: {{ infoData.bagExcType }}</el-col>
           <el-col :span="4">企业或团队名称:{{ infoData.TeamOrGroup }}</el-col>
           <el-col :span="4">PNR: {{ infoData.PNR }}</el-col>
@@ -157,11 +155,11 @@
 </template>
 <script>
 import Dialog from "@/layout/components/Dialog/index.vue";
-// import {
-//   nodeinfoes,
-//   fulltrackinfoAndNodeInfoList,
-//   BaggageMessageQuery,
-// } from "@/api/flight";
+import {
+  nodeinfoes,
+  fulltrackinfoAndNodeInfoList,
+  BaggageMessageQuery,
+} from "@/api/flight";
 import { getQuery } from "@/api/flight";
 import tableColsMixin from "../mixins/tableCols";
 
@@ -175,6 +173,7 @@ export default {
     return {
       departureAirport: "",
       landingAirport: "",
+      queryData: {},
       infoData: {
         BagSN: "3666149457",
         SpecialType: null,
@@ -312,27 +311,24 @@ export default {
   watch: {
     infoBtn(val) {
       if (val === "跟踪报文" && !this.hasMessageGotten) {
-        const { flightNo, flightDate, bagNo } = this.infoData;
+        const { BagSN: bagNo, FlightNO: flightNo, FlightDate: flightDate } = this.queryData;
         const params = { flightNo, flightDate, bagNo };
         this.baggageMessageQuery(params);
       }
     },
   },
   created() {
-    // this.infoData = this._.cloneDeep(this.$route.query);
-    // console.log(this.infoData)
+    this.queryData = this._.cloneDeep(this.$route.query);
+    // console.log(this.queryData)
+    const { BagSN: bagNo, FlightNO: flightNO, FlightDate: flightDate } = this.queryData
+    // const nodeData = { bagNo, flightNO, flightDate }
     // this.baggageTableColumnCheckList = this._.cloneDeep(this.baggageTableColumn)
-    // const nodeData = {
-    //   flightNo: this.infoData.flightNo,
-    //   flightDate: this.infoData.flightDate,
-    //   bagNo: this.infoData.bagNo,
-    // };
     // this.getNodeinfoes(nodeData);
     // this.getFulltrackinfoAndNodeInfoList(nodeData);
-    const id = 3666149457;
-    this.baggageDetails(id);
-    this.baggageTrack(id);
-    this.baggageDatas(id);
+    // const id = 3666149457;
+    this.baggageDetails(bagNo);
+    this.baggageTrack(bagNo);
+    this.baggageDatas(bagNo);
   },
   methods: {
     async getFulltrackinfoAndNodeInfoList(data) {
@@ -474,12 +470,10 @@ export default {
             this.departureAirport = result.returnData[0].departureAirport;
             this.landingAirport = result.returnData[0].landingAirport;
           }
-          result.returnData.forEach((item) => {
-            item["start"] = item.departureAirport + "\n" + item.departureTime;
-            item["end"] = item.landingAirport + "\n" + item.landingTime;
-            item["dealTime"] = item.dealTime.split("T")[1];
+          this.baggageTableData = result.returnData.map((item) => {
+            item["DealTime"] = item.DealTime.split("T")[1];
+            return item;
           });
-          this.baggageTableData = this._.cloneDeep(result.returnData);
           for (var i = 0; i < this.baggageTableData.length; i++) {
             if (i === 0) {
               this.spanArr.push(1);

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

@@ -25,7 +25,7 @@
         <el-table-column v-for="(item, index) in tableColsCopy" :prop="item.statCode" :label="item.statName" :key="index">
         </el-table-column>
       </el-table> -->
-      <el-table ref="table" max-height="100%" show-summary class="table" :data="tableData" border stripe height="calc(100vh - 155px)" style="width: 100%">
+      <el-table ref="table" max-height="100%" show-summary class="table" :data="tableData" border stripe height="calc(100vh - 155px)" style="width: 100%" @row-click="rowClickHandler">
         <el-table-column prop="FlightNO" label="航班号"></el-table-column>
         <el-table-column prop="FlightDate" label="航班日期"></el-table-column>
         <el-table-column prop="SourceAirport" label="起飞站"></el-table-column>
@@ -342,6 +342,10 @@ export default {
         this.dataContent.push(null);
       }
     },
+    // 表格行点击处理
+    rowClickHandler(row) {
+      this.$router.push({ path: '/advance/bag', query: row })
+    },
     //综合查询
     async integratedQuery (obj = {}) {
       try {

+ 4 - 5
src/views/baggageManagement/mixins/terminal.js

@@ -1,7 +1,7 @@
 /*
  * @Author: Badguy
  * @Date: 2022-03-04 11:41:55
- * @LastEditTime: 2022-03-15 16:20:08
+ * @LastEditTime: 2022-05-03 15:14:10
  * @LastEditors: your name
  * @Description: 航站视图通用部分
  * have a nice day!
@@ -97,13 +97,12 @@ export default {
               'bulk'
             ].includes(column.property)
           ) {
-            let values = data.map(item => Number(item[column.property]))
+            const values = data.map(item => Number(item[column.property]))
             if (values.some(value => !isNaN(value))) {
               sums[index] = values.reduce((prev, curr) => {
                 const value = Number(curr)
                 if (!isNaN(value)) {
-                  let num = Number(prev) + Number(curr)
-                  return num
+                  return Number(prev) + Number(curr)
                 } else {
                   return Number(prev)
                 }
@@ -112,7 +111,7 @@ export default {
               sums[index] = 0
             }
           } else {
-            //过滤某些字段不参与计算
+            // 过滤某些字段不参与计算
             sums[index] = '-'
           }
         })