浏览代码

运单跟踪节点排序

zhongxiaoyu 2 年之前
父节点
当前提交
4ce90ecf84

+ 1 - 1
src/views/realTime/components/WaybillView/index.vue

@@ -249,7 +249,7 @@ const { cellClickHandler } = useTableCellClick(`${props.name}Goods`)
         color: #101116;
         margin-bottom: 10px;
         &-span:not(:last-of-type) {
-          margin-right: 50px;
+          margin-right: 30px;
         }
       }
     }

+ 11 - 3
src/views/realTime/hooks/useTrackData.ts

@@ -1,6 +1,5 @@
 import { CSSProperties } from 'vue'
-import { CommonData, CommonValue, MaybeRef } from '~/common'
-import { Query } from '@/api/webApi'
+import { CommonData, MaybeRef } from '~/common'
 
 interface TrackNode {
   name: string
@@ -105,7 +104,7 @@ export default function useTrackData(
   const trackAirlines = ref<TrackAirline[]>([])
 
   const getTrackAirlines = () => {
-    trackAirlines.value = unref(trackData).reduce(
+    const airlines = unref(trackData).reduce(
       (
         airlines,
         {
@@ -216,6 +215,15 @@ export default function useTrackData(
       },
       [] as TrackAirline[]
     )
+    trackAirlines.value = airlines.map(airline => {
+      return {
+        ...airline,
+        airports:
+          name.includes('Departure') === airline.airports[0].isDeparture
+            ? airline.airports
+            : airline.airports.reverse(),
+      }
+    })
   }
 
   watch(trackData, () => {

+ 0 - 1
src/views/systemSettings/queryTemplate/index.vue

@@ -45,7 +45,6 @@ import Minheader from "@/components/minheader/index.vue";
 import Dialog from "@/components/dialog/index.vue";
 import { Query, GeneralDataReception } from "@/api/webApi";
 import { ElMessage } from "element-plus";
-import { el } from "element-plus/es/locale";
 const width = ref("200px");
 const router = useRouter();
 const dataId = ref<String>("4"); //请求id