在线人员统计

lijinlong
吕天方 1 year ago
parent f5fc054cde
commit a4320563d2

@ -4,7 +4,7 @@
* @Author: JC9527
* @Date: 2023-08-15 09:44:13
* @LastEditors: JC9527
* @LastEditTime: 2024-01-04 15:23:57
* @LastEditTime: 2024-01-06 17:14:03
-->
<template>
<div class="left-box">
@ -68,7 +68,7 @@
</div>
<div class="item lfet-list-one" id="parent-getHeight" :style="itemOne">
<title-box title="人员在线情况"></title-box>
<map-number title="在线人员总数" :onLine="100" :sum="150" type="人" :numberArray="peopleArray" :height="oneHeight" :id="1"
<map-number title="在线人员总数" :onLine="personOnLine" :sum="perpsonNum" type="人" :numberArray="peopleArray" :height="oneHeight" :id="1"
v-on="$listeners"></map-number>
</div>
<div class="item lfet-list-two" :style="itemOne">
@ -87,6 +87,8 @@ export default {
components: { titleBox, mapNumber },
data() {
return {
perpsonNum:0,
personOnLine:0,
peopleArray: [
{
title: '李飞'
@ -168,6 +170,16 @@ export default {
handler(newPerson) {
// console.log(newPerson,'线');
this.peopleArray = newPerson
if(newPerson){
this.perpsonNum = newPerson.length;
let line = 0;
newPerson.forEach(element => {
if(element.status == "1") {
line += 1
}
});
this.personOnLine = line
}
},
immediate: true,
},
@ -225,10 +237,10 @@ export default {
this.getDomHeight();
});
this.getDomHeight();
this.getEvent();
getTrend({ type: 1 }).then(res => {
console.log(res, '事件来源');
})
// this.getEvent();
// getTrend({ type: 1 }).then(res => {
// console.log(res, '');
// })
},

@ -1226,7 +1226,7 @@ export default {
//
getMarkers(id){
getMarkers(id,status){
let ico1 = require("../../../assets/images/icon/icon1.png");
let ico2 = require("../../../assets/images/icon/icon2.png");
let ico3 = require("../../../assets/images/icon/icon3.png");
@ -1238,7 +1238,7 @@ export default {
let offIcon3 = require("../../../assets/images/icon/offLine3.png");
let offIcon4 = require("../../../assets/images/icon/offLine4.png");
this.markers = [];
this.mapLoading = true;
this.mapLoading = status ? false : true;
if(id == 1) {
this.personLine = [];
getDeviceList({ imei: "861316060216403,861316060216619,861316060207857,861316060214648,861316060214317,861316060215553,861316060212493,861316060214804,861316060207931,861316060216056" }).then((res) => {
@ -2757,6 +2757,7 @@ export default {
this.markerOffset = new AMap.Pixel(-27, -94);
}
this.getMarkers(id);
// this.markerInterval()
// if (id == 1) {
// this.getTem();
@ -2780,14 +2781,26 @@ export default {
},
getCarList(){
getCarManageList({pageNum: 1,pageSize: 10}).then(res=>{
console.log(res);
// console.log(res);
this.carLine = res.rows
})
},
//
markerInterval(){
let timer
if(this.actionMap == 1) {
timer = setInterval(() => {
this.getMarkers(1,true)
}, 10000);
} else {
clearInterval(timer)
}
},
},
mounted() {
this.getCarList()
// this.markerInterval()
},
};
</script>

Loading…
Cancel
Save