就公司人员定位系统功能更新

liujun-2024-09-04-九公司人员定位
liujun 2024-09-05 10:19:48 +08:00
parent 39ec65ad0b
commit 652a051a2d
4 changed files with 120 additions and 56 deletions

View File

@ -55,7 +55,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="block4"> <div v-if="corpInfoId !== '21590a00ea5e462e9ee44dd332dddc26'" class="block4">
<layout-title title="报警列表"/> <layout-title title="报警列表"/>
<div class="content"> <div class="content">
<div class="table"> <div class="table">
@ -72,6 +72,25 @@
</div> </div>
</div> </div>
</div> </div>
<div v-if="corpInfoId === '21590a00ea5e462e9ee44dd332dddc26'" class="block4">
<layout-title title="报警列表"/>
<div class="content">
<div class="table">
<div class="tr">
<div class="td">报警类型</div>
<div class="td">报警时间</div>
<div class="td">触发人</div>
<div class="td">报警地点</div>
</div>
<div v-for="(item,index) in block4List" :key="index" class="tr">
<div class="td">{{ item.alarmName }}</div>
<div class="td">{{ item.alarmTime }}</div>
<div class="td">{{ item.foulUserName }}</div>
<div class="td">{{ item.place }}</div>
</div>
</div>
</div>
</div>
</div> </div>
</template> </template>
@ -173,37 +192,59 @@ export default {
}, },
getData() { getData() {
requestFN( requestFN(
'/map/getAllDwMessage', '/map/getAllDwMessage', { corpId: this.corpInfoId }
{ corpId: this.corpInfoId }
).then((data) => { ).then((data) => {
this.block4List = data.alarmList.list //
this.block1OptionsList = [ if (this.corpInfoId === '035958e685cf4850bc40151c5e0617a6') {
{ this.block4List = data.alarmList.list
title: '在线设备数', this.block1OptionsList = [
img: require('../../../assets/map/renyuan/ico1.png'), {
count: data.orthermessage.onlineDeviceNum title: '在线设备数',
}, img: require('../../../assets/map/renyuan/ico1.png'),
{ count: data.orthermessage.onlineDeviceNum
title: '在线人员', },
img: require('../../../assets/map/renyuan/img1ico1.png'), {
count: data.orthermessage.infoList.UwbBQ.num title: '在线人员',
}, img: require('../../../assets/map/renyuan/img1ico1.png'),
{ count: data.orthermessage.infoList.UwbBQ.num
title: '在线基站数', },
img: require('../../../assets/map/renyuan/ico3.png'), {
count: data.orthermessage.infoList.UwbJiZhan.num title: '在线基站数',
}, img: require('../../../assets/map/renyuan/ico3.png'),
{ count: data.orthermessage.infoList.UwbJiZhan.num
title: '在线摄像头数', },
img: require('../../../assets/map/renyuan/ico4.png'), {
count: data.orthermessage.infoList.HKcamera.num title: '在线摄像头数',
}, img: require('../../../assets/map/renyuan/ico4.png'),
{ count: data.orthermessage.infoList.HKcamera.num
title: '在线报警设备数', },
img: require('../../../assets/map/renyuan/ico5.png'), {
count: data.orthermessage.infoList.tklyr.num title: '在线报警设备数',
} img: require('../../../assets/map/renyuan/ico5.png'),
] count: data.orthermessage.infoList.tklyr.num
}
]
}
if (this.corpInfoId === '21590a00ea5e462e9ee44dd332dddc26') {
this.block1OptionsList = [
{
title: '总设备数',
img: require('../../../assets/map/renyuan/img1ico1.png'),
count: data.orthermessage.onlineDeviceNum
},
{
title: '在线人员数',
img: require('../../../assets/map/renyuan/img1ico1.png'),
count: data.orthermessage.lockNum
},
{
title: '离线人数',
img: require('../../../assets/map/renyuan/img1ico1.png'),
count: data.orthermessage.unLockNum
}
]
this.block4List = data.orthermessage.alarmList
}
}).catch((e) => { }).catch((e) => {
this.$message.error(e) this.$message.error(e)
}) })

View File

@ -29,12 +29,12 @@
<td>{{ otherInfo?otherInfo.postName:'' }}</td> <td>{{ otherInfo?otherInfo.postName:'' }}</td>
</tr> </tr>
</table> </table>
<table class="table-ui"> <!-- 一公司人员定位页面 -->
<table v-if="corpId === '035958e685cf4850bc40151c5e0617a6'" class="table-ui">
<tr> <tr>
<td class="bbg-transparent">姓名</td> <td class="bbg-transparent">姓名</td>
<td >{{ info?info.userName:'' }}</td> <td >{{ info?info.userName:'' }}</td>
</tr> </tr>
<tr> <tr>
<td class="bbg-transparent">定位卡号:</td> <td class="bbg-transparent">定位卡号:</td>
<td >{{ info?info.id:'' }}</td> <td >{{ info?info.id:'' }}</td>
@ -48,6 +48,25 @@
<td>{{ info?info.departmentName:'' }}</td> <td>{{ info?info.departmentName:'' }}</td>
</tr> </tr>
</table> </table>
<!-- 九公司人员定位页面 -->
<table v-if="corpId === '21590a00ea5e462e9ee44dd332dddc26'" class="table-ui">
<tr>
<td class="bbg-transparent">姓名</td>
<td >{{ (info && info.name) ? info.name : '未绑定人员' }}</td>
</tr>
<tr>
<td class="bbg-transparent">定位卡号:</td>
<td >{{ info?info.id:'' }}</td>
</tr>
<tr>
<td class="bbg-transparent">定位卡电量</td>
<td >{{ info?info.battery:'' }}</td>
</tr>
<tr>
<td class="bbg-transparent">公司</td>
<td>{{ info?info.corpName:'' }}</td>
</tr>
</table>
</div> </div>
</template> </template>
@ -94,8 +113,12 @@ export default {
corpId: this.corpId corpId: this.corpId
} }
).then((data) => { ).then((data) => {
this.info = data.userInfo if (data.code === 9999) {
this.otherInfo = data.statusInfo this.$message.success(data.msg)
} else {
this.info = data.userInfo
this.otherInfo = data.statusInfo
}
}).catch((e) => { }).catch((e) => {
}) })
} }

