Browse Source

航班节点显示修改

zhongxiaoyu 2 years ago
parent
commit
f885c1ee2b
5 changed files with 27 additions and 1 deletions
  1. 2 0
      index.html
  2. 20 0
      public/nodeCode.js
  3. 3 0
      src/views/realTime/components/FlightView/index.vue
  4. 1 0
      typings/global.d.ts
  5. 1 1
      vite.config.ts

+ 2 - 0
index.html

@@ -6,9 +6,11 @@
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
     <title><%= title %></title>
     <%- injectScript %>
+    <script src="./configLoader.js"></script>
   </head>
   <body>
     <div id="app"></div>
+    <script src="./nodeCode.js"></script>
     <script type="module" src="/src/main.ts"></script>
   </body>
 </html>

+ 20 - 0
public/nodeCode.js

@@ -0,0 +1,20 @@
+window.NODE_CODE = {
+  NEW: '获取运单',
+  DEH: '收运核单',
+  ACC_CHECK: '查验',
+  ACC_BUP: '加货',
+  LS_CARGO: '预配载',
+  CARGOS_HANDOVER_STATUS_02: '货站交接',
+  CARGOS_HANDOVER_STATUS_03: '运输前复核',
+  出港货邮: '机下交接',
+  装载完成: '装机完成',
+  关货舱门: '关货舱门',
+  CARGOS_OFFLOAD: '拉下登记',
+  OFFLOAD_CONFIRM: '拉下确认',
+  BILL_RETURN: '退运',
+  CARGOS_ARR_HANDOVER: '卸机',
+  CARGOS_HANDOVER_STATUS_01: '机下交接',
+  CARGOS_HANDOVER_STATUS_99: '货站交接',
+  IMP_TALLY: '理货',
+  FSU_DLV: '出库',
+}

+ 3 - 0
src/views/realTime/components/FlightView/index.vue

@@ -163,6 +163,9 @@ const tableFormatter: CommonTableFormatter = (
   ) {
     return value.slice(5, -3).replace('T', '\n')
   }
+  if (column.property === 'nodeCode') {
+    return NODE_CODE[value] ?? ''
+  }
   return value
 }
 

+ 1 - 0
typings/global.d.ts

@@ -11,6 +11,7 @@ declare global {
   declare var LOOP_INTERVAL: any
   declare var DATACONTENT_ID: any
   declare var SERVICE_ID: any
+  declare var NODE_CODE: any
 }
 
 export {}

+ 1 - 1
vite.config.ts

@@ -147,7 +147,7 @@ export default ({ command, mode }: any) => {
           // Inject data into ejs template
           data: {
             title: setting.title,
-            injectScript: `<script src="./baseConfig.js"></script><script src="./configLoader.js"></script>`,
+            injectScript: `<script src="./baseConfig.js"></script>`,
           },
         },
       }),