瀏覽代碼

航班视图修改

zhongxiaoyu 2 年之前
父節點
當前提交
c2411c8abd

+ 19 - 0
src/components/KeepAliveRouterView/index.tsx

@@ -0,0 +1,19 @@
+import { KeepAlive } from 'vue'
+import { RouterView } from 'vue-router'
+
+export default function (name: string) {
+  return defineComponent({
+    name,
+    setup() {
+      return () => (
+        <RouterView>
+          {({ Component }) => (
+            <KeepAlive>
+              <Component />
+            </KeepAlive>
+          )}
+        </RouterView>
+      )
+    },
+  })
+}

+ 81 - 53
src/layout/components/AppMain.vue

@@ -2,7 +2,11 @@
   <div class="app-main" :class="{ 'show-tag-view': settings.showTagsView }">
     <router-view v-slot="{ Component }">
       <!--has transition  Judging by settings.mainNeedAnimation-->
-      <transition v-if="settings.mainNeedAnimation" name="fade-transform" mode="out-in">
+      <transition
+        v-if="settings.mainNeedAnimation"
+        name="fade-transform"
+        mode="out-in"
+      >
         <keep-alive :include="cachedViews">
           <component :is="Component" :key="key" />
         </keep-alive>
@@ -24,7 +28,7 @@ const settings = computed(() => {
   return appStore.settings
 })
 
