zhaoke 9 months ago
parent
commit
6856c5e3a8

+ 4 - 9
src/components/Hamburger/index.vue

@@ -1,13 +1,6 @@
 <template>
   <div style="padding: 0 15px;" @click="toggleClick">
-    <svg
-      :class="{'is-active':isActive}"
-      class="hamburger"
-      viewBox="0 0 1024 1024"
-      xmlns="http://www.w3.org/2000/svg"
-      width="64"
-      height="64"
-    >
+    <svg :class="{'is-active':isActive}" class="hamburger" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="64" height="64">
       <path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z" />
     </svg>
   </div>
@@ -23,7 +16,7 @@ export default {
     }
   },
   methods: {
-    toggleClick() {
+    toggleClick () {
       this.$emit('toggleClick')
     }
   }
@@ -36,6 +29,8 @@ export default {
   vertical-align: middle;
   width: 20px;
   height: 20px;
+  background-color: #fff;
+  cursor: pointer;
 }
 
 .hamburger.is-active {

+ 8 - 2
src/layout/components/Navbar.vue

@@ -59,7 +59,7 @@
         </div> -->
       </div>
     </div>
-    <div class="navbar_lower" id="navbar_lowers">
+    <div class="navbar_lower" :class="isSidebar ? 'hide_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="index < breadList.length -1 ? item.path : undefined">
           <span>{{ item.meta.title }}</span>
@@ -102,7 +102,10 @@ export default {
     }
   },
   computed: {
-    ...mapGetters(['sidebar', 'avatar', 'timeZone'])
+    ...mapGetters(['sidebar', 'avatar', 'timeZone']),
+    isSidebar () {
+      return !this.sidebar.opened
+    }
   },
   mounted () {
     this.getTimeInterval = setInterval(() => {
@@ -466,5 +469,8 @@ export default {
       // color: #ffffff;
     }
   }
+  .hide_navbar_lower {
+    padding-left: 48px;
+  }
 }
 </style>

+ 1 - 1
src/layout/components/Sidebar/SidebarItem.vue

@@ -10,7 +10,7 @@
 
     <el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
       <template v-if="item.meta" slot="title">
-        <item :meta="item.meta" />
+        <item :meta="item.meta" :icon="item.meta.elSvgIcon||(item.meta&&item.meta.elSvgIcon)" />
         <span>{{ item.meta.title }}</span>
       </template>
       <SidebarItem v-for="child in item.children" :key="child.path" :is-nest="true" :item="child" :base-path="resolvePath(child.path)" />

+ 9 - 3
src/layout/components/Sidebar/index.vue

@@ -1,11 +1,11 @@
 <template>
   <div :class="{ 'has-logo': showLogo }">
-    <logo v-if="showLogo" :collapse="isCollapse" />
     <el-scrollbar wrap-class="scrollbar-wrapper">
-      <el-menu class="navMenu" :default-active="activeMenu" :background-color="variables.menusBg" :text-color="variables.menuText" :unique-opened="false" :active-text-color="variables.menuActiveText" :collapse-transition="false" mode="vertical">
+      <el-menu class="navMenu" :collapse="isCollapse" :default-active="activeMenu" :background-color="variables.menusBg" :text-color="variables.menuText" :unique-opened="false" :active-text-color="variables.menuActiveText" :collapse-transition="false" mode="vertical">
         <sidebar-item v-for="(route, index) in permission_routes" :key="index" :item="route" :base-path="route.path" :leup="leup" />
       </el-menu>
     </el-scrollbar>
+    <hamburger :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
   </div>
 </template>
 
@@ -14,6 +14,7 @@ import { mapGetters } from "vuex";
 import Logo from "./Logo";
 import SidebarItem from "./SidebarItem";
 import variables from "@/styles/variables.scss";
+import Hamburger from '@/components/Hamburger'
 
 export default {
   data () {
@@ -21,7 +22,7 @@ export default {
       leup: true,
     };
   },
-  components: { SidebarItem, Logo },
+  components: { SidebarItem, Logo, Hamburger },
   computed: {
     ...mapGetters(["sidebar", "permission_routes"]),
     routes () {
@@ -67,6 +68,11 @@ export default {
       return !this.sidebar.opened;
     },
   },
+  methods: {
+    toggleSideBar () {
+      this.$store.dispatch('app/toggleSideBar')
+    },
+  }
 };
 </script>
 

+ 11 - 3
src/layout/index.vue

@@ -1,9 +1,9 @@
 <template>
   <div class="app-wrapper">
-    <sidebar class="sidebar-container" id="sidebar-containers" />
+    <sidebar class="sidebar-container" :class="isSidebar ? 'hide-sidebar-container' : ''" id="sidebar-containers" />
     <div class="main-container">
       <navbar />
-      <app-main id="main-containers" />
+      <app-main id="main-containers" :class="isSidebar ? 'hide-main-containers' : ''" />
     </div>
     <!--修改密码弹框-->
     <Dialog width="496px" customClass="dataStoreInfoDialog" :flag="pwdflag">
@@ -93,6 +93,12 @@ export default {
   },
   computed: {
     ...mapGetters(['pwdflag', 'outflag', 'name']),
+    sidebar () {
+      return this.$store.state.app.sidebar
+    },
+    isSidebar () {
+      return !this.sidebar.opened
+    }
   },
   methods: {
     //存储数据项-提交
@@ -213,7 +219,9 @@ export default {
   position: absolute;
   z-index: 999;
 }
-
+.hide-main-containers {
+  padding-left: 48px;
+}
 .fixed-header {
   position: fixed;
   top: 0;

+ 4 - 0
src/styles/sidebar.scss

@@ -107,6 +107,10 @@
     }
   }
 
+  .hide-sidebar-container {
+    width: 48px;
+  }
+
   .hideSidebar {
     .sidebar-container {
       width: 240px;

+ 1 - 1
src/views/newBagDetails/components/baggageStory.vue

@@ -4,7 +4,7 @@
       <el-table height="400" :data="storyTable" border style="width: 100%">
         <el-table-column prop="luggageDescribe" label="行李服务记录">
         </el-table-column>
-        <el-table-column prop="createtime" label="行李服务时间">
+        <el-table-column prop="createtime" label="行李创建时间">
         </el-table-column>
       </el-table>
     </div>

+ 5 - 6
src/views/newBagDetails/components/baggageView.vue

@@ -158,14 +158,13 @@ export default {
         const arrs = item.bagStatus
         const { stateProp, stateValue } = arrs[index]
         if (stateProp == 'securityInspectionResults' && stateValue == 'UCL') {
-          return 'step-circle-danger'
+          if (arrs[index + 1].stateValue || arrs[index + 1].loclValue || arrs[index + 1].timeValue || arrs[index + 2].stateValue || arrs[index + 2].loclValue || arrs[index + 2].timeValue) {
+            return 'step-circle-waring'
+          } else {
+            return 'step-circle-danger'
+          }
         }
         if (stateProp == 'securityInspectionResults' && !stateValue) {
-          const nowdate = new Date().getHours() + ':' + new Date().getMinutes()
-          const takedate = diffMinutes()
-          // if ((nowdate == takedate.replace(' ', '')) && (!arrs[index + 1].stateValue && !arrs[index + 1].loclValue && !arrs[index + 1].timeValue)) {
-          //   return 'step-circle-danger'
-          // }
           if (this.tableData.length < 2 && !arrs[index + 1].stateValue && !arrs[index + 1].loclValue && !arrs[index + 1].timeValue && !arrs[index + 2].stateValue && !arrs[index + 2].loclValue && !arrs[index + 2].timeValue) {
             return 'step-circle-danger'
           } else {

+ 1 - 1
src/views/newBagDetails/index.vue

@@ -201,7 +201,7 @@ export default {
           for (const key in datasObj) {
             this.msgs1.map(item => {
               if (item.columnName == key) {
-                item.value = datasObj[key]
+                item.value = item.columnName == 'activeState' ? datasObj[key] == 0 ? 'N' : 'Y' : datasObj[key]
               }
             })
           }

+ 0 - 4
src/views/statisticsCharts/mixins/checkType.js

@@ -33,10 +33,6 @@ export default {
         {
           value: 'GATE',
           label: 'GATE'
-        },
-        {
-          value: 'TPE',
-          label: 'TPE'
         }
       ],
       props: {