| | |
| | | </el-checkbox-group> |
| | | |
| | | <div |
| | | v-for="(chart, index) in charts" |
| | | v-for="chart in charts" |
| | | :key="chart.id" |
| | | class="chart-container" |
| | | :ref="el => chartDoms[index] = el" |
| | | :ref="el => chartDoms[chart.id] = el" |
| | | v-loading="loading" |
| | | ></div> |
| | | </el-dialog> |
| | |
| | | const visible = ref(false) |
| | | const dataList = ref([]) |
| | | const selectedData = ref([]) |
| | | const charts = ref([]) |
| | | const chartDoms = ref([]) |
| | | const charts = ref() |
| | | const chartDoms = ref({}) |
| | | const chartInstances = ref([]) |
| | | const loading = ref(false) |
| | | |
| | |
| | | |
| | | /** 渲染图表 */ |
| | | const renderCharts = () => { |
| | | chartInstances.value = chartDoms.value.map((dom, index) => { |
| | | chartInstances.value = charts.value.map((chartInfo, index) => { |
| | | const dom = chartDoms.value[chartInfo.id] |
| | | if (!dom) return null |
| | | const chart = echarts.init(dom) |
| | | const chartInfo = charts.value[index] |
| | | |
| | | if (!chartInfo) return chart |
| | | |