1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
| <template>
| <div class="leftMnu">
| <div class="menuBox">
| <chart-vue :childData="childData"></chart-vue>
| </div>
| <div class="menuBox">
| <chart-vue :childData="childData1"></chart-vue>
| </div>
| <div class="menuBox">
| <chart-vue :childData="childData2"></chart-vue>
| </div>
| </div>
| </template>
|
| <script>
| import * as echarts from 'echarts';
| import chartVue from './list/chart.vue';
| import data from './data.js';
| export default {
| components: {
| chartVue
| },
| props: {
| leftChartData: {
| type: Object,
| required: true
| },
| },
| data() {
| return {
| childData: null,
| childData1: null,
| childData2: null,
| }
| },
| watch: {
|
| },
| mounted() {
| this.initEchart();
| },
| methods: {
| initEchart() {
| this.initEchart1();
| this.initEchart2();
| this.initEchart3();
| },
| initEchart1() {
| var chart1= data[3];
| chart1.id = "myChart01";
| this.childData =chart1
| },
| initEchart2() {
| var chart2= data[4];
| chart2.id = "myChart02";
| this.childData1 = chart2
| }, initEchart3() {
| var chart3= data[5];
| chart3.id = "myChart03";
| this.childData2 = chart3
| }
| }
| }
| </script>
|
| <style lang="scss" scoped>
| .leftMnu {
| height: 100%;
| width: 100%;
| display: flex;
| flex-direction: column;
| justify-content: space-between;
|
| .menuBox {
| width: 100%;
| height: 33%;
| background: url(~@/assets/images/Screen/chartbg.png);
| background-size: 100% 100%;
| background-repeat: no-repeat;
| display: flex;
| flex-direction: column;
|
| .aside-title {
| box-sizing: border-box;
| padding-left: 30px;
|
| font-size: 15px;
| font-family: YouSheBiaoTiHei, YouSheBiaoTiHei-Regular;
| color: #fff;
| width: 100%;
| height: 45px;
| line-height: 45px;
| // background: url(~@/assets/images/Screen/asideTitleBg.png);
| background-size: 100% 100%;
| background-repeat: no-repeat;
| }
|
| .echartBox {
| flex: 1;
| padding: 5px;
| position: relative;
|
| .chartBox {
| width: calc(100% - 10px);
| height: calc(100% - 10px);
|
| position: absolute;
| }
| }
| }
| }
| </style>
|
|