diff --git a/frontend/src/components/canvas/components/Editor/Preview.vue b/frontend/src/components/canvas/components/Editor/Preview.vue index c256d970ff..f3c481b03f 100644 --- a/frontend/src/components/canvas/components/Editor/Preview.vue +++ b/frontend/src/components/canvas/components/Editor/Preview.vue @@ -175,7 +175,7 @@ export default { this.timer && clearInterval(this.timer) let refreshTime = 300000 if (this.canvasStyleData.refreshTime && this.canvasStyleData.refreshTime > 0) { - refreshTime = this.canvasStyleData.refreshTime * 60000 + refreshTime = this.canvasStyleData.refreshTime * 1000 } this.timer = setInterval(() => { this.searchCount++ diff --git a/frontend/src/components/canvas/custom-component/UserView.vue b/frontend/src/components/canvas/custom-component/UserView.vue index 0a5e3da298..15d84015e8 100644 --- a/frontend/src/components/canvas/custom-component/UserView.vue +++ b/frontend/src/components/canvas/custom-component/UserView.vue @@ -211,7 +211,7 @@ export default { }, // 监听外部计时器变化 searchCount: function(val1) { - if (val1 > 0) { + if (val1 > 0 && this.requestStatus !== 'waiting') { this.getData(this.element.propValue.viewId) } }, diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index 227541000e..406d7f9ac2 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -1242,6 +1242,7 @@ export default { component_gap: 'Component Gap', refresh_time: 'Refresh Time', minute: 'minute', + second: 'second', photo: 'Photo', default_panel: 'Default Dashboard', create_public_links: 'Create public links', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index c50f15f7da..6a4c6f15f6 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -1245,6 +1245,7 @@ export default { component_gap: '組件間隙', refresh_time: '刷新时间', minute: '分钟', + second: '秒', photo: '圖片', default_panel: '默認儀表板', create_public_links: '創建公共鏈接', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index 2ff80274ff..852a800810 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -1253,6 +1253,7 @@ export default { component_gap: '组件间隙', refresh_time: '刷新时间', minute: '分钟', + second: '秒', photo: '图片', default_panel: '默认仪表板', create_public_links: '创建公共链接', diff --git a/frontend/src/views/panel/SubjectSetting/PanelStyle/PanelRefreshTime.vue b/frontend/src/views/panel/SubjectSetting/PanelStyle/PanelRefreshTime.vue index 24d883cce4..67344bb1f0 100644 --- a/frontend/src/views/panel/SubjectSetting/PanelStyle/PanelRefreshTime.vue +++ b/frontend/src/views/panel/SubjectSetting/PanelStyle/PanelRefreshTime.vue @@ -8,8 +8,8 @@ > - - + + diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue index 0af8fe5e24..12f3477610 100644 --- a/frontend/src/views/panel/edit/index.vue +++ b/frontend/src/views/panel/edit/index.vue @@ -422,7 +422,7 @@ export default { this.$store.commit('setComponentData', this.resetID(componentDatas)) // this.$store.commit('setComponentData', this.resetID(JSON.parse(componentDataTemp))) const temp = JSON.parse(canvasStyleDataTemp) - temp.refreshTime = (temp.refreshTime || 5) + temp.refreshTime = (temp.refreshTime || 300) this.$store.commit('setCanvasStyle', temp) // 清空临时画布数据 @@ -443,7 +443,7 @@ export default { this.$store.commit('setComponentData', this.resetID(componentDatas)) // this.$store.commit('setComponentData', this.resetID(JSON.parse(response.data.panelData))) const panelStyle = JSON.parse(response.data.panelStyle) - panelStyle.refreshTime = (panelStyle.refreshTime || 5) + panelStyle.refreshTime = (panelStyle.refreshTime || 300) this.$store.commit('setCanvasStyle', panelStyle) this.$store.commit('recordSnapshot', 'init')// 记录快照 diff --git a/frontend/src/views/panel/list/PanelList.vue b/frontend/src/views/panel/list/PanelList.vue index c19ab8cd75..2748b32e50 100644 --- a/frontend/src/views/panel/list/PanelList.vue +++ b/frontend/src/views/panel/list/PanelList.vue @@ -631,7 +631,7 @@ export default { this.$store.commit('setComponentData', this.resetID(componentDatas)) // this.$store.commit('setComponentData', sourceInfo.type === 'custom' ? sourceInfo : this.resetID(sourceInfo)) const temp = JSON.parse(response.data.panelStyle) - temp.refreshTime = (temp.refreshTime || 5) + temp.refreshTime = (temp.refreshTime || 300) this.$store.commit('setCanvasStyle', temp) this.$store.dispatch('panel/setPanelInfo', data) diff --git a/frontend/src/views/panel/panel.js b/frontend/src/views/panel/panel.js index f238d33acd..4760c847af 100644 --- a/frontend/src/views/panel/panel.js +++ b/frontend/src/views/panel/panel.js @@ -20,7 +20,7 @@ export const CANVAS_STYLE = { auxiliaryMatrix: true, openCommonStyle: true, panel: DEFAULT_PANEL_STYLE, - refreshTime: 5 // 仪表板刷新时间 默认五分钟 + refreshTime: 300 // 仪表板刷新时间 默认300秒 } export const DEFAULT_COMMON_CANVAS_STYLE_STRING = {