| | |
| | | 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; |
| | | } |
| | | } |
| | |
| | | // 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", |
| | |
| | | }; |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | canvas{ |
| | | canvas { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |