From c9bc497a18f0826d14cda60bad17d9961c367313 Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Mon, 1 Jul 2024 22:43:59 +0800
Subject: [PATCH] =?UTF-8?q?refactor(=E5=9B=BE=E8=A1=A8):=20=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=E5=AF=8C=E6=96=87=E6=9C=AC=E6=9D=A1=E4=BB=B6=E8=AE=BE?=
=?UTF-8?q?=E7=BD=AE=E6=98=AF=E5=90=A6=E4=B8=BA=E7=A9=BA=E7=9A=84=E6=98=BE?=
=?UTF-8?q?=E7=A4=BA=E5=88=A4=E6=96=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/custom-component/rich-text/DeRichTextView.vue | 10 ++++++----
1 file changed, 6 insertions(+), 4 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 c656d4fb50..3ba2890d7e 100644
--- a/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue
+++ b/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue
@@ -227,14 +227,15 @@ const assignment = content => {
if (dataRowFiledName.value.includes(itm)) {
const ele = itm.slice(1, -1)
let value = dataRowNameSelect.value[ele] !== undefined ? dataRowNameSelect.value[ele] : null
- if (value && thresholdStyleInfo && thresholdStyleInfo[ele]) {
+ let targetValue = !!value ? value : '-'
+ if (thresholdStyleInfo && thresholdStyleInfo[ele]) {
const thresholdStyle = thresholdStyleInfo[ele]
- value = `${value}`
+ targetValue = `${targetValue}`
}
if (initReady.value) {
- content = content.replace(itm, !!value ? value : '-')
+ content = content.replace(itm, targetValue)
} else {
- content = content.replace(itm, !!value ? value : '[获取中...]')
+ content = content.replace(itm, !!value ? targetValue : '[获取中...]')
}
}
})
@@ -366,6 +367,7 @@ const calcData = (view: Chart, callback) => {
const curViewInfo = canvasViewInfo.value[element.value.id]
curViewInfo['curFields'] = res.data.fields
dvMainStore.setViewDataDetails(element.value.id, state.data)
+ initReady.value = true
initCurFields(res)
}
callback?.()