a80c2f0b by 任超

feat:首页设配

1 parent 640def75
1 .home { 1 .home {
2 display: flex; 2 display: flex;
3 justify-content: space-between; 3 justify-content: space-between;
4 height: 100%;
4 5
5 .flexst { 6 .flexst {
6 display: flex; 7 display: flex;
...@@ -48,6 +49,7 @@ ...@@ -48,6 +49,7 @@
48 .home-left { 49 .home-left {
49 width: 70%; 50 width: 70%;
50 padding-right: 3px; 51 padding-right: 3px;
52 height: 100%;
51 53
52 .list-title { 54 .list-title {
53 overflow: hidden; 55 overflow: hidden;
...@@ -58,7 +60,7 @@ ...@@ -58,7 +60,7 @@
58 ul { 60 ul {
59 li { 61 li {
60 line-height: 36px; 62 line-height: 36px;
61 63
62 p { 64 p {
63 white-space: nowrap; 65 white-space: nowrap;
64 } 66 }
...@@ -66,6 +68,11 @@ ...@@ -66,6 +68,11 @@
66 } 68 }
67 } 69 }
68 70
71 .box-mountNode {
72 flex: 1;
73 height: calc(100% - 500px);
74 }
75
69 .home-right { 76 .home-right {
70 padding-left: 4px; 77 padding-left: 4px;
71 width: 30%; 78 width: 30%;
......
...@@ -59,7 +59,8 @@ ...@@ -59,7 +59,8 @@
59 </el-card> 59 </el-card>
60 </el-col> 60 </el-col>
61 </el-row> 61 </el-row>
62 <el-card shadow="hover" class="marginTop10" :body-style="{ paddingRight: '6px' }"> 62 <el-card shadow="hover" class="marginTop10 box-mountNode" id="mountNodeCon"
63 :body-style="{ padding: '8px 6px 0 6px' }">
63 <div id="mountNode"></div> 64 <div id="mountNode"></div>
64 </el-card> 65 </el-card>
65 </div> 66 </div>
...@@ -208,13 +209,11 @@ export default { ...@@ -208,13 +209,11 @@ export default {
208 window.open(href, '_blank'); 209 window.open(href, '_blank');
209 }, 210 },
210 buildChart () { 211 buildChart () {
212 let height = document.getElementById("mountNodeCon").offsetHeight - 20
211 var chart = new G2.Chart({ 213 var chart = new G2.Chart({
212 container: 'mountNode', 214 container: 'mountNode',
213 height: 205 215 height: height
214 }); 216 });
215 const e = document.createEvent('Event')
216 e.initEvent('resize', true, true)
217 window.dispatchEvent(e)
218 chart.source(this.chartData); 217 chart.source(this.chartData);
219 chart.scale({ 218 chart.scale({
220 value: { 219 value: {
......