View File

@ -226,13 +226,13 @@
enter-active-class="animate__animated animate__fadeInDown" enter-active-class="animate__animated animate__fadeInDown"
leave-active-class="animate__animated animate__fadeOutUp" leave-active-class="animate__animated animate__fadeOutUp"
> >
<div class="people_trajectory" v-if="isPeopleTrajectory"> <div v-if="isPeopleTrajectory" class="people_trajectory" >
<el-select v-model="peopleTrajectoryValue" popper-class="people_trajectory_select"> <el-select v-model="peopleTrajectoryValue" popper-class="people_trajectory_select">
<el-option v-for="item in onePerLocArr" :key="item.id" :value="item.id" :label="item.id"/> <el-option v-for="item in onePerLocArr" :key="item.id" :value="item.id" :label="item.id"/>
</el-select> </el-select>
<el-button class="search_btn" @click="addTrajectory"></el-button> <el-button class="search_btn" @click="addTrajectory"></el-button>
<el-button class="reset_btn" @click="()=>{removeTrajectory();peopleTrajectoryValue = ''}">重置</el-button> <el-button class="reset_btn" @click="()=>{removeTrajectory();peopleTrajectoryValue = ''}">重置</el-button>
</div> </div>
</transition> </transition>
</div> </div>
</transition> </transition>
@ -925,7 +925,7 @@ export default {
RyPostName: '', RyPostName: '',
RyRealName: '', RyRealName: '',
personTypeName: '', personTypeName: '',
GATE_VIDEO_ID:'' GATE_VIDEO_ID: ''
}, },
/* 曹妃甸使用参数开始*/ /* 曹妃甸使用参数开始*/
// //
@ -1215,8 +1215,8 @@ export default {
VIIDPort: '8088' VIIDPort: '8088'
}, },
trajectoryEntityCollection: {}, trajectoryEntityCollection: {},
isPeopleTrajectory:false, isPeopleTrajectory: false,
peopleTrajectoryValue:'' peopleTrajectoryValue: ''
} }
}, },
mounted() { mounted() {
@ -2121,7 +2121,7 @@ export default {
} }
this.carLocArr = [] this.carLocArr = []
} }
if(urlType === 'peopleTrajectory'){ if (urlType === 'peopleTrajectory'){
this.isPeopleTrajectory = false this.isPeopleTrajectory = false
} }
if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '035958e685cf4850bc40151c5e0617a6' && urlType === 'peoplePosition') { if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '035958e685cf4850bc40151c5e0617a6' && urlType === 'peoplePosition') {
@ -2129,8 +2129,8 @@ export default {
this.clearMqttPoint('+/UwbBQ/') this.clearMqttPoint('+/UwbBQ/')
this.removeTrajectory() this.removeTrajectory()
for (let i = 0; i < this.bottomOptionsList[pindex].list.length; i++) { for (let i = 0; i < this.bottomOptionsList[pindex].list.length; i++) {
if(this.bottomOptionsList[pindex].list[i].type === 'peopleTrajectory'){ if (this.bottomOptionsList[pindex].list[i].type === 'peopleTrajectory') {
if(this.bottomOptionsList[pindex].list[i].check){ if (this.bottomOptionsList[pindex].list[i].check) {
this.bottomOptionsList[pindex].list[i].check = false this.bottomOptionsList[pindex].list[i].check = false
this.isPeopleTrajectory = false this.isPeopleTrajectory = false
break break
@ -2154,7 +2154,7 @@ export default {
} }
}) })
} else { } else {
if(urlType === 'peopleTrajectory'){ if (urlType === 'peopleTrajectory') {
let flag = false let flag = false
for (let i = 0; i < this.bottomOptionsList[pindex].list.length; i++) { for (let i = 0; i < this.bottomOptionsList[pindex].list.length; i++) {
if(this.bottomOptionsList[pindex].list[i].type === 'peoplePosition'){ if(this.bottomOptionsList[pindex].list[i].type === 'peoplePosition'){
@ -2164,10 +2164,10 @@ export default {
} }
} }
} }
if(flag){ if (flag) {
this.$message.warning('请先选择人员定位!!!') this.$message.warning('请先选择人员定位!!!')
return return
}else{ } else {
this.isPeopleTrajectory = true this.isPeopleTrajectory = true
} }
} }
@ -2652,8 +2652,7 @@ export default {
personTypeName: item.personTypeName, personTypeName: item.personTypeName,
data_id: item.cardId + '', data_id: item.cardId + '',
point_type: 'peoplePositionCzks', point_type: 'peoplePositionCzks',
label: item.realName, label: item.realName
} }
czksPerLoc.push(perLoc) czksPerLoc.push(perLoc)
ry_drag.addEntity(perLoc) ry_drag.addEntity(perLoc)
@ -2942,14 +2941,14 @@ export default {
_this.fwebsocket = new WebSocket(encodeURI(wsUrl)) _this.fwebsocket = new WebSocket(encodeURI(wsUrl))
_this.fwebsocket.onmessage = function(message) { _this.fwebsocket.onmessage = function(message) {
console.info('接收消息') console.info('接收消息')
const peopleList = JSON.parse(message.data).data.data const peopleList = JSON.parse(message.data)
console.log(peopleList) console.log(peopleList)
for (let i = 0; i < peopleList.length; i++) { for (let i = 0; i < peopleList.length; i++) {
const item = peopleList[i] const item = peopleList[i]
if ((!item)) continue if ((!item)) continue
// //
const index = _this.onePerLocArr.findIndex(item1 => { const index = _this.onePerLocArr.findIndex(item1 => {
return item1.id.toString() === item.id.toString() return item1.id === item.id
}) })
const x = item.lon const x = item.lon
const y = item.lat const y = item.lat
@ -2962,6 +2961,7 @@ export default {
} else { } else {
const perLoc = { const perLoc = {
id: item.id, id: item.id,
name: item.name,
x: x, x: x,
y: y, y: y,
icon_type: 'img4_0' + pointColor, icon_type: 'img4_0' + pointColor,

View File

@ -31,7 +31,7 @@ export default class DragEntity {
disableDepthTestDistance: Number.POSITIVE_INFINITY disableDepthTestDistance: Number.POSITIVE_INFINITY
}, },
label: { label: {
text: point.id, text: point.name ? point.name : point.id,
font: '13px sans-serif', font: '13px sans-serif',
pixelOffset: new Cesium.Cartesian2(0, -55), pixelOffset: new Cesium.Cartesian2(0, -55),
showBackground: true, showBackground: true,