From ac01feb1a7a7b45cbd1c9237c5a478361d8e60c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=98=89=E8=B1=AA?= <42510293+ziyujiahao@users.noreply.github.com> Date: Mon, 19 Jan 2026 14:08:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E7=BB=84=E9=BB=98=E8=AE=A4=E5=80=BC=E9=9D=A0=E5=89=8D=E6=8E=92?= =?UTF-8?q?=E5=88=97=E5=AF=BC=E8=87=B4=E5=90=8E=E7=BD=AE=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E4=B8=BA=E7=94=9F=E6=95=88=E9=97=AE=E9=A2=98=EF=BC=8C=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E6=9C=AA=E8=BF=9B=E8=A1=8C=E7=A9=BA=E5=80=BC=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E9=97=AE=E9=A2=98=20(#17824)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/custom-component/picture-group/Component.vue | 11 ++++++++++- core/core-frontend/src/locales/en.ts | 1 + core/core-frontend/src/locales/tw.ts | 1 + core/core-frontend/src/locales/zh-CN.ts | 1 + .../editor/editor-senior/components/Threshold.vue | 4 ++++ 5 files changed, 17 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/custom-component/picture-group/Component.vue b/core/core-frontend/src/custom-component/picture-group/Component.vue index b9a1d91d9d..a58a034276 100644 --- a/core/core-frontend/src/custom-component/picture-group/Component.vue +++ b/core/core-frontend/src/custom-component/picture-group/Component.vue @@ -33,6 +33,7 @@ import { mappingColor } from '@/views/chart/components/js/panel/common/common_ta import { storeToRefs } from 'pinia' import ChartEmptyInfo from '@/views/chart/components/views/components/ChartEmptyInfo.vue' import ChartError from '@/views/chart/components/views/components/ChartError.vue' +import { deepCopy } from '@/utils/utils' const dvMainStore = dvMainStoreWithOut() const { canvasViewInfo, mobileInPc, fullscreenFlag } = storeToRefs(dvMainStore) const state = reactive({ @@ -198,8 +199,16 @@ const conditionAdaptor = (chart: Chart) => { const conditions = threshold.tableThreshold ?? [] if (conditions?.length > 0) { for (let i = 0; i < conditions.length; i++) { - const field = conditions[i] + const field = deepCopy(conditions[i]) let defaultValueColor = null + field.conditions.sort((a, b) => { + const aIsDefault = a.term === 'default' + const bIsDefault = b.term === 'default' + + if (aIsDefault && !bIsDefault) return 1 + if (!aIsDefault && bIsDefault) return -1 + return 0 + }) const checkResult = mappingColor( dataRowNameSelect.value[field.field.name], defaultValueColor, diff --git a/core/core-frontend/src/locales/en.ts b/core/core-frontend/src/locales/en.ts index fd0188c1ad..6c7ba0a1f2 100644 --- a/core/core-frontend/src/locales/en.ts +++ b/core/core-frontend/src/locales/en.ts @@ -2947,6 +2947,7 @@ export default { column_name: 'Field name' }, visualization: { + img_can_not_null: 'Image cannot be empty', outer_params_type_tips1: "When the type is 'filter', it only applies to text dropdown, text tree, and number dropdown. For text tree filtering format, separate multiple levels with '-de-'", outer_params_type_tips2: diff --git a/core/core-frontend/src/locales/tw.ts b/core/core-frontend/src/locales/tw.ts index e6a5339cc9..ff376b692e 100644 --- a/core/core-frontend/src/locales/tw.ts +++ b/core/core-frontend/src/locales/tw.ts @@ -2866,6 +2866,7 @@ export default { column_name: '欄位名稱' }, visualization: { + img_can_not_null: '圖片不能為空', outer_params_type_tips1: "類型為過濾時僅對文字下拉、文字樹、數字下拉有效。文字樹的過濾格式中,多級之間使用 '-de-' 分隔", outer_params_type_tips2: diff --git a/core/core-frontend/src/locales/zh-CN.ts b/core/core-frontend/src/locales/zh-CN.ts index 0530a80932..e754bbcc81 100644 --- a/core/core-frontend/src/locales/zh-CN.ts +++ b/core/core-frontend/src/locales/zh-CN.ts @@ -2872,6 +2872,7 @@ export default { column_name: '字段名称' }, visualization: { + img_can_not_null: '图片不能为空', outer_params_type_tips1: "类型为过滤时仅对文本下拉、文本树、数字下拉,文本树的过滤格式多级之间使用'-de-' 隔离", outer_params_type_tips2: diff --git a/core/core-frontend/src/views/chart/components/editor/editor-senior/components/Threshold.vue b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/Threshold.vue index ecaaa2fffe..568cd714a1 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-senior/components/Threshold.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/Threshold.vue @@ -193,6 +193,10 @@ const changeTableThreshold = () => { } for (let j = 0; j < field.conditions.length; j++) { const ele = field.conditions[j] + if (props.chart.type === 'picture-group' && !ele.url) { + ElMessage.error(t('visualization.img_can_not_null')) + return + } if (!ele.term || ele.term === '') { ElMessage.error(t('chart.exp_can_not_empty')) return