From ce3b404a5983f03a56ad9cd65a4ae2352db2ba77 Mon Sep 17 00:00:00 2001 From: hanbaoshan <hanbaoshan@aiotlink.com> Date: 星期五, 06 十一月 2020 14:15:56 +0800 Subject: [PATCH] 集群树节点状态切换查询参数treeNodes错误修复 --- src/components/canvas/index.vue | 21 +++++++++++---------- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/components/canvas/index.vue b/src/components/canvas/index.vue index cd8f3b5..c26ef7b 100644 --- a/src/components/canvas/index.vue +++ b/src/components/canvas/index.vue @@ -95,15 +95,15 @@ default: 324 } }, - computed:{ - canvasBg(){ - if(this.snapshot_url){ - if(this.sourceType == 2){ - return `/files/${this.snapshot_url}` - }else{ + computed: { + canvasBg() { + if (this.snapshot_url) { + if (this.sourceType == 2) { + return `${this.snapshot_url}` + } else { return `/httpImage/${this.snapshot_url}` } - }else{ + } else { return this.blackImg; } } @@ -165,11 +165,12 @@ // this.$emit('changeBaseImg',this.currentCameraId) this.$emit('changeLoading', true) if (this.currentCameraId) { + let _this = this; await updateSnapshot(this.currentCameraId) .then(res => { - if (res.data.cameraId === this.currentCameraId) { + if (res.data.cameraId === _this.currentCameraId) { this.baseImg = res.data.snapshotUrl; - this.$emit('refresh', res.data.snapshotUrl) + this.$emit('refresh', res.data.snapshotUrl, _this.currentCameraId) this.$forceUpdate() this.$notify({ type: "success", @@ -494,7 +495,7 @@ }; </script> <style lang="scss" scoped> -canvas{ +canvas { position: absolute; top: 0; left: 0; -- Gitblit v1.8.0