Bladeren bron

Merge branch 'dev_g' into test_g

AmandaG 6 maanden geleden
bovenliggende
commit
646473fb07

+ 5 - 0
src/router/index.ts

@@ -142,6 +142,11 @@ const router = createRouter({
           meta: {
             activeMenu: '/SystemSettings'
           }
+        },
+        {
+          path: '/Booking/DestinationDelivery',
+          name: 'Destination Delivery',
+          component: () => import('../views/DesDelivery')
         }
       ]
     }

+ 16 - 1
src/stores/modules/breadCrumb.ts

@@ -16,7 +16,8 @@ const whiteList = [
   'Add VGM',
   'Public Tracking Detail',
   'Create New Rule',
-  'System Message Detail'
+  'System Message Detail',
+  'Destination Delivery',
 ]
 
 export const useBreadCrumb = defineStore('breadCrumb', {
@@ -27,6 +28,7 @@ export const useBreadCrumb = defineStore('breadCrumb', {
   actions: {
     setRouteList(toRoute: any) {
       const index = this.routeList.findIndex((item) => item.label === toRoute.name)
+      console.log(toRoute.name)
       if (index !== -1) {
         this.routeList.splice(index + 1)
       } else if (toRoute.name === 'Public Tracking Detail') {
@@ -68,6 +70,19 @@ export const useBreadCrumb = defineStore('breadCrumb', {
             query: toRoute.query
           }
         ]
+      } else if (toRoute.name === 'Destination Delivery') {
+        this.routeList = [
+          {
+            label: 'Destination Delivery',
+            path: '/booking',
+            query: ''
+          },
+          {
+            label: 'Configurations',
+            path: '/Booking/DestinationDelivery',
+            query: toRoute.query
+          }
+        ]
       } else if (toRoute.name && whiteList.includes(toRoute.name)) {
         this.routeList.push({
           label: toRoute?.meta?.breadName || toRoute.name,

+ 1 - 0
src/views/DesDelivery/index.ts

@@ -0,0 +1 @@
+export { default } from './src/DesDelivery.vue'

+ 3 - 0
src/views/DesDelivery/src/DesDelivery.vue

@@ -0,0 +1,3 @@
+<template>
+  <div>123</div>
+</template>

+ 53 - 2
src/views/Layout/src/components/Menu/MenuView.vue

@@ -10,7 +10,58 @@ const userStore = useUserStore()
 
 const isCollapse = defineModel<boolean>()
 
-const menuList = ref()
+const menuList = ref(
+  [
+    {
+      index: '1',
+      icon: 'icon_data_fill_b',
+      label: 'Dashboard',
+      path: '/dashboard'
+    },
+    {
+      index: '2',
+      icon: 'icon_booking__fill_b',
+      label: 'Booking',
+      type: "list",
+      children: [
+        {
+          index: '2-1',
+          label: 'Booking Management',
+          path: '/booking'
+        },
+        {
+          index: '2-2',
+          label: 'Destination Delivery',
+          path: '/Booking/DestinationDelivery'
+        },
+      ]
+    },
+    {
+      index: '3',
+      icon: 'icon_tracking__fill_b',
+      label: 'Tracking',
+      path: '/tracking'
+    },
+    {
+      index: '4',
+      icon: 'icon_system__management_fill_b',
+      label: 'System Management',
+      type: "list",
+      children: [
+        {
+          index: '4-1',
+          label: 'System Message',
+          path: '/system-message'
+        },
+        {
+          index: '4-2',
+          label: 'System Settings',
+          path: '/SystemSettings'
+        }
+      ]
+    }
+  ]
+)
 watch(
   () => userStore.userInfo?.uname,
   () => {
@@ -20,7 +71,7 @@ watch(
 const getMenuList = () => {
   $api.getMenuList().then((res) => {
     if (res.code === 200) {
-      menuList.value = res.data
+      // menuList.value = res.data
     }
   })
 }