Merge branch 'ehs' of https://e.coding.net/ctcdevteam/ehs/ehs_web into ehs
This commit is contained in:
commit
8f79d5fe3e
|
@ -241,7 +241,7 @@
|
||||||
<div class="alarm-detail-info left_arrow" v-if="areaDetail" style="width:150%">
|
<div class="alarm-detail-info left_arrow" v-if="areaDetail" style="width:150%">
|
||||||
<div class="simple-title">
|
<div class="simple-title">
|
||||||
<div><span>区域统计</span></div>
|
<div><span>区域统计</span></div>
|
||||||
<span class="icon-close" @click="areaDetail = false"></span>
|
<span class="icon-close" @click="areaDetailClose"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="detail-content">
|
<div class="detail-content">
|
||||||
<div class="content-head">
|
<div class="content-head">
|
||||||
|
@ -271,7 +271,7 @@
|
||||||
<el-table-column label="所在区域" prop="area_name"></el-table-column>
|
<el-table-column label="所在区域" prop="area_name"></el-table-column>
|
||||||
<el-table-column label="唯一标识" prop="code"></el-table-column>
|
<el-table-column label="唯一标识" prop="code"></el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-table class="bigScreenTable" :data="areaUser" v-if="areaShowType==4">
|
<el-table class="bigScreenTable" :data="areaUser" v-if="areaShowType==4" @row-click="areaEmployeeRowClick">
|
||||||
<el-table-column label="人员姓名" prop="my_info.employee_.name"></el-table-column>
|
<el-table-column label="人员姓名" prop="my_info.employee_.name"></el-table-column>
|
||||||
<el-table-column label="人员姓名" prop="my_info.employee_.type"></el-table-column>
|
<el-table-column label="人员姓名" prop="my_info.employee_.type"></el-table-column>
|
||||||
<el-table-column label="定位卡号" prop="mac"></el-table-column>
|
<el-table-column label="定位卡号" prop="mac"></el-table-column>
|
||||||
|
@ -774,7 +774,8 @@ export default {
|
||||||
pointMarkerLayer: null,//点位图层
|
pointMarkerLayer: null,//点位图层
|
||||||
polygonMaskerLayer: null,//危险作业
|
polygonMaskerLayer: null,//危险作业
|
||||||
cameraMaskerLayer: null,//摄像头
|
cameraMaskerLayer: null,//摄像头
|
||||||
materialsMaskerLayer: null,//消防物资
|
materialsMaskerLayer: null,//喇叭
|
||||||
|
singleAreaMaskerLayer:null,
|
||||||
carsMaskerLayer: null,//车辆
|
carsMaskerLayer: null,//车辆
|
||||||
manMaskerLayer: null,//人员
|
manMaskerLayer: null,//人员
|
||||||
flyManager: null,
|
flyManager: null,
|
||||||
|
@ -1118,6 +1119,7 @@ export default {
|
||||||
clearInterval(this.eventAudioTimer)//事件
|
clearInterval(this.eventAudioTimer)//事件
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//查询某个人员
|
||||||
searchOne(keyword){
|
searchOne(keyword){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.markList[5] = true;
|
that.markList[5] = true;
|
||||||
|
@ -1133,7 +1135,11 @@ export default {
|
||||||
that.screenUser = true;
|
that.screenUser = true;
|
||||||
window.map.flyToMarker(that.userMarker[item.mac], {
|
window.map.flyToMarker(that.userMarker[item.mac], {
|
||||||
duration: 1000,
|
duration: 1000,
|
||||||
range: 200
|
offset:{
|
||||||
|
rotate: 45,
|
||||||
|
tilt: 60,
|
||||||
|
range: 200
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -1175,6 +1181,7 @@ export default {
|
||||||
this.showUserSelect = false;
|
this.showUserSelect = false;
|
||||||
// this.screenUser = true;
|
// this.screenUser = true;
|
||||||
},
|
},
|
||||||
|
//
|
||||||
audioFinished(){
|
audioFinished(){
|
||||||
if(this.audioIndex<this.audioList.length){
|
if(this.audioIndex<this.audioList.length){
|
||||||
this.audioIndex++;
|
this.audioIndex++;
|
||||||
|
@ -1182,11 +1189,13 @@ export default {
|
||||||
this.audioIndex = 0;
|
this.audioIndex = 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//显示右上角的时间
|
||||||
showTime() {
|
showTime() {
|
||||||
this.currentTime = this.$TOOL.dateFormat(new Date(), 'hh:mm:ss');
|
this.currentTime = this.$TOOL.dateFormat(new Date(), 'hh:mm:ss');
|
||||||
this.currentWeek = this.$TOOL.dateFormat(new Date(), 'week');
|
this.currentWeek = this.$TOOL.dateFormat(new Date(), 'week');
|
||||||
this.currentDay = this.$TOOL.dateFormat(new Date(), 'yyyy年MM月dd日')
|
this.currentDay = this.$TOOL.dateFormat(new Date(), 'yyyy年MM月dd日')
|
||||||
},
|
},
|
||||||
|
//区域下的作业/监控/喇叭/人员查询
|
||||||
areaItemHandle(index){
|
areaItemHandle(index){
|
||||||
this.areaShowType = index;
|
this.areaShowType = index;
|
||||||
if(index==1){
|
if(index==1){
|
||||||
|
@ -1218,6 +1227,7 @@ export default {
|
||||||
that.getNewEvent();
|
that.getNewEvent();
|
||||||
}, 20000)
|
}, 20000)
|
||||||
},
|
},
|
||||||
|
//获取事件总数
|
||||||
getEventTotal(){
|
getEventTotal(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.ecm.event.cateAgg.req(that.cateAggForm).then(res => {
|
that.$API.ecm.event.cateAgg.req(that.cateAggForm).then(res => {
|
||||||
|
@ -1226,6 +1236,7 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//获取新事件
|
||||||
getNewEvent(){
|
getNewEvent(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.ecm.event.list.req({page_size:1}).then(res => {
|
that.$API.ecm.event.list.req({page_size:1}).then(res => {
|
||||||
|
@ -1277,6 +1288,7 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//事件轮询
|
||||||
eventInterval(){
|
eventInterval(){
|
||||||
let that = this;
|
let that = this;
|
||||||
if (that.timerEventRoll) {
|
if (that.timerEventRoll) {
|
||||||
|
@ -1317,23 +1329,65 @@ export default {
|
||||||
areaRowClick(data) {
|
areaRowClick(data) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.areaDetail = true;
|
that.areaDetail = true;
|
||||||
debugger;
|
|
||||||
console.log(data)
|
|
||||||
that.areaDetailId = data.id;
|
that.areaDetailId = data.id;
|
||||||
let points = data.third_info.xx_rail.detail.polygon.points[0];
|
let point = data.third_info.xx_rail.detail.polygon.points[0];
|
||||||
window.map.flyToPosition(new jsmap.JSPoint(points.x, points.y, points.z),
|
let points = data.third_info.xx_rail.detail.polygon.points;
|
||||||
|
window.map.flyToPosition(new jsmap.JSPoint(point.longitude, point.latitude, 0),
|
||||||
{ duration:1000,
|
{ duration:1000,
|
||||||
offset:{
|
offset:{
|
||||||
rotate: 45,
|
rotate: 60,
|
||||||
tilt: 60,
|
tilt: 60,
|
||||||
range: 300
|
range: 300
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// this.getAreaList();
|
this.getAreaList();
|
||||||
this.getAreaOperation();
|
this.getAreaOperation();
|
||||||
this.getAreaVchannel();
|
this.getAreaVchannel();
|
||||||
this.getAreaSpeaker();
|
this.getAreaSpeaker();
|
||||||
this.getAreaBlt();
|
this.getAreaBlt();
|
||||||
|
if(that.singleAreaMaskerLayer!==null){
|
||||||
|
that.singleAreaMaskerLayer.setMarkerVisibleByFilter(false, (properties)=>{
|
||||||
|
if(properties && properties.get('id')!==data.id){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
that.singleAreaMaskerLayer = new jsmap.JSPolygonMarkerLayer({
|
||||||
|
minimumLevel: 3,
|
||||||
|
maxmumLevel: 22,
|
||||||
|
show: true
|
||||||
|
});
|
||||||
|
let pointsList = [];
|
||||||
|
window.map.addLayer(that.singleAreaMaskerLayer);
|
||||||
|
pointsList = points.map(item => {
|
||||||
|
let obj = item;
|
||||||
|
obj.x=item.longitude;
|
||||||
|
obj.y=item.latitude;
|
||||||
|
return obj
|
||||||
|
});
|
||||||
|
let polygonMarker = new jsmap.JSPolygonMarker({
|
||||||
|
id: data.id,//id
|
||||||
|
position: pointsList,//坐标集合
|
||||||
|
floorId: data.third_info.xx_rail.detail.floorId,//楼层id
|
||||||
|
color: 'rgba(0,0,255,.44)',//填充颜色
|
||||||
|
strokeColor: '#2bff1d',//边线颜色
|
||||||
|
depthTest: false,//是否开启深度检测
|
||||||
|
allowPicking: false, //是否允许点击
|
||||||
|
displayCondition: new jsmap.JSDisplayCondition(0.0, 1000), //可见范围
|
||||||
|
properties: {
|
||||||
|
id: data.id
|
||||||
|
},//属性设置
|
||||||
|
callback: (marker) => {
|
||||||
|
// console.log(marker);
|
||||||
|
}//回调
|
||||||
|
});
|
||||||
|
that.singleAreaMaskerLayer.addMarker(polygonMarker);
|
||||||
|
},
|
||||||
|
areaDetailClose(){
|
||||||
|
let that = this;
|
||||||
|
that.areaDetail = false;
|
||||||
|
that.singleAreaMaskerLayer.show = false;
|
||||||
},
|
},
|
||||||
//区域下的作业
|
//区域下的作业
|
||||||
getAreaOperation(){
|
getAreaOperation(){
|
||||||
|
@ -1363,12 +1417,34 @@ export default {
|
||||||
getAreaBlt(){
|
getAreaBlt(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.third.blt.all.req({area:that.areaDetailId}).then(res=>{
|
that.$API.third.blt.all.req({area:that.areaDetailId}).then(res=>{
|
||||||
|
debugger;
|
||||||
console.log(res)
|
console.log(res)
|
||||||
that.areaUser = res.filter(item=>{
|
that.areaUser = res.filter(item=>{
|
||||||
return item.my_info.employee;
|
return item.my_info.employee;
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//点击区域下的人员
|
||||||
|
areaEmployeeRowClick(row){
|
||||||
|
let that = this;
|
||||||
|
that.screenUserItem = row.my_info.employee_;
|
||||||
|
that.screenUserItem.mac = row.mac;
|
||||||
|
that.screenUser = true;
|
||||||
|
window.map.flyToMarker(that.userMarker[row.mac], {
|
||||||
|
duration: 1000,
|
||||||
|
offset:{
|
||||||
|
rotate: 45,
|
||||||
|
tilt: 60,
|
||||||
|
range: 300
|
||||||
|
}
|
||||||
|
})
|
||||||
|
that.markList[5] = true;
|
||||||
|
that.userMaskerLayer.show = true;
|
||||||
|
clearInterval(that.timerUser);
|
||||||
|
that.timerUser = setInterval(function () {
|
||||||
|
that.refreshUserMarker();
|
||||||
|
}, 10000)
|
||||||
|
},
|
||||||
//加载部门数据
|
//加载部门数据
|
||||||
getGroup() {
|
getGroup() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
@ -1522,7 +1598,6 @@ export default {
|
||||||
showUserDetail() {
|
showUserDetail() {
|
||||||
this.screenUserDetail = true;
|
this.screenUserDetail = true;
|
||||||
this.$API.hrm.employee.item.req(this.screenUserItem.id).then(res => {
|
this.$API.hrm.employee.item.req(this.screenUserItem.id).then(res => {
|
||||||
// console.log(res);
|
|
||||||
this.screenUserItemDetail = res;
|
this.screenUserItemDetail = res;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -1748,7 +1823,7 @@ export default {
|
||||||
let userImage = '';
|
let userImage = '';
|
||||||
if (userList.length > 0) {
|
if (userList.length > 0) {
|
||||||
userList.forEach(item=>{
|
userList.forEach(item=>{
|
||||||
let employee_ = item.my_info.employee_;
|
let employee_ = item.my_info.employee_,online = item.online;;
|
||||||
employee_.mac = item.mac;
|
employee_.mac = item.mac;
|
||||||
let employeeType = item.my_info.employee_.type
|
let employeeType = item.my_info.employee_.type
|
||||||
if (employeeType === 'employee') {
|
if (employeeType === 'employee') {
|
||||||
|
@ -1792,30 +1867,27 @@ export default {
|
||||||
nearFarScale: new jsmap.JSNearFarScale(0.0, 1, 500, 1),
|
nearFarScale: new jsmap.JSNearFarScale(0.0, 1, 500, 1),
|
||||||
show: true,
|
show: true,
|
||||||
properties: {
|
properties: {
|
||||||
employee: employee_
|
employee: employee_,
|
||||||
|
online:online
|
||||||
},
|
},
|
||||||
callback: (marker) => {
|
callback: (marker) => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
that.userMaskerLayer.addMarker(that.userMarker[item.mac]);
|
that.userMaskerLayer.addMarker(that.userMarker[item.mac]);
|
||||||
|
that.userMaskerLayer.setMarkerVisibleByFilter(false, (properties)=>{
|
||||||
|
if(properties && properties.get('online')!==true){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// if(that.markList[5]){
|
|
||||||
// clearInterval(that.timerUser);
|
|
||||||
// that.timerUser = setInterval(function () {
|
|
||||||
// that.refreshUserMarker();
|
|
||||||
// }, 10000)
|
|
||||||
// }else{
|
|
||||||
// clearInterval(that.timerUser);
|
|
||||||
// }
|
|
||||||
|
|
||||||
},
|
},
|
||||||
//更新人员标记
|
//更新人员标记
|
||||||
refreshUserMarker() {
|
refreshUserMarker() {
|
||||||
if (document.getElementById("mapContainer") == null || document.getElementById("mapContainer") == undefined){
|
if (document.getElementById("mapContainer") == null || document.getElementById("mapContainer") == undefined){
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// debugger;
|
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.third.blt.all.req(that.userParams).then(res => {
|
that.$API.third.blt.all.req(that.userParams).then(res => {
|
||||||
if (res.err_msg) {
|
if (res.err_msg) {
|
||||||
|
@ -1825,16 +1897,15 @@ export default {
|
||||||
});
|
});
|
||||||
let addUser = that.func(userList, that.userList)[0];
|
let addUser = that.func(userList, that.userList)[0];
|
||||||
let refreshList = that.func(userList, that.userList)[1];
|
let refreshList = that.func(userList, that.userList)[1];
|
||||||
let subUser = that.func(that.userList, userList)[0];
|
|
||||||
that.allUserList = that.userList = refreshList.concat(addUser);//更新userList
|
that.allUserList = that.userList = refreshList.concat(addUser);//更新userList
|
||||||
subUser.forEach(subUserItem=>{
|
|
||||||
that.userMaskerLayer.removeMarker(that.userMarker[subUserItem.mac]);//删除离线员工
|
|
||||||
})
|
|
||||||
that.showUserMarkers(addUser);//增加新进在线员工
|
that.showUserMarkers(addUser);//增加新进在线员工
|
||||||
|
that.userMaskerLayer.setMarkerVisibleByFilter(false, (properties)=>{
|
||||||
|
if(properties && properties.get('online')!==true){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
})
|
||||||
refreshList.forEach(item1 => {
|
refreshList.forEach(item1 => {
|
||||||
// debugger;
|
|
||||||
// console.log(item1)
|
|
||||||
let item2 = {};
|
let item2 = {};
|
||||||
item2={...item1};
|
item2={...item1};
|
||||||
that.userMaskerLayer.updateMarkerPosition(that.userMarker[item2.mac], {
|
that.userMaskerLayer.updateMarkerPosition(that.userMarker[item2.mac], {
|
||||||
|
@ -1848,8 +1919,6 @@ export default {
|
||||||
},
|
},
|
||||||
//比较两次获取的人数的变动 func(a,b)//a与b相比多出来的
|
//比较两次获取的人数的变动 func(a,b)//a与b相比多出来的
|
||||||
func(arr1, arr2) {
|
func(arr1, arr2) {
|
||||||
/*var arr1 = [{name:1},{name:2},{name:3},{name:4}];
|
|
||||||
var arr2 = [{name:2},{name:3},{name:4},{name:5}];*/
|
|
||||||
let arr = [];
|
let arr = [];
|
||||||
let list = [];
|
let list = [];
|
||||||
let bool = false;
|
let bool = false;
|
||||||
|
@ -1870,8 +1939,6 @@ export default {
|
||||||
if (bool !== false) arr.push(arr1[bool]);
|
if (bool !== false) arr.push(arr1[bool]);
|
||||||
}
|
}
|
||||||
let arrList = [arr, list];
|
let arrList = [arr, list];
|
||||||
// debugger;
|
|
||||||
// console.log(arrList);
|
|
||||||
return arrList;
|
return arrList;
|
||||||
},
|
},
|
||||||
//危险作业
|
//危险作业
|
||||||
|
|
Loading…
Reference in New Issue