From 9e0c53ef03e1cdea0b4a5764d7aaacd2480b6708 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 1 Jul 2024 14:42:10 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=AF=8C=E6=96=87=E6=9C=AC=E8=BF=99=E4=B8=AA=E6=8C=87=E6=A0=87?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E9=A2=9C=E8=89=B2=E6=97=B6=EF=BC=8C=E5=9B=A0?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E5=AF=BC=E8=87=B4=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=A4=B1=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/custom-component/rich-text/DeRichTextView.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue b/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue index c7c4b1d194..c656d4fb50 100644 --- a/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue +++ b/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue @@ -110,6 +110,7 @@ const state = reactive({ }) const dataRowSelect = ref({}) const dataRowNameSelect = ref({}) +const dataRowNameSelectSource = ref({}) const dataRowFiledName = ref([]) const initReady = ref(false) const editShow = ref(true) @@ -390,6 +391,7 @@ const initCurFields = chartDetails => { dataRowFiledName.value = [] dataRowSelect.value = {} dataRowNameSelect.value = {} + dataRowNameSelectSource.value = {} // 记录原格式,部分数字是经过格式化的,再匹配颜色时会有问题 if (chartDetails.data && chartDetails.data.sourceFields) { const checkAllAxisStr = JSON.stringify(chartDetails.xAxis) + @@ -430,11 +432,13 @@ const initCurFields = chartDetails => { for (const key in rowData) { dataRowSelect.value[nameIdMap[key]] = rowData[key] let rowDataValue = rowData[key] + const rowDataValueSource = rowData[key] const f = valueFieldMap[key] if (f && f.formatterCfg) { rowDataValue = valueFormatter(rowDataValue, f.formatterCfg) } dataRowNameSelect.value[sourceFieldNameIdMap[key]] = rowDataValue + dataRowNameSelectSource.value[sourceFieldNameIdMap[key]] = rowDataValueSource } } element.value.propValue['innerType'] = chartDetails.type @@ -468,13 +472,13 @@ const conditionAdaptor = (chart: Chart) => { let defaultBgColor = 'none' res[field.field.name] = { color: mappingColor( - dataRowNameSelect.value[field.field.name], + dataRowNameSelectSource.value[field.field.name], defaultValueColor, field, 'color' ), backgroundColor: mappingColor( - dataRowNameSelect.value[field.field.name], + dataRowNameSelectSource.value[field.field.name], defaultBgColor, field, 'backgroundColor'