提交 0bb8ccae authored 作者: wangjiahao's avatar wangjiahao

fix: 刷新时间设置时间被还原问题

上级 b7d5f0b8
...@@ -37,9 +37,9 @@ export default { ...@@ -37,9 +37,9 @@ export default {
}, },
created() { created() {
// 初始化赋值 // 初始化赋值
if (!this.canvasStyleData.refreshTime) { // if (!this.canvasStyleData.refreshTime) {
this.canvasStyleData['refreshTime'] = CANVAS_STYLE.refreshTime // this.canvasStyleData['refreshTime'] = CANVAS_STYLE.refreshTime
} // }
}, },
methods: { methods: {
onChangePanelStyle() { onChangePanelStyle() {
......
...@@ -394,7 +394,10 @@ export default { ...@@ -394,7 +394,10 @@ export default {
}) })
this.$store.commit('setComponentData', this.resetID(componentDatas)) this.$store.commit('setComponentData', this.resetID(componentDatas))
// this.$store.commit('setComponentData', this.resetID(JSON.parse(componentDataTemp))) // this.$store.commit('setComponentData', this.resetID(JSON.parse(componentDataTemp)))
this.$store.commit('setCanvasStyle', JSON.parse(canvasStyleDataTemp)) const temp = JSON.parse(canvasStyleDataTemp)
temp.refreshTime = (temp.refreshTime || 5)
this.$store.commit('setCanvasStyle', temp)
// 清空临时画布数据 // 清空临时画布数据
this.$store.dispatch('panel/setComponentDataTemp', null) this.$store.dispatch('panel/setComponentDataTemp', null)
this.$store.dispatch('panel/setCanvasStyleDataTemp', null) this.$store.dispatch('panel/setCanvasStyleDataTemp', null)
...@@ -413,6 +416,8 @@ export default { ...@@ -413,6 +416,8 @@ export default {
this.$store.commit('setComponentData', this.resetID(componentDatas)) this.$store.commit('setComponentData', this.resetID(componentDatas))
// this.$store.commit('setComponentData', this.resetID(JSON.parse(response.data.panelData))) // this.$store.commit('setComponentData', this.resetID(JSON.parse(response.data.panelData)))
const panelStyle = JSON.parse(response.data.panelStyle) const panelStyle = JSON.parse(response.data.panelStyle)
panelStyle.refreshTime = (panelStyle.refreshTime || 5)
this.$store.commit('setCanvasStyle', panelStyle) this.$store.commit('setCanvasStyle', panelStyle)
this.$store.commit('recordSnapshot', 'init')// 记录快照 this.$store.commit('recordSnapshot', 'init')// 记录快照
// 刷新联动信息 // 刷新联动信息
......
...@@ -630,6 +630,8 @@ export default { ...@@ -630,6 +630,8 @@ export default {
this.$store.commit('setComponentData', this.resetID(componentDatas)) this.$store.commit('setComponentData', this.resetID(componentDatas))
// this.$store.commit('setComponentData', sourceInfo.type === 'custom' ? sourceInfo : this.resetID(sourceInfo)) // this.$store.commit('setComponentData', sourceInfo.type === 'custom' ? sourceInfo : this.resetID(sourceInfo))
const temp = JSON.parse(response.data.panelStyle) const temp = JSON.parse(response.data.panelStyle)
temp.refreshTime = (temp.refreshTime || 5)
this.$store.commit('setCanvasStyle', temp) this.$store.commit('setCanvasStyle', temp)
this.$store.dispatch('panel/setPanelInfo', data) this.$store.dispatch('panel/setPanelInfo', data)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论