Commit 3f2835c95bc0013c34192bd559dfe1f03b632cf8

Authored by ww
1 parent 17b947f5

fix: switch component not real time update

... ... @@ -8154,7 +8154,6 @@ DataFormatPanel.prototype.addDataFont = function (container) {
8154 8154 generateUploadLayerComponent((imageState) => {
8155 8155 $(el).find('img').attr('src', imageState[enumConst.IMAGE_GALLERY_IMAGE_PATH])
8156 8156 form.val(getFormFilter, imageState)
8157   - console.log(form.val(getFormFilter))
8158 8157 })
8159 8158 })
8160 8159 }
... ... @@ -13258,20 +13257,24 @@ class HandleDataSource {
13258 13257 const [[timespan, receiveValue] = []] = data[attr] || []
13259 13258 const switchConfig = this.DispatchInstance.contentData.act.find(item => item.id === nodeId && item.type === 'SWITCH')
13260 13259 const { condition = [] } = switchConfig || {}
13261   - let reg = /image=images[^;]+/g
  13260 + let reg = /image=[^;]+/g
13262 13261 let flag = false
13263 13262 for (const item of condition) {
13264 13263 const { value, imagePath } = item || {}
13265 13264 if (Number(receiveValue) === Number(value)) {
13266 13265 flag = true
13267   - const style = node.getStyle()
13268   - node.setStyle(style.replace(reg, `image=${imagePath}`))
  13266 + this.updatePage(() => {
  13267 + const style = node.getStyle()
  13268 + node.setStyle(style.replace(reg, `image=${imagePath}`))
  13269 + }, node)
13269 13270 break
13270 13271 }
13271 13272 }
13272 13273 if (!flag) {
13273   - const style = node.getStyle()
13274   - node.setStyle(style.replace(reg, `image=images/thingskit/not-standard-value.svg`))
  13274 + this.updatePage(() => {
  13275 + const style = node.getStyle()
  13276 + node.setStyle(style.replace(reg, `image=images/thingskit/not-standard-value.svg`))
  13277 + }, node)
13275 13278 }
13276 13279 }
13277 13280
... ... @@ -13280,7 +13283,9 @@ class HandleDataSource {
13280 13283 const node = this.getNodeByCmdId(subscriptionId)
13281 13284 const { attr } = this.getBindData(subscriptionId)
13282 13285 const [[timespan, receiveValue] = []] = data[attr] || []
13283   - node.setAttribute('label', `<button class="param-setting-button">${receiveValue}</button>`)
  13286 + this.updatePage(() => {
  13287 + node.setAttribute('label', `<button class="param-setting-button">${receiveValue}</button>`)
  13288 + }, node)
13284 13289 }
13285 13290
13286 13291 /**
... ... @@ -13549,9 +13554,6 @@ class HandleDataSource {
13549 13554 }
13550 13555
13551 13556 instance.setOption(chartOption)
13552   - instance.on('dataZoom', () => {
13553   - console.log(instance.getOption())
13554   - })
13555 13557 // instance.on('mouseover', stop)
13556 13558 // instance.on('mouseout', goMove)
13557 13559 // autoMove()
... ... @@ -14419,7 +14421,6 @@ class HandleDynamicEffect {
14419 14421 ...videoPlayConfig
14420 14422 },
14421 14423 function () {
14422   - console.log(idEl)
14423 14424 this.play()
14424 14425 })
14425 14426 }
... ...