0707
This commit is contained in:
parent
459636e5b0
commit
25e0cb4b13
|
@ -1,8 +1,10 @@
|
|||
<template>
|
||||
<el-drawer
|
||||
id="mapDrawer"
|
||||
:title="channelName+'位置标记'"
|
||||
v-model="visible"
|
||||
destroy-on-close
|
||||
:size="'80%'"
|
||||
@closed="closeDrawer"
|
||||
>
|
||||
<el-form
|
||||
|
@ -194,15 +196,11 @@
|
|||
submit() {
|
||||
let that = this;
|
||||
let item = this.form.location;
|
||||
/*let item = this.form.location;
|
||||
let tool = new jsmap.JSMapCoordTool(window.map);
|
||||
let coordinate = {x:item[0],y:item[1],z:item.z};
|
||||
let pixel = tool.mapToScreenCoordinate(coordinate);
|
||||
that.form.location = pixel;*/
|
||||
console.log(this.form.location);
|
||||
that.form.code = that.channelCode;
|
||||
that.form.type = that.channelType;
|
||||
that.form.name = that.channelName;
|
||||
that.form.location = {x:item[0],y:item[1],z:item.z};
|
||||
that.form.location = {x:item[0],y:item[1],z:item[2]};
|
||||
that.$API.am.tdevice.labelLocation.req(that.form)
|
||||
.then(res => {
|
||||
that.isSaveing = false;
|
||||
|
@ -219,6 +217,8 @@
|
|||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
<style scoped>
|
||||
.el-drawer.open{
|
||||
width: 70%!important;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -952,7 +952,6 @@
|
|||
this.polygonMarkerLayers();//危险作业
|
||||
this.speakersMaskerLayers();//喇叭
|
||||
this.jobDomMarkerLayers();//危险作业图片
|
||||
// let compassControl = new jsmap.JSMapGestureController(map);
|
||||
let compassControl = new jsmap.JSCompassControl({
|
||||
position: jsmap.JSControlPosition.LEFT_TOP,
|
||||
offset: {
|
||||
|
@ -1076,7 +1075,7 @@
|
|||
this.getAreas();//区域/风险区域$$
|
||||
this.getGroup();//部门$$
|
||||
//右上展示数据
|
||||
this.getVchannels();//摄像头$$
|
||||
// this.getVchannels();//摄像头$$
|
||||
this.getDangers();//危险作业$$
|
||||
// this.getRisks();//风险区域$$
|
||||
this.getSpeakers();//喇叭$$
|
||||
|
@ -1121,7 +1120,7 @@
|
|||
arr.push(obj)
|
||||
}
|
||||
this.postList =arr;
|
||||
console.log(arr)
|
||||
// console.log(arr)
|
||||
})
|
||||
},
|
||||
//人员统计
|
||||
|
@ -1188,7 +1187,7 @@
|
|||
this.userList = res.filter(item => {
|
||||
return item.my_info.employee
|
||||
});
|
||||
console.log(this.userList)
|
||||
// console.log(this.userList)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -1219,19 +1218,19 @@
|
|||
if (res.err_msg) {
|
||||
} else {
|
||||
this.group = genTree(res);
|
||||
console.log(this.group);
|
||||
// console.log(this.group);
|
||||
}
|
||||
});
|
||||
},
|
||||
//选择部门
|
||||
groupClick(data) {
|
||||
console.log(data);
|
||||
// console.log(data);
|
||||
},
|
||||
//获取人员详细信息
|
||||
showUserDetail() {
|
||||
this.screenUserDetail = true;
|
||||
this.$API.hrm.employee.item.req(this.screenUserItem.id).then(res=>{
|
||||
console.log(res);
|
||||
// console.log(res);
|
||||
this.screenUserItemDetail = res;
|
||||
})
|
||||
},
|
||||
|
@ -1249,70 +1248,79 @@
|
|||
},
|
||||
//风险区域layer
|
||||
riskMaskerLayers() {
|
||||
this.riskMarkerLayer = new jsmap.JSBoxMarkerLayer({
|
||||
let that = this;
|
||||
that.riskMarkerLayer = new jsmap.JSBoxMarkerLayer({
|
||||
minimumLevel: 3,
|
||||
maxmumLevel: 22,
|
||||
show: false
|
||||
});
|
||||
window.map.addLayer(this.riskMarkerLayer);
|
||||
this.showRiskMarkers();
|
||||
window.map.addLayer(that.riskMarkerLayer);
|
||||
that.showRiskMarkers();
|
||||
},
|
||||
//摄像头layer
|
||||
cameraMaskerLayers() {//图标文字
|
||||
this.cameraMaskerLayer = new jsmap.JSIconTextMarkerLayer({
|
||||
let that = this;
|
||||
that.cameraMaskerLayer = new jsmap.JSIconTextMarkerLayer({
|
||||
minimumLevel: 3,
|
||||
maxmumLevel: 22,
|
||||
show: false
|
||||
});
|
||||
window.map.addLayer(this.cameraMaskerLayer);
|
||||
this.showCameraMarkers();
|
||||
window.map.addLayer(that.cameraMaskerLayer);
|
||||
debugger;
|
||||
console.log(that.cameraMaskerLayer);
|
||||
that.getVchannels();
|
||||
},
|
||||
//监控视频播放
|
||||
domMarkerLayers() {
|
||||
this.domMarkerLayer = new jsmap.JSDomMarkerLayer({
|
||||
let that = this;
|
||||
that.domMarkerLayer = new jsmap.JSDomMarkerLayer({
|
||||
minimumLevel: 3,
|
||||
maxmumLevel: 22,
|
||||
show: true
|
||||
});
|
||||
window.map.addLayer(this.domMarkerLayer);
|
||||
window.map.addLayer(that.domMarkerLayer);
|
||||
},
|
||||
jobDomMarkerLayers() {
|
||||
this.jobDomMarkerLayer = new jsmap.JSDomMarkerLayer({
|
||||
let that = this;
|
||||
that.jobDomMarkerLayer = new jsmap.JSDomMarkerLayer({
|
||||
minimumLevel: 3,
|
||||
maxmumLevel: 22,
|
||||
show: false
|
||||
});
|
||||
window.map.addLayer(this.jobDomMarkerLayer);
|
||||
this.showJobDomMarkers();
|
||||
window.map.addLayer(that.jobDomMarkerLayer);
|
||||
that.showJobDomMarkers();
|
||||
},
|
||||
//员工标记layer
|
||||
userMaskerLayers() {//图标文字
|
||||
this.userMaskerLayer = new jsmap.JSIconTextMarkerLayer({
|
||||
let that = this;
|
||||
that.userMaskerLayer = new jsmap.JSIconTextMarkerLayer({
|
||||
minimumLevel: 3,
|
||||
maxmumLevel: 22,
|
||||
show: false
|
||||
});
|
||||
window.map.addLayer(this.userMaskerLayer);
|
||||
window.map.addLayer(that.userMaskerLayer);
|
||||
},
|
||||
//喇叭layer
|
||||
speakersMaskerLayers() {//消防物资
|
||||
this.materialsMaskerLayer = new jsmap.JSIconTextMarkerLayer({
|
||||
let that = this;
|
||||
that.materialsMaskerLayer = new jsmap.JSIconTextMarkerLayer({
|
||||
minimumLevel: 3,
|
||||
maxmumLevel: 22,
|
||||
show: false
|
||||
});
|
||||
window.map.addLayer(this.materialsMaskerLayer);
|
||||
window.map.addLayer(that.materialsMaskerLayer);
|
||||
this.showSpeakersMarkers();
|
||||
},
|
||||
//危险作业Layer
|
||||
polygonMarkerLayers() {//危险作业
|
||||
this.polygonMaskerLayer = new jsmap.JSPolygonMarkerLayer({
|
||||
let that = this;
|
||||
that.polygonMaskerLayer = new jsmap.JSPolygonMarkerLayer({
|
||||
minimumLevel: 3,
|
||||
maxmumLevel: 22,
|
||||
show: false
|
||||
});
|
||||
window.map.addLayer(this.polygonMaskerLayer);
|
||||
this.showPolygonMarkers();
|
||||
window.map.addLayer(that.polygonMaskerLayer);
|
||||
that.showPolygonMarkers();
|
||||
},
|
||||
//风险区域
|
||||
showRiskMarkers() {
|
||||
|
@ -1382,14 +1390,14 @@
|
|||
this.pointMarkerLayer.addMarker(pointMarker);
|
||||
},*/
|
||||
//摄像头
|
||||
showCameraMarkers() {
|
||||
showCameraMarkers(list) {
|
||||
let that = this;
|
||||
let iconTextMarker = null;
|
||||
that.Vchannels.forEach(item => {
|
||||
list.forEach(item => {
|
||||
let cameraMarker = null;
|
||||
let pixel = item.my_info.location;
|
||||
iconTextMarker = new jsmap.JSIconTextMarker({
|
||||
cameraMarker = new jsmap.JSIconTextMarker({
|
||||
id: item.channelCode,
|
||||
position: {x: pixel[0], y: pixel[1], z: pixel[2]}, //坐标
|
||||
position: {x: pixel.x, y: pixel.y, z: pixel.z}, //坐标
|
||||
floorId: 1, //楼层id,默认为1(地面)
|
||||
image: "/img/camera.svg",
|
||||
text: '摄像头',
|
||||
|
@ -1406,20 +1414,18 @@
|
|||
displayCondition: new jsmap.JSDisplayCondition(0.0, 1000),
|
||||
nearFarScale: new jsmap.JSNearFarScale(0.0, 1, 500, 1),
|
||||
show: true,
|
||||
callback: (marker) => {
|
||||
// iconTextMarker.jump();标注跳动
|
||||
console.log(marker);
|
||||
callback: () => {
|
||||
}
|
||||
});
|
||||
that.cameraMaskerLayer.addMarker(iconTextMarker);
|
||||
debugger;
|
||||
console.log(that.cameraMaskerLayer);
|
||||
that.cameraMaskerLayer.addMarker(cameraMarker);
|
||||
})
|
||||
|
||||
},
|
||||
//人员
|
||||
showUserMarkers() {
|
||||
let that = this;
|
||||
let iconTextMarker = null,iconTextMarker1 = null;
|
||||
debugger;
|
||||
let iconTextMarker = null;
|
||||
if(that.userList.length>0){
|
||||
let employee_ = that.userList[0].my_info.employee_;
|
||||
iconTextMarker = new jsmap.JSIconTextMarker({
|
||||
|
@ -1448,6 +1454,7 @@
|
|||
return employee_
|
||||
}
|
||||
});
|
||||
|
||||
that.userMaskerLayer.addMarker(iconTextMarker);
|
||||
setTimeout(function () {
|
||||
console.log(that.userMaskerLayer);
|
||||
|
@ -1457,14 +1464,14 @@
|
|||
animate: true
|
||||
});//动画效果,持续时间一秒
|
||||
},3000);
|
||||
/*setTimeout(function () {
|
||||
setTimeout(function () {
|
||||
console.log(that.userMaskerLayer);
|
||||
that.userMaskerLayer.updateMarkerPosition(iconTextMarker,{
|
||||
floorId:1,
|
||||
position: {x:114.6315404372349, y: 38.813557855009435, z:0},
|
||||
animate: true
|
||||
});//动画效果,持续时间一秒
|
||||
},6000);*/
|
||||
},6000);
|
||||
debugger;
|
||||
/*let employee_1 = that.userList[1].my_info.employee_;
|
||||
iconTextMarker1 = new jsmap.JSIconTextMarker({
|
||||
|
@ -1747,11 +1754,13 @@
|
|||
},
|
||||
//获取摄像头列表
|
||||
getVchannels() {
|
||||
this.$API.am.video.list.req(this.params).then(res => {
|
||||
let that = this;
|
||||
this.$API.am.video.list.req(that.params).then(res => {
|
||||
if (res.err_msg) {
|
||||
this.$message.error(res.err_msg);
|
||||
} else {
|
||||
this.Vchannels = res.pageData;
|
||||
that.Vchannels = res.pageData;
|
||||
that.showCameraMarkers(res.pageData);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue