guoxing 1 year ago
parent
commit
39a33d858f
  1. 254
      yxt-as-ui/src/layout/components/Sidebar/index.vue

254
yxt-as-ui/src/layout/components/Sidebar/index.vue

@ -35,74 +35,130 @@
YongHuid: [],
routes: [
// {
// path: '/storage',
// component: 'storage',
// redirect: '/storage',
// meta: {
// title: ''sss
// },
// children: [{
// path: '/inventory/inventory',
// component: () => import('@/views/storage/inventory/inventory.vue'),
// name: 'Inventory',
// meta: {
// title: '',
// noCache: true
// }
// },
// {
// path: '/stocktaking/index',
// name: 'Stocktaking',
// component: () => import('@/views/storage/stocktaking/index'),
// meta: {
// title: '',
// noCache: true
// }
// },
// {
// path: '/allocation/index',
// name: 'Allocation',
// component: () => import('@/views/storage/allocation/index'),
// meta: {
// title: '',
// noCache: true
// }
// },
// {
// path: '/deliveryNotice/index',
// name: 'DeliveryNotice',
// component: () => import('@/views/storage/deliveryNotice/index'),
// meta: {
// title: '',
// noCache: true
// }
// },
// {
// path: '/receivingGoods/index',
// name: 'ReceivingGoods',
// component: () => import('@/views/storage/receivingGoods/index'),
// meta: {
// title: '',
// noCache: true
// }
// },
// {
// path: '/upShelf/index',
// name: 'UpShelf',
// component: () => import('@/views/storage/upShelf/index'),
// meta: {
// title: '',
// noCache: true
// }
// },
// ]
// },
{
path: '/storage',
component: 'storage',
redirect: '/storage',
meta: {
title: '仓储'
},
children: [{
path: '/inventory/inventory',
component: () => import('@/views/storage/inventory/inventory.vue'),
name: 'Inventory',
meta: {
title: '库存查询',
noCache: true
}
},
{
path: '/stocktaking/index',
name: 'Stocktaking',
component: () => import('@/views/storage/stocktaking/index'),
meta: {
title: '盘点管理',
noCache: true
}
},
{
path: '/allocation/index',
name: 'Allocation',
component: () => import('@/views/storage/allocation/index'),
meta: {
title: '调拨管理',
noCache: true
}
},
{
path: '/deliveryNotice/index',
name: 'DeliveryNotice',
component: () => import('@/views/storage/deliveryNotice/index'),
meta: {
title: '到货通知单',
noCache: true
}
},
{
path: '/receivingGoods/index',
name: 'ReceivingGoods',
component: () => import('@/views/storage/receivingGoods/index'),
meta: {
title: '收货单管理',
noCache: true
}
},
{
path: '/upShelf/index',
name: 'UpShelf',
component: () => import('@/views/storage/upShelf/index'),
meta: {
title: '上架单管理',
noCache: true
}
},
{
path: '/oldPartsFactory/index',
name: 'OldPartsFactory',
component: () => import('@/views/storage/oldPartsFactory/index'),
meta: {
title: '旧件返厂',
noCache: true
}
},
{
path: '/oldPartsCope/index',
name: 'OldPartsCope',
component: () => import('@/views/storage/oldPartsCope/index'),
meta: {
title: '旧件处理',
noCache: true
}
},
{
path: '/oldPartsRecovery/index',
name: 'OldPartsRecovery',
component: () => import('@/views/storage/oldPartsRecovery/index'),
meta: {
title: '旧件回收',
noCache: true
}
},
{
path: '/oldPartsInStorage/index',
name: 'OldPartsInStorage',
component: () => import('@/views/storage/oldPartsInStorage/index'),
meta: {
title: '旧件入库',
noCache: true
}
},
{
path: '/oldPartsInvertory/index',
name: 'OldPartsInvertory',
component: () => import('@/views/storage/oldPartsInvertory/index'),
meta: {
title: '旧件库存',
noCache: true
}
},
{
path: '/oldPartsInAndOutStorage/index',
name: 'OldPartsInAndOutStorage',
component: () => import('@/views/storage/oldPartsInAndOutStorage/index'),
meta: {
title: '旧件出入库查询',
noCache: true
}
},
]
},
],
params: {
sourceSid: 'ab270a77-a3a2-4ac5-9bf9-1e0d68a900c6',
// sourceSid: '',
// sourceSid: 'ab270a77-a3a2-4ac5-9bf9-1e0d68a900c6',
sourceSid: '',
userSid: ''
},
}
@ -117,17 +173,17 @@
// return this.$router.options.routes
// },
activeMenu() {
const route = this.$route
const {
meta,
path
} = route
// if set path, the sidebar will highlight the path you set
if (meta.activeMenu) {
return meta.activeMenu
}
return path
// return '/index'
// const route = this.$route
// const {
// meta,
// path
// } = route
// // if set path, the sidebar will highlight the path you set
// if (meta.activeMenu) {
// return meta.activeMenu
// }
// return path
return '/index'
},
showLogo() {
return this.$store.state.settings.sidebarLogo
@ -145,30 +201,30 @@
methods: {
//
postHuoquyonghu() {
var token = getStorage()
loginDetails(token).then((response) => {
if (response.code === '200') {
this.YongHuid = response.data
this.params.userSid = this.YongHuid.sid
getrolemenus(this.params).then((res) => {
const userRoles = this.resRouter(res.data)
userRoles.push({
path: '*',
redirect: '/404',
hidden: true
})
return userRoles
})
}
})
// this.routes.push({
// path: '*',
// redirect: '/404',
// hidden: true
// var token = getStorage()
// loginDetails(token).then((response) => {
// if (response.code === '200') {
// this.YongHuid = response.data
// this.params.userSid = this.YongHuid.sid
// getrolemenus(this.params).then((res) => {
// const userRoles = this.resRouter(res.data)
// userRoles.push({
// path: '*',
// redirect: '/404',
// hidden: true
// })
// return userRoles
// })
// }
// })
// console.log('', this.routes)
// return this.routes
this.routes.push({
path: '*',
redirect: '/404',
hidden: true
})
console.log('左侧菜单', this.routes)
return this.routes
},
resRouter(menus) {

Loading…
Cancel
Save