fix: 修复仪表板编辑界面只保存后新页面预览跳转到目标仪表板可能未联动问题

This commit is contained in:
wangjiahao
2025-04-18 16:54:41 +08:00
committed by 王嘉豪
parent 90904842ba
commit 1fd90f65da
2 changed files with 4 additions and 1 deletions

View File

@@ -94,6 +94,7 @@ public class ChartViewManege {
SnapshotCoreChartView coreChartView = snapshotCoreChartViewMapper.selectById(id);
SnapshotCoreChartView record = transDTO2Record(chartViewDTO);
if (ObjectUtils.isEmpty(coreChartView)) {
snapshotCoreChartViewMapper.deleteById(record.getId());
snapshotCoreChartViewMapper.insert(record);
} else {
UpdateWrapper<SnapshotCoreChartView> updateWrapper = new UpdateWrapper<>();

View File

@@ -34,7 +34,7 @@ const state = reactive({
curPreviewGap: 0,
initState: true,
editPreview: false,
showPosition: null,
showPosition: 'preview',
showOffset: {
top: 3,
left: 3
@@ -206,6 +206,7 @@ onMounted(async () => {
state.editPreview = router.currentRoute.value.query.editPreview === 'true'
dvMainStore.setIframeFlag(isFrameFlag)
dvMainStore.setIsPopWindow(isPopWindow)
state.showPosition = state.editPreview ? 'edit-preview' : 'preview'
const { dvType, callBackFlag, taskId, showWatermark } = router.currentRoute.value.query
if (!!taskId) {
dvMainStore.setCanvasAttachInfo({ taskId, showWatermark })
@@ -257,6 +258,7 @@ defineExpose({
:is-selector="props.isSelector"
:download-status="downloadStatus"
:show-pop-bar="true"
:show-position="state.showPosition"
:show-linkage-button="false"
></de-preview>
<empty-background