图片
This commit is contained in:
@@ -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}` })
|
||||
|
||||
Reference in New Issue
Block a user