Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
junjun 2022-11-03 10:10:49 +08:00
commit aac77d2804
3 changed files with 35 additions and 6 deletions

View File

@ -86,8 +86,8 @@ public class PanelAppTemplateService {
String snapshotName = "app-template-" + request.getId() + ".jpeg";
staticResourceService.saveSingleFileToServe(snapshotName, request.getSnapshot().replace("data:image/jpeg;base64,", ""));
requestTemplate.setSnapshot("/" + UPLOAD_URL_PREFIX + '/' + snapshotName);
panelAppTemplateMapper.insertSelective(requestTemplate);
}
panelAppTemplateMapper.insertSelective(requestTemplate);
}
@ -193,11 +193,26 @@ public class PanelAppTemplateService {
public Map<String, String> applyDatasetField(List<DatasetTableField> datasetTableFieldsInfo, Map<String, String> datasetsRealMap) {
Map<String, String> datasetFieldsRealMap = new HashMap<>();
for (DatasetTableField datasetTableField : datasetTableFieldsInfo) {
String oldId = datasetTableField.getId();
datasetTableField.setTableId(datasetsRealMap.get(datasetTableField.getTableId()));
datasetTableField.setId(null);
DatasetTableField newTableField = dataSetTableFieldsService.save(datasetTableField);
datasetFieldsRealMap.put(oldId, newTableField.getId());
if(datasetTableField.getExtField()!=2){
String oldId = datasetTableField.getId();
datasetTableField.setTableId(datasetsRealMap.get(datasetTableField.getTableId()));
datasetTableField.setId(null);
DatasetTableField newTableField = dataSetTableFieldsService.save(datasetTableField);
datasetFieldsRealMap.put(oldId, newTableField.getId());
}
}
//数据集计算字段替换
for (DatasetTableField datasetTableField : datasetTableFieldsInfo) {
if(datasetTableField.getExtField()==2){
String oldId = datasetTableField.getId();
datasetTableField.setTableId(datasetsRealMap.get(datasetTableField.getTableId()));
datasetTableField.setId(null);
datasetFieldsRealMap.forEach((k, v) -> {
datasetTableField.setOriginName(datasetTableField.getOriginName().replaceAll(k, v));
});
DatasetTableField newTableField = dataSetTableFieldsService.save(datasetTableField);
datasetFieldsRealMap.put(oldId, newTableField.getId());
}
}
return datasetFieldsRealMap;
}

File diff suppressed because one or more lines are too long

View File

@ -262,12 +262,22 @@ export default {
this._updateH()
this.$nextTick(() => {
on(document, 'mouseup', this._popoverHideFun)
this.bindScroll()
})
},
beforeDestroy() {
off(document, 'mouseup', this._popoverHideFun)
this.unbindScroll()
},
methods: {
bindScroll() {
window.onmousewheel = this._popoverHideFun
on(document, 'DOMMouseScroll', this._popoverHideFun)
},
unbindScroll() {
window.onmousewheel = null
off(document, 'DOMMouseScroll', this._popoverHideFun)
},
showPopover() {
this.$nextTick(() => {
this.$refs.input.focus()