浏览代码

行李视图节点信息修改、config.js加载修改

zhongxiaoyu 2 年之前
父节点
当前提交
9496d2215d

+ 14 - 8
public/configLoader.js

@@ -1,9 +1,15 @@
-const config = document.createElement('script')
-config.id = 'configJS'
-config.src = 'config.js'
-config.type = 'text/javascript'
-document.head.appendChild(config)
-setInterval(function () {
-  document.head.removeChild(document.getElementById('configJS'))
+if (!window.configLoadLoop) {
+  const config = document.createElement('script')
+  config.id = 'configJS'
+  config.type = 'text/javascript'
+  config.src = './config.js?t=' + new Date().getTime()
   document.head.appendChild(config)
-}, 60 * 1000)
+  window.configLoadLoop = setInterval(function () {
+    document.head.removeChild(document.getElementById('configJS'))
+    const config = document.createElement('script')
+    config.id = 'configJS'
+    config.type = 'text/javascript'
+    config.src = './config.js?t=' + new Date().getTime()
+    document.head.appendChild(config)
+  }, 60 * 1000)
+}

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

@@ -150,7 +150,7 @@
           <el-form-item v-is="['is_columnSettings']">
             <img
               class="btn-img btn-shadow"
-              src="../../../../assets/baggage/ic_setting.png"
+              src="@/assets/baggage/ic_setting.png"
               title="列设置"
               @click="show"
             >
@@ -158,7 +158,7 @@
           <el-form-item v-is="['dm_dt_columnSettings']">
             <img
               class="btn-img btn-shadow"
-              src="../../../../assets/baggage/ic_export.png"
+              src="@/assets/baggage/ic_export.png"
               title="导出"
               @click="exportHandler('table', '航站进港列表')"
             >

+ 37 - 9
src/views/baggageManagement/components/baggage/index.vue

@@ -84,9 +84,9 @@
               <span class="step-name">{{ item.nodeName }}</span>
             </div>
             <div class="step-info">
-              <!-- <div class="step-status">{{ item.status }}</div> -->
+              <div :class="statusClasses(item.status)">{{ item.status }}</div>
               <span class="step-time">{{ item.processingTime }}</span>
-              <!-- <div class="step-location">{{ item.location }}</div> -->
+              <div class="step-location">{{ item.locationId }}</div>
             </div>
           </div>
         </div>
@@ -94,13 +94,13 @@
       <div class="btns">
         <img
           class="btn-square btn-shadow"
-          src="../../../../assets/baggage/ic_export.png"
+          src="@/assets/baggage/ic_export.png"
           title="导出"
           @click="exportHandler('table', '行李节点列表')"
         >
         <img
           class="btn-square btn-shadow"
-          src="../../../../assets/baggage/ic_setting.png"
+          src="@/assets/baggage/ic_setting.png"
           title="列设置"
           @click="show"
         >
@@ -157,7 +157,7 @@
         <div class="btns">
           <img
             class="btn-square btn-shadow"
-            src="../../../../assets/baggage/ic_export.png"
+            src="@/assets/baggage/ic_export.png"
             title="导出"
             @click="exportMessageToExcel"
           >
@@ -404,6 +404,19 @@ export default {
         return this.stepNodes[index].processingTime && this.stepNodes[index + 1].processingTime
       }
     },
