This commit is contained in:
yanran200730
2022-04-28 10:28:15 +08:00
parent e99ea5b2de
commit 7bbeb88804
2 changed files with 35 additions and 25 deletions

View File

@@ -186,12 +186,12 @@
showMonitor(monitor, refresh = false) {
let { id: deviceId } = monitor
deviceId &&
this.instance
.post('/app/appzyvideoequipment/getWebSdkUrl', null, {
if (deviceId) {
this.isLoading = true
this.instance.post('/app/appzyvideoequipment/getWebSdkUrl', null, {
params: { deviceId },
})
.then((res) => {
}).then((res) => {
if (res?.data) {
this.videoUrl = res.data
let data = {
@@ -211,7 +211,12 @@
}
}
}
this.isLoading = false
}).catch(() => {
this.isLoading = false
})
}
},
renderTreeItem: function (h, { node, data }) {
let show = data.deviceStatus == 1 ? 'show' : ''

View File

@@ -140,7 +140,12 @@
const canvasInfo = document.querySelector(`#synergr-canvas`).getBoundingClientRect()
const seconds = 24 * 60 * 60
const x = e.clientX - canvasInfo.left + 100
if (x < 100) return
if (x < 100 || x > this.canvasWidth + 100) {
this.isHide = true
return false
}
const unit = seconds / this.canvasWidth * (x - 100)
this.left = x