From 76d8917b96e7dbbc525d68521692ef6dc7de6775 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 6 Nov 2024 12:07:29 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E8=B7=B3=E8=BD=AC=E5=85=B3=E8=81=94=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=97=B6=E5=81=B6=E7=8E=B0=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=98=BE=E7=A4=BA=E5=86=85=E5=AE=B9=E4=B8=8E?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E5=86=85=E5=AE=B9=E4=B8=8D=E7=AC=A6=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20#12909?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/data-visualization/dvMain.ts | 38 ++++++++++--------- .../data-visualization/PreviewCanvas.vue | 2 +- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts index 905f5b6ea8..02470986ff 100644 --- a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts +++ b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts @@ -1145,21 +1145,21 @@ export const dvMainStore = defineStore('dataVisualization', { // 0 文本类型 1 数字类型 if (filterItem.multiple) { // multiple === true 多选 - filterItem.selectValue = queryParams - filterItem.defaultValue = queryParams + filterItem['selectValue'] = queryParams + filterItem['defaultValue'] = queryParams } else { // 单选 - filterItem.selectValue = queryParams[0] - filterItem.defaultValue = queryParams[0] + filterItem['selectValue'] = queryParams[0] + filterItem['defaultValue'] = queryParams[0] } } else if (filterItem.displayType === '1') { // 1 时间类型 - filterItem.selectValue = queryParams[0] - filterItem.defaultValue = queryParams[0] + filterItem['selectValue'] = queryParams[0] + filterItem['defaultValue'] = queryParams[0] } else if (filterItem.displayType === '7') { // 7 时间范围类型 - filterItem.selectValue = queryParams - filterItem.defaultValue = queryParams + filterItem['selectValue'] = queryParams + filterItem['defaultValue'] = queryParams } else if (filterItem.displayType === '8') { // 8 文本搜索 filterItem.conditionValueF = parmaValueSource + '' @@ -1243,26 +1243,28 @@ export const dvMainStore = defineStore('dataVisualization', { // 0 文本类型 1 数字类型 if (filterItem.multiple) { // multiple === true 多选 - filterItem.selectValue = queryParams - filterItem.defaultValue = queryParams + filterItem['selectValue'] = queryParams + filterItem['defaultValue'] = queryParams } else { // 单选 - filterItem.selectValue = queryParams[0] - filterItem.defaultValue = queryParams[0] + filterItem['selectValue'] = queryParams[0] + filterItem['defaultValue'] = queryParams[0] } + filterItem['defaultMapValue'] = queryParams + filterItem['mapValue'] = queryParams } else if (filterItem.displayType === '1') { // 1 时间类型 - filterItem.selectValue = queryParams[0] - filterItem.defaultValue = queryParams[0] + filterItem['selectValue'] = queryParams[0] + filterItem['defaultValue'] = queryParams[0] } else if (filterItem.displayType === '7') { // 7 时间范围类型 if (QDItem.timeValue && Array.isArray(QDItem.timeValue)) { // 如果dimension.timeValue存在值且是数组 目前判断为是时间组件 - filterItem.selectValue = QDItem.timeValue - filterItem.defaultValue = QDItem.timeValue + filterItem['selectValue'] = QDItem.timeValue + filterItem['defaultValue'] = QDItem.timeValue } else { - filterItem.selectValue = queryParams - filterItem.defaultValue = queryParams + filterItem['selectValue'] = queryParams + filterItem['defaultValue'] = queryParams } } else if (filterItem.displayType === '8') { // 8 文本搜索 diff --git a/core/core-frontend/src/views/data-visualization/PreviewCanvas.vue b/core/core-frontend/src/views/data-visualization/PreviewCanvas.vue index 2f94897d9a..b20650af8f 100644 --- a/core/core-frontend/src/views/data-visualization/PreviewCanvas.vue +++ b/core/core-frontend/src/views/data-visualization/PreviewCanvas.vue @@ -106,7 +106,7 @@ const loadCanvasDataAsync = async (dvId, dvType, ignoreParams = false) => { } } - initCanvasData( + await initCanvasData( dvId, dvType, function ({