|
|
|
@ -4,7 +4,7 @@
|
|
|
|
|
* @Author: JC9527
|
|
|
|
|
* @Date: 2024-01-09 23:08:15
|
|
|
|
|
* @LastEditors: JC9527
|
|
|
|
|
* @LastEditTime: 2024-03-04 10:48:02
|
|
|
|
|
* @LastEditTime: 2024-03-08 09:06:26
|
|
|
|
|
-->
|
|
|
|
|
<template>
|
|
|
|
|
<div class="map-main">
|
|
|
|
@ -104,8 +104,8 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="btns">
|
|
|
|
|
<div @click="travelPath()">行程轨迹</div>
|
|
|
|
|
<div>附近队员</div>
|
|
|
|
|
<div>位置分享</div>
|
|
|
|
|
<!-- <div>附近队员</div> -->
|
|
|
|
|
<div @click="shareClick">位置分享</div>
|
|
|
|
|
<div @click="watchClick">强制观摩</div>
|
|
|
|
|
<div @click="taskClick">任务派发</div>
|
|
|
|
|
</div>
|
|
|
|
@ -121,7 +121,7 @@
|
|
|
|
|
:position="eventInfo.position"
|
|
|
|
|
:visible.sync="eventInfo.visible"
|
|
|
|
|
>
|
|
|
|
|
<div class="event-popup">
|
|
|
|
|
<div class="event-popup" :class="eventInfo.info.status == '待受理' ? '':'event-popupTwo'">
|
|
|
|
|
<div class="event-title">
|
|
|
|
|
<div class="title">事件信息</div>
|
|
|
|
|
<!-- <div class="mask" @click="markersClosePopup"></div> -->
|
|
|
|
@ -136,19 +136,30 @@
|
|
|
|
|
<div class="event-info">
|
|
|
|
|
<div class="dot"></div>
|
|
|
|
|
<div class="name">事件类别:</div>
|
|
|
|
|
<div class="position">{{ eventInfo.info.type }}</div>
|
|
|
|
|
<el-tooltip :content="eventInfo.info.type" placement="top">
|
|
|
|
|
<div class="position">{{ eventInfo.info.type }}</div>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="event-info">
|
|
|
|
|
<div class="dot"></div>
|
|
|
|
|
<div class="name">事件地址:</div>
|
|
|
|
|
<div class="position">{{ eventInfo.info.address }}</div>
|
|
|
|
|
<el-tooltip :content="eventInfo.info.address" placement="top">
|
|
|
|
|
<div class="position">{{ eventInfo.info.address }}</div>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="event-info">
|
|
|
|
|
<div class="dot"></div>
|
|
|
|
|
<div class="name">描述:</div>
|
|
|
|
|
<div class="position">{{ eventInfo.info.content }}</div>
|
|
|
|
|
<el-tooltip :content="eventInfo.info.content" placement="top">
|
|
|
|
|
<div class="position">{{ eventInfo.info.content }}</div>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="btn" @click="eventBtn">
|
|
|
|
|
<div class="event-info">
|
|
|
|
|
<div class="dot"></div>
|
|
|
|
|
<div class="name">状态:</div>
|
|
|
|
|
<div class="position">{{ eventInfo.info.status }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="btn" v-show="eventInfo.info.status == '待受理'" @click="eventBtn">
|
|
|
|
|
指派
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -158,7 +169,7 @@
|
|
|
|
|
<!-- 执法车辆弹框 -->
|
|
|
|
|
<el-amap-info-window
|
|
|
|
|
v-if="carInfo.visible"
|
|
|
|
|
:offset="[-10,-40]"
|
|
|
|
|
:offset="[-0,-10]"
|
|
|
|
|
:closeWhenClickMap="true"
|
|
|
|
|
:position="carInfo.position"
|
|
|
|
|
:visible.sync="carInfo.visible"
|
|
|
|
@ -172,8 +183,8 @@
|
|
|
|
|
<div class="car-main">
|
|
|
|
|
<div class="car-info">
|
|
|
|
|
<div class="dot"></div>
|
|
|
|
|
<div class="name">执法一队1号车</div>
|
|
|
|
|
<div class="position">苏A568974</div>
|
|
|
|
|
<div class="name">{{carInfo.info.carName}}</div>
|
|
|
|
|
<div class="position">{{carInfo.info.carCode}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="btn" @click="travelPath()">行程轨迹</div>
|
|
|
|
|
</div>
|
|
|
|
@ -199,7 +210,7 @@
|
|
|
|
|
<div class="person-info">
|
|
|
|
|
<div class="info-left">
|
|
|
|
|
<div class="dot"></div>
|
|
|
|
|
<div class="name">监控点名称:</div>
|
|
|
|
|
<div class="name">点位名称:</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="position">{{ monitoringInfo.info.name }}</div>
|
|
|
|
|
</div>
|
|
|
|
@ -254,12 +265,16 @@
|
|
|
|
|
<div class="event-info">
|
|
|
|
|
<div class="dot"></div>
|
|
|
|
|
<div class="name">所在地址:</div>
|
|
|
|
|
<div class="position">{{ shopInfo.info.bodyAddress }}</div>
|
|
|
|
|
<el-tooltip :content="shopInfo.info.bodyAddress" placement="top">
|
|
|
|
|
<div class="position">{{ shopInfo.info.bodyAddress }}</div>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="event-info">
|
|
|
|
|
<div class="dot"></div>
|
|
|
|
|
<div class="name">描述:</div>
|
|
|
|
|
<div class="position">{{ shopInfo.info.bodyName }}</div>
|
|
|
|
|
<el-tooltip :content="shopInfo.info.bodyName" placement="top">
|
|
|
|
|
<div class="position">{{ shopInfo.info.bodyName }}</div>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="btn" @click="getShopInfo">
|
|
|
|
@ -276,7 +291,7 @@
|
|
|
|
|
<transition name="left-animationMap">
|
|
|
|
|
<div class="map-left" v-if="leftAnimationData">
|
|
|
|
|
<!-- :personLine="personLine" -->
|
|
|
|
|
<map-left :carLine="carLine" @realTimeLocationClick="realTimeLocationClick"></map-left>
|
|
|
|
|
<map-left :carLine="carLine" @realTimeLocationClick="realTimeLocationClick" @carTimeLocationClick="realTimeLocationClick"></map-left>
|
|
|
|
|
</div>
|
|
|
|
|
</transition>
|
|
|
|
|
|
|
|
|
@ -415,6 +430,7 @@
|
|
|
|
|
<div class="bgt"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<personage-track ref="personageTrack"></personage-track>
|
|
|
|
|
<!-- 事件指派人员 -->
|
|
|
|
|
<crew-assign ref="crewAssign"></crew-assign>
|
|
|
|
|
<!-- <video-wall ref="videoWall"></video-wall> -->
|
|
|
|
|
<alone-video ref="aloneVideo"></alone-video>
|
|
|
|
@ -545,6 +561,7 @@ export default {
|
|
|
|
|
// 车辆弹框信息
|
|
|
|
|
carInfo: {
|
|
|
|
|
position: [],
|
|
|
|
|
info:{},
|
|
|
|
|
visible: false,
|
|
|
|
|
},
|
|
|
|
|
// 监控视频弹框信息
|
|
|
|
@ -958,7 +975,8 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 事件的非聚合自定义样式及点击事件
|
|
|
|
|
_eventMarker (context) {
|
|
|
|
|
var content = `<div class="markerStyles"><img src="${require("../../../assets/images/icon/icon2.png")}" alt=""></div>`;
|
|
|
|
|
// console.log(context,"context");
|
|
|
|
|
var content = `<div class="markerStyles"><img src="${context.data[0].info.status == '已处理' ? require("../../../assets/images/icon/offLine2.png") : require("../../../assets/images/icon/icon2.png")}" alt=""></div>`;
|
|
|
|
|
var offset = new AMap.Pixel(-13, -16);
|
|
|
|
|
context.marker.setContent(content)
|
|
|
|
|
context.marker.setOffset(offset)
|
|
|
|
@ -968,6 +986,18 @@ export default {
|
|
|
|
|
this.eventInfo.visible = true;
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 车辆非聚合自定义样式及点击事件
|
|
|
|
|
_carMarker(context){
|
|
|
|
|
var content = `<div class="markerStyles"><img src="${require("../../../assets/images/icon/icon4.png")}" alt=""></div>`;
|
|
|
|
|
var offset = new AMap.Pixel(-13, -16);
|
|
|
|
|
context.marker.setContent(content)
|
|
|
|
|
context.marker.setOffset(offset)
|
|
|
|
|
context.marker.on('click',(ev)=>{
|
|
|
|
|
this.carInfo.position = context.data[0].position;
|
|
|
|
|
this.carInfo.info = context.data[0].info;
|
|
|
|
|
this.carInfo.visible = true;
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 视频非聚合自定义样式及点击事件
|
|
|
|
|
_renderMarker (context) {
|
|
|
|
|
var content = `<div class="markerStyles"><img src="${context.data[0].info.status == 1 ? require("../../../assets/images/icon/icon5.png") : require("../../../assets/images/icon/offLine4.png")}" alt=""></div>`;
|
|
|
|
@ -994,6 +1024,7 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 各个点位获取
|
|
|
|
|
getMarkers(id,status){
|
|
|
|
|
if (this.cluster) {
|
|
|
|
@ -1119,17 +1150,58 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else if(id == 3){
|
|
|
|
|
point.features.forEach((element)=>{
|
|
|
|
|
if (element.properties.name == "执法车辆") {
|
|
|
|
|
// point.features.forEach((element)=>{
|
|
|
|
|
// if (element.properties.name == "执法车辆") {
|
|
|
|
|
// let obj = {position:[]};
|
|
|
|
|
// obj.position[0] = element.geometry.coordinates[0];
|
|
|
|
|
// obj.position[1] = element.geometry.coordinates[1];
|
|
|
|
|
// obj.imgSrc = element.properties.status == "0"? offIcon3 : ico4;
|
|
|
|
|
// obj.text = element.properties.name;
|
|
|
|
|
// this.markers.push(obj)
|
|
|
|
|
// this.mapLoading = false;
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
getCarManageList({pageNum: 1,pageSize: 1000}).then(res=>{
|
|
|
|
|
// console.log('车辆',res);
|
|
|
|
|
this.carLine = res.rows
|
|
|
|
|
let videoPoint = [];
|
|
|
|
|
this.mapLoading = false;
|
|
|
|
|
res.rows.forEach((element)=>{
|
|
|
|
|
// console.log(element);
|
|
|
|
|
let obj = {position:[]};
|
|
|
|
|
obj.position[0] = element.geometry.coordinates[0];
|
|
|
|
|
obj.position[1] = element.geometry.coordinates[1];
|
|
|
|
|
obj.imgSrc = element.properties.status == "0"? offIcon3 : ico4;
|
|
|
|
|
obj.text = element.properties.name;
|
|
|
|
|
this.markers.push(obj)
|
|
|
|
|
obj.position[0] = element.longitude;
|
|
|
|
|
obj.position[1] = element.latitude;
|
|
|
|
|
// obj.imgSrc = element.status == "0" ? offIcon4 : ico5;
|
|
|
|
|
obj.lnglat = new AMap.LngLat(element.longitude ? element.longitude : 0 ,element.latitude ? element.latitude : 0)
|
|
|
|
|
obj.imgSrc = ico4;
|
|
|
|
|
obj.info = element;
|
|
|
|
|
// this.markers.push(obj)
|
|
|
|
|
videoPoint.push(obj)
|
|
|
|
|
})
|
|
|
|
|
this.count = videoPoint.length;
|
|
|
|
|
|
|
|
|
|
AMap.plugin(['AMap.MarkerCluster','AMap.Size','AMap.Pixel'],()=>{
|
|
|
|
|
|
|
|
|
|
this.cluster = new AMap.MarkerCluster(this.map,videoPoint,{
|
|
|
|
|
gridSize: 60, // 设置网格像素大小
|
|
|
|
|
styles: sts,
|
|
|
|
|
maxZoom: 15,
|
|
|
|
|
// renderClusterMarker: this._renderClusterMarker, // 自定义聚合点样式
|
|
|
|
|
renderMarker: this._carMarker, // 自定义非聚合点样式
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
// res.rows.forEach(element => {
|
|
|
|
|
// let obj = {position:[]};
|
|
|
|
|
// obj.position[0] = element.longitude;
|
|
|
|
|
// obj.position[1] = element.latitude;
|
|
|
|
|
// obj.imgSrc = ico6;
|
|
|
|
|
// obj.info = element;
|
|
|
|
|
// this.markers.push(obj)
|
|
|
|
|
// this.mapLoading = false;
|
|
|
|
|
// })
|
|
|
|
|
}).catch(err=>{
|
|
|
|
|
this.mapLoading = false;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
} else if(id == 4){
|
|
|
|
|
getVideoPageEq({pageNo:1,pageSize:1000}).then(res=>{
|
|
|
|
|
this.mapLoading = false;
|
|
|
|
@ -1251,7 +1323,11 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 任务派发事件
|
|
|
|
|
taskClick(){
|
|
|
|
|
this.$refs.personageTask.open(this.personInfo.info);
|
|
|
|
|
if(this.personInfo.info.status == "1") {
|
|
|
|
|
this.$refs.personageTask.open(this.personInfo.info);
|
|
|
|
|
} else {
|
|
|
|
|
this.$modal.msgError("该设备已离线");
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 播放监控视频
|
|
|
|
|
initVideoPlayer(videoUrl){
|
|
|
|
@ -1324,7 +1400,7 @@ export default {
|
|
|
|
|
if(res.code == 200 && res.data.msg == '操作成功') {
|
|
|
|
|
// http://121.229.2.163:9291/live/9999 http://120.27.25.166:9305/live/9999_
|
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
this.initVideoPlayer(`http://121.229.2.163:9291/live/9999_${this.personInfo.info.userId}.flv`)
|
|
|
|
|
this.initVideoPlayer(`https://121.229.2.163:9307/live/9999_${this.personInfo.info.userId}.flv`)
|
|
|
|
|
},3000)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
@ -1343,6 +1419,21 @@ export default {
|
|
|
|
|
this.player = null
|
|
|
|
|
if(this.timer) clearInterval(this.timer)
|
|
|
|
|
},
|
|
|
|
|
// 位置分享
|
|
|
|
|
shareClick(){
|
|
|
|
|
console.log(this.personInfo,"位置分享");
|
|
|
|
|
if(this.personInfo.info.status == "1") {
|
|
|
|
|
var aux = document.createElement("input");
|
|
|
|
|
aux.setAttribute("value", this.personInfo.info.address);
|
|
|
|
|
document.body.appendChild(aux);
|
|
|
|
|
aux.select();
|
|
|
|
|
document.execCommand("copy");
|
|
|
|
|
document.body.removeChild(aux);
|
|
|
|
|
this.$modal.msgSuccess("位置已复制");
|
|
|
|
|
} else {
|
|
|
|
|
this.$modal.msgError("该人员已离线");
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 事件指派
|
|
|
|
|
eventBtn(){
|
|
|
|
|
this.$refs.crewAssign.open(this.eventInfo.info);
|
|
|
|
@ -1614,6 +1705,18 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 今日明日获取
|
|
|
|
|
getCurrentTime(id) {
|
|
|
|
|
const currentDate = new Date();
|
|
|
|
|
if(id){
|
|
|
|
|
currentDate.setDate(currentDate.getDate() + 1);
|
|
|
|
|
}
|
|
|
|
|
const year = currentDate.getFullYear();
|
|
|
|
|
const month = currentDate.getMonth() + 1; // 月份从0开始,所以要加1
|
|
|
|
|
const day = currentDate.getDate();
|
|
|
|
|
|
|
|
|
|
return year + "-" +month + "-" + day;
|
|
|
|
|
},
|
|
|
|
|
// 开启围栏,路段,区域的点击事件
|
|
|
|
|
openClick(layer){
|
|
|
|
|
layer.on('click',(e)=>{
|
|
|
|
@ -1672,14 +1775,20 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 子组件的实时定位事件
|
|
|
|
|
realTimeLocationClick(item,id){
|
|
|
|
|
if(id == this.actionMap) {
|
|
|
|
|
if(id == 1) {
|
|
|
|
|
this.personLine.forEach(per=>{
|
|
|
|
|
if(item.imei == per.imei) {
|
|
|
|
|
this.map.setZoomAndCenter(16,[per.longitude,per.latitude]);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else if(id == this.actionMap){
|
|
|
|
|
|
|
|
|
|
} else if(id == 3){
|
|
|
|
|
// console.log("进来了");
|
|
|
|
|
console.log(this.carInfo);
|
|
|
|
|
this.carLine.forEach(car=>{
|
|
|
|
|
if(item.id == car.id) {
|
|
|
|
|
this.map.setZoomAndCenter(16,[car.longitude,car.latitude]);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 执法人员/执法车辆 行程轨迹
|
|
|
|
@ -1687,7 +1796,7 @@ export default {
|
|
|
|
|
if(this.actionMap == 1) {
|
|
|
|
|
this.$refs.personageTrack.open("person", this.personInfo.info);
|
|
|
|
|
} else if(this.actionMap == 3) {
|
|
|
|
|
this.$refs.personageTrack.open("car");
|
|
|
|
|
this.$refs.personageTrack.open("car", this.car.info);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 子组件的名称点击事件
|
|
|
|
@ -2404,7 +2513,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
confirm() {
|
|
|
|
|
// 事件新增完毕重新请求事件列表及经纬度
|
|
|
|
|
|
|
|
|
|
this.getMarkers(2);
|
|
|
|
|
},
|
|
|
|
|
// 切换地图事件
|
|
|
|
|
changeMap(id) {
|
|
|
|
@ -2449,7 +2558,7 @@ export default {
|
|
|
|
|
// 获取车辆信息
|
|
|
|
|
getCarList(){
|
|
|
|
|
getCarManageList({pageNum: 1,pageSize: 10}).then(res=>{
|
|
|
|
|
// console.log(res);
|
|
|
|
|
// console.log('车辆',res);
|
|
|
|
|
this.carLine = res.rows
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
@ -2486,7 +2595,7 @@ export default {
|
|
|
|
|
// 模拟登录获取token
|
|
|
|
|
getrobotToken(){
|
|
|
|
|
robotLogin({username:"superAdmin",password:"sa@123456"}).then(res=>{
|
|
|
|
|
console.log(res,"登录信息");
|
|
|
|
|
// console.log(res,"登录信息");
|
|
|
|
|
if(res.code == 200) {
|
|
|
|
|
// setRobotToken(res.result.token)
|
|
|
|
|
localStorage.setItem('robotToken',res.result.token)
|
|
|
|
|