This commit is contained in:
2023-12-10 14:33:58 +08:00
parent 2cc4c82cbd
commit e1e98de4b2
14 changed files with 216 additions and 37 deletions

View File

@@ -1,7 +1,7 @@
<template>
<div class="videoRoomContainer">
<div class="wrapper">
<video ref="videoStreamtopVideo" width="100%" autoplay></video>
<video @click="videoClick" ref="videoStreamtopVideo" width="100%" autoplay></video>
<div class="swiper-container">
<div class="swiper-wrapper">
<template v-for="(item,index) in videoRoomSteamList">
@@ -94,9 +94,12 @@ export default {
callSessionId: "",
callStatus: "0",//房间状态 1 未开始等待 2已开始 3已关闭
callRoomInfoRequetTimes:0,//房间拉取次数
client:"",
uuid:""
};
},
mounted() {
this.uuid=uuidv4,
console.log(location.href)
console.log(location.href)
console.log(location.href)
@@ -114,6 +117,7 @@ export default {
this.showInviteConfirmDialog = getUrlParam("showInviteConfirmDialog");
this.hasVideo = getUrlParam("hasVideo");
this.isForce = getUrlParam("isForce");
this.client = getUrlParam("client");
this.voiceImg = getStatisFileUrl("/media/voice_open.png")
@@ -130,9 +134,12 @@ export default {
}
this.token = this.$route.query.token || "";
if (this.token > 10) {
this.token = getUrlParam("token");
console.log("token" + this.token)
if (this.token!=null) {
localStorage.setItem("hd_token", this.token)
}else {
console.warn("url中未获取到token")
}
if (this.showConfirmDialog == 1) {
@@ -226,9 +233,11 @@ export default {
}
if (this.isPlayer == 1) {
this.getRoomVideoList();
this.roomTimer = setInterval(() => {
this.getRoomVideoList();
}, 2000)
}
this.swiperInstance = new Swiper('.swiper-container', {
slidesPerView: 4,
@@ -438,18 +447,28 @@ export default {
if (res.status == 200) {
if(this.isPublish==1){
if(res.data.data.length==2){
if(this.callStatus==1){
this.callBegin();
}
this.callStatus=2
this.callBegin();
}
}else {
if(res.data.data.length==1){
if(this.callStatus==1){
this.callBegin();
}
this.callStatus=2
this.callBegin();
}
}
this.generateVideoRoomStream(res.data.data)
if(this.client=="app"){
try {
location.href = "uniwebview://action?function=domMockClick&params1=300&params2=300";
}catch (e) {
}
}
this.generateVideoRoomStream(res.data.data)
}else {
this.generateVideoRoomStream([])
}
@@ -497,10 +516,14 @@ export default {
})
},
callHangUp() {
if(this.callStatus==3){
return false;
}
let roomInfo = {
sessionId: this.roomId,
roomId:this.roomId
roomId:this.roomId,
_uuid:this.uuid,
}
axios({
@@ -519,13 +542,15 @@ export default {
cmd: "hangUp",
msgTxt: this.uname || ""
}).then((res) => {
if (res.status == 200) {
try {
this.publishSdk.close();
}catch (e) {
}
this.callStatus=3;
clearInterval(this.roomTimer)
})
console.log(res)
})
},
joinRoom() {
@@ -649,6 +674,12 @@ export default {
}, 1000)
//videoSteamList
},
videoClick(){
this.videoRoomSteamList.map(item=>{
var video = eval('this.$refs.videoStream' + item.publishId)[0]
video.play();
})
},
videoClickAction(publishId) {
this.topVideo = publishId;
var video = eval('this.$refs.videoStream' + publishId)[0]

View File

@@ -388,6 +388,93 @@ export default {
this.addPoints(e.coordinate);
}
});
},
planningPathCar() {
const startPoint = ol.proj.transform(this.navigationStartPoint, 'EPSG:4326', 'EPSG:3857');
const endPoint = ol.proj.transform(this.navigationEndPoint, 'EPSG:4326', 'EPSG:3857');
let _url = "https://172.16.3.18/route/v0/driving/"
_url = _url + this.navigationStartPoint[0] + ","
_url = _url + this.navigationStartPoint[1] + ";"
_url = _url + this.navigationEndPoint[0] + ","
_url = _url + this.navigationEndPoint[1]
_url = _url + "?" + "alternatives=true&steps=true&geometries=geojson";
axios({
method: "get",
url: _url,
headers: {
'Content-Type': 'application/json;charset=utf-8'
},
}).then(res => {
console.log("================================获取到了导航结果")
res = res.data;
/*
console.log(res)
if (res.code != "OK") {
return false;
}else {
console.log("================================获取到了导航结果,开始步行导航")
}
*/
let pathList = [startPoint];
const coordinates = res.routes[0].geometry.coordinates
coordinates.map(item1 => {
const _point = ol.proj.transform(item1, 'EPSG:4326', 'EPSG:3857');
pathList.push(_point)
})
// let _list=res.route[0].legs[0].steps[0].intersections
//
// _list.map((item, index) => {
//
// })
pathList.push(endPoint)
console.log("==============================pathList")
console.log(pathList)
const route = new LineString(pathList)
const geometryMove = new Point(route.getFirstCoordinate());
const featureMove = new Feature({
type: "featureMove",
geometry: geometryMove,
});
// this.planningVectorLayer.set('id', 'planningVectorLayer');
//先清空 再清除
this.map.removeLayer(this.planningVectorLayer)
this.planningVectorLayer = new VectorLayer({
source: new VectorSource({
features: [
new Feature({
type: "route",
geometry: route,
}),
featureMove,
new Feature({
type: "icon",
geometry: new Point(route.getFirstCoordinate()),
}),
new Feature({
type: "icon",
geometry: new Point(route.getLastCoordinate()),
}),
],
}),
style: (feature) => {
return this.styles[feature.get("type")];
},
});
this.map.addLayer(this.planningVectorLayer)
})
},
planningPathFoot() {
const startPoint = ol.proj.transform(this.navigationStartPoint, 'EPSG:4326', 'EPSG:3857');
@@ -998,12 +1085,22 @@ export default {
},
alarmClickAction(index) {
if (index == 1) {
location.href = "uniwebview://action?function=alarmConfirmAction&params1=" + this.alarmDetailsData.id;
}
if (index == 2) {
location.href = "uniwebview://action?function=alarmPlanningAction&params1=" + this.alarmDetailsData.id + "&params2=" + this.alarmDetailsData.location;
try {
if (index == 1) {
location.href = "uniwebview://action?function=alarmConfirmAction&params1=" + this.alarmDetailsData.id;
}
if (index == 2) {
location.href = "uniwebview://action?function=alarmPlanningAction&params1=" + this.alarmDetailsData.id + "&params2=" + this.alarmDetailsData.location;
}
}catch (e) {
console.log(e)
}
setTimeout(()=>{
this.alarmDetailsOverlay=false
},1000)
},
getAlarmDetails(id) {
service.get(`/api/alarm/queryById`, {
@@ -1017,7 +1114,7 @@ export default {
this.addPointWidthCoordinate(res.data.result.location, "alarm", res.data.result)
setInterval(() => {
if (this.routeType == "car") {
this.planningPath()
this.planningPathCar()
}
if (this.routeType == "foot") {
this.planningPathFoot()

View File

@@ -1151,7 +1151,7 @@ export default {
this.getPatrolInstanceRealyPath(res.data.result.actualStartTime,res.data.result.actualEndTime);
setInterval(()=>{
this.getPatrolInstanceRealyPath(res.data.result.actualStartTime,res.data.result.actualEndTime);
},50000)
},2000)
}
})
@@ -1175,6 +1175,7 @@ export default {
service.get(`/sys/equipment/trajectory`, {
params: {
pageSize:1000,
uerId: this.moveUserId,
startTime:dayjs().startOf('day').format('YYYY-MM-DD HH:mm'),
endTime:dayjs().endOf('day').format('YYYY-MM-DD HH:mm'),