forked from github/dataease
fix: 修复表格数字格式化不兼容导致表格样式显示异常问题
This commit is contained in:
parent
881e84c95b
commit
65ff44a85f
@ -654,20 +654,22 @@ export default {
|
|||||||
pre[next['dataeaseName']] = next['name']
|
pre[next['dataeaseName']] = next['name']
|
||||||
return pre
|
return pre
|
||||||
}, {})
|
}, {})
|
||||||
let yAxis = []
|
|
||||||
try {
|
|
||||||
yAxis = JSON.parse(chartDetails.yaxis)
|
|
||||||
} catch (err) {
|
|
||||||
yAxis = JSON.parse(JSON.stringify(chartDetails.yaxis))
|
|
||||||
}
|
|
||||||
let yDataeaseNames = []
|
|
||||||
let yDataeaseNamesCfg = []
|
|
||||||
yAxis.forEach(yItem => {
|
|
||||||
yDataeaseNames.push(yItem.dataeaseName)
|
|
||||||
yDataeaseNamesCfg[yItem.dataeaseName]=yItem.formatterCfg
|
|
||||||
})
|
|
||||||
const rowData = chartDetails.data.tableRow[0]
|
const rowData = chartDetails.data.tableRow[0]
|
||||||
this.rowDataFormat(rowData,yDataeaseNames,yDataeaseNamesCfg)
|
if(chartDetails.type === 'richTextView'){
|
||||||
|
let yAxis = []
|
||||||
|
try {
|
||||||
|
yAxis = JSON.parse(chartDetails.yaxis)
|
||||||
|
} catch (err) {
|
||||||
|
yAxis = JSON.parse(JSON.stringify(chartDetails.yaxis))
|
||||||
|
}
|
||||||
|
let yDataeaseNames = []
|
||||||
|
let yDataeaseNamesCfg = []
|
||||||
|
yAxis.forEach(yItem => {
|
||||||
|
yDataeaseNames.push(yItem.dataeaseName)
|
||||||
|
yDataeaseNamesCfg[yItem.dataeaseName]=yItem.formatterCfg
|
||||||
|
})
|
||||||
|
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]
|
||||||
|
Loading…
Reference in New Issue
Block a user