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

@@ -292,6 +292,7 @@ export default {
return arr.indexOf(item, 0) === index
})
},
nameAvatar(name) {
return name?.split('')?.slice(-2) || '游客'
},

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}` })

View File

@@ -22,7 +22,7 @@
<div class="datas" v-if="data.length">
<div class="card" v-for="(item, index) in 3" :key="index" @click="toDetail(item)">
<div class="cardTop">
<img src="../../static/workOnline/池夏2.jpg" alt="" />
<img src="../../static/workOnline/icon3@2x.png" alt="" />
<div class="rightTop">
<div class="leftStaus">
@@ -40,7 +40,7 @@
<div class="cardConts">秋穿上漫步森林在阳光下呼吸伸展在安逸的天也许是兰天名字的由来吧</div>
<div class="cardImg">
<img src="../../static/workOnline/池夏2.jpg" alt="" v-for="(items, i) in 4" :key="i" />
<img src="../../static/workOnline/icon3@2x.png" alt="" v-for="(items, i) in 4" :key="i" />
</div>
<div class="cardBot">

View File

@@ -6,7 +6,7 @@
<div class="middle">
<div class="cardTop">
<img src="../../static/workOnline/池夏2.jpg" alt="" />
<img src="../../static/workOnline/icon3@2x.png" alt="" />
<div class="rightTop">
<div class="leftStaus">
@@ -23,7 +23,7 @@
<div class="cardConts">秋穿上漫步森林在阳光下呼吸伸展在安逸的天也许是兰天名字的由来吧</div>
<div class="cardImg">
<img src="../../static/workOnline/池夏2.jpg" alt="" v-for="(items, i) in 4" :key="i" />
<img src="../../static/workOnline/icon3@2x.png" alt="" v-for="(items, i) in 4" :key="i" />
</div>
<div class="cardBot">
@@ -107,7 +107,7 @@ export default {
return this.$u.toast('请输入你的想法')
}
this.$http
this.$instance
.post(`/app/appvillagediscussmessage/addOrUpdate`, {
content: this.content,
avatar: this.user.avatar,
@@ -127,7 +127,7 @@ export default {
},
like(id) {
this.$http
this.$instance
.post(`/app/appvillagediscussmessage/suport?id=${id}&userId=${this.user.id}`)
.then((res) => {
this.$hideLoading()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 KiB