This commit is contained in:
花有清香月有阴
2022-02-17 16:07:34 +08:00
parent 6db67c6fcc
commit 6470a2b52f
5 changed files with 23 additions and 16 deletions

View File

@@ -66,6 +66,17 @@ export default {
this.getList()
},
methods: {
getList() {
this.$instance.post(`/app/appzyvideoequipment/getAreaEquipment?areaId=${this.areaId}`).then((res) => {
if (res?.data) {
this.list = res.data.list
this.count = res.data.count
this.onlineRate = (this.count.online / this.count.sum).toFixed(2)
this.offlineRate = (1 - this.onlineRate).toFixed(2)
}
})
},
getMonitors(nodeId, queryType = 0) {
this.monitors = []
this.$instance
@@ -79,31 +90,26 @@ export default {
}
})
},
getMore(row) {
this.nodes.push(row)
this.getMonitors(row.nodeId, row.hasChild == 1 ? 0 : 1)
},
isCurrent(index) {
return index == Math.max(this.nodes?.length - 1, 0)
},
gotoNode(node, index) {
this.nodes.splice(index + 1)
this.getMonitors(node.nodeId)
},
getList() {
this.$instance.post(`/app/appzyvideoequipment/getAreaEquipment?areaId=${this.areaId}`).then((res) => {
if (res?.data) {
this.list = res.data.list
this.count = res.data.count
this.onlineRate = (this.count.online / this.count.sum).toFixed(2)
this.offlineRate = (1 - this.onlineRate).toFixed(2)
}
})
},
areaSelect(e) {
this.areaId = e
this.getList()
},
showMonitor(row) {
if (row.deviceStatus != 1) return
uni.navigateTo({ url: `./monitorDetail?id=${row.id}` })