浏览代码

航班视图、行李视图修改

zhongxiaoyu 2 年之前
父节点
当前提交
090b810168

+ 3 - 1
.eslintrc.js

@@ -11,7 +11,9 @@ module.exports = {
   },
   extends: ['plugin:vue/recommended', 'eslint:recommended'],
   globals: {
-    'DATACONTENT_ID': 'readonly'
+    'DATACONTENT_ID': 'readonly',
+    'SERVICE_ID': 'readonly',
+    'LOOP_INTERVAL': 'readonly'
   },
 
   // add your custom rules here

+ 28 - 25
src/views/baggageManagement/components/baggage/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2022-01-17 10:39:22
- * @LastEditTime: 2022-06-30 09:46:18
+ * @LastEditTime: 2022-08-12 19:14:09
  * @LastEditors: your name
  * @Description: 行李视图
 -->
@@ -295,7 +295,7 @@ export default {
           prop: 'frequentFlyerClass'
         },
         {
-          label: '是否取消值机',
+          label: '取消值机',
           prop: 'whetherToCancelTheCheckIn'
         },
         {
@@ -407,24 +407,27 @@ export default {
     formattedBaggageInfo() {
       return function (prop) {
         const value = this.baggageBasicInfo[prop]
-        switch (prop) {
-          case 'transitSign':
-            return Number(value) === 1 ? '中转' : '非中转'
-          case 'activeState':
-            return value === 'A' ? '激活' : '未激活'
-          case 'whetherToCancelTheCheckIn':
-            return Number(value) === 1 ? '取消' : ''
-          case 'isItLoadable':
-          case 'isItTransportable':
-          case 'activeState':
-          case 'noBSM':
-          case 'expressSign':
-          case 'brokenSign':
-          case 'complaintSign':
-          case 'compensationSign':
-            return Number(value) === 1 || value === 'Y' ? '是' : '否'
-          default:
-            return (value ?? '') === '' ? '' : value
+        if ((value ?? '') === '') {
+          return ''
+        } else {
+          switch (prop) {
+            case 'transitSign':
+              return Number(value) === 0 ? '非中转' : '中转'
+            case 'activeState':
+              return Number(value) === 0 ? '未激活' : '激活'
+            case 'whetherToCancelTheCheckIn':
+              return Number(value) === 1 ? '取消' : ''
+            case 'isItLoadable':
+            case 'isItTransportable':
+            case 'noBSM':
+            case 'expressSign':
+            case 'brokenSign':
+            case 'complaintSign':
+            case 'compensationSign':
+              return Number(value) === 1 || value === 'Y' ? '是' : '否'
+            default:
+              return value
+          }
         }
       }
     }
@@ -704,13 +707,13 @@ export default {
       }
     },
     async queryTrack() {
+      function isSameStep(code1, code2) {
+        const sameStepCodes = ['ARRIVED', 'TRANSFER']
+        return sameStepCodes.includes(code1) && sameStepCodes.includes(code2)
+      }
       try {
         const result = await this.queryBaggageTrack(this.selectedAirline.split(','))
         this.resetStepNodes()
-        function isSameStep(code1, code2) {
-          const sameStepCodes = ['ARRIVED', 'TRANSFER']
-          return sameStepCodes.includes(code1) && sameStepCodes.includes(code2)
-        }
         result.forEach(({ nodeCode, nodeName, processingTime }) => {
           const replaceIndex = this.stepNodes.findIndex(
             stepNode => stepNode.nodeCode === nodeCode || isSameStep(stepNode.nodeCode, nodeCode)
@@ -863,7 +866,7 @@ export default {
         margin: auto;
         display: flex;
         .step-line-segment {
-          width: 1 / 6 * 100%;
+          width: calc(100% / 6);
           height: 100%;
           background: #afb4bf;
           &.step-line-active {

+ 2 - 2
src/views/baggageManagement/components/flight/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2022-01-17 10:39:22
- * @LastEditTime: 2022-08-09 17:52:42
+ * @LastEditTime: 2022-08-12 18:59:39
  * @LastEditors: your name
  * @Description: 航班视图
 -->
@@ -544,7 +544,7 @@ export default {
         { label: '容器编号', prop: 'containerNumber', width: 100 },
         { label: '类型', prop: 'style' },
         { label: '行李数', prop: 'numberOfBags' },
-        { label: '位', prop: 'containerSpace' }
+        { label: '位', prop: 'containerSpace' }
       ],
       // transferInTableColumn: [
       //   { label: '航班号', prop: 'preFlightNO' },