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

This commit is contained in:
taojinlong 2024-06-03 12:39:25 +08:00
commit 9fc419b976
5 changed files with 13 additions and 8 deletions

View File

@ -54,14 +54,18 @@ public class CoreVisualizationExportManage {
} }
if (CollectionUtils.isEmpty(chartViewDTOS)) return null; if (CollectionUtils.isEmpty(chartViewDTOS)) return null;
Map<String, ChartExtRequest> chartExtRequestMap = buildViewRequest(visualization, onlyDisplay); Map<String, ChartExtRequest> chartExtRequestMap = buildViewRequest(visualization, onlyDisplay);
List<ExcelSheetModel> sheets = chartViewDTOS.stream().map(view -> { List<ExcelSheetModel> sheets = new ArrayList<>();
for (int i = 0; i < chartViewDTOS.size(); i++) {
ChartViewDTO view = chartViewDTOS.get(i);
ChartExtRequest extRequest = chartExtRequestMap.get(view.getId().toString()); ChartExtRequest extRequest = chartExtRequestMap.get(view.getId().toString());
if (ObjectUtils.isNotEmpty(extRequest)) { if (ObjectUtils.isNotEmpty(extRequest)) {
view.setChartExtRequest(extRequest); view.setChartExtRequest(extRequest);
} }
view.getChartExtRequest().setUser(AuthUtils.getUser().getUserId()); view.getChartExtRequest().setUser(AuthUtils.getUser().getUserId());
return exportViewData(view); view.setTitle((i + 1) + "-" + view.getTitle());
}).toList(); sheets.add(exportViewData(view));
}
return VisualizationExcelUtils.exportExcel(sheets, visualization.getName(), visualization.getId().toString()); return VisualizationExcelUtils.exportExcel(sheets, visualization.getName(), visualization.getId().toString());
} }

View File

@ -80,7 +80,7 @@ const onBlur = () => {
} }
init() init()
watch( watch(
frameLinks.value, () => frameLinks.value,
() => { () => {
init() init()
}, },

View File

@ -112,7 +112,7 @@ const onChange = () => {
init() init()
watch( watch(
linkInfo.value, () => linkInfo.value,
() => { () => {
init() init()
}, },

View File

@ -1,5 +1,6 @@
<template> <template>
<el-row> <el-row>
--{{ linkInfo }}
<el-form @submit.prevent ref="form" size="small" style="width: 100%"> <el-form @submit.prevent ref="form" size="small" style="width: 100%">
<el-form-item :effect="themes" :label="t('visualization.auto_play')"> <el-form-item :effect="themes" :label="t('visualization.auto_play')">
<el-switch <el-switch
@ -105,7 +106,7 @@ const onBlur = () => {
init() init()
watch( watch(
linkInfo.value, () => linkInfo.value,
() => { () => {
init() init()
}, },

View File

@ -11,7 +11,7 @@ const composeStore = composeStoreWithOut()
const snapshotStore = snapshotStoreWithOut() const snapshotStore = snapshotStoreWithOut()
const copyStore = copyStoreWithOut() const copyStore = copyStoreWithOut()
const lockStore = lockStoreWithOut() const lockStore = lockStoreWithOut()
const { curComponent, isInEditor } = storeToRefs(dvMainStore) const { curComponent, isInEditor, editMode } = storeToRefs(dvMainStore)
const { areaData } = storeToRefs(composeStore) const { areaData } = storeToRefs(composeStore)
const ctrlKey = 17, const ctrlKey = 17,
@ -101,7 +101,7 @@ let isShiftDown = false
// 全局监听按键操作并执行相应命令 // 全局监听按键操作并执行相应命令
export function listenGlobalKeyDown() { export function listenGlobalKeyDown() {
window.onkeydown = e => { window.onkeydown = e => {
if (!isInEditor || checkDialog()) return if (!isInEditor.value || editMode.value === 'preview' || checkDialog()) return
const { keyCode } = e const { keyCode } = e
if (positionMoveKey[keyCode] && curComponent.value) { if (positionMoveKey[keyCode] && curComponent.value) {
positionMoveKey[keyCode](keyCode) positionMoveKey[keyCode](keyCode)