-const key = computed(() => route.path)
+const key = computed(() => route.fullPath)
 
 const cachedViews = computed(() => {
   return appStore.cachedViews
@@ -37,74 +41,96 @@ let oldRoute: ObjTy = {}
 let deepOldRouter: ObjTy | null = null
 
 const appStore = useAppStore()
-const removeDeepChildren = (deepOldRouter) => {
-  deepOldRouter.children?.forEach((fItem) => {
+const removeDeepChildren = deepOldRouter => {
+  deepOldRouter.children?.forEach(fItem => {
     appStore.M_DEL_CACHED_VIEW_DEEP(fItem.name)
   })
 }
 
 watch(
-  () => route.name,
-  () => {
-    const routerLevel = route.matched.length
-    //二级路由处理
-    if (routerLevel === 2) {
-      if (deepOldRouter?.name) {
-        if (deepOldRouter.meta?.leaveRmCachePage && deepOldRouter.meta?.cachePage) {
-          appStore.M_DEL_CACHED_VIEW(deepOldRouter.name)
-          //remove the deepOldRouter‘s children component
-          removeDeepChildren(deepOldRouter)
-        }
-      } else {
-        if (oldRoute?.name) {
-          if (oldRoute.meta?.leaveRmCachePage && oldRoute.meta?.cachePage) {
-            appStore.M_DEL_CACHED_VIEW(oldRoute.name)
+  route,
+  (to, from) => {
+    if (from?.matched[0].name === 'RealTime') {
+      if (to.matched[1].name !== from.matched[1].name) {
+        appStore.M_DEL_CACHED_VIEW_ALL()
+      } else if (to.matched.length < from.matched.length) {
+        appStore.M_DEL_CACHED_VIEW(from.name)
+      }
+    }
+    if (to.matched[0].name === 'RealTime') {
+      if (to.meta.keepAlive) {
+        // appStore.M_ADD_CACHED_VIEW_ALL(to.matched.map(route => route.name))
+        appStore.M_ADD_CACHED_VIEW(to.name)
+      }
+    } else {
+      const routerLevel = route.matched.length
+      //二级路由处理
+      if (routerLevel === 2) {
+        if (deepOldRouter?.name) {
+          if (
+            deepOldRouter.meta?.leaveRmCachePage &&
+            deepOldRouter.meta?.cachePage
+          ) {
+            appStore.M_DEL_CACHED_VIEW(deepOldRouter.name)
+            //remove the deepOldRouter‘s children component
+            removeDeepChildren(deepOldRouter)
+          }
+        } else {
+          if (oldRoute?.name) {
+            if (oldRoute.meta?.leaveRmCachePage && oldRoute.meta?.cachePage) {
+              appStore.M_DEL_CACHED_VIEW(oldRoute.name)
+            }
           }
         }
-      }
 
-      if (route.name) {
-        if (route.meta?.cachePage) {
-          appStore.M_ADD_CACHED_VIEW(route.name)
+        if (route.name) {
+          if (route.meta?.cachePage) {
+            appStore.M_ADD_CACHED_VIEW(route.name)
+          }
         }
+        deepOldRouter = null
       }
-      deepOldRouter = null
-    }
 
-    //三级路由处理
-    if (routerLevel === 3) {
-      //三级时存储当前路由对象的上一级
-      const parentRoute = route.matched[1]
-      //deepOldRouter不为空,且deepOldRouter不是当前路由的父对象,则需要清除deepOldRouter缓存
-      //一般为三级路由跳转三级路由的情况
-      if (deepOldRouter?.name && deepOldRouter.name !== parentRoute.name) {
-        if (deepOldRouter.meta?.leaveRmCachePage && deepOldRouter.meta?.cachePage) {
-          appStore.M_DEL_CACHED_VIEW(deepOldRouter.name)
-          //remove the deepOldRouter‘s children component
-          removeDeepChildren(deepOldRouter)
-        }
-      } else {
-        //否则走正常两级路由处理流程
-        if (oldRoute?.name) {
-          if (oldRoute.meta?.leaveRmCachePage && oldRoute.meta?.cachePage) {
-            appStore.M_DEL_CACHED_VIEW_DEEP(oldRoute.name)
+      //三级路由处理
+      if (routerLevel === 3) {
+        //三级时存储当前路由对象的上一级
+        const parentRoute = route.matched[1]
+        //deepOldRouter不为空,且deepOldRouter不是当前路由的父对象,则需要清除deepOldRouter缓存
+        //一般为三级路由跳转三级路由的情况
+        if (deepOldRouter?.name && deepOldRouter.name !== parentRoute.name) {
+          if (
+            deepOldRouter.meta?.leaveRmCachePage &&
+            deepOldRouter.meta?.cachePage
+          ) {
+            appStore.M_DEL_CACHED_VIEW(deepOldRouter.name)
+            //remove the deepOldRouter‘s children component
+            removeDeepChildren(deepOldRouter)
+          }
+        } else {
+          //否则走正常两级路由处理流程
+          if (oldRoute?.name) {
+            if (oldRoute.meta?.leaveRmCachePage && oldRoute.meta?.cachePage) {
+              appStore.M_DEL_CACHED_VIEW_DEEP(oldRoute.name)
+            }
           }
         }
-      }
 
-      //取的是第二级的name
-      if (parentRoute.name && parentRoute.meta?.cachePage) {
-        deepOldRouter = parentRoute
-        appStore.M_ADD_CACHED_VIEW(deepOldRouter.name)
-        if (route.name) {
-          if (route.meta?.cachePage) {
-            //和第三级的name进行缓存
-            appStore.M_ADD_CACHED_VIEW_DEEP(route.name)
+        //取的是第二级的name
+        if (parentRoute.name && parentRoute.meta?.cachePage) {
+          deepOldRouter = parentRoute
+          appStore.M_ADD_CACHED_VIEW(deepOldRouter.name)
+          if (route.name) {
+            if (route.meta?.cachePage) {
+              //和第三级的name进行缓存
+              appStore.M_ADD_CACHED_VIEW_DEEP(route.name)
+            }
           }
         }
       }
+      oldRoute = JSON.parse(
+        JSON.stringify({ name: route.name, meta: route.meta })
+      )
     }
-    oldRoute = JSON.parse(JSON.stringify({ name: route.name, meta: route.meta }))
   },
   { immediate: true }
 )
@@ -119,7 +145,9 @@ watch(
   background-color: #dfe3ea;
 }
 .show-tag-view {
-  height: calc(100vh - #{var(--nav-bar-height)} - #{var(--tag-view-height)}) !important;
+  height: calc(
+    100vh - #{var(--nav-bar-height)} - #{var(--tag-view-height)}
+  ) !important;
 }
 .fixed-header + .app-main {
   padding-top: 50px;

+ 21 - 18
src/router/index.ts

@@ -74,26 +74,29 @@ const router: Router = createRouter({
 
 router.beforeEach((to, from, next) => {
   const { savedPages, savePage } = useKeepAlive()
-
-  if (
-    typeof from.name === 'string' &&
-    ((from.name.includes('FlightView') &&
-      from.query.flightNO &&
-      from.query.flightDate) ||
-      (from.name.includes('WaybillView') && from.query.waybillNO))
-  ) {
-    savePage(from as Page)
+  if (from.matched?.[0]?.name === 'RealTime') {
+    if (
+      typeof from.name === 'string' &&
+      ((from.name.includes('FlightView') &&
+        from.query.flightNO &&
+        from.query.flightDate) ||
+        (from.name.includes('WaybillView') && from.query.waybillNO))
+    ) {
+      savePage(from as Page)
+    }
   }
 
-  if (
-    typeof to.name === 'string' &&
-    ((to.name.includes('FlightView') &&
-      (!to.query.flightNO || !to.query.flightDate)) ||
-      (to.name.includes('WaybillView') && !to.query.waybillNO))
-  ) {
-    const savedPage = savedPages.find(savedPage => savedPage.name === to.name)
-    if (savedPage) {
-      next(savedPage.fullPath)
+  if (to.matched?.[0]?.name === 'RealTime') {
+    if (
+      typeof to.name === 'string' &&
+      ((to.name.includes('FlightView') &&
+        (!to.query.flightNO || !to.query.flightDate)) ||
+        (to.name.includes('WaybillView') && !to.query.waybillNO))
+    ) {
+      const savedPage = savedPages.find(savedPage => savedPage.name === to.name)
+      if (savedPage) {
+        next(savedPage.fullPath)
+      }
     }
   }
 

+ 38 - 58
src/router/routes/routes-file-six.ts

@@ -1,11 +1,11 @@
 import Layout from '@/layout'
-import { h, resolveComponent } from 'vue'
+import KeepAliveRouterView from '@/components/KeepAliveRouterView'
+// import { h, resolveComponent } from 'vue'
 
 const ActualTimeRoutes = {
   path: '/realTime',
   component: Layout,
-  name: 'realTime',
-  redirect: '/realTime/departure',
+  name: 'RealTime',
   //using el svg icon, the elSvgIcon first when at the same time using elSvgIcon and icon
   meta: {
     title: '综合可视化',
@@ -17,29 +17,23 @@ const ActualTimeRoutes = {
     {
       path: '/realTime/departure',
       name: 'Departure',
-      redirect: '/realTime/departure/airport',
       meta: {
         title: '国内出港',
         breadcrumb: false,
         roles: ['view_of_domestic_departure_termina_page'],
       },
-      component: {
-        render: () => h(resolveComponent('router-view')),
-      },
+      component: KeepAliveRouterView('Departure'),
       children: [
         {
           path: '/realTime/departure/airport',
           name: 'DepartureAirport',
-          meta: {
-            title: '国内出港航站视图',
-          },
-          component: {
-            render: () => h(resolveComponent('router-view')),
-          },
+          meta: { title: '国内出港航站视图' },
+          component: KeepAliveRouterView('DepartureAirport'),
           children: [
             {
               path: '/realTime/departure/airport',
               name: 'DepartureAirportView',
+              meta: { keepAlive: true },
               component: () =>
                 import('@/views/realTime/departure/airport/index.vue'),
             },
@@ -49,13 +43,12 @@ const ActualTimeRoutes = {
               meta: {
                 title: '国内出港航班视图',
               },
-              component: {
-                render: () => h(resolveComponent('router-view')),
-              },
+              component: KeepAliveRouterView('DepartureFlight'),
               children: [
                 {
                   path: '/realTime/departure/flight',
                   name: 'DepartureFlightView',
+                  meta: { keepAlive: true },
                   component: () =>
                     import('@/views/realTime/departure/flight/index.vue'),
                 },
@@ -65,13 +58,12 @@ const ActualTimeRoutes = {
                   meta: {
                     title: '国内出港运单视图',
                   },
-                  component: {
-                    render: () => h(resolveComponent('router-view')),
-                  },
+                  component: KeepAliveRouterView('DepartureWaybill'),
                   children: [
                     {
                       path: '/realTime/departure/waybill',
                       name: 'DepartureWaybillView',
+                      meta: { keepAlive: true },
                       component: () =>
                         import('@/views/realTime/departure/waybill/index.vue'),
                     },
@@ -80,6 +72,7 @@ const ActualTimeRoutes = {
                       name: 'DepartureGoods',
                       meta: {
                         title: '国内出港货物视图',
+                        keepAlive: true,
                       },
                       component: () =>
                         import('@/views/realTime/departure/goods/index.vue'),
@@ -95,27 +88,23 @@ const ActualTimeRoutes = {
     {
       path: '/realTime/internationalDeparture',
       name: 'InternationalDeparture',
-      redirect: '/realTime/internationalDeparture/airport',
       meta: {
         title: '国际出港',
         roles: ['view_of_international_departure_terminal_page'],
         breadcrumb: false,
       },
-      component: {
-        render: () => h(resolveComponent('router-view')),
-      },
+      component: KeepAliveRouterView('InternationalDeparture'),
       children: [
         {
           path: '/realTime/internationalDeparture/airport',
           name: 'InternationalDepartureAirport',
           meta: { title: '国际出港航站视图' },
-          component: {
-            render: () => h(resolveComponent('router-view')),
-          },
+          component: KeepAliveRouterView('InternationalDepartureAirport'),
           children: [
             {
               path: '/realTime/internationalDeparture/airport',
               name: 'InternationalDepartureAirportView',
+              meta: { keepAlive: true },
               component: () =>
                 import(
                   '@/views/realTime/internationalDeparture/airport/index.vue'
@@ -127,13 +116,12 @@ const ActualTimeRoutes = {
               meta: {
                 title: '国际出港航班视图',
               },
-              component: {
-                render: () => h(resolveComponent('router-view')),
-              },
+              component: KeepAliveRouterView('InternationalDepartureFlight'),
               children: [
                 {
                   path: '/realTime/internationalDeparture/flight',
                   name: 'InternationalDepartureFlightView',
+                  meta: { keepAlive: true },
                   component: () =>
                     import(
                       '@/views/realTime/internationalDeparture/flight/index.vue'
@@ -145,13 +133,14 @@ const ActualTimeRoutes = {
                   meta: {
                     title: '国际出港运单视图',
                   },
-                  component: {
-                    render: () => h(resolveComponent('router-view')),
-                  },
+                  component: KeepAliveRouterView(
+                    'InternationalDepartureWaybill'
+                  ),
                   children: [
                     {
                       path: '/realTime/internationalDeparture/waybill',
                       name: 'InternationalDepartureWaybillView',
+                      meta: { keepAlive: true },
                       component: () =>
                         import(
                           '@/views/realTime/internationalDeparture/waybill/index.vue'
@@ -162,6 +151,7 @@ const ActualTimeRoutes = {
                       name: 'InternationalDepartureGoods',
                       meta: {
                         title: '国际出港货物视图',
+                        keepAlive: true,
                       },
                       component: () =>
                         import(
@@ -179,27 +169,23 @@ const ActualTimeRoutes = {
     {
       path: '/realTime/arrival',
       name: 'Arrival',
-      redirect: '/realTime/arrival/airport',
       meta: {
         title: '国内进港',
         roles: ['view_of_domestic_inbound_termina_page'],
         breadcrumb: false,
       },
-      component: {
-        render: () => h(resolveComponent('router-view')),
-      },
+      component: KeepAliveRouterView('Arrival'),
       children: [
         {
           path: '/realTime/arrival/airport',
           name: 'ArrivalAirport',
           meta: { title: '国内进港航站视图' },
-          component: {
-            render: () => h(resolveComponent('router-view')),
-          },
+          component: KeepAliveRouterView('ArrivalAirport'),
           children: [
             {
               path: '/realTime/arrival/airport',
               name: 'ArrivalAirportView',
+              meta: { keepAlive: true },
               component: () =>
                 import('@/views/realTime/arrival/airport/index.vue'),
             },
@@ -209,13 +195,12 @@ const ActualTimeRoutes = {
               meta: {
                 title: '国内进港航班视图',
               },
-              component: {
-                render: () => h(resolveComponent('router-view')),
-              },
+              component: KeepAliveRouterView('ArrivalFlight'),
               children: [
                 {
                   path: '/realTime/arrival/flight',
                   name: 'ArrivalFlightView',
+                  meta: { keepAlive: true },
                   component: () =>
                     import('@/views/realTime/arrival/flight/index.vue'),
                 },
@@ -225,13 +210,12 @@ const ActualTimeRoutes = {
                   meta: {
                     title: '国内进港运单视图',
                   },
-                  component: {
-                    render: () => h(resolveComponent('router-view')),
-                  },
+                  component: KeepAliveRouterView('ArrivalWaybill'),
                   children: [
                     {
                       path: '/realTime/arrival/waybill',
                       name: 'ArrivalWaybillView',
+                      meta: { keepAlive: true },
                       component: () =>
                         import('@/views/realTime/arrival/waybill/index.vue'),
                     },
@@ -240,6 +224,7 @@ const ActualTimeRoutes = {
                       name: 'ArrivalGoods',
                       meta: {
                         title: '国内进港货物视图',
+                        keepAlive: true,
                       },
                       component: () =>
                         import('@/views/realTime/arrival/goods/index.vue'),
@@ -255,27 +240,23 @@ const ActualTimeRoutes = {
     {
       path: '/realTime/internationalArrival',
       name: 'InternationalArrival',
-      redirect: '/realTime/internationalArrival/airport',
       meta: {
         title: '国际进港',
         roles: ['view_of_international_inbound_terminal_page'],
         breadcrumb: false,
       },
-      component: {
-        render: () => h(resolveComponent('router-view')),
-      },
+      component: KeepAliveRouterView('InternationalArrival'),
       children: [
         {
           path: '/realTime/internationalArrival/airport',
           name: 'InternationalArrivalAirport',
           meta: { title: '国际进港航站视图' },
-          component: {
-            render: () => h(resolveComponent('router-view')),
-          },
+          component: KeepAliveRouterView('InternationalArrivalAirport'),
           children: [
             {
               path: '/realTime/internationalArrival/airport',
               name: 'InternationalArrivalAirportView',
+              meta: { keepAlive: true },
               component: () =>
                 import(
                   '@/views/realTime/internationalArrival/airport/index.vue'
@@ -287,13 +268,12 @@ const ActualTimeRoutes = {
               meta: {
                 title: '国际进港航班视图',
               },
-              component: {
-                render: () => h(resolveComponent('router-view')),
-              },
+              component: KeepAliveRouterView('InternationalArrivalFlight'),
               children: [
                 {
                   path: '/realTime/internationalArrival/flight',
                   name: 'InternationalArrivalFlightView',
+                  meta: { keepAlive: true },
                   component: () =>
                     import(
                       '@/views/realTime/internationalArrival/flight/index.vue'
@@ -305,13 +285,12 @@ const ActualTimeRoutes = {
                   meta: {
                     title: '国际进港运单视图',
                   },
-                  component: {
-                    render: () => h(resolveComponent('router-view')),
-                  },
+                  component: KeepAliveRouterView('InternationalArrivalWaybill'),
                   children: [
                     {
                       path: '/realTime/internationalArrival/waybill',
                       name: 'InternationalArrivalWaybillView',
+                      meta: { keepAlive: true },
                       component: () =>
                         import(
                           '@/views/realTime/internationalArrival/waybill/index.vue'
@@ -322,6 +301,7 @@ const ActualTimeRoutes = {
                       name: 'InternationalArrivalGoods',
                       meta: {
                         title: '国际进港货物视图',
+                        keepAlive: true,
                       },
                       component: () =>
                         import(

+ 11 - 1
src/store/app.ts

@@ -62,7 +62,17 @@ export const useAppStore = defineStore('app', {
         index > -1 && state.cachedViewsDeep.splice(index, 1)
       })
     },
-
+    M_ADD_CACHED_VIEW_ALL(views) {
+      views.forEach(view => {
+        this.M_ADD_CACHED_VIEW(view)
+      })
+    },
+    M_DEL_CACHED_VIEW_ALL() {
+      this.$patch(state => {
+        state.cachedViews.length = 0
+        state.cachedViewsDeep.length = 0
+      })
+    },
     A_sidebar_opened(data: boolean) {
       this.M_sidebar_opened(data)
     }

+ 0 - 1
src/store/keepAlive.ts

@@ -1,5 +1,4 @@
 import { defineStore } from 'pinia'
-import { LocationQuery } from 'vue-router'
 
 export type Page = {
   name: string

+ 20 - 4
src/views/realTime/components/AirportView/AirportForm.vue

@@ -25,7 +25,11 @@
       />
     </el-form-item>
     <el-form-item :prop="formData.flightStatus" style="width: 104px">
-      <el-select v-model="formData.flightStatus" size="default" :clearable="false">
+      <el-select
+        v-model="formData.flightStatus"
+        size="default"
+        :clearable="false"
+      >
         <el-option
           v-for="option in flightStatusOptions"
           :key="option.value"
@@ -35,7 +39,11 @@
       </el-select>
     </el-form-item>
     <el-form-item :prop="formData.flightWarning" style="width: 104px">
-      <el-select v-model="formData.flightWarning" size="default" :clearable="false">
+      <el-select
+        v-model="formData.flightWarning"
+        size="default"
+        :clearable="false"
+      >
         <el-option
           v-for="option in flightWarningOptions"
           :key="option.value"
@@ -44,8 +52,16 @@
         />
       </el-select>
     </el-form-item>
-    <el-form-item v-if="name.includes('International')" :prop="formData.waybillType" style="width: 104px">
-      <el-select v-model="formData.waybillType" size="default" :clearable="false">
+    <el-form-item
+      v-if="name.includes('International')"
+      :prop="formData.waybillType"
+      style="width: 104px"
+    >
+      <el-select
+        v-model="formData.waybillType"
+        size="default"
+        :clearable="false"
+      >
         <el-option
           v-for="option in waybillTypeOptions"
           :key="option.value"

+ 6 - 6
src/views/realTime/components/AirportView/useAirportTable.ts

@@ -169,7 +169,7 @@ const columnGroupsMap: {
           columnName: 'planeDown',
           columnLabel: '机下交接\n(板卡/件)',
           columnDescribe: '根据运输前复核计算所得',
-    },
+        },
         {
           columnName: 'planeDownTime',
           columnLabel: '机下交接\n时间',
@@ -937,13 +937,13 @@ export function useAirportTable(name: string, formData: CommonData) {
     }
   }
 
-  watch(formData, data => {
+  watch(formData, () => {
+    stopQuery()
+    startQuery()
+  })
+  onDeactivated(() => {
     stopQuery()
-    if (data.startDate && data.endDate) {
-      startQuery()
-    }
   })
-  onUnmounted(stopQuery)
 
   onMounted(() => {
     getTableColumns()

+ 25 - 7
src/views/realTime/components/FlightView/index.vue

@@ -6,8 +6,16 @@
         <div class="flight-info-box-wrapper">
           <template v-for="(group, index) in flightInfoItems" :key="index">
             <div class="info-box">
-              <div v-for="(item, i) in group" :key="i">
-                {{ item.label }}:{{ computedFlightInfo(item) }}
+              <div v-for="(item, i) in group" :key="i" class="info-item">
+                <div>{{ item.label }}:</div>
+                <el-tooltip
+                  v-if="computedFlightInfo(item) && item.showOverflowTooltip"
+                  :content="computedFlightInfo(item)"
+                  effect="light"
+                >
+                  <div>{{ computedFlightInfo(item) }}</div>
+                </el-tooltip>
+                <div v-else>{{ computedFlightInfo(item) }}</div>
               </div>
             </div>
             <div v-if="index < flightInfoItems.length - 1" class="icon-box">
@@ -217,11 +225,21 @@ const { cellClickHandler: flightWaybillCellClickHandler } = useTableCellClick(
           width: calc(33.3% - 10px);
           background: #561638;
           padding: 10px 15px;
-          box-sizing: border-box;
-          font-size: 14px;
-          font-weight: 400;
-          color: #ffffff;
-          line-height: 30px;
+          .info-item {
+            width: 100%;
+            height: 30px;
+            line-height: 30px;
+            font-size: 14px;
+            font-weight: 400;
+            color: #ffffff;
+            display: flex;
+            .el-tooltip__trigger {
+              flex: 1;
+              overflow: hidden;
+              white-space: nowrap;
+              text-overflow: ellipsis;
+            }
+          }
         }
         .icon-box {
           display: flex;

+ 17 - 11
src/views/realTime/components/FlightView/useFlightInfo.ts

@@ -29,15 +29,16 @@ const flightInfoItemsMap = {
       },
       {
         label: '托运运单数/货物数',
-        key: "concat(preLoadList,'/',preLoad)",
+        key: 'loadInfo',
       },
       // {
       //   label: '中转进运单/货物数',
-      //   key: "concat(transInList,'/',transInList)",
+      //   key: "transInfo",
       // },
       {
         label: '已配载集装器',
         key: 'stowage_Yes',
+        showOverflowTooltip: true,
       },
       {
         label: '货站已交接集装器',
@@ -48,7 +49,7 @@ const flightInfoItemsMap = {
         key: 'loadPlane',
       },
       {
-        label: '拉下集装器/运单/货物数',
+        label: '拉下集装器/货物数',
         key: 'pull',
       },
       {
@@ -93,19 +94,19 @@ const flightInfoItemsMap = {
       },
       {
         label: '卸载运单数/货物数',
-        key: "concat(unLoadPlaneList,'/',unLoadPlane)",
+        key: 'unLoadListInfo',
       },
       // {
       //   label: '中转进运单/货物数',
-      //   key: "concat(transInList,'/',transIn)",
+      //   key: "transIn",
       // },
       {
         label: '已卸载集装器',
-        key: 'stowage_Yes',
+        key: 'unloadStowageNum',
       },
       {
         label: '卸载数量(板/箱/卡)',
-        key: 'unloadPlane',
+        key: 'unloadPlaneInfo',
       },
       {
         label: '货站交接数量(板/箱/卡)',
@@ -167,7 +168,12 @@ const simulateFlightInfoMap = {
 
 export function useFlightInfo(name: string, dataContent: CommonValue[]) {
   const flightInfoItems = ref<
-    { label: string; key?: string; getter?: (info: any) => string }[][]
+    {
+      label: string
+      key?: string
+      getter?: (info: any) => string
+      showOverflowTooltip?: boolean
+    }[][]
   >([])
   const getFlightInfoItems = () => {
     flightInfoItems.value =
@@ -234,13 +240,13 @@ export function useFlightInfo(name: string, dataContent: CommonValue[]) {
         throw new Error(message ?? '失败')
       }
       if (!listValues.length) {
-        ElMessage.info('未查询到航班中文名')
-        return ''
+        ElMessage.info('未查询到航班中文名' + airportCode)
+        return airportCode
       }
       return listValues[0].airportname
     } catch (error) {
       console.error(error)
-      return ''
+      return airportCode
     }
   }
 

+ 5 - 1
src/views/realTime/departure/airport/index.vue

@@ -2,6 +2,10 @@
   <AirportView name="DepartureAirport" />
 </template>
 
-<script setup lang="ts">
+<script lang="ts">
 import AirportView from '../../components/AirportView/index.vue'
+export default defineComponent({
+  name: 'DepartureAirportView',
+  components: { AirportView },
+})
 </script>

+ 6 - 2
src/views/realTime/departure/flight/index.vue

@@ -2,6 +2,10 @@
   <FlightView name="DepartureFlight" />
 </template>
 
-<script setup lang="ts">
+<script lang="ts">
 import FlightView from '../../components/FlightView/index.vue'
-</script>
+export default defineComponent({
+  name: 'DepartureFlightView',
+  components: { FlightView },
+})
+</script>

+ 1 - 3
src/views/realTime/index.vue

@@ -1,5 +1,3 @@
 <template>
-  <div>
-    <router-view />
-  </div>
+  <router-view />
 </template>