zhongxiaoyu 2 роки тому
батько
коміт
690210285f

+ 0 - 1
src/components/BackButton/index.vue

@@ -10,7 +10,6 @@ export default {
   methods: {
     goBackHandler() {
       const pathArray = this.$route.path.split('/')
-      console.log(pathArray)
       if (pathArray[1] === 'advance') {
         this.$router.push('/advance')
       } else if (pathArray.at(-1) === 'flightView') {

+ 107 - 58
src/layout/components/Navbar.vue

@@ -13,20 +13,37 @@
       <div class="right-menu">
         <el-dropdown>
           <div class="user">
-            <img class="head-icon-img" src="../../assets/status/ic_user.png" alt="" />
+            <img
+              class="head-icon-img"
+              src="../../assets/status/ic_user.png"
+              alt=""
+            />
             <span class="name">{{ name }}</span>
             <i class="el-icon-arrow-down el-icon--right"></i>
           </div>
-          <el-dropdown-menu class="handleMsgMneu" slot="dropdown">
+          <el-dropdown-menu
+            class="handleMsgMneu"
+            slot="dropdown"
+          >
             <el-dropdown-item v-if="name != '匿名用户'">
-              <span class="editPwd" @click="dialogPwd">修改密码</span>
+              <span
+                class="editPwd"
+                @click="dialogPwd"
+              >修改密码</span>
             </el-dropdown-item>
             <el-dropdown-item>
-              <span @click="exitDialog" class="layoutSys">退出登录</span>
+              <span
+                @click="exitDialog"
+                class="layoutSys"
+              >退出登录</span>
             </el-dropdown-item>
           </el-dropdown-menu>
         </el-dropdown>
-        <el-button @click="downFile" class="btn-help" plain>帮助</el-button>
+        <el-button
+          @click="downFile"
+          class="btn-help"
+          plain
+        >帮助</el-button>
         <!-- <div class="seting">
           <span @click="toSystem" class="img-icon"></span>
         </div> -->
@@ -38,10 +55,23 @@
         </div> -->
       </div>
     </div>
-    <div class="navbar_lower" id="navbar_lowers">
+    <div
+      class="navbar_lower"
+      id="navbar_lowers"
+    >
       <el-breadcrumb separator-class="el-icon-arrow-right">
-        <el-breadcrumb-item v-for="(item, index) in breadList" :key="index" :to="item.path">
-          {{ item.meta.title }}
+        <el-breadcrumb-item
+          v-for="(item, index) in breadList"
+          :key="index"
+          :to="index < breadList.length -1 ? item.path : undefined"
+        >
+          <span
+            v-if="withButtonBack(item, index)"
+            is="router-link"
+            class="btn-back"
+            :to="goBackHandler(item)"
+          ><i class="el-icon-arrow-left" />返回</span>
+          <span>{{ item.meta.title }}</span>
         </el-breadcrumb-item>
       </el-breadcrumb>
       <!-- <tags-view /> -->
@@ -51,83 +81,97 @@
 </template>
 
 <script>
-import { mapGetters } from "vuex";
-import Breadcrumb from "@/components/Breadcrumb";
-import Hamburger from "@/components/Hamburger";
+import { mapGetters } from 'vuex'
+import Breadcrumb from '@/components/Breadcrumb'
+import Hamburger from '@/components/Hamburger'
 // import { Format } from "../../config/util";
-import { timeInZone } from "@/utils/table"
+import { timeInZone } from '@/utils/table'
 // import TagsView from "./TagsView";
 
 export default {
-  props: ["logstart"],
-  data () {
+  props: ['logstart'],
+  data() {
     return {
-      newData: "",
+      newData: '',
       breadList: this.getBreadcrumb(),
       getTimeInterval: null
-    };
+    }
   },
   components: {
     Breadcrumb,
-    Hamburger,
+    Hamburger
     // TagsView,
   },
   watch: {
-    $route () {
-      this.breadList = this.getBreadcrumb();
-    },
+    $route(val) {
+      this.breadList = this.getBreadcrumb()
+    }
   },
   computed: {
-    ...mapGetters(["sidebar", "avatar", "name", "timeZone"]),
+    ...mapGetters(['sidebar', 'avatar', 'name', 'timeZone'])
   },
-  mounted () {
+  mounted() {
     this.getTimeInterval = setInterval(() => {
       // this.newData = Format("yyyy/MM/dd hh:mm:ss", new Date());
-      this.newData = timeInZone(new Date(), this.timeZone).replaceAll("-", "/");
-    });
+      this.newData = timeInZone(new Date(), this.timeZone).replaceAll('-', '/')
+    })
   },
-  beforeDestroy () {
-    this.getTimeInterval && clearInterval(this.getTimeInterval);
-    this.getTimeInterval = null;
+  beforeDestroy() {
+    this.getTimeInterval && clearInterval(this.getTimeInterval)
+    this.getTimeInterval = null
   },
   methods: {
-    toggleSideBar () {
-      this.$store.dispatch("app/toggleSideBar");
+    toggleSideBar() {
+      this.$store.dispatch('app/toggleSideBar')
     },
-    async logout () {
-      await this.$store.dispatch("user/logout");
-      this.$router.push(`/login?redirect=${this.$route.fullPath}`);
+    async logout() {
+      await this.$store.dispatch('user/logout')
+      this.$router.push(`/login?redirect=${this.$route.fullPath}`)
     },
-    getBreadcrumb () {
-      return this.$route.matched.filter((item) => item.name && item.meta.title);
+    getBreadcrumb() {
+      return this.$route.matched.filter(item => item.name && item.meta.title)
     },
     //修改密码
-    dialogPwd () {
-      this.$store.dispatch("app/togglePwdflag", true);
+    dialogPwd() {
+      this.$store.dispatch('app/togglePwdflag', true)
     },
     //退出系统-弹框
-    exitDialog () {
-      this.$store.dispatch("app/toggleOutflag", true);
+    exitDialog() {
+      this.$store.dispatch('app/toggleOutflag', true)
     },
     //下载
-    downFile () {
-      const a = document.createElement('a');
+    downFile() {
+      const a = document.createElement('a')
       // 给a标签的href属性值加上地址,注意:这里是绝对路径,不用加 点.
-      a.href = './国航行李整合及应用项目-用户使用手册V2.1.pdf';
+      a.href = './国航行李整合及应用项目-用户使用手册V2.1.pdf'
       // 设置下载文件文件名,这里加上.xlsx指定文件类型,pdf文件就指定.fpd即可
-      a.download = '国航行李整合及应用项目-用户使用手册V2.1.pdf';
+      a.download = '国航行李整合及应用项目-用户使用手册V2.1.pdf'
       // 障眼法藏起来a标签
-      a.style.display = 'none';
+      a.style.display = 'none'
       // 将a标签追加到文档对象中
-      document.body.appendChild(a);
+      document.body.appendChild(a)
       // 模拟点击了<a>标签,会触发<a>标签的href的读取,浏览器就会自动下载了
-      a.click();
+      a.click()
       // 一次性的,用完就删除a标签
-      a.remove();
+      a.remove()
       // window.location.href = './国航行李整合及应用项目-用户使用手册V2.1.pdf'
+    },
+    withButtonBack(item, index) {
+      if (['/systemSettings', '/BasicsData'].includes(this.$route.matched[0].path)) {
+        return false
+      }
+      return (
+        item.parent.path !== item.path &&
+        !item.parent.redirect &&
+        index > 0 &&
+        index === this.breadList.length - 1
+      )
+    },
+    goBackHandler(item) {
+      return item.parent?.path
     }
-  },
-};
+  }
+}
 </script>
 
 <style lang="scss" scoped>
@@ -156,7 +200,6 @@ export default {
       font-family: Microsoft YaHei;
       font-weight: 400;
       color: #101116;
-      pointer-events: none;
     }
   }
   > .navbar_top {
@@ -238,17 +281,17 @@ export default {
       }
       .lock {
         .img-icon {
-          background-image: url("../../assets/status/ic_password.png");
+          background-image: url('../../assets/status/ic_password.png');
           &:hover {
-            background-image: url("../../assets/status/ic_password_hovar.png");
+            background-image: url('../../assets/status/ic_password_hovar.png');
           }
         }
       }
       .exit {
         .img-icon {
-          background-image: url("../../assets/status/ic_exit.png");
+          background-image: url('../../assets/status/ic_exit.png');
           &:hover {
-            background-image: url("../../assets/status/ic_exit_hovar.png");
+            background-image: url('../../assets/status/ic_exit_hovar.png');
           }
         }
       }
@@ -328,7 +371,7 @@ export default {
           .search {
             width: 21px;
             height: 21px;
-            background: url("../../assets/header/ic_search_top.png") no-repeat;
+            background: url('../../assets/header/ic_search_top.png') no-repeat;
             background-size: 100% 100%;
             margin-top: 10px;
             margin-right: 41px;
@@ -336,8 +379,7 @@ export default {
           .fullscreen {
             width: 21px;
             height: 21px;
-            background: url("../../assets/header/ic_fullscreen_top.png")
-              no-repeat;
+            background: url('../../assets/header/ic_fullscreen_top.png') no-repeat;
             background-size: 100% 100%;
             margin-top: 10px;
             margin-right: 20px;
@@ -345,7 +387,7 @@ export default {
           .journaler {
             width: 21px;
             height: 21px;
-            background: url("../../assets/header/ic_data_top.png") no-repeat;
+            background: url('../../assets/header/ic_data_top.png') no-repeat;
             background-size: 100% 100%;
             margin-top: 10px;
             margin-right: 41px;
@@ -353,7 +395,7 @@ export default {
           .information {
             width: 21px;
             height: 21px;
-            background: url("../../assets/header/ic_message_top.png") no-repeat;
+            background: url('../../assets/header/ic_message_top.png') no-repeat;
             background-size: 100% 100%;
             margin-top: 10px;
             margin-right: 41px;
@@ -432,6 +474,13 @@ export default {
       //   font-size: 14px;
       //   color: #ffffff !important;
       // }
+      .btn-back {
+        margin-left: -30px;
+        margin-right: 10px;
+        font-size: 14px;
+        color: #2d67e3;
+        cursor: pointer;
+      }
     }
     > .newdata {
       font-size: 14px;

+ 19 - 2
src/router/index.js

@@ -88,10 +88,27 @@ const createRouter = () =>
 const router = createRouter()
 
 router.beforeEach((to, from, next) => {
-  if (from.path.includes('flightView') && from.query.flightNO && from.query.flightDate) {
+  if (
+    (from.path.includes('flightView') && from.query.flightNO && from.query.flightDate) ||
+    (from.path.includes('containerView') &&
+      from.query.flightNO &&
+      from.query.flightDate &&
+      from.query.departureAirport &&
+      from.query.landingAirport &&
+      from.query.containerID)
+  ) {
     store.dispatch('keepAlive/savePage', from)
   }
-  if (to.path.includes('flightView') && (!to.query.flightNO || !to.query.flightDate) && from.meta?.keepAlive) {
+  if (
+    from.meta?.keepAlive &&
+    ((to.path.includes('flightView') && (!to.query.flightNO || !to.query.flightDate)) ||
+      (to.path.includes('containerView') &&
+        (!to.query.flightNO ||
+          !to.query.flightDate ||
+          !to.query.departureAirport ||
+          !to.query.landingAirport ||
+          !to.query.containerID)))
+  ) {
     const savedPage = store.getters.savedPages.find(savedPage => savedPage.name === to.name)
     if (savedPage) {
       next(savedPage.fullPath)

+ 96 - 62
src/router/routes/routes-file-five.js

@@ -1,10 +1,3 @@
-/*
- * @Author: zk
- * @Date: 2022-01-17 10:40:48
- * @LastEditTime: 2022-09-13 16:35:22
- * @LastEditors: your name
- * @Description: 离港路由
- */
 import Layout from '@/layout'
 
 const departureRoutes = {
@@ -24,7 +17,7 @@ const departureRoutes = {
       children: [
         {
           path: '/departure',
-          name: 'DepartureOne',
+          name: 'DepartureNav',
           component: () => import('@/views/baggageManagement'),
           meta: {
             title: '离港视图',
@@ -41,7 +34,7 @@ const departureRoutes = {
             },
             {
               path: '/departure/flightView',
-              name: 'DepartureParentSem',
+              name: 'DepartureFlightNav',
               component: () => import('@/views/baggageManagement'),
               meta: { title: '航班视图', keepAlive: true },
               children: [
@@ -59,15 +52,23 @@ const departureRoutes = {
                 },
                 {
                   path: '/departure/containerView',
-                  name: 'DepartureContainerView',
-                  component: () => import('@/views/baggageManagement/components/departure/container'),
-                  meta: { title: '容器视图', keepAlive: true }
-                },
-                {
-                  path: '/departure/containerHistory',
-                  name: 'DepartureContainerHistory',
-                  component: () => import('@/views/baggageManagement/components/departure/containerHistory'),
-                  meta: { title: '历史记录', keepAlive: true }
+                  name: 'DepartureContainerNav',
+                  component: () => import('@/views/baggageManagement'),
+                  meta: { title: '容器视图', keepAlive: true },
+                  children: [
+                    {
+                      path: '/departure/containerView',
+                      name: 'DepartureContainerView',
+                      component: () => import('@/views/baggageManagement/components/departure/container'),
+                      meta: { keepAlive: true }
+                    },
+                    {
+                      path: '/departure/containerHistory',
+                      name: 'DepartureContainerHistory',
+                      component: () => import('@/views/baggageManagement/components/departure/containerHistory'),
+                      meta: { title: '历史记录', keepAlive: true }
+                    }
+                  ]
                 }
               ]
             }
@@ -95,7 +96,7 @@ const arrivalRoutes = {
       children: [
         {
           path: '/arrival',
-          name: 'ArrivalOne',
+          name: 'ArrivalNav',
           component: () => import('@/views/baggageManagement'),
           meta: { title: '进港视图', roles: ['inbound_search_page'], keepAlive: true },
           children: [
@@ -107,7 +108,7 @@ const arrivalRoutes = {
             },
             {
               path: '/arrival/flightView',
-              name: 'ArrivalFlightTwo',
+              name: 'ArrivalFlightNav',
               component: () => import('@/views/baggageManagement'),
               meta: { title: '航班视图', keepAlive: true },
               children: [
@@ -125,15 +126,23 @@ const arrivalRoutes = {
                 },
                 {
                   path: '/arrival/containerView',
-                  name: 'ArrivalContainerView',
-                  component: () => import('@/views/baggageManagement/components/arrival/container'),
-                  meta: { title: '容器视图', keepAlive: true }
-                },
-                {
-                  path: '/arrival/containerHistory',
-                  name: 'ArrivalContainerHistory',
-                  component: () => import('@/views/baggageManagement/components/arrival/containerHistory'),
-                  meta: { title: '容器历史', keepAlive: true }
+                  name: 'ArrivalContainerNav',
+                  component: () => import('@/views/baggageManagement'),
+                  meta: { title: '容器视图', keepAlive: true },
+                  children: [
+                    {
+                      path: '/arrival/containerView',
+                      name: 'ArrivalContainerView',
+                      component: () => import('@/views/baggageManagement/components/arrival/container'),
+                      meta: { keepAlive: true }
+                    },
+                    {
+                      path: '/arrival/containerHistory',
+                      name: 'ArrivalContainerHistory',
+                      component: () => import('@/views/baggageManagement/components/arrival/containerHistory'),
+                      meta: { title: '容器历史', keepAlive: true }
+                    }
+                  ]
                 }
               ]
             }
@@ -161,7 +170,7 @@ const transferRoutes = {
       children: [
         {
           path: '/transfer/arrival',
-          name: 'TransferArrivalOne',
+          name: 'TransferArrivalNav',
           component: () => import('@/views/baggageManagement'),
           meta: { title: '中转进港', roles: ['transit_inbound_page'], keepAlive: true },
           children: [
@@ -173,7 +182,7 @@ const transferRoutes = {
             },
             {
               path: '/transfer/arrival/flightView',
-              name: 'TransferArrivalTwo',
+              name: 'TransferArrivalFlightNav',
               component: () => import('@/views/baggageManagement'),
               meta: { title: '航班视图', keepAlive: true },
               children: [
@@ -191,15 +200,23 @@ const transferRoutes = {
                 },
                 {
                   path: '/transfer/arrival/containerView',
-                  name: 'TransferArrivalContainerView',
-                  component: () => import('@/views/baggageManagement/components/arrival/container'),
-                  meta: { title: '容器历史', keepAlive: true }
-                },
-                {
-                  path: '/transfer/arrival/containerHistory',
-                  name: 'TransferArrivalContainerHistory',
-                  component: () => import('@/views/baggageManagement/components/transferArrival/containerHistory'),
-                  meta: { title: '容器视图', keepAlive: true }
+                  name: 'TransferArrivalContainerNav',
+                  component: () => import('@/views/baggageManagement'),
+                  meta: { title: '容器视图', keepAlive: true },
+                  children: [
+                    {
+                      path: '/transfer/arrival/containerView',
+                      name: 'TransferArrivalContainerView',
+                      component: () => import('@/views/baggageManagement/components/arrival/container'),
+                      meta: { keepAlive: true }
+                    },
+                    {
+                      path: '/transfer/arrival/containerHistory',
+                      name: 'TransferArrivalContainerHistory',
+                      component: () => import('@/views/baggageManagement/components/transferArrival/containerHistory'),
+                      meta: { title: '容器历史', keepAlive: true }
+                    }
+                  ]
                 }
               ]
             }
@@ -207,7 +224,7 @@ const transferRoutes = {
         },
         {
           path: '/transfer/departure',
-          name: 'TransferDepartureOne',
+          name: 'TransferDepartureNav',
           component: () => import('@/views/baggageManagement'),
           meta: { title: '中转离港', roles: ['transit_departure_page'], keepAlive: true },
           children: [
@@ -219,7 +236,7 @@ const transferRoutes = {
             },
             {
               path: '/transfer/departure/flightView',
-              name: 'TransferDepartureTwo',
+              name: 'TransferDepartureFlightNav',
               component: () => import('@/views/baggageManagement'),
               meta: { title: '航班视图', keepAlive: true },
               children: [
@@ -237,15 +254,24 @@ const transferRoutes = {
                 },
                 {
                   path: '/transfer/departure/containerView',
-                  name: 'TransferDepartureContainerView',
-                  component: () => import('@/views/baggageManagement/components/transferDeparture/container'),
-                  meta: { title: '容器视图', keepAlive: true }
-                },
-                {
-                  path: '/transfer/departure/containerHistory',
-                  name: 'TransferDepartureContainerHistory',
-                  component: () => import('@/views/baggageManagement/components/transferDeparture/containerHistory'),
-                  meta: { title: '容器历史', keepAlive: true }
+                  name: 'TransferDepartureContainerNav',
+                  component: () => import('@/views/baggageManagement'),
+                  meta: { title: '容器视图', keepAlive: true },
+                  children: [
+                    {
+                      path: '/transfer/departure/containerView',
+                      name: 'TransferDepartureContainerView',
+                      component: () => import('@/views/baggageManagement/components/transferDeparture/container'),
+                      meta: { keepAlive: true }
+                    },
+                    {
+                      path: '/transfer/departure/containerHistory',
+                      name: 'TransferDepartureContainerHistory',
+                      component: () =>
+                        import('@/views/baggageManagement/components/transferDeparture/containerHistory'),
+                      meta: { title: '容器历史', keepAlive: true }
+                    }
+                  ]
                 }
               ]
             }
@@ -264,7 +290,7 @@ const advanceRoutes = {
   children: [
     {
       path: '/advance',
-      component: () => import('@/views/advancedQuery/index.vue'),
+      component: () => import('@/views/advancedQuery'),
       meta: {
         title: '高级查询',
         imgstyle: 'ic_list_nav_search_default.png',
@@ -274,7 +300,7 @@ const advanceRoutes = {
         {
           path: '/advance',
           name: 'AdvancedQuery',
-          component: () => import('@/views/advancedQuery/index.vue'),
+          component: () => import('@/views/advancedQuery'),
           meta: { title: '高级查询', isPage: 'advance_page', keepAlive: true },
           children: [
             {
@@ -303,15 +329,23 @@ const advanceRoutes = {
             },
             {
               path: 'containerView',
-              name: 'AdvancedContainerView',
-              component: () => import('@/views/advancedQuery/views/advancedContainer.vue'),
-              meta: { title: '容器视图', keepAlive: true }
-            },
-            {
-              path: 'containerHistory',
-              name: 'AdvancedContainerHistory',
-              component: () => import('@/views/advancedQuery/views/advancedContainerHistory.vue'),
-              meta: { title: '容器历史', keepAlive: true }
+              name: 'AdvancedContainerNav',
+              component: () => import('@/views/advancedQuery'),
+              meta: { title: '容器视图', keepAlive: true },
+              children: [
+                {
+                  path: '/advance/containerView',
+                  name: 'AdvancedContainerView',
+                  component: () => import('@/views/advancedQuery/views/advancedContainer.vue'),
+                  meta: { keepAlive: true }
+                },
+                {
+                  path: '/advance/containerHistory',
+                  name: 'AdvancedContainerHistory',
+                  component: () => import('@/views/advancedQuery/views/advancedContainerHistory.vue'),
+                  meta: { title: '容器历史', keepAlive: true }
+                }
+              ]
             }
           ]
         }

+ 139 - 161
src/router/routes/routes-file-four.js

@@ -1,241 +1,219 @@
-/*
- * @Author: Badguy
- * @Date: 2022-04-25 16:01:34
- * @LastEditTime: 2022-05-06 11:09:32
- * @LastEditors: your name
- * @Description: 账号管理
- * have a nice day!
- */
-
-import Layout from "@/layout";
+import Layout from '@/layout'
 
 // 权限管理
 const authorityRoutes = {
-  path: "/authority",
+  path: '/authority',
   component: Layout,
-  meta: { roles: ["authority_menu"], keepAlive: false },
+  meta: { roles: ['authority_menu'] },
   children: [
     {
-      path: "/authority",
-      component: () => import("@/views/authorityManagement/index"),
+      path: '/authority',
+      component: () => import('@/views/authorityManagement/index'),
       meta: {
-        title: "权限管理",
-        icon: "authority",
-        imgstyle: "ic_list_nav_permissions_default.png",
-        imgstyleup: "ic_list_nav_permissions_check.png",
-        keepAlive: false,
+        title: '权限管理',
+        icon: 'authority',
+        imgstyle: 'ic_list_nav_permissions_default.png',
+        imgstyleup: 'ic_list_nav_permissions_check.png'
       },
       children: [
         {
-          path: "/",
-          name: "AuthorityHome",
+          path: '/authority',
+          name: 'AuthorityNav',
           component: {
-            render (c) {
-              return c("router-view");
-            },
+            render(c) {
+              return c('router-view')
+            }
           },
-          redirect: "/",
-          meta: { title: "权限项管理", isPage: "authority_page", keepAlive: false, roles: ["authority_page"] },
+          meta: { title: '权限项管理', isPage: 'authority_page', roles: ['authority_page'] },
           children: [
             {
-              path: "/",
-              meta: { title: "权限项管理", isPage: "authority_page", keepAlive: false },
-              component: () => import("@/views/authorityManagement/components/authorityHome"),
+              path: '/authority',
+              name: 'AuthorityHome',
+              component: () => import('@/views/authorityManagement/components/authorityHome')
             },
             {
-              path: "appAdd",
-              name: "AuthorityAppAdd",
-              component: () => import("@/views/authorityManagement/components/authorityAppAdd"),
-              meta: { title: "新增应用", keepAlive: false },
+              path: 'appAdd',
+              name: 'AuthorityAppAdd',
+              component: () => import('@/views/authorityManagement/components/authorityAppAdd'),
+              meta: { title: '新增应用' }
             },
             {
-              path: "appEdit",
-              name: "AuthorityAppEdit",
-              component: () => import("@/views/authorityManagement/components/authorityAppEdit"),
-              meta: { title: "编辑应用", keepAlive: false },
+              path: 'appEdit',
+              name: 'AuthorityAppEdit',
+              component: () => import('@/views/authorityManagement/components/authorityAppEdit'),
+              meta: { title: '编辑应用' }
             },
             {
-              path: "addPower",
-              name: "AuthorityPowerAdd",
-              component: () => import("@/views/authorityManagement/components/authorityPowerAdd"),
-              meta: { title: "新增权限项", keepAlive: false },
+              path: 'addPower',
+              name: 'AuthorityPowerAdd',
+              component: () => import('@/views/authorityManagement/components/authorityPowerAdd'),
+              meta: { title: '新增权限项' }
             },
             {
-              path: "editPower",
-              name: "AuthorityPowerEdit",
-              component: () => import("@/views/authorityManagement/components/authorityPowerEdit"),
-              meta: { title: "编辑权限项", keepAlive: false },
-            },
-          ],
-        },
-      ],
-    },
-  ],
-};
+              path: 'editPower',
+              name: 'AuthorityPowerEdit',
+              component: () => import('@/views/authorityManagement/components/authorityPowerEdit'),
+              meta: { title: '编辑权限项' }
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}
 
 // 角色管理
 const roleRoutes = {
-  path: "/role",
+  path: '/role',
   component: Layout,
-  meta: { roles: ["role_menu"], keepAlive: false },
+  meta: { roles: ['role_menu'] },
   children: [
     {
-      path: "/role",
-      component: () => import("@/views/authorityManagement/components/authorityRole"),
+      path: '/role',
+      component: () => import('@/views/authorityManagement/components/authorityRole'),
       meta: {
-        title: "角色管理",
-        icon: "role",
-        imgstyle: "ic_list_nav_character_default.png",
-        imgstyleup: "ic_list_nav_character_check.png",
-        keepAlive: false,
+        title: '角色管理',
+        icon: 'role',
+        imgstyle: 'ic_list_nav_character_default.png',
+        imgstyleup: 'ic_list_nav_character_check.png'
       },
       children: [
         {
-          path: "/",
-          name: "AuthorityRoleHome",
+          path: '/role',
+          name: 'AuthorityRoleNav',
           component: {
-            render (c) {
-              return c("router-view");
-            },
+            render(c) {
+              return c('router-view')
+            }
           },
-          redirect: "/",
-          meta: { title: "角色管理", isPage: "role_page", keepAlive: false, roles: ["role_page"] },
+          meta: { title: '角色管理', isPage: 'role_page', roles: ['role_page'] },
           children: [
             {
-              path: "/",
-              component: () => import("@/views/authorityManagement/components/authorityRoleHome"),
-              meta: { title: "角色管理", keepAlive: false },
+              path: '/role',
+              name: 'AuthorityRoleHome',
+              component: () => import('@/views/authorityManagement/components/authorityRoleHome')
             },
             {
-              path: "addRole",
-              name: "AuthorityRoleAdd",
-              component: () => import("@/views/authorityManagement/components/authorityRoleAdd"),
-              meta: { title: "新增角色", keepAlive: false },
+              path: 'addRole',
+              name: 'AuthorityRoleAdd',
+              component: () => import('@/views/authorityManagement/components/authorityRoleAdd'),
+              meta: { title: '新增角色' }
             },
             {
-              path: "editRole",
-              name: "AuthorityRoleEdit",
-              component: () => import("@/views/authorityManagement/components/authorityRoleEdit"),
-              meta: { title: "账号授权", keepAlive: false },
-            },
-          ],
-        },
-      ],
-    },
-  ],
-};
+              path: 'editRole',
+              name: 'AuthorityRoleEdit',
+              component: () => import('@/views/authorityManagement/components/authorityRoleEdit'),
+              meta: { title: '账号授权' }
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}
 
 // 账号管理
 const accountRoutes = {
-  path: "/account",
+  path: '/account',
   component: Layout,
-  meta: { roles: ["account_menu"], keepAlive: false },
+  meta: { roles: ['account_menu'] },
   children: [
     {
-      path: "/account",
-      component: () => import("@/views/accountManagement"),
+      path: '/account',
+      component: () => import('@/views/accountManagement'),
       meta: {
-        title: "账号管理",
-        icon: "account",
-        imgstyle: "ic_list_nav_account_default.png",
-        imgstyleup: "ic_list_nav_account_check.png",
-        keepAlive: false,
+        title: '账号管理',
+        icon: 'account',
+        imgstyle: 'ic_list_nav_account_default.png',
+        imgstyleup: 'ic_list_nav_account_check.png'
       },
       children: [
         {
-          path: "/",
+          path: '/account',
+          name: 'accountNav',
           component: {
-            render (c) {
-              return c("router-view");
-            },
+            render(c) {
+              return c('router-view')
+            }
           },
           meta: {
-            keepAlive: false,
-            roles: ["account_page"],
+            title: '账号管理',
+            roles: ['account_page']
           },
           children: [
             {
-              path: "/",
-              name: "accountHome",
-              component: () => import("@/views/accountManagement/components/accountHome"),
-              meta: {
-                title: "账号管理",
-                keepAlive: false,
-              },
+              path: '/account',
+              name: 'accountHome',
+              component: () => import('@/views/accountManagement/components/accountHome')
             },
             {
-              path: "accountAdd",
-              name: "accountAdd",
-              component: () => import("@/views/accountManagement/components/accountEdit"),
+              path: 'accountAdd',
+              name: 'accountAdd',
+              component: () => import('@/views/accountManagement/components/accountEdit'),
               meta: {
-                title: "新增账号",
-                keepAlive: false,
-              },
+                title: '新增账号'
+              }
             },
             {
-              path: "accountEdit",
-              name: "accountEdit",
-              component: () => import("@/views/accountManagement/components/accountEdit"),
+              path: 'accountEdit',
+              name: 'accountEdit',
+              component: () => import('@/views/accountManagement/components/accountEdit'),
               meta: {
-                title: "编辑账号",
-                doesAccountExist: true,
-                keepAlive: false,
-              },
+                title: '编辑账号',
+                doesAccountExist: true
+              }
             },
             {
-              path: "accountAuth",
-              name: "accountAuth",
-              component: () => import("@/views/accountManagement/components/accountAuth"),
+              path: 'accountAuth',
+              name: 'accountAuth',
+              component: () => import('@/views/accountManagement/components/accountAuth'),
               meta: {
-                title: "账号授权",
-                keepAlive: false,
-              },
-            },
-          ],
-        },
-      ],
-    },
-  ],
-};
+                title: '账号授权'
+              }
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}
 
 // 账号管理
 const accountGroupRoutes = {
-  path: "/accountgroup",
+  path: '/accountgroup',
   component: Layout,
-  meta: { roles: ["group_menu"], keepAlive: false },
+  meta: { roles: ['group_menu'] },
   children: [
     {
-      path: "/accountgroup",
-      component: () => import("@/views/accountGroupManagement"),
+      path: '/accountgroup',
+      component: () => import('@/views/accountGroupManagement'),
       meta: {
-        title: "账号组管理",
-        icon: "role",
-        imgstyle: "ic_list_nav_group_default.png",
-        imgstyleup: "ic_list_nav_group_check.png",
-        keepAlive: false,
+        title: '账号组管理',
+        icon: 'role',
+        imgstyle: 'ic_list_nav_group_default.png',
+        imgstyleup: 'ic_list_nav_group_check.png'
       },
       children: [
         {
-          path: "/",
-          name: "accountgroupHome",
+          path: '/accountgroup',
+          name: 'accountgroupNav',
           component: {
-            render (c) {
-              return c("router-view");
-            },
+            render(c) {
+              return c('router-view')
+            }
           },
-          redirect: "/",
-          meta: { title: "账号组管理", keepAlive: false },
+          meta: { title: '账号组管理' },
           children: [
             {
-              path: "/",
-              component: () => import("@/views/accountGroupManagement/components/accountHome"),
-              meta: { title: "账号组管理", keepAlive: false },
-            },
-          ],
-        },
-      ],
-    },
-  ],
-};
+              path: '/accountgroup',
+              name: 'accountGroupHome',
+              component: () => import('@/views/accountGroupManagement/components/accountHome')
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}
 
-export default [authorityRoutes, roleRoutes, accountRoutes, accountGroupRoutes];
+export default [authorityRoutes, roleRoutes, accountRoutes, accountGroupRoutes]

+ 7 - 1
src/views/advancedQuery/views/advancedHome.vue

@@ -955,6 +955,10 @@ export default {
             this.$router.push({
               path: '/advance/containerView',
               query: {
+                flightNO: row.flightNO,
+                flightDate: row.flightDate,
+                departureAirport: row.sourceAirport,
+                landingAirport: row.targetAirport,
                 containerID: row.U_Device_ID
               }
             })
@@ -1199,7 +1203,9 @@ export default {
       try {
         const result = await myQuery(DATACONTENT_ID.baggageTypeId)
         this.baggageTypeList = result
-      } catch (error) {this.$message.error("失败");}
+      } catch (error) {
+        this.$message.error('失败')
+      }
     },
     // 统计行数
     summaryRow(num) {

+ 17 - 13
src/views/baggageManagement/components/baggage/index.vue

@@ -26,7 +26,7 @@
             :label="item"
           />
         </el-radio-group>
-        <BackButton />
+        <!-- <BackButton /> -->
       </div>
       <div class="part1_info">
         <el-row :gutter="12">
@@ -231,7 +231,7 @@
   </div>
 </template>
 <script>
-import BackButton from '@/components/BackButton'
+// import BackButton from '@/components/BackButton'
 import Dialog from '@/layout/components/Dialog/index.vue'
 import { myQuery } from '@/api/dataIntegration'
 import { BaggageMessageQuery } from '@/api/flight'
@@ -244,7 +244,7 @@ import FileSaver from 'file-saver'
 export default {
   name: 'BaggageView',
   components: {
-    BackButton,
+    // BackButton,
     Dialog
   },
   mixins: [tableColsMixin],
@@ -366,12 +366,12 @@ export default {
         { name: '航班日期', prop: 'flightDate', width: 100 },
         {
           name: '起飞航站\n起飞时间',
-          prop: 'departureAirport',
+          prop: 'departureInfo',
           width: 111
         },
         {
           name: '目的航站\n降落时间',
-          prop: 'landingAirport',
+          prop: 'landingInfo',
           sortable: 'custom',
           width: 111
         },
@@ -460,7 +460,7 @@ export default {
             this.queryAirline()
             this.infoBtn = this.infoRadios[0]
           } else {
-            this.$router.push('/advance')
+            this.$router.push('/')
           }
         }
       },
@@ -579,7 +579,7 @@ export default {
       this.pos = pos
     },
     headerCellClass({ row, column, rowIndex, columnIndex }) {
-      if (['departureAirport', 'landingAirport'].includes(column.property)) {
+      if (['departureInfo', 'landingInfo'].includes(column.property)) {
         return 'pre-line'
       }
     },
@@ -592,7 +592,7 @@ export default {
       ) {
         classes.push('cell-click')
       }
-      if (['departureAirport', 'landingAirport'].includes(column.property)) {
+      if (['departureInfo', 'landingInfo'].includes(column.property)) {
         classes.push('pre-line')
       }
       return classes.join(' ')
@@ -602,7 +602,7 @@ export default {
         switch (column.property) {
           case 'flightNO':
             this.$router.push({
-              path: `/${this.$route.path.split('/').slice(1, -1).join('/')}/flightView`,
+              path: `${this.$route.path.split('/').slice(0, -1).join('/')}/flightView`,
               query: {
                 flightNO: row.flightNO,
                 flightDate: row.flightDate
@@ -611,8 +611,12 @@ export default {
             break
           case 'U_Device_ID':
             this.$router.push({
-              path: `/${this.$route.path.split('/').slice(1, -1).join('/')}/containerView`,
+              path: `${this.$route.path.split('/').slice(0, -1).join('/')}/containerView`,
               query: {
+                flightNO: row.flightNO,
+                flightDate: row.flightDate,
+                departureAirport: row.departureAirport,
+                landingAirport: row.landingAirport,
                 containerID: row.U_Device_ID
               }
             })
@@ -623,7 +627,7 @@ export default {
       }
     },
     tableSpanMethod({ row, column, rowIndex, columnIndex }) {
-      if (['flightNO', 'flightDate', 'departureAirport', 'landingAirport'].includes(column['property'])) {
+      if (['flightNO', 'flightDate', 'departureInfo', 'landingInfo'].includes(column['property'])) {
         const _row = this.spanArr[rowIndex]
         const _col = _row > 0 ? 1 : 0
         return {
@@ -785,10 +789,10 @@ export default {
           if (item['dealTime']) {
             item['dealTime'] = item['dealTime'].replace('T', ' ')
           }
-          item['departureAirport'] = `${item['departureAirport']}\n${
+          item['departureInfo'] = `${item['departureAirport']}\n${
             item['departureTime'] ? item['departureTime'].replace('T', '\n') : ''
           }`
-          item['landingAirport'] = `${item['landingAirport']}\n${
+          item['landingInfo'] = `${item['landingAirport']}\n${
             item['landingTime'] ? item['landingTime'].replace('T', '\n') : ''
           }`
           if (item['DeviceCode'] === 'STARHUB') {

+ 1 - 1
src/views/baggageManagement/components/container/index.vue

@@ -425,7 +425,7 @@ export default {
     cellClickHandler(row, column, cell, event) {},
     toContainerHistory() {
       this.$router.push({
-        path: `/${this.$route.path.split('/').slice(1, -1).join('/')}/containerHistory`,
+        path: `${this.$route.path.split('/').slice(0, -1).join('/')}/containerHistory`,
         query: {
           containerID: this.queryData.containerID
         }

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

@@ -3,7 +3,7 @@
     <div class="container-left">
       <div class="title">
         <span class="manageTitle">容器历史</span>
-        <BackButton />
+        <!-- <BackButton /> -->
       </div>
       <div
         v-loading="treeLoading"
@@ -87,7 +87,7 @@
 </template>
 
 <script>
-import BackButton from '@/components/BackButton'
+// import BackButton from '@/components/BackButton'
 import TableHeaderCell from '@/components/TableHeaderCell'
 import { mapGetters } from 'vuex'
 import { myQuery } from '@/api/dataIntegration'
@@ -96,7 +96,7 @@ import { setTableFilters } from '@/utils/table'
 export default {
   name: 'ContainerHistory',
   components: {
-    BackButton,
+    // BackButton,
     TableHeaderCell
   },
   data() {

+ 0 - 1
src/views/baggageManagement/components/departure/index.vue

@@ -481,7 +481,6 @@ export default {
                     item["warningState"] = 2;
                     const returnedTarget = Object.assign(newItem, p);
                     this.sendLog(returnedTarget);
-                    console.log('ddd2')
                   }
                 }
               }

+ 29 - 32
src/views/baggageManagement/components/flight/index.vue

@@ -11,7 +11,7 @@
       <div class="part1">
         <div class="title">
           <span class="manageTitle">航班基本信息</span>
-          <BackButton />
+          <!-- <BackButton /> -->
         </div>
         <div class="part1-wrapper">
           <div class="airline">{{ queryData.flightNO }}
@@ -303,7 +303,8 @@
           :summary-method="summaryMethod"
           :header-cell-style="{ color: '#101116' }"
           :row-class-name="rowClass"
-          @row-click="containerClick"
+          :cell-class-name="cellClass"
+          @cell-click="cellClickHandler"
         >
           <el-table-column
             v-for="col in containerTableColumn"
@@ -487,7 +488,7 @@
   </div>
 </template>
 <script>
-import BackButton from '@/components/BackButton'
+// import BackButton from '@/components/BackButton'
 import Dialog from '@/layout/components/Dialog/index.vue'
 import TimeZoneSelector from '@/components/TimeZoneSelector'
 import { myQuery } from '@/api/dataIntegration'
@@ -536,7 +537,7 @@ export default {
     }
   },
   components: {
-    BackButton,
+    // BackButton,
     Dialog,
     TimeZoneSelector,
     TableHeaderCell
@@ -765,6 +766,7 @@ export default {
       }
       if (
         [
+          'containerNumber',
           'preFlightNO',
           'totalNumber',
           'inFlightNO',
@@ -794,8 +796,10 @@ export default {
     cellClickHandler(row, column, cell, event) {
       if (
         [
+          'containerNumber',
           'preFlightNO',
           'totalNumber',
+          'inFlightNO',
           'transferFlightNO',
           'transferNumber',
           'PassengerNameUpcase',
@@ -811,9 +815,25 @@ export default {
           pageName: this.$route.name
         })
         switch (column.property) {
+          case 'containerNumber': {
+            const [departureAirport, landingAirport] = this.selectedAirline.split('-')
+            this.$router.push({
+              path: `${this.$route.path.split('/').slice(0, -1).join('/')}/containerView`,
+              query: {
+                flightNO: this.queryData.flightNO,
+                flightDate: this.queryData.flightDate,
+                departureAirport,
+                landingAirport,
+                containerID: row.containerNumber,
+                containerType: row.style,
+                containerSpace: row.containerSpace
+              }
+            })
+            break
+          }
           case 'preFlightNO':
             this.$router.push({
-              path: '/advance/flightView',
+              path: `${this.$route.path.split('/').slice(0, -1).join('/')}/flightView`,
               query: {
                 flightNO: row.preFlightNO,
                 flightDate: row.preFlightDate
@@ -833,7 +853,7 @@ export default {
             break
           case 'inFlightNO':
             this.$router.push({
-              path: '/advance/flightView',
+              path: `${this.$route.path.split('/').slice(0, -1).join('/')}/flightView`,
               query: {
                 flightNO: row.inFlightNO,
                 flightDate: row.inFlightDate
@@ -842,7 +862,7 @@ export default {
             break
           case 'transferFlightNO':
             this.$router.push({
-              path: '/advance/flightView',
+              path: `${this.$route.path.split('/').slice(0, -1).join('/')}/flightView`,
               query: {
                 flightNO: row.transferFlightNO,
                 flightDate: row.transferFlightDate
@@ -865,7 +885,7 @@ export default {
             break
           case 'BagSN':
             this.$router.push({
-              path: `/${this.$route.path.split('/').slice(1, -1).join('/')}/baggageView`,
+              path: `${this.$route.path.split('/').slice(0, -1).join('/')}/baggageView`,
               query: {
                 bagSN: row.BagSN,
                 flightNO: this.queryData.flightNO,
@@ -877,7 +897,7 @@ export default {
             const [departureAirport, landingAirport] = this.selectedAirline.split('-')
             const container = this.containerTableData.find(({ containerNumber }) => containerNumber === row.U_Device_ID)
             this.$router.push({
-              path: `/${this.$route.path.split('/').slice(1, -1).join('/')}/containerView`,
+              path: `${this.$route.path.split('/').slice(0, -1).join('/')}/containerView`,
               query: {
                 flightNO: this.queryData.flightNO,
                 flightDate: this.queryData.flightDate,
@@ -939,29 +959,6 @@ export default {
         return ['合计', `共${num}件`]
       }
     },
-    containerClick(row) {
-      if (row.containerNumber === 'FBULK') {
-        this.$router.push({
-          path: '/advance',
-          query: {
-            flightNO: this.queryData.flightNO,
-            startDate: this.queryData.flightDate,
-            endDate: this.queryData.flightDate,
-            loadType: 1
-          }
-        })
-      } else {
-        this.$router.push({
-          path: '/advance',
-          query: {
-            flightNO: this.queryData.flightNO,
-            startDate: this.queryData.flightDate,
-            endDate: this.queryData.flightDate,
-            U_Device_ID: row.containerNumber
-          }
-        })
-      }
-    },
     exportHandler(refName, tableName) {
       const table = this.$refs[refName].$el.cloneNode(true)
       const fileName = `${tableName}-${this.queryData.flightNO}-${this.queryData.flightDate}.xlsx`