湖里大屏(数字工地):人脸闸机数据渲染

This commit is contained in:
骆乐 2022-08-11 13:36:33 +08:00
parent 632655024c
commit 37a5d8f6b8
4 changed files with 52 additions and 17 deletions

View File

@ -24,7 +24,7 @@
<rightCenter title="环境监测"></rightCenter> <rightCenter title="环境监测"></rightCenter>
</div> </div>
<div class="rightBottom"> <div class="rightBottom">
<rightBottom title="人脸闸机"></rightBottom> <rightBottom title="人脸闸机" :ufaceList="ufaceList"></rightBottom>
</div> </div>
</div> </div>
</div> </div>
@ -64,7 +64,8 @@ export default {
towerList: [], // towerList: [], //
lifterList: [], // lifterList: [], //
videoCountList: {}, // videoCountList: {}, //
ufaceList: [], // ufaceList: {}, //
uface:[],
ufaceInCount: 0, // ufaceInCount: 0, //
environmentDevList: [], // environmentDevList: [], //
dangerAlarmTypeList: [], // dangerAlarmTypeList: [], //
@ -90,7 +91,7 @@ export default {
// //
getAllTowerDangerInfo(data).then(res => { getAllTowerDangerInfo(data).then(res => {
if (res.code === 200) { if (res.code === 200) {
console.log('获取塔吊数量',res) // console.log('',res)
let { result } = res let { result } = res
this.totalTowerDev = result.devCount.devNum this.totalTowerDev = result.devCount.devNum
this.totalDangerTowerDev = result.towerAlarmCount this.totalDangerTowerDev = result.towerAlarmCount
@ -154,7 +155,7 @@ export default {
selectTowerDevAlarmCountList(data).then(res => { selectTowerDevAlarmCountList(data).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.towerList = res.result.devList this.towerList = res.result.devList
console.log('获取塔吊设备信息',this.towerList) // console.log('',this.towerList)
} }
}) })
// //
@ -173,8 +174,10 @@ export default {
// //
selectUfaceDevStatisticsList(data).then(res => { selectUfaceDevStatisticsList(data).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.ufaceList = res.result.devList console.log('获取人脸闸机设备信息',res)
this.ufaceList.forEach(item => { this.ufaceList = res.result
this.uface = res.result.devList
this.uface.forEach(item => {
this.ufaceInCount += item.inTotalNum this.ufaceInCount += item.inTotalNum
}) })
} }

View File

@ -6,11 +6,13 @@
> >
<div class="list"> <div class="list">
<div class="list-head">设备名称</div> <div class="list-head">设备名称</div>
<div class="listBox">
<div class="list-item" :class="item.deviceState ==1 ? 'offline' : 'online'" v-for="(item,index) in videoCountList.videoList" :key="index"> <div class="list-item" :class="item.deviceState ==1 ? 'offline' : 'online'" v-for="(item,index) in videoCountList.videoList" :key="index">
<div class="label">{{item.videoName}}</div> <div class="label">{{item.videoName}}</div>
<div class="status">{{item.deviceState ==1 ? '在线' :'离线'}}</div> <div class="status">{{item.deviceState ==1 ? '在线' :'离线'}}</div>
</div> </div>
</div> </div>
</div>
</DeviceCard> </DeviceCard>
</Card> </Card>
</template> </template>
@ -34,12 +36,17 @@ export default {
return {} return {}
}, },
mounted(){ mounted(){
console.log('--------------',this.videoCountList) // console.log('--------------',this.videoCountList)
} }
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
::-webkit-scrollbar {
width: 3px;
color: #636364;
}
.list { .list {
padding: 0 10px; padding: 0 10px;
color: #fff; color: #fff;
@ -48,6 +55,9 @@ export default {
padding-left: 16px; padding-left: 16px;
font-size: 12px; font-size: 12px;
} }
.listBox{
height:120px;
overflow: auto;
.list-item { .list-item {
margin-bottom: 6px; margin-bottom: 6px;
padding: 0 16px; padding: 0 16px;
@ -81,4 +91,8 @@ export default {
} }
} }
} }
}
</style> </style>

View File

@ -59,7 +59,7 @@ export default {
}; };
}, },
mounted() { mounted() {
console.log("传过来了吗", this.towerList, this.totalTowerDev); // console.log("------", this.towerList, this.totalTowerDev);
// xy 0 // xy 0
//var datax = [],datay =[] //var datax = [],datay =[]
//this.towerList.forEach((item)=>{ //this.towerList.forEach((item)=>{

View File

@ -10,11 +10,13 @@
<div class="enter">进场人数</div> <div class="enter">进场人数</div>
<div class="outer">出场人数</div> <div class="outer">出场人数</div>
</div> </div>
<div class="list-item" :class="i === 2 ? 'offline' : 'online'" v-for="i in 3" :key="i"> <div class="listBox">
<div class="status">在线</div> <div class="list-item" :class="item.deviceState ==1 ? 'offline' : 'online'" v-for="(item,index) in ufaceList.devList" :key="index">
<div class="label">1号塔吊</div> <div class="status">{{item.deviceState ==1 ? '在线' :'离线'}}</div>
<div class="enter">66</div> <div class="label">{{item.devName}}</div>
<div class="outer">99</div> <div class="enter">{{item.isEnter}}</div>
<div class="outer">{{item.outTotalNum}}</div>
</div>
</div> </div>
</div> </div>
</DeviceCard> </DeviceCard>
@ -30,15 +32,26 @@ export default {
title: { title: {
type: String, type: String,
default: '' default: ''
},
ufaceList:{
type: Object,
default: []
} }
}, },
data() { data() {
return {} return {}
},
mounted(){
// console.log('--------------', this.ufaceList)
} }
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
::-webkit-scrollbar {
width: 3px;
color: #636364;
}
.list { .list {
padding: 0 10px; padding: 0 10px;
color: #fff; color: #fff;
@ -59,6 +72,9 @@ export default {
text-align: right; text-align: right;
} }
} }
.listBox{
height:100px;
overflow:auto;
.list-item { .list-item {
margin-bottom: 6px; margin-bottom: 6px;
padding: 0 16px; padding: 0 16px;
@ -99,4 +115,6 @@ export default {
} }
} }
} }
}
</style> </style>