From 6eee52b87f8b3aa170e6a847d07a70b549604d63 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 10 Sep 2024 13:47:45 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E3=80=81=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A8=E6=95=B4=E4=BD=93=E5=88=B7=E6=96=B0?= =?UTF-8?q?#11378?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dashboard-style/OverallSetting.vue | 50 +++++++++++++++++++ core/core-frontend/src/utils/canvasUtils.ts | 4 ++ .../editor/util/dataVisualization.ts | 3 ++ .../data-visualization/PreviewCanvas.vue | 12 +++++ 4 files changed, 69 insertions(+) diff --git a/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/OverallSetting.vue b/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/OverallSetting.vue index e61892bb4a..bae9050821 100644 --- a/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/OverallSetting.vue +++ b/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/OverallSetting.vue @@ -72,6 +72,56 @@ + + + 整体刷新 + + + + + + + + + + + + + { ElMessage.error(t('visualization.outer_param_decode_error')) } } + + const initBrowserTimer = () => { + if (state.canvasStylePreview.refreshBrowserEnable) { + const gap = state.canvasStylePreview.refreshBrowserUnit === 'minute' ? 60 : 1 + const browserRefreshTime = state.canvasStylePreview.refreshBrowserTime * gap * 1000 + setTimeout(() => { + window.location.reload() + }, browserRefreshTime) + } + } + initCanvasData( dvId, dvType, @@ -120,6 +131,7 @@ const loadCanvasDataAsync = async (dvId, dvType) => { document.title = dvInfo.name setTitle(dvInfo.name) } + initBrowserTimer() } ) }