Merge branch 'dev' of github.com:dataease/dataease into dev

This commit is contained in:
taojinlong 2022-09-26 16:01:04 +08:00
commit 7fbfad2bac
2 changed files with 19 additions and 14 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<div @mousedown="fieldsAreaDown"> <div @mousedown="fieldsAreaDown">
<el-button v-for="(field) in fields" :key="field.id" size="mini" class="field-area" @click="fieldSelect(field)"> <el-button v-for="(field) in fields" :title="field.name" :key="field.id" size="mini" class="field-area" @click="fieldSelect(field)">
{{ field.name }} {{ field.name }}
</el-button> </el-button>
</div> </div>
@ -51,6 +51,9 @@ export default {
margin: 4px 0 0 0; margin: 4px 0 0 0;
text-align: left; text-align: left;
margin-left: 0px!important; margin-left: 0px!important;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
</style> </style>

View File

@ -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]