rt-sim-training-client/src/views/dashboard/index.vue

90 lines
1.8 KiB
Vue
Raw Normal View History

2019-07-02 16:29:52 +08:00
<template>
<div class="dashboard-container">
2019-08-16 14:25:20 +08:00
<!-- <div class="item-row" style="margin-top: 20px">
2019-08-15 14:28:31 +08:00
<div class="item-col">
2019-08-15 18:04:23 +08:00
<echarts-lesson id="lesson" ref="lesson" :size="{width: size.width, height: size.height}" />
2019-08-15 14:28:31 +08:00
</div>
<div class="item-col">
2019-08-15 18:04:23 +08:00
<echarts-exam id="exam" ref="exam" :size="{width: size.width, height: size.height}" />
2019-08-15 14:28:31 +08:00
</div>
</div>
<div class="item-flex">
2019-08-15 18:04:23 +08:00
<echarts-demon id="demon" ref="demon" :size="{width: size.width * 2 + 4, height: size.height}" />
2019-08-16 14:25:20 +08:00
</div> -->
<echarts-permission ref="permission" class="perssmin-card" :size="{ width: size.width, height: size.height }" />
2019-07-02 16:29:52 +08:00
</div>
</template>
<script>
2019-08-14 14:52:21 +08:00
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
2019-08-16 14:25:20 +08:00
// import EchartsExam from './echarts/exam';
// import EchartsLesson from './echarts/lesson';
// import EchartsDemon from './echarts/demonstration';
import EchartsPermission from './echarts/permission';
2019-07-02 16:29:52 +08:00
export default {
name: 'Dashboard',
2019-08-14 14:52:21 +08:00
components: {
2019-08-16 14:25:20 +08:00
// EchartsExam,
// EchartsLesson,
// EchartsDemon,
EchartsPermission
2019-08-14 14:52:21 +08:00
},
mixins: [WindowResizeHandler],
data() {
return {
2019-08-15 08:58:21 +08:00
size: {
width: 0,
height: 0
}
2019-08-14 14:52:21 +08:00
};
},
methods: {
resizeHandler() {
2019-08-16 14:25:20 +08:00
// this.size = {
// width: (this._clientWidth - 60) / 2,
// height: (this._clientHeight - 100) / 2
// };
2019-08-15 08:58:21 +08:00
this.size = {
2019-08-16 14:25:20 +08:00
width: (this._clientWidth - 40),
height: (this._clientHeight - 100)
2019-08-15 08:58:21 +08:00
};
2019-08-14 14:52:21 +08:00
}
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 {
2019-08-15 08:58:21 +08:00
margin: 0px;
2019-07-02 16:29:52 +08:00
}
&-text {
font-size: 30px;
line-height: 46px;
}
}
2019-08-15 08:58:21 +08:00
.item-col {
display: inline-block;
}
.item-row {
left: 50%;
right: 50%;
text-align: center;
}
.item-flex {
display: flex;
justify-content: center;
}
2019-08-16 14:25:20 +08:00
.perssmin-card {
display: flex;
justify-content: center;
margin-top: 20px;
}
2019-07-02 16:29:52 +08:00
</style>