Browse Source

fix: 路由调整

zh 2 years ago
parent
commit
a24632a532

+ 4 - 2
src/components/NotifyBox/index.vue

@@ -679,13 +679,15 @@ export default {
       this.visible = false
     },
     handleJump(id) {
-      this.$router.push({ path: `/supply/pickup/sum_list?id=${id}` })
+      // this.$router.push({ path: `/supply/pickup/sum_list?id=${id}` })
+      this.$router.push({name: 'exwarehouseSum_list', query:{id}})
       this.type = 0
       this.$emit('reset')
       this.$store.commit('user/showMessage', 'no')
     },
     handleToDaily(orderId) {
-      this.$router.push({ path: `/basic_data/dailyWarehouseRent?orderId=${orderId}` })
+      // this.$router.push({ path: `/basic_data/dailyWarehouseRent?orderId=${orderId}` })
+      this.$router.push({ name: 'dailyWarehouseRent', query:{orderId}})
       this.type = 0
       this.$emit('reset')
       this.$store.commit('user/showMessage', 'no')

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

@@ -1,14 +1,14 @@
 <template>
   <div v-if="!item.hidden || item.noShowingChildren">
     <template v-if="!item.children || !item.children.length">
-      <app-link v-if="item.meta" :to="item.name">
-        <el-menu-item :index="item.name" :class="{ 'submenu-title-noDropdown': !isNest }">
+      <app-link v-if="item.meta" :to="item.path">
+        <el-menu-item :index="item.path" :class="{ 'submenu-title-noDropdown': !isNest }">
           <item :icon="item.meta.icon || (item.meta && item.meta.icon)" :title="item.meta.title" />
         </el-menu-item>
       </app-link>
     </template>
 
-    <el-submenu v-else ref="subMenu" :index="item.name" popper-append-to-body>
+    <el-submenu v-else ref="subMenu" :index="item.path" popper-append-to-body>
       <template slot="title">
         <item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
       </template>

+ 1 - 1
src/permission.js

@@ -83,7 +83,7 @@ function buildRoute(route, parentUrl = '') {
   const { url, moduleName, icon, moduleId, code, type, hidden, fullUrl } = route
   var item = {}
   item.path = ~[3, 4].indexOf(type) ? fullUrl : parentUrl + url
-  item.name = ~[3, 4].indexOf(type) ? fullUrl : parentUrl + url
+  item.name = ~[3, 4].indexOf(type) ? fullUrl : code
   item.type = type
   item.meta = {
     url,

+ 1 - 1
src/views/supply/pickup/pickup_list.vue

@@ -266,7 +266,7 @@ export default {
     backList() {
       this.isShowForm = false
       if (this.$route.query && this.$route.query.id) {
-        this.$router.push('/supply/pickup/sum_list')
+        this.$router.push({name: 'exwarehouseSum_list'})
       } else {
         this.queryItem = {}
         this.$refs.pageRef.refreshList()

+ 1 - 1
src/views/supply/pickup/sum_list.vue

@@ -148,7 +148,7 @@ export default {
             ) : null}
             <el-button onClick={() => {
               this.$router.push({
-                path: '/supply/pickup/pickup_list',
+                name: 'pickup_list',
                 query: {
                   id: row.id
                 }