Browse Source

修改问题

master
yunuo970428 1 year ago
parent
commit
dde4ebd81c
  1. 7
      yxt-as-ui/.env.development
  2. 188
      yxt-as-ui/src/layout/components/Sidebar/index.vue

7
yxt-as-ui/.env.development

@ -6,9 +6,4 @@ VUE_APP_BASE_API = '/api'
## 配置测试和本地开发时的 接口地址 ## 配置测试和本地开发时的 接口地址
##VUE_APP_URL = "http://26077a35f5.wicp.vip" ##VUE_APP_URL = "http://26077a35f5.wicp.vip"
##VUE_APP_URL = "http://anrui.yyundong.com" VUE_APP_URL = "http://anrui.yyundong.com"
## wms
##VUE_APP_URL = "http://127.0.0.1:4523/m1/4061550-0-default"
## 安瑞
VUE_APP_URL = "http://127.0.0.1:4523/m1/613533-0-default"

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

@ -2,9 +2,7 @@
<div :class="{'has-logo':showLogo}"> <div :class="{'has-logo':showLogo}">
<logo v-if="showLogo" :collapse="isCollapse" /> <logo v-if="showLogo" :collapse="isCollapse" />
<el-scrollbar wrap-class="scrollbar-wrapper"> <el-scrollbar wrap-class="scrollbar-wrapper">
<el-menu :default-active="activeMenu" :background-color="variables.menuBg" :text-color="variables.menuText" <el-menu :default-active="activeMenu" :background-color="variables.menuBg" :text-color="variables.menuText" :unique-opened="false" :active-text-color="variables.menuActiveText" :collapse-transition="false" mode="vertical">
:unique-opened="false" :active-text-color="variables.menuActiveText" :collapse-transition="false"
mode="vertical">
<sidebar-item v-for="route in routes" :key="route.path" :item="route" :base-path="route.path" /> <sidebar-item v-for="route in routes" :key="route.path" :item="route" :base-path="route.path" />
</el-menu> </el-menu>
</el-scrollbar> </el-scrollbar>
@ -33,134 +31,11 @@
data() { data() {
return { return {
YongHuid: [], YongHuid: [],
routes: [ routes: [],
{
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: { params: {
// sourceSid: 'ab270a77-a3a2-4ac5-9bf9-1e0d68a900c6', sourceSid: 'ab270a77-a3a2-4ac5-9bf9-1e0d68a900c6',
sourceSid: '',
userSid: '' userSid: ''
}, }
} }
}, },
computed: { computed: {
@ -173,17 +48,16 @@
// return this.$router.options.routes // return this.$router.options.routes
// }, // },
activeMenu() { activeMenu() {
// const route = this.$route const route = this.$route
// const { const {
// meta, meta,
// path path
// } = route } = route
// // if set path, the sidebar will highlight the path you set // if set path, the sidebar will highlight the path you set
// if (meta.activeMenu) { if (meta.activeMenu) {
// return meta.activeMenu return meta.activeMenu
// } }
// return path return path
return '/index'
}, },
showLogo() { showLogo() {
return this.$store.state.settings.sidebarLogo return this.$store.state.settings.sidebarLogo
@ -201,31 +75,22 @@
methods: { methods: {
// //
postHuoquyonghu() { postHuoquyonghu() {
// var token = getStorage() var token = getStorage()
// loginDetails(token).then((response) => { loginDetails(token).then((response) => {
// if (response.code === '200') { if (response.code === '200') {
// this.YongHuid = response.data this.YongHuid = response.data
// this.params.userSid = this.YongHuid.sid this.params.userSid = this.YongHuid.sid
// getrolemenus(this.params).then((res) => { getrolemenus(this.params).then((res) => {
// const userRoles = this.resRouter(res.data) const userRoles = this.resRouter(res.data)
// userRoles.push({ userRoles.push({
// path: '*',
// redirect: '/404',
// hidden: true
// })
// return userRoles
// })
// }
// })
this.routes.push({
path: '*', path: '*',
redirect: '/404', redirect: '/404',
hidden: true hidden: true
}) })
console.log('左侧菜单', this.routes) return userRoles
return this.routes })
}
})
}, },
resRouter(menus) { resRouter(menus) {
// //
@ -238,7 +103,6 @@
delete menus[i].redirect delete menus[i].redirect
} }
if (menus[i].component == '') { if (menus[i].component == '') {
console.log('55555', menus[i])
menus[i] = { menus[i] = {
path: menus[i].path, path: menus[i].path,
component: Layout, component: Layout,

Loading…
Cancel
Save