| | |
| | | <template> |
| | | <div style="width: calc(100ch - 28px)"> |
| | | <template v-if="data && data.length > 0"> |
| | | <template v-if="summaryList && summaryList.length > 0"> |
| | | <div class="w-full" v-for="(item, idx) in summaryList" :key="idx"> |
| | | <h3>{{ item.title }}</h3> |
| | |
| | | <div ref="chartRefList" v-for="(item, index) in recordSetList" :key="index"></div> |
| | | </div> |
| | | </div> |
| | | <div v-if="urlList && urlList.length > 0" class="w-full"> |
| | | <HTMLCom data="/test" v-for="(item, index) in urlList" :key="index"></HTMLCom> |
| | | </div> |
| | | </template> |
| | | <div v-else class="text-red-500">{{ error }}</div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { ChartTypeEnum, chartTypeMapEchart, chartTypeMapName } from '../types'; |
| | | import { axisLabelFormatter } from '/@/utils/chart'; |
| | | import { timeDataOptionToContent } from '../common'; |
| | | |
| | | const props = defineProps(['data']); |
| | | import { AnswerType } from '../../model/types'; |
| | | import HTMLCom from '../htmlCom/HTMLCom.vue'; |
| | | const props = defineProps(['data', 'error']); |
| | | |
| | | const selectChartType = ref<ChartTypeEnum>(ChartTypeEnum.Line); |
| | | |
| | |
| | | return refList; |
| | | }); |
| | | |
| | | const recordSetList = computed(() => props.data.filter((item) => item.type === 'recordset')); |
| | | const summaryList = computed(() => props.data.filter((item) => item.type === 'summary')); |
| | | const recordSetList = computed(() => props.data.filter((item) => item.type === AnswerType.RecordSet)); |
| | | const summaryList = computed(() => props.data.filter((item) => item.type === AnswerType.Summary)); |
| | | const urlList = computed(() => props.data.filter((item) => item.type === AnswerType.Url)); |
| | | |
| | | const drawAllChart = () => { |
| | | chartInstanceList.map((item, index) => { |
| | | drawChart(item, recordSetList.value[index]); |
| | |
| | | |
| | | if (!parent) { |
| | | return; |
| | | } else { |
| | | } |
| | | |
| | | const parentBound = parent.getBoundingClientRect(); |