2019-07-02 16:29:52 +08:00
|
|
|
<template>
|
|
|
|
<div class="dashboard-container">
|
2019-08-14 14:52:21 +08:00
|
|
|
<el-row type="flex" justify="center">
|
|
|
|
<el-col :span="12">
|
|
|
|
<echarts-lesson id="lesson" ref="lesson" :width="width + 'px'" :height="height+ 'px'" />
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<echarts-lesson id="exam" ref="exam" :width="width + 'px'" :height="height+ 'px'" />
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="12">
|
|
|
|
<echarts-lesson id="deomon" ref="deomon" :width="width + 'px'" :height="height+ 'px'" />
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<echarts-lesson id="test" ref="test" :width="width + 'px'" :height="height+ 'px'" />
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
2019-07-02 16:29:52 +08:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2019-08-13 11:10:55 +08:00
|
|
|
import { mapGetters } from 'vuex';
|
2019-08-14 14:52:21 +08:00
|
|
|
import EchartsLesson from './echarts/lesson';
|
|
|
|
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
2019-07-02 16:29:52 +08:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'Dashboard',
|
2019-08-14 14:52:21 +08:00
|
|
|
components: {
|
|
|
|
EchartsLesson
|
|
|
|
},
|
|
|
|
mixins: [WindowResizeHandler],
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
width: 0,
|
|
|
|
height: 0
|
|
|
|
};
|
|
|
|
},
|
2019-07-02 16:29:52 +08:00
|
|
|
computed: {
|
|
|
|
...mapGetters([
|
|
|
|
'name'
|
|
|
|
])
|
2019-08-14 14:52:21 +08:00
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
resizeHandler() {
|
|
|
|
this.width = this._clientWidth / 2;
|
|
|
|
this.height = this._clientHeight - 80;
|
|
|
|
}
|
2019-07-02 16:29:52 +08:00
|
|
|
}
|
2019-08-13 11:10:55 +08:00
|
|
|
};
|
2019-07-02 16:29:52 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.dashboard {
|
|
|
|
&-container {
|
|
|
|
margin: 30px;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-text {
|
|
|
|
font-size: 30px;
|
|
|
|
line-height: 46px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|