parent
bef9531f73
commit
9f5984bd88
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,17 @@
|
||||
<template>
|
||||
<el-card shadow="hover" body-style="padding: 50px;">
|
||||
<span>{{name}}</span>
|
||||
<slot></slot>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "block",
|
||||
props:['name']
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -0,0 +1,71 @@
|
||||
<template>
|
||||
<div id="module2" :style="md2Style">
|
||||
<el-container>
|
||||
<!-- 头部组件-->
|
||||
<el-header style="size: 20px;text-align: right;padding-top: 10px">
|
||||
<drop-down-user :user="user" @back="backLogin"></drop-down-user>
|
||||
</el-header>
|
||||
<!-- body部分-->
|
||||
<el-main class="main" >
|
||||
<el-row>
|
||||
<el-col :span="8" :offset="8">
|
||||
<el-card shadow="always" style="margin-bottom: 30%" ><h1>Hi{{user}},欢迎您</h1></el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 用一个循环把所有的功能模块加载出来 -->
|
||||
<el-row :gutter="40" justify="center" type="flex" align="bottom">
|
||||
<el-col :span="6" v-for="item in names">
|
||||
<block :name="item" :style="bodyStyle" ></block>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-main>
|
||||
</el-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import dropDownUser from "~/components/dropDownUser";
|
||||
import block from "~/components/block";
|
||||
import {get} from "~/utils";
|
||||
export default {
|
||||
name: "home",
|
||||
props:[
|
||||
'names',
|
||||
'user'
|
||||
],
|
||||
data(){
|
||||
return{
|
||||
url:'',
|
||||
md2Style:'background-color: aquamarine;height:',
|
||||
bodyStyle:'background: deepskyblue',
|
||||
}
|
||||
},
|
||||
components:{
|
||||
block,
|
||||
dropDownUser
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.md2Style+= window.innerHeight
|
||||
this.md2Style+='px'
|
||||
console.log(this.md2Style)
|
||||
|
||||
},
|
||||
methods:{
|
||||
backPersonal:function(){
|
||||
this.$router.push('')
|
||||
},
|
||||
backLogin:function () {
|
||||
this.$router.push('/login')
|
||||
},
|
||||
goPersonal:function () {
|
||||
get('/lb/user/home')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -0,0 +1,24 @@
|
||||
<template>
|
||||
<div>
|
||||
<home :names="{name1:'管理实验室',name2:'审核'}" :user="user"></home>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import home from "~/components/home";
|
||||
export default {
|
||||
name: "index",
|
||||
data(){
|
||||
return{
|
||||
user:'林大池'
|
||||
}
|
||||
},
|
||||
components:{
|
||||
home
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -0,0 +1,24 @@
|
||||
<template>
|
||||
<div>
|
||||
<home :names="{name1:'管理实验室',name2:'管理教师/管理员信息',name3:'新增教师/管理员信息'}" :user="user"></home>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import home from "~/components/home";
|
||||
export default {
|
||||
name: "index",
|
||||
data(){
|
||||
return{
|
||||
user:"林大池"
|
||||
}
|
||||
},
|
||||
components:{
|
||||
home
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
Loading…
Reference in new issue