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 e505a5129b..67d82c5e40 100644 --- a/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue +++ b/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue @@ -223,21 +223,15 @@ const assignment = content => { on.forEach(itm => { if (dataRowFiledName.value.includes(itm)) { const ele = itm.slice(1, -1) - if (initReady.value) { + let value = dataRowNameSelect.value[ele] !== undefined ? dataRowNameSelect.value[ele] : null + if (value && thresholdStyleInfo && thresholdStyleInfo[ele]) { const thresholdStyle = thresholdStyleInfo[ele] - let value = - dataRowNameSelect.value[ele] !== undefined ? dataRowNameSelect.value[ele] : null - if (value && thresholdStyle) { - value = `${value}` - } + value = `${value}` + } + if (initReady.value) { content = content.replace(itm, !!value ? value : '[未获取字段值]') } else { - content = content.replace( - itm, - dataRowNameSelect.value[ele] !== undefined - ? dataRowNameSelect.value[ele] - : '[获取中...]' - ) + content = content.replace(itm, !!value ? value : '[获取中...]') } } })