Merge pull request #6753 from dataease/pr@dev-v2@refactor_view-count

fix: 修复富文本图表不识别记录数字段问题
This commit is contained in:
王嘉豪 2023-11-17 17:51:15 +08:00 committed by GitHub
commit 670d46349a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -335,7 +335,6 @@ const calcData = (view: Chart, callback) => {
}
const initCurFields = chartDetails => {
curFields.value = []
dataRowFiledName.value = []
dataRowSelect.value = {}
dataRowNameSelect.value = {}
@ -347,10 +346,12 @@ const initCurFields = chartDetails => {
JSON.stringify(chartDetails.yAxisExt)
chartDetails.data.sourceFields.forEach(field => {
if (checkAllAxisStr.indexOf(field.id) > -1) {
curFields.value.push(field)
dataRowFiledName.value.push(`[${field.name}]`)
}
})
if (checkAllAxisStr.indexOf('"记录数*"') > -1) {
dataRowFiledName.value.push(`[记录数*]`)
}
// Get the corresponding relationship between id and value
const nameIdMap = chartDetails.data.fields.reduce((pre, next) => {
pre[next['dataeaseName']] = next['id']