Commit a45e068f by 姜雷

修改数据首页布局

parent d1f43f32
...@@ -212,6 +212,7 @@ export default { ...@@ -212,6 +212,7 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
@import '@/assets/styles/variables.scss';
.Dashboard { .Dashboard {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -246,7 +247,6 @@ export default { ...@@ -246,7 +247,6 @@ export default {
} }
.Dashboard-CampusData { .Dashboard-CampusData {
display: flex; display: flex;
height: 300px;
padding: 0 15px; padding: 0 15px;
.Dashboard-title { .Dashboard-title {
...@@ -321,4 +321,20 @@ export default { ...@@ -321,4 +321,20 @@ export default {
} }
} }
} }
@media screen and (max-width: $bigScreenWidth) {
.Dashboard {
.Dashboard-SearchBar {
padding: 10px 0 10px;
}
.Dashboard-OperatorData {
.Dashboard-SearchBar {
height: 50px;
}
.Dashboard-title {
margin: 10px 10px 0;
padding-bottom: 10px;
}
}
}
}
</style> </style>
...@@ -8,6 +8,7 @@ export default { ...@@ -8,6 +8,7 @@ export default {
data() { data() {
return { return {
chart: null, chart: null,
height: 270,
chartGeom: null, chartGeom: null,
}; };
}, },
...@@ -17,6 +18,11 @@ export default { ...@@ -17,6 +18,11 @@ export default {
}, },
}, },
mounted() { mounted() {
const innerWidth = window.innerWidth;
const innerHeight = window.innerHeight;
if (innerWidth < 1600) {
this.height = (innerHeight - 250) / 2;
}
this.initData(); this.initData();
}, },
methods: { methods: {
......
...@@ -24,7 +24,7 @@ export default { ...@@ -24,7 +24,7 @@ export default {
this.chart = new G2.Chart({ this.chart = new G2.Chart({
container: 'ActiveUserByMonth', container: 'ActiveUserByMonth',
forceFit: true, forceFit: true,
height: 270, height: this.height,
padding: [50, 40], padding: [50, 40],
}); });
this.chart this.chart
......
...@@ -29,7 +29,7 @@ export default { ...@@ -29,7 +29,7 @@ export default {
this.chart = new G2.Chart({ this.chart = new G2.Chart({
container: 'CampusRank', container: 'CampusRank',
forceFit: true, forceFit: true,
height: 270, height: this.height,
padding: [0, 130, 0, 0], padding: [0, 130, 0, 0],
}); });
this.chart.source(this.data); this.chart.source(this.data);
......
...@@ -19,7 +19,7 @@ export default { ...@@ -19,7 +19,7 @@ export default {
this.chart = new G2.Chart({ this.chart = new G2.Chart({
container: 'RegisterByDay', container: 'RegisterByDay',
forceFit: true, forceFit: true,
height: 270, height: this.height,
padding: [40, 20, 30, 45], padding: [40, 20, 30, 45],
}); });
this.chart this.chart
......
...@@ -18,7 +18,7 @@ export default { ...@@ -18,7 +18,7 @@ export default {
this.chart = new G2.Chart({ this.chart = new G2.Chart({
container: 'RegisterByMonth', container: 'RegisterByMonth',
forceFit: true, forceFit: true,
height: 270, height: this.height,
padding: [0, 20, 30, 20], padding: [0, 20, 30, 20],
}); });
this.chart this.chart
......
...@@ -29,7 +29,7 @@ export default { ...@@ -29,7 +29,7 @@ export default {
this.chart = new G2.Chart({ this.chart = new G2.Chart({
container: 'SeviceRatio', container: 'SeviceRatio',
forceFit: true, forceFit: true,
height: 270, height: this.height,
padding: [0, 130, 0, 0], padding: [0, 130, 0, 0],
}); });
this.chart.source(this.data); this.chart.source(this.data);
......
...@@ -8,11 +8,6 @@ ...@@ -8,11 +8,6 @@
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js"></script> <script src="https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vuex@3.1.0/dist/vuex.js"></script> <script src="https://cdn.jsdelivr.net/npm/vuex@3.1.0/dist/vuex.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-router@3.0.1/dist/vue-router.js"></script> <script src="https://cdn.jsdelivr.net/npm/vue-router@3.0.1/dist/vue-router.js"></script>
<link
rel="stylesheet"
href="<%= VUE_APP_LIB_MANAGER %>/customerManage/lib/customerManage.css"
/>
<link <link
rel="stylesheet" rel="stylesheet"
href="<%= VUE_APP_LIB_MANAGER %>/baseManage/lib/baseManage.css" href="<%= VUE_APP_LIB_MANAGER %>/baseManage/lib/baseManage.css"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment