Commit 572f20ef88f2439dc508dd39cd9e7939a17f3dae
1 parent
1520b27d
处理动态图片第一次不加载的问题
Showing
3 changed files
with
8 additions
and
2 deletions
src/views/bigscreenDesigner/designer/components/dynamicForm.vue
src/views/bigscreenDesigner/designer/widget/div/widgetDtImage.vue
| ... | ... | @@ -73,6 +73,8 @@ export default { |
| 73 | 73 | this.options = this.value; |
| 74 | 74 | this.optionsData = this.value.data; |
| 75 | 75 | this.setPicValue(); |
| 76 | + this.getEchartData(); | |
| 77 | + | |
| 76 | 78 | }, |
| 77 | 79 | methods: { |
| 78 | 80 | // vue hack 之强制刷新组件 |
| ... | ... | @@ -98,6 +100,7 @@ export default { |
| 98 | 100 | this.getEchartData(); |
| 99 | 101 | } |
| 100 | 102 | }, |
| 103 | + | |
| 101 | 104 | dynamicDataFn(refreshTime) { |
| 102 | 105 | if (this.ispreview) { |
| 103 | 106 | this.flagInter = setInterval(() => { |
| ... | ... | @@ -111,12 +114,14 @@ export default { |
| 111 | 114 | const imageAdressOld =this.imageAdress; |
| 112 | 115 | const imageAdressNew =this.getShowPic(); |
| 113 | 116 | //this.imageAdress = this.getShowPic(); |
| 114 | - this.imageAdressShow = this.isNotBlank(this.imageAdress); | |
| 117 | + | |
| 115 | 118 | // console.log("this.imageAdress",imageAdressOld, imageAdressNew,(imageAdressOld!==imageAdressNew) ) |
| 116 | 119 | if(imageAdressOld!==imageAdressNew){ |
| 117 | 120 | this.imageAdress = imageAdressNew; |
| 118 | 121 | this.reload(); |
| 119 | 122 | } |
| 123 | + this.imageAdressShow = this.isNotBlank(this.imageAdress); | |
| 124 | + | |
| 120 | 125 | }, |
| 121 | 126 | getShowPic() { |
| 122 | 127 | const {textPic, slectedDataType} = this.transStyle; | ... | ... |
src/views/bigscreenDesigner/viewer/index.vue
| ... | ... | @@ -10,6 +10,7 @@ |
| 10 | 10 | v-model="widget.value" |
| 11 | 11 | :index="index" |
| 12 | 12 | :type="widget.type" |
| 13 | + :value="widget.value" | |
| 13 | 14 | /> |
| 14 | 15 | </div> |
| 15 | 16 | </div> |
| ... | ... | @@ -36,6 +37,7 @@ export default { |
| 36 | 37 | }, |
| 37 | 38 | mounted() { |
| 38 | 39 | this.getData(); |
| 40 | + | |
| 39 | 41 | }, |
| 40 | 42 | methods: { |
| 41 | 43 | ...mapMutations('dataSource', ['SET_STATIC_DATA','SET_REFRESHTIME']), | ... | ... |