Files
dvcp_v2_wxcp_app/src/apps/AppBroadcast/onlineList.vue

96 lines
1.9 KiB
Vue
Raw Normal View History

2021-11-15 10:29:05 +08:00
<template>
<div class="onlineList">
<div class="record">
2021-12-15 14:37:20 +08:00
<div class="item" v-for="(item, index) in list" :key="index">
2021-12-24 21:20:52 +08:00
<img src="img/bigHorn-lb@2x.png" alt="">
2021-11-15 10:29:05 +08:00
<div class="info">
2021-12-15 14:37:20 +08:00
<p>{{ item.deviceName }}</p>
<span>{{ item.areaName }}</span>
2021-11-15 10:29:05 +08:00
</div>
</div>
</div>
2021-12-16 18:30:17 +08:00
<AiEmpty v-if="!list.length"/>
2021-12-24 10:02:37 +08:00
2021-11-15 10:29:05 +08:00
</div>
</template>
2021-12-15 14:37:20 +08:00
<script>
2021-11-15 10:29:05 +08:00
export default {
name: "onlineList",
data() {
return {
page: {current: 1, size: 10, total: 0},
list: []
}
},
methods: {
getList() {
this.$http.post("/app/appdlbquipment/getDlbDeviceList", null, {
params: {...this.page, devStatus: 5}
}).then(res => {
if (res?.data) {
if (this.page.current > 1) {
this.list = [...this.list, ...res.data.records]
} else this.list = res.data.records
this.page.total = res.data.total
}
})
},
reachBottom() {
if (this.page.total > this.list.length) {
this.page.current++
this.getList()
}
},
},
created() {
this.getList()
2021-12-24 15:27:36 +08:00
},
onShow() {
2021-12-24 21:20:52 +08:00
document.title = '在线设备'
2021-12-24 15:27:36 +08:00
},
2021-11-15 10:29:05 +08:00
}
</script>
<style lang="scss" scoped>
.onlineList {
2021-12-15 14:37:20 +08:00
.record {
2021-11-15 10:29:05 +08:00
padding-left: 32px;
background-color: #fff;
2021-12-15 14:37:20 +08:00
.item {
2021-11-15 10:29:05 +08:00
width: 100%;
border-bottom: 1px solid #ddd;
display: flex;
padding: 12px 40px 16px 0;
2021-12-15 14:37:20 +08:00
img {
2021-11-15 10:29:05 +08:00
width: 48px;
height: 48px;
margin: 12px 16px 0 0;
}
2021-12-15 14:37:20 +08:00
.info {
2021-11-15 10:29:05 +08:00
width: calc(100% - 100px);
2021-12-15 14:37:20 +08:00
p {
2021-11-15 10:29:05 +08:00
font-size: 34px;
font-family: PingFang-SC-Medium, PingFang-SC;
font-weight: 500;
color: #333;
line-height: 48px;
margin-bottom: 12px;
}
2021-12-15 14:37:20 +08:00
span {
2021-11-15 10:29:05 +08:00
font-size: 22px;
font-family: PingFang-SC-Medium, PingFang-SC;
font-weight: 500;
color: #999;
line-height: 32px;
}
}
}
}
}
</style>