|
@@ -1,37 +1,77 @@
|
|
<template>
|
|
<template>
|
|
<div id="index">
|
|
<div id="index">
|
|
- <top topType="2"></top>
|
|
|
|
- <lineBar title="发表数"></lineBar>
|
|
|
|
- <gauge title="阅读数"></gauge>
|
|
|
|
- <pie title="点赞数"></pie>
|
|
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="24" class="main">
|
|
|
|
+ <el-col :span="24" class="top">
|
|
|
|
+ <top topType="2" :leftArrow="false"></top>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24" class="info" :style="{ height: clientHeight + 'px' }">
|
|
|
|
+ <lineBar title="发表数"></lineBar>
|
|
|
|
+ <gauge title="阅读数"></gauge>
|
|
|
|
+ <pie title="点赞数"></pie>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24" class="foot">
|
|
|
|
+ <foot></foot>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import top from '@/layout/common/top.vue';
|
|
|
|
import lineBar from './chart/lineBar.vue';
|
|
import lineBar from './chart/lineBar.vue';
|
|
import pie from './chart/pie.vue';
|
|
import pie from './chart/pie.vue';
|
|
import gauge from './chart/gauge.vue';
|
|
import gauge from './chart/gauge.vue';
|
|
|
|
+import top from '@/layout/common/top.vue';
|
|
|
|
+import foot from '@/layout/common/foot.vue';
|
|
|
|
+
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
export default {
|
|
export default {
|
|
name: 'index',
|
|
name: 'index',
|
|
props: {},
|
|
props: {},
|
|
- components: { lineBar, pie, gauge, top },
|
|
|
|
|
|
+ components: {
|
|
|
|
+ top,
|
|
|
|
+ foot,
|
|
|
|
+ lineBar,
|
|
|
|
+ pie,
|
|
|
|
+ gauge,
|
|
|
|
+ },
|
|
data: function() {
|
|
data: function() {
|
|
- return {};
|
|
|
|
|
|
+ return {
|
|
|
|
+ clientHeight: '',
|
|
|
|
+ };
|
|
},
|
|
},
|
|
created() {},
|
|
created() {},
|
|
|
|
+ mounted() {
|
|
|
|
+ let clientHeight = (document.documentElement.clientHeight || document.body.clientHeight) - 90;
|
|
|
|
+ this.$set(this, `clientHeight`, clientHeight);
|
|
|
|
+ },
|
|
methods: {},
|
|
methods: {},
|
|
computed: {
|
|
computed: {
|
|
- ...mapState(['user', 'menuParams']),
|
|
|
|
- pageTitle() {
|
|
|
|
- return `${this.$route.meta.title}`;
|
|
|
|
- },
|
|
|
|
|
|
+ ...mapState(['user']),
|
|
},
|
|
},
|
|
metaInfo() {
|
|
metaInfo() {
|
|
return { title: this.$route.meta.title };
|
|
return { title: this.$route.meta.title };
|
|
},
|
|
},
|
|
|
|
+ watch: {},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-<style lang="less" scoped></style>
|
|
|
|
|
|
+<style lang="less" scoped>
|
|
|
|
+.main {
|
|
|
|
+ .top {
|
|
|
|
+ height: 40px;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ border-bottom: 1px solid #f1f1f1;
|
|
|
|
+ }
|
|
|
|
+ .info {
|
|
|
|
+ overflow-x: hidden;
|
|
|
|
+ overflow-y: auto;
|
|
|
|
+ }
|
|
|
|
+ .foot {
|
|
|
|
+ height: 50px;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ border-top: 1px solid #f1f1f1;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+</style>
|