| | |
| | | <template> |
| | | <div class="leftMnu"> |
| | | <div class="menuBox"> |
| | | <div class="aside-title">{{ title.t1 }}</div> |
| | | <chart-vue :childData="childData"></chart-vue> |
| | | </div> |
| | | <div class="menuBox"> |
| | | <div class="aside-title">{{ title.t2 }}</div> |
| | | <chart-vue :childData="childData1"></chart-vue> |
| | | </div> |
| | | <div class="menuBox"> |
| | | <div class="aside-title">{{ title.t3 }}</div> |
| | | <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 { |
| | | title: { |
| | | t1: 'xxx', |
| | | t2: 'XXXX', |
| | | t3: 'xxxxx' |
| | | } |
| | | childData: null, |
| | | childData1: null, |
| | | childData2: null, |
| | | } |
| | | }, |
| | | watch: { |
| | | |
| | | }, |
| | | |
| | | mounted() { |
| | | window.regionWeather = null; |
| | | 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 |
| | | } |
| | | } |
| | | } |
| | |
| | | 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; |
| | |
| | | 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> |