fix:视图更换数据集可能导致联动失效的问题

This commit is contained in:
wangjiahao 2021-09-10 11:22:41 +08:00
parent b9eecf8e21
commit 3d59c010d2
2 changed files with 4 additions and 1 deletions

View File

@ -460,6 +460,9 @@ public class ChartViewService {
map.putAll(mapChart);
map.putAll(mapTableNormal);
List<DatasetTableField> sourceFields = dataSetTableFieldsService.getFieldsByTableId(view.getTableId());
map.put("sourceFields",sourceFields);
ChartViewDTO dto = new ChartViewDTO();
BeanUtils.copyBean(dto, view);
dto.setData(map);

View File

@ -121,7 +121,7 @@ export default {
trackMenu() {
const trackMenuInfo = []
let linkageCount = 0
this.chart.data && this.chart.data.fields && this.chart.data.fields.forEach(item => {
this.chart.data && this.chart.data.sourceFields && this.chart.data.sourceFields.forEach(item => {
const sourceInfo = this.chart.id + '#' + item.id
if (this.nowPanelTrackInfo[sourceInfo]) {
linkageCount++