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 c4d7aff9d8..fbd7ea666d 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 9ef01755b2..567494051b 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -1229,6 +1229,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 af2479d535..997b6d82e5 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -1232,6 +1232,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 20d710e29b..51f2c50712 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -1239,6 +1239,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 02c569f7f7..3af2b80000 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 = {