fix: 修复表格数字格式化不兼容导致表格样式显示异常问题

This commit is contained in:
wangjiahao 2022-09-26 15:22:12 +08:00
parent 881e84c95b
commit 65ff44a85f

View File

@ -654,6 +654,8 @@ export default {
pre[next['dataeaseName']] = next['name'] pre[next['dataeaseName']] = next['name']
return pre return pre
}, {}) }, {})
const rowData = chartDetails.data.tableRow[0]
if(chartDetails.type === 'richTextView'){
let yAxis = [] let yAxis = []
try { try {
yAxis = JSON.parse(chartDetails.yaxis) yAxis = JSON.parse(chartDetails.yaxis)
@ -666,8 +668,8 @@ export default {
yDataeaseNames.push(yItem.dataeaseName) yDataeaseNames.push(yItem.dataeaseName)
yDataeaseNamesCfg[yItem.dataeaseName]=yItem.formatterCfg yDataeaseNamesCfg[yItem.dataeaseName]=yItem.formatterCfg
}) })
const rowData = chartDetails.data.tableRow[0]
this.rowDataFormat(rowData,yDataeaseNames,yDataeaseNamesCfg) this.rowDataFormat(rowData,yDataeaseNames,yDataeaseNamesCfg)
}
for (const key in rowData) { for (const key in rowData) {
this.dataRowSelect[nameIdMap[key]] = rowData[key] this.dataRowSelect[nameIdMap[key]] = rowData[key]
this.dataRowNameSelect[sourceFieldNameIdMap[key]] = rowData[key] this.dataRowNameSelect[sourceFieldNameIdMap[key]] = rowData[key]