parent
f4b83253bf
commit
94a40e7db4
@ -0,0 +1,54 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<home :names="homeParams" :user="nickname" personal-url="/supManager/index/personal"></home>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import home from "~/components/home";
|
||||||
|
import {get} from "~/utils";
|
||||||
|
import {showSuccess} from "~/utils/dialog";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
home
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
nickname: '未登录',
|
||||||
|
homeParams: [
|
||||||
|
{
|
||||||
|
name: '实验室管理', func: () => {
|
||||||
|
this.$router.push('/supManager/index/labManage')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '用户管理', func: () => {
|
||||||
|
this.$router.push('/supManager/index/userManage')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '个人中心', func: () => {
|
||||||
|
this.$router.push('/supManager/index/personal')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async backLogin() {
|
||||||
|
await get('lb/user/logout')
|
||||||
|
await showSuccess('退出成功', this)
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$router.push('/login')
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async mounted() {
|
||||||
|
this.nickname = await get('lb/user/getUserName')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
Loading…
Reference in new issue