From faf00e3c92dff16563d3b6f31c67f0ffd0d8fc71 Mon Sep 17 00:00:00 2001 From: betaqi <3188864257@qq.com> Date: Tue, 21 Oct 2025 14:11:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=95=B0=E6=8D=AE=E6=BA=90=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=BF=87=E6=BB=A4=E5=99=A8=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ChartData/components/ChartDataMonacoEditor/index.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataMonacoEditor/index.vue b/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataMonacoEditor/index.vue index bb25090..7589be6 100644 --- a/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataMonacoEditor/index.vue +++ b/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataMonacoEditor/index.vue @@ -108,6 +108,8 @@ import { icon } from '@/plugins' import { goDialog, toString } from '@/utils' import { customizeHttp } from '@/api/http' import cloneDeep from 'lodash/cloneDeep' +import { RequestDataTypeEnum } from "@/enums/httpEnum"; +import { fetchDataByIot } from "@/api/path/dataSource"; const { DocumentTextIcon } = icon.ionicons5 const { FilterIcon, FilterEditIcon } = icon.carbon @@ -127,7 +129,12 @@ const sourceData = ref('') // 动态获取数据 const fetchTargetData = async () => { try { - const res = await customizeHttp(toRaw(targetData.value.request), toRaw(chartEditStore.getRequestGlobalConfig)) + let res; + if (targetData.value.request.requestDataType === RequestDataTypeEnum.Source) { + res = await fetchDataByIot(targetData.value.requestSource) + } else { + res = await customizeHttp(toRaw(targetData.value.request), toRaw(chartEditStore.getRequestGlobalConfig)) + } if (res) { sourceData.value = res return