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