mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
Merge branch 'master' of https://gitee.com/js-yhsec/energy_storage
This commit is contained in:
@@ -81,7 +81,7 @@ export default {
|
||||
if (res.errcode === 0) {
|
||||
this.$message.success('登录成功')
|
||||
localStorage.setItem('token', res.token)
|
||||
localStorage.setItem('user',JSON.stringify( res.permission) )
|
||||
localStorage.setItem('permission',JSON.stringify( res.permission) )
|
||||
this.$router.push('/')
|
||||
|
||||
}
|
||||
|
||||
@@ -149,15 +149,15 @@ export default {
|
||||
})
|
||||
},
|
||||
initRoute() {
|
||||
console.log(localStorage.getItem('user'), "localStorage.getItem('user')")
|
||||
console.log(localStorage.getItem('permission'), "localStorage.getItem('permission')")
|
||||
// 执行过滤
|
||||
// const filteredRoutes = this.filterRoutes(
|
||||
// this.menuList,
|
||||
// JSON.parse(localStorage.getItem('user'))
|
||||
// JSON.parse(localStorage.getItem('permission'))
|
||||
// )
|
||||
console.log( this.$route.matched, 'filteredRoutes')
|
||||
this.subMenu = this.$route.matched[1].children || []
|
||||
// this.menuList= JSON.parse(localStorage.getItem('user'))
|
||||
// this.menuList= JSON.parse(localStorage.getItem('permission'))
|
||||
// this.subMenu =filteredRoutes[0].children||[]
|
||||
|
||||
this.currentKey = '/' + this.$route.fullPath.split('/')[1]
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<template #status="record">
|
||||
<span>{{ ['未启用', '启用'][record.status] }}</span>
|
||||
</template>
|
||||
<template #work_mode_id="record">
|
||||
<template #work_mode="record">
|
||||
<span>{{workModeList.find(item=>record.value==item.value)?.label|| '' }}</span>
|
||||
</template>
|
||||
<template #policy_id="record">
|
||||
|
||||
Reference in New Issue
Block a user