| | |
| | | <template> |
| | | <div class="w-full"> |
| | | <div class="flex space-x-2 mb-4" v-if="data?.params && data?.params.length > 0"> |
| | | <div class="flex space-x-2 mb-4" v-if="visibleParams && visibleParams.length > 0"> |
| | | <component |
| | | v-model="paramsValueList[index].value" |
| | | v-for="(item, index) in data?.params" |
| | | v-for="(item, index) in visibleParams as any" |
| | | :key="item.id" |
| | | :id="item.id" |
| | | :is="recordSetMapCom[item.type]" |
| | |
| | | import type * as echarts from 'echarts'; |
| | | import _ from 'lodash'; |
| | | import type { PropType } from 'vue'; |
| | | import { ref, watch } from 'vue'; |
| | | import { computed, ref, watch } from 'vue'; |
| | | import { SCATTER_SYMBOL_SIZE, chatComProps, getChatChartOption } from '../../../common'; |
| | | import { useDrawChatChart } from '../../../hooks/useDrawChatChart'; |
| | | import type { RecordSet, RecordSetParamsItem } from './types'; |
| | |
| | | data: RecordSet; |
| | | }; |
| | | const chartLoading = ref(false); |
| | | const paramsValueList = ref(deepClone(props.data?.params)); |
| | | |
| | | const visibleParams = computed(()=>(props.data?.params?.filter((item) => !item?.hide) ?? [])) |
| | | const paramsValueList = ref(deepClone(visibleParams.value)); |
| | | let groupedValues = null; |
| | | let timeIndex = undefined; |
| | | let valueIndex = undefined; |
| | |
| | | const { chartContainerResize, chartInstance } = useDrawChatChart({ chartRef, drawChart }); |
| | | |
| | | // 更换列表 |
| | | const changeMap = new Map<string,string>(null); |
| | | const changeMap = new Map<string, string>(null); |
| | | |
| | | const handleQueryChange = async (val: string, item: RecordSetParamsItem) => { |
| | | if (!val) return; |
| | |
| | | let res = null; |
| | | |
| | | try { |
| | | |
| | | changeMap.set(item.id,val); |
| | | changeMap.set(item.id, val); |
| | | const paramsObj = {}; |
| | | for (const [key,value] of changeMap) { |
| | | for (const [key, value] of changeMap) { |
| | | paramsObj[key] = value; |
| | | } |
| | | const params = { |