+    statusClasses() {
+      return function (status) {
+        const classes = ['step-status']
+        if (typeof status === 'string') {
+          if (status.includes('正常') || status.includes('通过')) {
+            classes.push('step-status-normal')
+          } else {
+            classes.push('step-status-abnormal')
+          }
+        }
+        return classes
+      }
+    },
     formattedBaggageInfo() {
       return function (prop) {
         const value = this.baggageBasicInfo[prop]
@@ -481,6 +494,9 @@ export default {
     this.basicInfoHeight = this.$refs['basicInfo'].offsetHeight
     this.$refs['table']?.doLayout()
   },
+  beforeDestroy() {
+    this.stopLoopAll()
+  },
   methods: {
     startQueryDetails() {
       this.queryDetails()
@@ -714,7 +730,7 @@ export default {
       try {
         const result = await this.queryBaggageTrack(this.selectedAirline.split(','))
         this.resetStepNodes()
-        result.forEach(({ nodeCode, nodeName, processingTime }) => {
+        result.forEach(({ nodeCode, nodeName, processingTime, locationId, status }) => {
           const replaceIndex = this.stepNodes.findIndex(
             stepNode => stepNode.nodeCode === nodeCode || isSameStep(stepNode.nodeCode, nodeCode)
           )
@@ -722,7 +738,9 @@ export default {
             this.stepNodes.splice(replaceIndex, 1, {
               nodeCode,
               nodeName,
-              processingTime: processingTime.replace('T', '\n')
+              processingTime: processingTime.replace('T', '\n'),
+              locationId,
+              status
             })
           }
         })
@@ -878,7 +896,7 @@ export default {
         width: 80px;
         height: 100%;
         text-align: center;
-        font-size: 12px;
+        font-size: 14px;
         display: flex;
         flex-direction: column;
         align-items: center;
@@ -899,9 +917,19 @@ export default {
         .step-info {
           margin-top: 15px;
           color: #101116;
-          line-height: 1;
+          line-height: 22px;
+          .step-status {
+            &-normal {
+              color: #4ab36f;
+            }
+            &-abnormal {
+              color: #e9af4b;
+            }
+          }
           .step-time {
             white-space: pre-line;
+            font-size: 12px;
+            line-height: 20px;
           }
         }
         &.active-item .step-circle {

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

@@ -150,7 +150,7 @@
           <el-form-item v-is="['dm_dt_columnSettings']">
             <img
               class="btn-img btn-shadow"
-              src="../../../../assets/baggage/ic_setting.png"
+              src="@/assets/baggage/ic_setting.png"
               title="列设置"
               @click="show"
             >
@@ -158,7 +158,7 @@
           <el-form-item v-is="['dm_dt_columnSettings']">
             <img
               class="btn-img btn-shadow"
-              src="../../../../assets/baggage/ic_export.png"
+              src="@/assets/baggage/ic_export.png"
               title="导出"
               @click="exportHandler('table', '航站离港列表')"
             >

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

@@ -142,7 +142,7 @@
           <el-form-item v-is="['dm_dt_columnSettings']">
             <img
               class="btn-img btn-shadow"
-              src="../../../../assets/baggage/ic_setting.png"
+              src="@/assets/baggage/ic_setting.png"
               title="列设置"
               @click="show"
             >
@@ -150,7 +150,7 @@
           <el-form-item v-is="['dm_dt_columnSettings']">
             <img
               class="btn-img btn-shadow"
-              src="../../../../assets/baggage/ic_export.png"
+              src="@/assets/baggage/ic_export.png"
               title="导出"
               @click="exportHandler('table', '航站离港列表')"
             >

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

@@ -278,7 +278,7 @@
           <span class="manageTitle">航班容器列表</span>
           <img
             class="btn-square btn-shadow"
-            src="../../../../assets/baggage/ic_export.png"
+            src="@/assets/baggage/ic_export.png"
             title="导出"
             @click="exportHandler('containerTable', '航班容器列表')"
           >
@@ -390,13 +390,13 @@
           <TimeZoneSelector />
           <img
             class="btn-square btn-shadow"
-            src="../../../../assets/baggage/ic_export.png"
+            src="@/assets/baggage/ic_export.png"
             title="导出"
             @click="exportHandler('flightBaggageTable', '航班行李列表')"
           >
           <img
             class="btn-square btn-shadow"
-            src="../../../../assets/baggage/ic_setting.png"
+            src="@/assets/baggage/ic_setting.png"
             title="列设置"
             @click="show"
           >

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

@@ -190,7 +190,7 @@
           <el-form-item v-is="['ti_columnSettings']">
             <img
               class="btn-img btn-shadow"
-              src="../../../../assets/baggage/ic_setting.png"
+              src="@/assets/baggage/ic_setting.png"
               title="列设置"
               @click="show"
             >
@@ -198,7 +198,7 @@
           <el-form-item v-is="['dm_dt_columnSettings']">
             <img
               class="btn-img btn-shadow"
-              src="../../../../assets/baggage/ic_export.png"
+              src="@/assets/baggage/ic_export.png"
               title="导出"
               @click="exportHandler('table', '航站中转进港列表')"
             >

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

@@ -188,7 +188,7 @@
           <el-form-item v-is="['td_columnSettings']">
             <img
               class="btn-img btn-shadow"
-              src="../../../../assets/baggage/ic_setting.png"
+              src="@/assets/baggage/ic_setting.png"
               title="列设置"
               @click="show"
             >
@@ -196,7 +196,7 @@
           <el-form-item v-is="['dm_dt_columnSettings']">
             <img
               class="btn-img btn-shadow"
-              src="../../../../assets/baggage/ic_export.png"
+              src="@/assets/baggage/ic_export.png"
               title="导出"
               @click="exportHandler('table', '航站中转进港列表')"
             >