Revert "feat(aiot): 截图持久化 + ROI 显示修复 + 告警图片代理"
This reverts commit 547dfdd5f4.
This commit is contained in:
@@ -57,26 +57,16 @@ export default {
|
||||
snapUrl() {
|
||||
this.loading = true
|
||||
this.errorMsg = ''
|
||||
this.$nextTick(() => this.initCanvas())
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.$refs.wrapper) {
|
||||
this._resizeObserver = new ResizeObserver(() => {
|
||||
if (this.$refs.wrapper && this.$refs.wrapper.clientWidth > 0) {
|
||||
this.initCanvas()
|
||||
}
|
||||
})
|
||||
this._resizeObserver.observe(this.$refs.wrapper)
|
||||
}
|
||||
window.addEventListener('resize', this.handleResize)
|
||||
this.$nextTick(() => {
|
||||
this.initCanvas()
|
||||
window.addEventListener('resize', this.handleResize)
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.handleResize)
|
||||
if (this._resizeObserver) {
|
||||
this._resizeObserver.disconnect()
|
||||
this._resizeObserver = null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onImageLoad() {
|
||||
@@ -88,7 +78,6 @@ export default {
|
||||
onImageError() {
|
||||
this.loading = false
|
||||
this.errorMsg = '截图加载失败,请确认摄像头正在拉流'
|
||||
this.$nextTick(() => this.initCanvas())
|
||||
},
|
||||
initCanvas() {
|
||||
const canvas = this.$refs.canvas
|
||||
|
||||
Reference in New Issue
Block a user