-
+
@@ -346,11 +344,11 @@
-
+
跟踪
-
+
-
跟踪
@@ -358,11 +356,11 @@
取消跟踪
+
轨迹
-
+
轨迹
@@ -372,8 +370,8 @@
-
+
{{ scope.row.my_info.employee_.name }}
@@ -422,13 +420,13 @@
部门:
{{
- screenUserItemDetail.belong_dept_.name
+ screenUserItemDetail.belong_dept_.name
}}
岗位:
{{
- screenUserItemDetail.post_.name
+ screenUserItemDetail.post_.name
}}
@@ -461,49 +459,42 @@
-
-
- 作业
-
-
-
-
-
-
-
-
-
- {{scope.row.dept_ter_.name}}
-
-
-
-
- {{ item.name }}
-
-
-
-
+
-
- 作业区域:{{ areaName }}
-区域下监控:
- {{ item.name }}
-
-
- 区域下监控:该作业所在区域没有监控设备
-
+
+ 作业
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.dept_ter_.name }}
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+ 作业区域:{{ areaName }}
+区域下监控:
+ {{ item.name }}
+
+ 区域下监控:该作业所在区域没有监控设备
@@ -514,63 +505,55 @@
-
作业名称:
- {{screenJobItem.name}}
+ {{ screenJobItem.name }}
作业编号:
- {{screenJobItem.number}}
+ {{ screenJobItem.number }}
生产状态:
- {{screenJobItem.state_work}}
+ {{ screenJobItem.state_work }}
作业区域:
- {{screenJobItem.area_.name}}
+ {{ screenJobItem.area_.name }}
部门协调员:
- {{screenJobItem.coordinator_name}}
+ {{ screenJobItem.coordinator_name }}
开始时间:
- {{screenJobItem.start_time}}
+ {{ screenJobItem.start_time }}
结束时间:
- {{screenJobItem.end_time}}
+ {{ screenJobItem.end_time }}
属地部门:
- {{screenJobItem.dept_ter_.name}}
+ {{ screenJobItem.dept_ter_.name }}
业务部门:
- {{screenJobItem.dept_bus_.name}}
+ {{ screenJobItem.dept_bus_.name }}
作业票
- {{ item.cate_name }}
+ {{ item.cate_name }}
监控设备
- {{ item.name }}
+
+ {{ item.name }}
该作业没有选择监控设备
@@ -584,14 +567,14 @@
-
风险区域名称:{{areaItemDetail.name}}
+
{
if (res.err_msg) { } else {
- if(that.warningData.total != res.count){
+ if (that.warningData.total != res.count) {
that.getWarnings();
}
that.wStatistics = res;
@@ -1261,23 +1255,23 @@ export default {
})
},
//获取新事件
- getNewEvent(){
+ getNewEvent() {
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 => {
if (res.err_msg) {
} else {
- let judge = res.results[0].id==that.audioList.id
+ let judge = res.results[0].id == that.audioList.id
let item = res.results[0];
- if(that.audioSrc!==''){
- if(item.id==that.audioList.id){
- }else{
+ if (that.audioSrc !== '') {
+ if (item.id == that.audioList.id) {
+ } else {
that.audioList = item;
- that.audioSrc=item.voice;
- if(item.location){
- window.map.flyToPosition(new jsmap.JSPoint(item.location.longitude, item.location.latitude), { range: 200,duration: 1000 });
+ that.audioSrc = item.voice;
+ if (item.location) {
+ window.map.flyToPosition(new jsmap.JSPoint(item.location.longitude, item.location.latitude), { range: 200, duration: 1000 });
}
}
- }else{
+ } else {
that.audioList = item;
that.audioSrc = item.voice;
that.music.play();//播放
@@ -1288,13 +1282,13 @@ export default {
//报警类型
getWarningType() {
let that = this;
- that.$API.ecm.event_cate.list.req({page:0}).then(res => {
- if (res.err_msg) { } else {
- that.warningTypes = res;
- }
- })
+ that.$API.ecm.event_cate.list.req({ page: 0 }).then(res => {
+ if (res.err_msg) { } else {
+ that.warningTypes = res;
+ }
+ })
},
- warningTypeChange(){
+ warningTypeChange() {
this.warningTypeShow = !this.warningTypeShow
},
handleCurrentChange() {
@@ -1313,26 +1307,26 @@ export default {
})
},
//事件轮询
- eventInterval(){
+ eventInterval() {
let that = this;
- if (that.timerEventRoll!==null) {
+ if (that.timerEventRoll !== null) {
clearInterval(that.timerEventRoll);
that.timerEventRoll = null;
}
that.timerEventRoll = setInterval(function () {
- that.heightNum+=1;
- if(that.heightNum>250){
- that.heightNum=0;
+ that.heightNum += 1;
+ if (that.heightNum > 250) {
+ that.heightNum = 0;
document.getElementById('eventScrenItem').style.top = 0;
- }else{
+ } else {
let top = -that.heightNum;
- document.getElementById('eventScrenItem').style.top = top+'px';
+ document.getElementById('eventScrenItem').style.top = top + 'px';
}
}, 100)
-
+
},
//警报类型查询
- warningTypeSelected(id,name) {
+ warningTypeSelected(id, name) {
let that = this;
this.warningTypeShow = false;
let params = new Object();
@@ -1348,7 +1342,7 @@ export default {
}
})
},
-
+
//区域点击事件
areaRowClick(data) {
let that = this;
@@ -1359,38 +1353,39 @@ export default {
this.getAreaVchannel();
this.getAreaSpeaker();
this.getAreaBlt();
- if(data.third_info.xx_rail){
+ if (data.third_info.xx_rail) {
let point = data.third_info.xx_rail.detail.polygon.points[0];
let points = data.third_info.xx_rail.detail.polygon.points;
- window.map.flyToPosition(new jsmap.JSPoint(point.longitude, point.latitude, 0),
- { duration:1000,
- offset:{
- rotate: 60,
- tilt: 60,
- range: 300
- }
- });
- if(that.singleAreaMaskerLayer!==null){
- that.singleAreaMaskerLayer.setMarkerVisibleByFilter(false, (properties)=>{
- if(properties && properties.get('id')!==data.id){
+ window.map.flyToPosition(new jsmap.JSPoint(point.longitude, point.latitude, 0),
+ {
+ duration: 1000,
+ offset: {
+ rotate: 60,
+ tilt: 60,
+ range: 300
+ }
+ });
+ if (that.singleAreaMaskerLayer !== null) {
+ that.singleAreaMaskerLayer.setMarkerVisibleByFilter(false, (properties) => {
+ if (properties && properties.get('id') !== data.id) {
return true;
}
- return false;
+ return false;
})
}
that.singleAreaMaskerLayer = new jsmap.JSPolygonMarkerLayer({
- minimumLevel: 3,
- maxmumLevel: 22,
- show: true
- });
+ 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 obj = item;
+ obj.x = item.longitude;
+ obj.y = item.latitude;
+ return obj
+ });
let polygonMarker = new jsmap.JSPolygonMarker({
id: data.id,//id
position: pointsList,//坐标集合
@@ -1408,60 +1403,60 @@ export default {
}//回调
});
that.singleAreaMaskerLayer.addMarker(polygonMarker);
- }else{}
-
+ } else { }
+
},
- areaDetailClose(){
+ areaDetailClose() {
let that = this;
that.areaDetail = false;
- if(that.singleAreaMaskerLayer){
+ if (that.singleAreaMaskerLayer) {
that.singleAreaMaskerLayer.show = false;
}
},
//区域下的作业
- getAreaOperation(){
+ getAreaOperation() {
let that = this;
- this.$API.opm.operation.list.req({area:that.areaDetailId, state__in: '30,40'}).then(res=>{
+ this.$API.opm.operation.list.req({ area: that.areaDetailId, state__in: '30,40' }).then(res => {
console.log(res)
that.areaOperation = res.results;
})
},
//区域下的监控
- getAreaVchannel(){
+ getAreaVchannel() {
let that = this;
- that.$API.third.tdevice.list.req({area:that.areaDetailId,type:60,page:0}).then(res=>{
+ that.$API.third.tdevice.list.req({ area: that.areaDetailId, type: 60, page: 0 }).then(res => {
console.log(res)
that.areaVideo = res;
})
},
//区域下的喇叭
- getAreaSpeaker(){
+ getAreaSpeaker() {
let that = this;
- that.$API.third.tdevice.list.req({area:that.areaDetailId,type:50,page:0}).then(res=>{
+ that.$API.third.tdevice.list.req({ area: that.areaDetailId, type: 50, page: 0 }).then(res => {
console.log(res)
that.areaSpeaker = res;
})
},
//区域下的人员
- getAreaBlt(){
+ getAreaBlt() {
let that = this;
- that.$API.third.blt.all.req({area:that.areaDetailId}).then(res=>{
- that.areaUser = res.filter(item=>{
+ that.$API.third.blt.all.req({ area: that.areaDetailId }).then(res => {
+ that.areaUser = res.filter(item => {
return item.my_info.employee;
});
- }).catch(res=>{
+ }).catch(res => {
debugger;
})
},
//点击区域下的人员
- areaEmployeeRowClick(row){
+ 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:{
+ offset: {
rotate: 45,
tilt: 60,
range: 300
@@ -1475,17 +1470,17 @@ export default {
}, 10000)
},
//点击区域下的作业
- areaOperationRowClick(row){
+ areaOperationRowClick(row) {
let that = this;
console.log(row);
that.screenJobItem = row;
- that.$API.opm.opl.list.req({ operation: row.id}).then((res) => {
+ that.$API.opm.opl.list.req({ operation: row.id }).then((res) => {
console.log(res)
that.screenJobItem.cates_ = res.results;
that.screenOperation = true;
});
},
- closeScreenOperation(){
+ closeScreenOperation() {
this.screenOperation = false;
this.screenJobItem = null;
},
@@ -1495,9 +1490,9 @@ export default {
that.$API.system.dept.list.req({ page: 0 }).then(res => {
if (res.err_msg) {
} else {
- let rpartsList=[];
+ let rpartsList = [];
let arr = [];
- let children = genTree(res);
+ let children = genTree(res);
console.log(children)
for (let i = 0; i < 5; i++) {
let obj = new Object();
@@ -1511,14 +1506,14 @@ export default {
obj.id = 2;
obj.name = '访客';
obj.label = '访客';
- }else if (i === 3) {
+ } else if (i === 3) {
obj.id = 3;
obj.name = '司机';
obj.label = '司机';
}
arr.push(obj)
}
- that.postList = arr;
+ that.postList = arr;
}
});
},
@@ -1578,17 +1573,17 @@ export default {
},
getAreaList() {
let that = this;
- that.$API.am.area.list.req({page:0}).then(res => {
+ that.$API.am.area.list.req({ page: 0 }).then(res => {
if (res.err_msg) {
} else {
that.areaList = res;
}
- })
+ })
},
//获取危险作业
getDangers() {
let that = this;
- that.$API.opm.operation.list.req({state__in:'30,40'}).then(res => {
+ that.$API.opm.operation.list.req({ state__in: '30,40' }).then(res => {
if (res.err_msg) {
} else {
@@ -1600,7 +1595,7 @@ export default {
//区域列表/获取风险区域
getAreas() {
let that = this;
- that.$API.am.area.list.req({page:0}).then(res => {
+ that.$API.am.area.list.req({ page: 0 }).then(res => {
if (res.err_msg) {
} else {
that.areaList = res;
@@ -1626,7 +1621,7 @@ export default {
groupClick(data) {
console.log(data);
},
- checkChange(data1,data2,data3,data4){
+ checkChange(data1, data2, data3, data4) {
console.log(data1);
console.log(data2);
console.log(data3);
@@ -1719,32 +1714,32 @@ export default {
//风险区域
showRiskMarkers(list) {
let that = this;
- if(list.length>0){
+ if (list.length > 0) {
list.forEach(item => {
let boxMarker = null;
let pointsList = [], floorId = null;
- if (item.third_info.xx_rail!==null&&item.third_info.xx_rail!==undefined) {
+ if (item.third_info.xx_rail !== null && item.third_info.xx_rail !== undefined) {
floorId = item.third_info.xx_rail.detail.floorId;
let points = item.third_info.xx_rail.detail.polygon.points;
// debugger;
pointsList = points.map(item => {
let obj = item;
- obj.x=item.longitude;
- obj.y=item.latitude;
+ obj.x = item.longitude;
+ obj.y = item.latitude;
return obj
});
let areaId = item.id;
- let maskColor = '',strokeColor='';
- if(item.level===10){
+ let maskColor = '', strokeColor = '';
+ if (item.level === 10) {
maskColor = 'rgba(0,0,255,.3)';//蓝色
strokeColor = '#0000ff';
- }else if(item.level===20){
+ } else if (item.level === 20) {
maskColor = 'rgba(255,255,0,0.44)';//黄色
strokeColor = '#ffff00';
- }else if(item.level===30){
+ } else if (item.level === 30) {
maskColor = 'rgba(255,153,0,0.44)';//橙色
strokeColor = '#ff9900';
- }else if(item.level===40){
+ } else if (item.level === 40) {
maskColor = 'rgba(255,0,0,0.44)';//红色
strokeColor = '#ff0000';
}
@@ -1767,17 +1762,17 @@ export default {
}
})
}
-
+
},
//摄像头Marker
showCameraMarkers(list) {
// debugger;
let that = this;
- if(list.length>0){
+ if (list.length > 0) {
list.forEach(item => {
let cameraMarker = null;
let pixel = item.my_info.location;
- if(pixel.x){
+ if (pixel.x) {
cameraMarker = new jsmap.JSIconTextMarker({
id: item.channelCode,
position: { x: pixel.x, y: pixel.y, z: pixel.z }, //坐标
@@ -1816,30 +1811,30 @@ export default {
let pixel = item.my_info.location;
console.log(pixel)
materialMarker = new jsmap.JSIconTextMarker({
- id: item.id,
- position: {x: pixel.x, y: pixel.y, z: pixel.z}, //坐标
- floorId: pixel.floorId, //楼层id,默认为1(地面)
- image: "/img/sound.svg",
- text: item.name,
- font: '10px sans-serif',
- fontColor: '#ffffff',
- imageHeight: 25,
- imageWidth: 25,
- // fontStrokeColor: '#1f0fdd',
- fontStrokeWidth: 1,
- backgroundColor: 'rgba(0,0,0,0.3)',
- backgroundRadius: 1,
- backgroundStrokeColor: 'rgba(0,0,0,0.3)',
- backgroundStrokeWidth: 1,
- iconTextType: jsmap.JSIconTextType.TOPTEXT_BOTTOMICON,
- allowPicking: false,
- displayCondition: new jsmap.JSDisplayCondition(0.0, 1000),
- nearFarScale: new jsmap.JSNearFarScale(0.0, 1, 500, 1),
- show: true
- });
- that.materialsMaskerLayer.addMarker(materialMarker);
+ id: item.id,
+ position: { x: pixel.x, y: pixel.y, z: pixel.z }, //坐标
+ floorId: pixel.floorId, //楼层id,默认为1(地面)
+ image: "/img/sound.svg",
+ text: item.name,
+ font: '10px sans-serif',
+ fontColor: '#ffffff',
+ imageHeight: 25,
+ imageWidth: 25,
+ // fontStrokeColor: '#1f0fdd',
+ fontStrokeWidth: 1,
+ backgroundColor: 'rgba(0,0,0,0.3)',
+ backgroundRadius: 1,
+ backgroundStrokeColor: 'rgba(0,0,0,0.3)',
+ backgroundStrokeWidth: 1,
+ iconTextType: jsmap.JSIconTextType.TOPTEXT_BOTTOMICON,
+ allowPicking: false,
+ displayCondition: new jsmap.JSDisplayCondition(0.0, 1000),
+ nearFarScale: new jsmap.JSNearFarScale(0.0, 1, 500, 1),
+ show: true
+ });
+ that.materialsMaskerLayer.addMarker(materialMarker);
})
-
+
},
//人员Marker
showUserMarkers(userList) {
@@ -1848,34 +1843,34 @@ export default {
//标记图片
let userImage = '';
if (userList.length > 0) {
- userList.forEach(item=>{
- let employee_ = item.my_info.employee_,online = item.online;;
- employee_.mac = item.mac;
+ userList.forEach(item => {
+ let employee_ = item.my_info.employee_, online = item.online;;
+ employee_.mac = item.mac;
let employeeType = item.my_info.employee_.type
if (employeeType === 'employee') {
userImage = "/img/employee.png"
- }else if (employeeType === 'driver') {
+ } else if (employeeType === 'driver') {
userImage = "/img/driver.png"
- } else if (employeeType === 'remployee') {
+ } else if (employeeType === 'remployee') {
userImage = "/img/driver.png"
- }else {
+ } else {
userImage = "/img/visitor.png"
}
let floorId = 1;
- if(item.floorNo=='Floor1'){
+ if (item.floorNo == 'Floor1') {
floorId = 1;
- }else if(item.floorNo=='Floor2'){
+ } else if (item.floorNo == 'Floor2') {
floorId = 2;
- }else if(item.floorNo=='Floor3'){
+ } else if (item.floorNo == 'Floor3') {
floorId = 3;
- }else if(item.floorNo=='Floor4'){
+ } else if (item.floorNo == 'Floor4') {
floorId = 4;
- }else if(item.floorNo=='Floor5'){
+ } else if (item.floorNo == 'Floor5') {
floorId = 5;
}
that.userMarker[item.mac] = new jsmap.JSIconTextMarker({
id: item.my_info.code,
- position: { x:item.longitude, y: item.latitude, z: item.z }, //坐标
+ position: { x: item.longitude, y: item.latitude, z: item.z }, //坐标
floorId: floorId, //楼层id,默认为1(地面)
image: userImage,
text: employee_.name,
@@ -1894,24 +1889,24 @@ export default {
show: true,
properties: {
employee: employee_,
- online:online
+ online: online
},
callback: (marker) => {
- }
+ }
});
that.userMaskerLayer.addMarker(that.userMarker[item.mac]);
- that.userMaskerLayer.setMarkerVisibleByFilter(false, (properties)=>{
- if(properties && properties.get('online')!==true){
+ that.userMaskerLayer.setMarkerVisibleByFilter(false, (properties) => {
+ if (properties && properties.get('online') !== true) {
return true;
}
- return false;
+ return false;
})
})
}
},
//更新人员标记
refreshUserMarker() {
- if (document.getElementById("mapContainer") == null || document.getElementById("mapContainer") == undefined){
+ if (document.getElementById("mapContainer") == null || document.getElementById("mapContainer") == undefined) {
return
}
let that = this;
@@ -1925,15 +1920,15 @@ export default {
let refreshList = that.func(userList, that.userList)[1];
that.allUserList = that.userList = refreshList.concat(addUser);//更新userList
that.showUserMarkers(addUser);//增加新进在线员工
- that.userMaskerLayer.setMarkerVisibleByFilter(false, (properties)=>{
- if(properties && properties.get('online')!==true){
+ that.userMaskerLayer.setMarkerVisibleByFilter(false, (properties) => {
+ if (properties && properties.get('online') !== true) {
return true;
}
- return false;
+ return false;
})
refreshList.forEach(item1 => {
let item2 = {};
- item2={...item1};
+ item2 = { ...item1 };
that.userMaskerLayer.updateMarkerPosition(that.userMarker[item2.mac], {
floorId: 1,
position: { x: item2.longitude, y: item2.latitude, z: item2.z },
@@ -1970,21 +1965,21 @@ export default {
//危险作业
showPolygonMarkers(data) {
let that = this;
- if(data.length>0){
+ if (data.length > 0) {
data.forEach(item => {
let polygonMarker = null;
- let areaWork = that.areaList.filter(area=>{
- return area.id==item.area
+ let areaWork = that.areaList.filter(area => {
+ return area.id == item.area
});
let points = areaWork[0].third_info.xx_rail.detail.polygon.points;;
let pointsList = points.map(item => {
let obj = item;
- obj.x=item.longitude;
- obj.y=item.latitude;
+ obj.x = item.longitude;
+ obj.y = item.latitude;
return obj
});
polygonMarker = new jsmap.JSPolygonMarker({
- id: item.id+'work',//id
+ id: item.id + 'work',//id
position: pointsList,//坐标集合
floorId: 1,//楼层id
color: 'rgba(241,193,105,.44)',//填充颜色
@@ -1993,7 +1988,7 @@ export default {
allowPicking: true, //是否允许点击
displayCondition: new jsmap.JSDisplayCondition(0.0, 1000), //可见范围
properties: {
- workId:item.id,
+ workId: item.id,
area: item.area
},//属性设置
callback: (marker) => {
@@ -2027,7 +2022,7 @@ export default {
// });
// this.jobDomMarkerLayer.addMarker(domMarker);
// },
-
+
//显示人员类型选项
userSelect() {
this.showUserSelect = !this.showUserSelect
@@ -2125,12 +2120,12 @@ export default {
getVchannels() {
let that = this;
// debugger;
- that.$API.am.tdevice.vchannel.req({pageSize:999}).then(res => {
+ that.$API.am.tdevice.vchannel.req({ pageSize: 999 }).then(res => {
if (res.err_msg) {
that.$message.error(res.err_msg);
} else {
- let Vchannels = res.pageData.filter(item=>{
- return item.my_info.location!==undefined;
+ let Vchannels = res.pageData.filter(item => {
+ return item.my_info.location !== undefined;
})
that.Vchannels = Vchannels;
that.showCameraMarkers(Vchannels);
@@ -2144,8 +2139,8 @@ export default {
if (res.err_msg) {
that.$message.error(res.err_msg);
} else {
- let list = res.rows.filter(item=>{
- return item.my_info.location!==undefined;
+ let list = res.rows.filter(item => {
+ return item.my_info.location !== undefined;
})
that.speakerList = list;
that.showSpeakersMarkers(res.rows);
@@ -2193,7 +2188,7 @@ export default {
let that = this;
// debugger;
window.map.flyToMarker(that.userMarker[row.mac], {
- duration: 1000,range: 200
+ duration: 1000, range: 200
})
that.screenUserItem.name = row.my_info.employee_.name;
that.screenUserItem.type = row.my_info.employee_.type;
@@ -2215,18 +2210,18 @@ export default {
this.tracking = false;
},
//人员轨迹
- userLineTrack(){
+ userLineTrack() {
debugger;
let that = this;
let obj = {};
- obj.id=that.screenUserItem.id;
- obj.mac=that.screenUserItem.mac;
- obj.name=that.screenUserItem.name;
- obj.type=that.screenUserItem.type;
- obj.floorNo=that.screenUserItem.location.xx_detail.floorNo;
- obj.longitude=that.screenUserItem.location.xx_detail.longitude;
- obj.latitude=that.screenUserItem.location.xx_detail.latitude;
- localStorage.setItem('trackItem',JSON.stringify(obj))
+ obj.id = that.screenUserItem.id;
+ obj.mac = that.screenUserItem.mac;
+ obj.name = that.screenUserItem.name;
+ obj.type = that.screenUserItem.type;
+ obj.floorNo = that.screenUserItem.location.xx_detail.floorNo;
+ obj.longitude = that.screenUserItem.location.xx_detail.longitude;
+ obj.latitude = that.screenUserItem.location.xx_detail.latitude;
+ localStorage.setItem('trackItem', JSON.stringify(obj))
this.$router.push({
name: "track"
});
@@ -2324,7 +2319,7 @@ export default {
// }
// })
},
- userLineTrackCancel(){
+ userLineTrackCancel() {
window.location.reload();
let that = this;
that.lineTracking = false;
@@ -2349,23 +2344,23 @@ export default {
that.showUserSelect = false;
}, 300)
},
- allWarningView(){
+ allWarningView() {
this.$router.push('/ecm/event')
},
- speakerPasue(){
+ speakerPasue() {
this.speakerPlayStatus = false;
this.music.pause(); //暂停
},
- speakerPlay(){
+ speakerPlay() {
this.speakerPlayStatus = true;
this.music.play();//播放
},
//关闭作业列表
- workDetailClose(){
+ workDetailClose() {
this.workDetail = false;
},
//查看监控
- showVchannel(item){
+ showVchannel(item) {
let that = this;
// debugger;
console.log(item)
@@ -2373,10 +2368,10 @@ export default {
that.channelName = item.name;
that.limitedVisible = true;
},
- viewClose(){
+ viewClose() {
this.limitedVisible = false;
},
- showOpretion(item){
+ showOpretion(item) {
let that = this;
that.ticketId = item.ticket;
// that.projectId = item.operation;
@@ -2392,29 +2387,29 @@ export default {
that.limitedOpreation = true;
},
},
- beforeRouteLeave(to, from, next){
- next();
- if (this.timerUser) {
- clearInterval(this.timerUser);
- this.timerUser = null;
- }
- if (this.timerTime) {
- clearInterval(this.timerTime);
- this.timerTime = null;
- }
- if (this.eventTimer) {
- clearInterval(this.eventTimer);
- this.eventTimer = null;
- }
- if (this.timerEventRoll) {
- clearInterval(this.timerEventRoll);
- this.timerEventRoll = null;
- }
- if (this.eventAudioTimer) {
- clearInterval(this.eventAudioTimer);
- this.eventAudioTimer = null;
- }
- },
+ beforeRouteLeave(to, from, next) {
+ next();
+ if (this.timerUser) {
+ clearInterval(this.timerUser);
+ this.timerUser = null;
+ }
+ if (this.timerTime) {
+ clearInterval(this.timerTime);
+ this.timerTime = null;
+ }
+ if (this.eventTimer) {
+ clearInterval(this.eventTimer);
+ this.eventTimer = null;
+ }
+ if (this.timerEventRoll) {
+ clearInterval(this.timerEventRoll);
+ this.timerEventRoll = null;
+ }
+ if (this.eventAudioTimer) {
+ clearInterval(this.eventAudioTimer);
+ this.eventAudioTimer = null;
+ }
+ },
unmounted() {
// window.map.destroy();
window.map = null;
@@ -2433,12 +2428,12 @@ export default {
background: rgba(48, 255, 220, 0.35);
}
-.el-loading-spinner .el-loading-text{
- color: #Ffa500;
+.el-loading-spinner .el-loading-text {
+ color: #Ffa500;
}
-.el-loading-spinner .path{
- stroke: #Ffa500;
+.el-loading-spinner .path {
+ stroke: #Ffa500;
}
.el-radio.el-radio--small .el-radio__label {
@@ -2898,7 +2893,8 @@ export default {
z-index: 1;
transition: all .5s linear;
overflow-y: scroll;
- max-height: 80vh;
+ max-height: 80vh;
+
.job-content {
height: calc(100% - 44px);
overflow-y: auto;
@@ -3022,9 +3018,11 @@ export default {
padding: 0 20px 20px;
position: absolute;
background: rgba(24, 36, 51, .7);
+
.basic-head {
position: relative;
margin-bottom: 16px;
+
.header-tab {
width: 160px;
}
@@ -3032,6 +3030,7 @@ export default {
.basic-info {
min-height: 400px;
+
.info-item {
font-size: 14px;
height: 30px;
@@ -3155,6 +3154,7 @@ export default {
background: url(/public/img/icon_nbcl.png) no-repeat;
background-size: 100% 100%;
}
+
.item-info {
.normal {
font-size: 12px;
@@ -3229,18 +3229,21 @@ export default {
// display: flex;
justify-content: space-between;
height: calc(100% - 50px);
+
.alarm-danger {
- width: 50px;
- height: 50px;
- background: url(/public/img/a_danger.png) no-repeat;
- background-size: 100% 100%;
- }
+ width: 50px;
+ height: 50px;
+ background: url(/public/img/a_danger.png) no-repeat;
+ background-size: 100% 100%;
+ }
+
.content-left {
width: 160px;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
+
.alarm-danger {
width: 50px;
height: 50px;
@@ -3355,7 +3358,8 @@ export default {
transition: .5s;
z-index: 10;
max-height: 50vh;
- overflow-y: scroll;
+ overflow-y: scroll;
+
.drop-content-item {
color: #fff;
position: relative;
@@ -3660,6 +3664,7 @@ export default {
border-radius: 4px;
padding: 0 12px 0 12px;
z-index: 20;
+
.action-group {
display: flex;
align-items: center;
@@ -3698,6 +3703,7 @@ export default {
background: url(/public/img/b_ring.png) no-repeat;
background-size: 100% 100%;
}
+
.sound-quiet {
background: url(/public/img/b_quiet.png) no-repeat;
background-size: 100% 100%;
@@ -3893,10 +3899,11 @@ export default {
padding: 8px 16px;
border-radius: 15px;
}
+
.areaActive {
border: 1px solid #32fde3;
- background: #007767;
- box-shadow: inset 0 0 8px #5aecf0;
+ background: #007767;
+ box-shadow: inset 0 0 8px #5aecf0;
}
[class*=" el-icon-"],
@@ -3984,49 +3991,56 @@ export default {
.bigScreenTable.el-table .el-table__body tr.current-row>td.el-table__cell {
background-color: rgba(255, 255, 255, .1);
}
-#audio{
+
+#audio {
position: fixed;
opacity: 0;
}
-#eventScrenWrap{
- height:50px;
+
+#eventScrenWrap {
+ height: 50px;
width: calc(100% - 50px);
- overflow:hidden;
+ overflow: hidden;
padding-left: 20px;
position: relative;
}
-#eventScrenItem{
+
+#eventScrenItem {
line-height: 50px;
font-size: 20px;
color: cyan;
position: absolute;
}
-#bigScreeWrap{
+
+#bigScreeWrap {
position: fixed;
- z-index: 9999;
- top: 0;
+ z-index: 9999;
+ top: 0;
display: none;
- width: 100vw;
- height: 100vh;
- text-align: center;
- background-color: rgba(0,0,0,0.8);
+ width: 100vw;
+ height: 100vh;
+ text-align: center;
+ background-color: rgba(0, 0, 0, 0.8);
padding: 40px 20px 20px 20px;
}
-.bigScreeImg{
+
+.bigScreeImg {
width: 20px;
height: 20px;
background-color: red;
}
-.bigScreeClose{
+
+.bigScreeClose {
width: 20px;
- height: 20px;
- top: 10px;
- right: 10px;
- position: absolute;
+ height: 20px;
+ top: 10px;
+ right: 10px;
+ position: absolute;
background: url(/public/img/close.png) no-repeat;
}
-#videoElement{
+
+#videoElement {
width: auto;
- height: 60vh;
+ height: 60vh;
}
风险区域名称:{{
+ areaItemDetail.name }}
- 风险等级:{{levelOption[areaItemDetail.level]}}
+
风险等级:{{
+ levelOption[areaItemDetail.level] }}
- 区域编号:{{areaItemDetail.number}}
+ 区域编号:{{
+ areaItemDetail.number }}
详细信息
@@ -624,13 +607,13 @@
触发人:
{{
- screenWarningItem.employee_.name
+ screenWarningItem.employee_.name
}}
触发人部门:
{{
- screenWarningItem.employee_.belong_dept_.name
+ screenWarningItem.employee_.belong_dept_.name
}}
@@ -642,11 +625,12 @@
触发时间:
{{ screenWarningItem.create_time }}
-
+
- 关闭
+ 关闭
-
+
- 关闭
+ 关闭
@@ -708,17 +693,17 @@ export default {
},
data() {
return {
- line1:null,
- music:null,
- ticketId:null,
- projectId:null,
- cateType:null,
+ line1: null,
+ music: null,
+ ticketId: null,
+ projectId: null,
+ cateType: null,
timerUser: null,
timerTime: null,
- eventTimer:null,
- timerEventRoll:null,
- eventAudioTimer:null,
- trackMarker:null,
+ eventTimer: null,
+ timerEventRoll: null,
+ eventAudioTimer: null,
+ trackMarker: null,
domMarkerLayer: null,
userMaskerLayer: null,
jobDomMarkerLayer: null,
@@ -728,7 +713,7 @@ export default {
polygonMaskerLayer: null,//危险作业
cameraMaskerLayer: null,//摄像头
materialsMaskerLayer: null,//喇叭
- singleAreaMaskerLayer:null,
+ singleAreaMaskerLayer: null,
carsMaskerLayer: null,//车辆
manMaskerLayer: null,//人员
flyManager: null,
@@ -739,24 +724,24 @@ export default {
markList: [false, false, false, false, false, false],
autoRun: false,
tracking: false,
- lineTracking:false,
+ lineTracking: false,
areaDetail: false,
- workDetail:false,
+ workDetail: false,
screenJob: false,
screenUser: false,
screenRisk: false,
- speakerPlayStatus:true,
+ speakerPlayStatus: true,
screenWarning: false,
screenUserDetail: false,
warningTypeShow: false,
showUserSelect: false,
warningDetail: false,
filterCtrlFocus: true,
- screenOperation:false,
- limitedVisible:false,
- limitedOpreation:false,
+ screenOperation: false,
+ limitedVisible: false,
+ limitedOpreation: false,
warningListTotal: 0,
- heightNum:0,
+ heightNum: 0,
warningData: {
list: [],
total: 0,
@@ -771,27 +756,28 @@ export default {
is_handled: false,
completed: true
},
- areaItemDetail:{},
+ sys_base_name: '',
+ areaItemDetail: {},
wStatistics: {},
warningTypes: [],//事件类型
Vchannels: [],//摄像头列表
warningList: [],//报警事件列表
speakerList: [],//喇叭列表
userList: [],//人员列表
- allUserList:[],
+ allUserList: [],
deptList: [],//部门列表
postList: [
- {id:0,name:'全部',label:'全部'},
- {id:1,name:'曲阳金隅',label:'曲阳金隅'},
- {id:2,name:'访客',label:'访客'},
- {id:3,name:'司机',label:'司机'}],//岗位列表
+ { id: 0, name: '全部', label: '全部' },
+ { id: 1, name: '曲阳金隅', label: '曲阳金隅' },
+ { id: 2, name: '访客', label: '访客' },
+ { id: 3, name: '司机', label: '司机' }],//岗位列表
dangerList: [],//岗位列表
areaList: [],//区域列表/风险区域列表
- areaOperation:[],
- areaVideo:[],
- areaSpeaker:[],
- areaUser:[],
- deptChecked:[],
+ areaOperation: [],
+ areaVideo: [],
+ areaSpeaker: [],
+ areaUser: [],
+ deptChecked: [],
//数据统计
userCount: {
total: 0,
@@ -805,7 +791,7 @@ export default {
screenUserItem: {},//人员信息
screenUserItemDetail: {},//人员信息
url: '',
- areaDetailId:'',
+ areaDetailId: '',
params: {
json: {
data: {
@@ -816,8 +802,8 @@ export default {
},
code: 'video_realtime'
},
- userParams:{
- depts:[],
+ userParams: {
+ depts: [],
},
group: [],
groupsProps: {
@@ -843,23 +829,29 @@ export default {
currentTime: '',
currentWeek: '',
areaTableHeight: null,
- levelOption:{
- 10:'低风险',
- 20:'一般风险',
- 30:'较大风险',
- 40:'重大风险'
+ levelOption: {
+ 10: '低风险',
+ 20: '一般风险',
+ 30: '较大风险',
+ 40: '重大风险'
},
- eventTypeName:'全部',
- audioSrc:'',
- audioIndex:0,
- audioList:{},
- employeeScroll:0,
- searchKeyWord:'',
- ElLoading:null,
- channelCode:'',
- channelName:'',
+ eventTypeName: '全部',
+ audioSrc: '',
+ audioIndex: 0,
+ audioList: {},
+ employeeScroll: 0,
+ searchKeyWord: '',
+ ElLoading: null,
+ channelCode: '',
+ channelName: '',
}
},
+ computed: {
+ baseName() {
+ let baseName = this.$TOOL.data.get("BASE_INFO") !== null ? this.$TOOL.data.get("BASE_INFO").base.base_name : '曲阳金隅安全智能管控平台';
+ return baseName;
+ },
+ },
created() {
const scriptInfo = document.createElement("script");
scriptInfo.setAttribute("data-callType", "callScript");
@@ -867,7 +859,9 @@ export default {
document.head.appendChild(scriptInfo);
},
mounted() {
+ console.log(this.$TOOL.data.get("BASE_INFO"))
let that = this;
+ that.sys_base_name = this.$TOOL.data.get("BASE_INFO").base.base_name;
let date = new Date();
that.timeNow = date.getDay();
that.todayDate = this.warningData.params.start_create = this.cateAggForm.start_create = this.$TOOL.dateFormat(new Date(), 'yyyy-MM-dd');
@@ -878,7 +872,7 @@ export default {
}, 1000);
let host = window.location.host;
let jsUrl = '/jsmap/jsmap.js';
- that.loadScript('mapId',jsUrl, () => {
+ that.loadScript('mapId', jsUrl, () => {
window.map = new jsmap.JSMap({
mapType: jsmap.JSMapType.MAP_3D,
container: 'mapContainer',
@@ -946,7 +940,7 @@ export default {
if (type === 'Symbol(boxmarker)') {
let areaId = item.properties.get("areaId");
console.log(areaId);
- that.$API.am.area.item.req(areaId).then(res=>{
+ that.$API.am.area.item.req(areaId).then(res => {
that.areaItemDetail = res;
that.screenJob = false;
that.screenWarning = false;
@@ -993,7 +987,7 @@ export default {
newEle.appendChild(title);
newEle.appendChild(close);
let newEle2 = document.createElement("video");
- newEle2.controls = true;
+ newEle2.controls = true;
newEle2.autoplay = true;
newEle2.id = item.markers[0].id + 'videoPlayer';
newEle2.name = item.markers[0].id + 'videoPlayer';
@@ -1001,33 +995,33 @@ export default {
// 在对应dom 下追加创建的dom
otest.appendChild(newEle);
otest.appendChild(newEle2);
- let flvPlayer = null,URLS=null;
+ let flvPlayer = null, URLS = null;
newEle2.setAttribute("style", "width: 327px;height:183px;background:url(/img/rotate_line.png) no-repeat;background-size:60px 60px;background-position:center center;");
this.$API.am.video.item.req(this.params).then(res => {
- console.log(res);
- this.url = res.url;
- URLS = res.url.replace('192.168.10.253',sysConfig.VUE_APP_VIDEOHOST);
- if (flvjs.isSupported()) {
- let videoElement = document.getElementById(item.markers[0].id + 'videoPlayer');
- var mediaDataSource = {
- type: 'flv',
- hasAudio:false,
- hasVideo:true,
- isLive:false,
- withCredentials:false,
- url:URLS
- };
- flvPlayer = flvjs.createPlayer(mediaDataSource, {
- enableWorker: false,
- lazyLoadMaxDuration: 3 * 60,
- seekType: 'range',
- });
- flvPlayer.attachMediaElement(videoElement);
- newEle2.setAttribute("style", "width: 327px;height:183px;background:url(/img/rotate_line.png) no-repeat;background-size:60px 60px;background-position:center center;");
- flvPlayer.load();
- flvPlayer.play();
- }
- })
+ console.log(res);
+ this.url = res.url;
+ URLS = res.url.replace('192.168.10.253', sysConfig.VUE_APP_VIDEOHOST);
+ if (flvjs.isSupported()) {
+ let videoElement = document.getElementById(item.markers[0].id + 'videoPlayer');
+ var mediaDataSource = {
+ type: 'flv',
+ hasAudio: false,
+ hasVideo: true,
+ isLive: false,
+ withCredentials: false,
+ url: URLS
+ };
+ flvPlayer = flvjs.createPlayer(mediaDataSource, {
+ enableWorker: false,
+ lazyLoadMaxDuration: 3 * 60,
+ seekType: 'range',
+ });
+ flvPlayer.attachMediaElement(videoElement);
+ newEle2.setAttribute("style", "width: 327px;height:183px;background:url(/img/rotate_line.png) no-repeat;background-size:60px 60px;background-position:center center;");
+ flvPlayer.load();
+ flvPlayer.play();
+ }
+ })
close.onclick = () => {
let nodeMark = document.getElementById(item.markers[0].id);
nodeMark.remove();
@@ -1051,55 +1045,55 @@ export default {
//危险作业
console.log(item)
let workId = item.properties.get("workId");
- if(workId){
+ if (workId) {
that.areaDetailId = item.properties.get("area");
- let areaItem = that.areaList.filter(item=>{
- return item.id==that.areaDetailId;
+ let areaItem = that.areaList.filter(item => {
+ return item.id == that.areaDetailId;
});
debugger;
that.areaName = areaItem[0].name;
that.getAreaOperation();
that.getAreaVchannel();
that.workDetail = true;
- }else{
+ } else {
that.screenRisk = false;
that.screenWarning = false;
that.areaDetailId = item.properties.get("area");
- let areaWork = that.areaList.filter(area=>{
- return area.id==that.areaDetailId
+ let areaWork = that.areaList.filter(area => {
+ return area.id == that.areaDetailId
});
that.areaRowClick(areaWork[0]);
}
-
+
}
} else {
}
});
-
+
})
- //左侧数据统计
- this.getManCount();//人员统计$$
- this.getWarnings();//报警统计$$
- this.getAreaList();//区域/风险区域$$
- this.getGroup();//部门$$
- //右上展示数据
- this.getWarningTotal();//事件统计
- this.getWarningType();//事件类型
- let pageHeight = document.getElementsByClassName('screen-cockpit')[0].clientHeight;
- let height1 = document.getElementsByClassName('cockpit-count')[0].clientHeight;
- let height2 = document.getElementsByClassName('cockpit-alarm')[0].clientHeight;
- let height3 = document.getElementsByClassName('area-simple-title')[0].clientHeight;
- let domHeight = pageHeight - height1 - 310 - 84;
- let areaTableHeight = domHeight - height3 - 50;
- this.areaTableHeight = areaTableHeight;
- document.getElementsByClassName('cockpit-info')[0].style.height = domHeight + 'px';
+ //左侧数据统计
+ this.getManCount();//人员统计$$
+ this.getWarnings();//报警统计$$
+ this.getAreaList();//区域/风险区域$$
+ this.getGroup();//部门$$
+ //右上展示数据
+ this.getWarningTotal();//事件统计
+ this.getWarningType();//事件类型
+ let pageHeight = document.getElementsByClassName('screen-cockpit')[0].clientHeight;
+ let height1 = document.getElementsByClassName('cockpit-count')[0].clientHeight;
+ let height2 = document.getElementsByClassName('cockpit-alarm')[0].clientHeight;
+ let height3 = document.getElementsByClassName('area-simple-title')[0].clientHeight;
+ let domHeight = pageHeight - height1 - 310 - 84;
+ let areaTableHeight = domHeight - height3 - 50;
+ this.areaTableHeight = areaTableHeight;
+ document.getElementsByClassName('cockpit-info')[0].style.height = domHeight + 'px';
},
- computed:{
- bgmSrc:function(){
+ computed: {
+ bgmSrc: function () {
return this.audioList[this.audioIndex]
}
},
- beforeUnmount(){
+ beforeUnmount() {
window.map.destroy();
window.map = null;
this.timerUser = null;
@@ -1121,14 +1115,14 @@ export default {
that.ElLoading = null;
callback && callback()
return;
- }else{
+ } else {
that.ElLoading = this.$loading({
- lock: true,
- text: '地图资源加载中...',
- background: 'rgba(0, 0, 0, 0)',
- })
+ lock: true,
+ text: '地图资源加载中...',
+ background: 'rgba(0, 0, 0, 0)',
+ })
}
-
+
//第一次加载,先创建 script 标签
const script = document.createElement('script');
script.src = url;
@@ -1139,19 +1133,19 @@ export default {
//获取第一个script标签的父节点 BODY,在body的第一个script引用之前插入,即把这个动态的js文件放在第一个调用
firstScript.parentNode.insertBefore(script, firstScript);
//script 一加载就执行
- script.onload = script.onreadystatechange = function() {
+ script.onload = script.onreadystatechange = function () {
that.ElLoading.close();
// that.ElLoading = null;
-
+
// 加载完成
if (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete') {
callback && callback()
-
+
}
};
},
//查询某个人员
- searchOne(keyword){
+ searchOne(keyword) {
let that = this;
that.markList[5] = true;
that.userMaskerLayer.show = true;
@@ -1159,14 +1153,14 @@ export default {
that.timerUser = setInterval(function () {
that.refreshUserMarker();
}, 10000)
- that.userList.filter(item=>{
- if(item.my_info.employee_.name == keyword||item.mac ==keyword){
+ that.userList.filter(item => {
+ if (item.my_info.employee_.name == keyword || item.mac == keyword) {
that.screenUserItem = item.my_info.employee_;
that.screenUserItem.mac = item.mac;
that.screenUser = true;
window.map.flyToMarker(that.userMarker[item.mac], {
duration: 1000,
- offset:{
+ offset: {
rotate: 45,
tilt: 60,
range: 200
@@ -1175,7 +1169,7 @@ export default {
}
})
},
- handleChange(item, check,item2,item3) {
+ handleChange(item, check, item2, item3) {
let that = this;
this.deptChecked = check.checkedKeys;
this.userParams.depts = check.checkedKeys;
@@ -1192,10 +1186,10 @@ export default {
});
window.map.addLayer(that.userMaskerLayer);
let userListNew = [];
- that.userList.filter(item=>{
- if(checkedKeys.indexOf(item.my_info.employee_.belong_dept_)>-1){
+ that.userList.filter(item => {
+ if (checkedKeys.indexOf(item.my_info.employee_.belong_dept_) > -1) {
userListNew.push(item)
- }
+ }
})
that.userList = userListNew;
console.log(that.userList)
@@ -1203,10 +1197,10 @@ export default {
this.showUserSelect = false;
},
//
- audioFinished(){
- if(this.audioIndex
事件截图:
-
-
+
+
@@ -683,13 +667,14 @@