fix conflict
This commit is contained in:
commit
55f821cc03
|
@ -1,23 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<el-drawer
|
<el-drawer :title="areaName + '围栏设置'" v-model="visible" destroy-on-close :size="'80%'" @closed="closeDrawer">
|
||||||
:title="areaName+'围栏设置'"
|
<el-form :model="coordinates" label-width="80px" style="position:absolute;top:15px;left:200px;">
|
||||||
v-model="visible"
|
|
||||||
destroy-on-close
|
|
||||||
:size="'80%'"
|
|
||||||
@closed="closeDrawer"
|
|
||||||
>
|
|
||||||
<el-form
|
|
||||||
:model="coordinates"
|
|
||||||
label-width="80px"
|
|
||||||
style="position:absolute;top:15px;left:200px;"
|
|
||||||
>
|
|
||||||
<el-form-item label="围栏名称" prop="name">
|
<el-form-item label="围栏名称" prop="name">
|
||||||
<el-input
|
<el-input v-model="coordinates.railName" placeholder="请输入围栏名称" clearable style="width: 150px;">
|
||||||
v-model="coordinates.railName"
|
</el-input>
|
||||||
placeholder="请输入围栏名称"
|
|
||||||
clearable
|
|
||||||
style="width: 150px;"
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-container v-loading="loading">
|
<el-container v-loading="loading">
|
||||||
|
@ -26,11 +12,7 @@
|
||||||
<div id='mapContainer1'></div>
|
<div id='mapContainer1'></div>
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-footer>
|
<el-footer>
|
||||||
<el-button
|
<el-button type="primary" :loading="isSaveing" @click="submit">
|
||||||
type="primary"
|
|
||||||
:loading="isSaveing"
|
|
||||||
@click="submit"
|
|
||||||
>
|
|
||||||
保存
|
保存
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="visible = false">取消</el-button>
|
<el-button @click="visible = false">取消</el-button>
|
||||||
|
@ -40,179 +22,225 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
emits: ["success", "closed"],
|
emits: ["success", "closed"],
|
||||||
props: {
|
props: {
|
||||||
areaId: {
|
areaId: {
|
||||||
type: String,
|
type: String,
|
||||||
},
|
|
||||||
areaName: {
|
|
||||||
type: String,
|
|
||||||
},
|
|
||||||
areaPoints:{
|
|
||||||
type:Array,
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
data() {
|
areaName: {
|
||||||
return {
|
type: String,
|
||||||
loading: false,
|
},
|
||||||
visible: true,
|
areaPoints: {
|
||||||
isSaveing: false,
|
type: Array,
|
||||||
coordinates:{
|
}
|
||||||
floorNo:'',
|
},
|
||||||
railName:'',
|
data() {
|
||||||
railType:1,//1:多边形;0表示圆形
|
return {
|
||||||
mapType:'1',//点位信息有经纬度则为2,有xy则为1
|
loading: false,
|
||||||
color:'1',
|
visible: true,
|
||||||
polygon:{
|
isSaveing: false,
|
||||||
points:[]
|
coordinates: {
|
||||||
}
|
floorNo: '',
|
||||||
|
railName: '',
|
||||||
|
railType: 1,//1:多边形;0表示圆形
|
||||||
|
mapType: '1',//点位信息有经纬度则为2,有xy则为1
|
||||||
|
color: '1',
|
||||||
|
polygon: {
|
||||||
|
points: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
points: [],
|
||||||
|
areaMarkerLayer: null,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.loadMap();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
loadMap() {
|
||||||
|
let that = this;
|
||||||
|
|
||||||
|
window.map = new jsmap.JSMap({
|
||||||
|
mapType: jsmap.JSMapType.MAP_3D,
|
||||||
|
container: 'mapContainer1',
|
||||||
|
mapServerURL: 'data/map',
|
||||||
|
enableShadows: false, //是否开启阴影 默认false
|
||||||
|
enableLighting: false, //是否开发光照 默认false
|
||||||
|
mapScaleLevelRange: [16, 23],//比例尺级别范围, 16级到23级,默认[1,24]
|
||||||
|
floorControlOptions: {
|
||||||
|
floorHeight: 20,//楼层间距
|
||||||
|
position: jsmap.JSControlPosition.RIGHT_TOP,//控件位置
|
||||||
|
offset: {
|
||||||
|
x: 10,
|
||||||
|
y: 10,
|
||||||
|
}//控件偏移位置
|
||||||
},
|
},
|
||||||
points:[],
|
imageryProvider: jsmap.JSImageryProviderType.IMAGE_TDT,
|
||||||
};
|
backgroundColor: '#3798ff', //背景颜色
|
||||||
},
|
viewOptions: {
|
||||||
mounted() {
|
//屏幕中心坐标
|
||||||
this.$nextTick(()=>{
|
center: { x: 114.63059258861512, y: 38.81407163905287, z: 1 },
|
||||||
this.loadMap();
|
// center: {x:120,y:30,z:10},
|
||||||
})
|
//相机距屏幕中心点距离(单位m)
|
||||||
},
|
distance: 400,
|
||||||
methods: {
|
// 旋转角(单位°)
|
||||||
loadMap(){
|
rotate: 0,
|
||||||
let that = this;
|
//倾斜角(单位°)
|
||||||
window.map = new jsmap.JSMap({
|
tilt: 45,
|
||||||
mapType: jsmap.JSMapType.MAP_3D,
|
}
|
||||||
container: 'mapContainer1',
|
});
|
||||||
mapServerURL: 'data/map',
|
window.map.openMapById('0000');
|
||||||
enableShadows: false, //是否开启阴影 默认false
|
window.map.on('loadComplete', e => {
|
||||||
enableLighting: false, //是否开发光照 默认false
|
let drawTool2 = new jsmap.JSDrawToolControl({
|
||||||
mapScaleLevelRange: [16, 23],//比例尺级别范围, 16级到23级,默认[1,24]
|
position: jsmap.JSControlPosition.RIGHT_TOP, //画图工具在容器中的相对位置,当前为右上
|
||||||
floorControlOptions: {
|
offset: {
|
||||||
floorHeight: 20,//楼层间距
|
x: 30,
|
||||||
position: jsmap.JSControlPosition.RIGHT_TOP,//控件位置
|
y: 30
|
||||||
offset: {
|
}, //偏移量
|
||||||
x: 10,
|
drawMode: jsmap.JSDrawMode.POLYGON, //画图类型POINT:画点 POLYLINE:画线 POLYGON:画面
|
||||||
y: 10,
|
//画图结束的回调,返回所画的面信息
|
||||||
}//控件偏移位置
|
callback: (feature) => {
|
||||||
|
/*console.log('add', feature);
|
||||||
|
console.log(feature.properties);//type:POLYGON;id:"";name:"";floorNo:"";floorId:""
|
||||||
|
console.log(feature.geometry);//feature.geometry.coordinates:[[],[]]面数组*/
|
||||||
|
this.coordinates.floorNo = feature.properties.floorNo;
|
||||||
|
this.coordinates.floorId = feature.properties.floorId;
|
||||||
|
that.points = feature.geometry.coordinates[0];
|
||||||
},
|
},
|
||||||
imageryProvider: jsmap.JSImageryProviderType.IMAGE_TDT,
|
//移除相应面的回调,返回相应面信息
|
||||||
backgroundColor: '#3798ff', //背景颜色
|
removeCallback: (feature) => {
|
||||||
viewOptions: {
|
// console.log('remove', feature);
|
||||||
//屏幕中心坐标
|
},
|
||||||
center: {x: 114.63059258861512, y: 38.81407163905287, z: 1},
|
//编辑相应面的回调,返回相应面信息
|
||||||
// center: {x:120,y:30,z:10},
|
editCallback: (feature) => {
|
||||||
//相机距屏幕中心点距离(单位m)
|
// console.log('editCallback', feature);
|
||||||
distance: 400,
|
},
|
||||||
// 旋转角(单位°)
|
//定位到相应面的回调,返回相应面信息
|
||||||
rotate: 0,
|
locateCallback: (feature) => {
|
||||||
//倾斜角(单位°)
|
// console.log('locate..', feature);
|
||||||
tilt: 45,
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
window.map.openMapById('0000');
|
|
||||||
window.map.on('loadComplete', e => {
|
|
||||||
let drawTool2 = new jsmap.JSDrawToolControl({
|
|
||||||
position: jsmap.JSControlPosition.RIGHT_TOP, //画图工具在容器中的相对位置,当前为右上
|
|
||||||
offset: {
|
|
||||||
x: 30,
|
|
||||||
y: 30
|
|
||||||
}, //偏移量
|
|
||||||
drawMode: jsmap.JSDrawMode.POLYGON, //画图类型POINT:画点 POLYLINE:画线 POLYGON:画面
|
|
||||||
//画图结束的回调,返回所画的面信息
|
|
||||||
callback: (feature) => {
|
|
||||||
/*console.log('add', feature);
|
|
||||||
console.log(feature.properties);//type:POLYGON;id:"";name:"";floorNo:"";floorId:""
|
|
||||||
console.log(feature.geometry);//feature.geometry.coordinates:[[],[]]面数组*/
|
|
||||||
this.coordinates.floorNo = feature.properties.floorNo;
|
|
||||||
this.coordinates.floorId = feature.properties.floorId;
|
|
||||||
that.points = feature.geometry.coordinates[0];
|
|
||||||
},
|
|
||||||
//移除相应面的回调,返回相应面信息
|
|
||||||
removeCallback: (feature) => {
|
|
||||||
// console.log('remove', feature);
|
|
||||||
},
|
|
||||||
//编辑相应面的回调,返回相应面信息
|
|
||||||
editCallback: (feature) => {
|
|
||||||
// console.log('editCallback', feature);
|
|
||||||
},
|
|
||||||
//定位到相应面的回调,返回相应面信息
|
|
||||||
locateCallback: (feature) => {
|
|
||||||
// console.log('locate..', feature);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
window.map.addControl(drawTool2);
|
window.map.addControl(drawTool2);
|
||||||
//当电子围栏有数据时
|
if (that.areaPoints.length > 2) {
|
||||||
if(that.areaPoints.length>2){
|
debugger
|
||||||
let areaPoints = [];
|
|
||||||
let point =null;
|
|
||||||
that.areaPoints.forEach(item=>{
|
|
||||||
debugger;
|
|
||||||
|
|
||||||
let obj = {lng:345,lat:268}
|
|
||||||
console.log(obj)
|
that.areaMarkerLayers();
|
||||||
let tool = new jsmap.JSMapCoordTool(window.map);
|
}
|
||||||
let pixel = tool.screenToMapCoordinate(obj);
|
});
|
||||||
debugger;
|
},
|
||||||
console.log(pixel)
|
closeDrawer() {
|
||||||
debugger;
|
this.$emit('closed');
|
||||||
point = new jsmap.JSPoint(item.x,item.y,0);
|
},
|
||||||
areaPoints.push(point)
|
areaMarkerLayers() {
|
||||||
})
|
let that = this;
|
||||||
let polygonMarker = new jsmap.JSPolygonMarker({
|
that.areaMarkerLayer = new jsmap.JSDomMarkerLayer({
|
||||||
id: that.areaId,//id
|
minimumLevel: 3,
|
||||||
position: that.areaPoints,//坐标集合
|
maxmumLevel: 22,
|
||||||
floorId: 1,//楼层id
|
show: true
|
||||||
color: 'rgba(0,0,255,.44)',//填充颜色
|
});
|
||||||
strokeColor: 'rgba(0,0,255,.44)',//边线颜色
|
window.map.addLayer(that.areaMarkerLayer);
|
||||||
depthTest: false,//是否开启深度检测
|
// this.markerShow();
|
||||||
// material: new jsmap.JSWaterMaterial(), //材质,材质属性一旦设置,color属性就会失效
|
},
|
||||||
allowPicking: true, //是否允许点击
|
markerShow() {
|
||||||
displayCondition: new jsmap.JSDisplayCondition(0.0, 1000), //可见范围
|
let that = this;
|
||||||
properties: {
|
let tool = new jsmap.JSMapCoordTool(window.map);
|
||||||
test: 'polygonTest'
|
//当电子围栏有数据时
|
||||||
},//属性设置
|
let areaPoints = [];
|
||||||
callback: (marker) => {
|
let point = null;
|
||||||
// console.log(marker);
|
let point0 = that.areaPoints[0]
|
||||||
}//回调
|
debugger;
|
||||||
});
|
console.log(point0)
|
||||||
window.map.addMarker(polygonMarker);
|
debugger;
|
||||||
}
|
let obj = { x: point0.x, y: point0.y};
|
||||||
|
console.log(obj)
|
||||||
|
debugger;
|
||||||
|
let pixel = tool.screenToMapCoordinate(obj);
|
||||||
|
console.log(pixel)
|
||||||
|
that.areaPoints.forEach(item => {
|
||||||
|
let obj = { x: item.x, y: item.y }
|
||||||
|
let pixel = tool.screenToMapCoordinate(obj);
|
||||||
|
|
||||||
|
point = new jsmap.JSPoint(pixel.x, pixel.y, 0);
|
||||||
|
areaPoints.push(point)
|
||||||
|
})
|
||||||
|
let polygonMarker = new jsmap.JSPolygonMarker({
|
||||||
|
id: that.areaId,//id
|
||||||
|
position: that.areaPoints,//坐标集合
|
||||||
|
floorId: 1,//楼层id
|
||||||
|
color: 'rgba(0,0,255,.44)',//填充颜色
|
||||||
|
strokeColor: 'rgba(0,0,255,.44)',//边线颜色
|
||||||
|
depthTest: false,//是否开启深度检测
|
||||||
|
// material: new jsmap.JSWaterMaterial(), //材质,材质属性一旦设置,color属性就会失效
|
||||||
|
allowPicking: true, //是否允许点击
|
||||||
|
displayCondition: new jsmap.JSDisplayCondition(0.0, 1000), //可见范围
|
||||||
|
properties: {
|
||||||
|
test: 'polygonTest'
|
||||||
|
},//属性设置
|
||||||
|
callback: (marker) => {
|
||||||
|
// console.log(marker);
|
||||||
|
}//回调
|
||||||
|
});
|
||||||
|
that.areaMarkerLayer.addMarker(polygonMarker);
|
||||||
|
},
|
||||||
|
//表单提交方法
|
||||||
|
submit() {
|
||||||
|
let that = this;
|
||||||
|
// debugger;
|
||||||
|
let pointXY = [];
|
||||||
|
console.log(that.points)
|
||||||
|
let tool = new jsmap.JSMapCoordTool(window.map);
|
||||||
|
let coordinate = { x: 114.63059258861512, y: 38.81407163905287 };
|
||||||
|
let pixel = tool.mapToScreenCoordinate(coordinate);
|
||||||
|
debugger;
|
||||||
|
console.log(pixel)
|
||||||
|
|
||||||
|
debugger;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
let points = that.points;
|
||||||
|
if (points.length > 0) {
|
||||||
|
that.isSaveing = true;
|
||||||
|
that.coordinates.color = 'rgba(255,0,0,.4)';
|
||||||
|
points.forEach(item => {
|
||||||
|
let coordinate = { x: parseFloat(item[0]), y: parseFloat(item[1]) };
|
||||||
|
let pixel = tool.mapToScreenCoordinate(coordinate);
|
||||||
|
// let zuobiao = tool.screenToMapCoordinate(pixel);
|
||||||
|
|
||||||
|
// console.log(zuobiao)
|
||||||
|
pointXY.push(pixel);
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
|
||||||
closeDrawer() {
|
that.coordinates.polygon.points = pointXY;
|
||||||
this.$emit('closed');
|
// that.coordinates.polygon.points = points;
|
||||||
},
|
that.$API.am.area.bindRail.req(that.areaId, that.coordinates)
|
||||||
//表单提交方法
|
.then(res => {
|
||||||
submit() {
|
that.isSaveing = false;
|
||||||
let that = this;
|
that.visible = false;
|
||||||
let pointXY = [];
|
that.$emit("success");
|
||||||
let tool = new jsmap.JSMapCoordTool(window.map);
|
that.$message.success("操作成功");
|
||||||
let points = that.points;
|
return res
|
||||||
if(points.length>0){
|
}).catch(err => {
|
||||||
that.isSaveing = true;
|
|
||||||
that.coordinates.color = 'rgba(255,0,0,.4)';
|
|
||||||
points.forEach(item=>{
|
|
||||||
let coordinate = {x:parseFloat(item[0]),y:parseFloat(item[1])};
|
|
||||||
let pixel = tool.mapToScreenCoordinate(coordinate);
|
|
||||||
pointXY.push(pixel);
|
|
||||||
});
|
|
||||||
that.coordinates.polygon.points = pointXY;
|
|
||||||
that.$API.am.area.bindRail.req(that.areaId,that.coordinates)
|
|
||||||
.then(res => {
|
|
||||||
that.isSaveing = false;
|
|
||||||
that.visible = false;
|
|
||||||
that.$emit("success");
|
|
||||||
that.$message.success("操作成功");
|
|
||||||
return res
|
|
||||||
}).catch(err => {
|
|
||||||
that.isSaveing = false;
|
that.isSaveing = false;
|
||||||
return err
|
return err
|
||||||
})
|
})
|
||||||
}else{}
|
} else { }
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -110,12 +110,9 @@
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
<el-dialog :title="channelName" v-model="limitedVisible" :width="745">
|
<el-dialog :title="channelName" v-model="limitedVisible" :width="745">
|
||||||
<div style="height: 560px">
|
<video-view v-if="limitedVisible" :channelCode="channelCode"></video-view>
|
||||||
<video id="videoElement" muted="muted"></video>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="limitedVisible = false">关闭</el-button>
|
<el-button @click="viewClose">关闭</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<channel-view
|
<channel-view
|
||||||
|
@ -129,11 +126,14 @@
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import channelView from "./vchannel_view";
|
import channelView from "./vchannel_view";
|
||||||
|
import videoView from "./videoView";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "monitor",
|
name: "monitor",
|
||||||
|
inject:['reload'],
|
||||||
components: {
|
components: {
|
||||||
channelView,
|
channelView,
|
||||||
|
videoView
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -166,6 +166,8 @@ export default {
|
||||||
},
|
},
|
||||||
code: "video_realtime",
|
code: "video_realtime",
|
||||||
},
|
},
|
||||||
|
channelCode:'',
|
||||||
|
flvPlayer:null,
|
||||||
deviceTypes: {
|
deviceTypes: {
|
||||||
1: "枪机",
|
1: "枪机",
|
||||||
2: "球机",
|
2: "球机",
|
||||||
|
@ -181,24 +183,26 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleView(row) {
|
handleView(row) {
|
||||||
this.params.json.data.channelId = row.channelCode;
|
let that = this;
|
||||||
this.channelName = row.channelName;
|
that.channelCode = row.channelCode;
|
||||||
this.limitedVisible = true;
|
that.channelName = row.channelName;
|
||||||
this.$API.am.video.item.req(this.params).then((res) => {
|
that.limitedVisible = true;
|
||||||
debugger;
|
// that.$API.am.video.item.req(this.params).then((res) => {
|
||||||
console.log(res);
|
// this.url = res.url;
|
||||||
this.url = res.url;
|
// if (flvjs.isSupported()) {
|
||||||
if (flvjs.isSupported()) {
|
// let videoElement = document.getElementById("videoElement");
|
||||||
let videoElement = document.getElementById("videoElement");
|
// that.flvPlayer = flvjs.createPlayer({
|
||||||
let flvPlayer = flvjs.createPlayer({
|
// type: "flv",
|
||||||
type: "flv",
|
// url: res.url,
|
||||||
url: res.url,
|
// });
|
||||||
});
|
// that.flvPlayer.attachMediaElement(videoElement);
|
||||||
flvPlayer.attachMediaElement(videoElement);
|
// that.flvPlayer.load();
|
||||||
flvPlayer.load();
|
// that.flvPlayer.play();
|
||||||
flvPlayer.play();
|
// }
|
||||||
}
|
// });
|
||||||
});
|
},
|
||||||
|
viewClose(){
|
||||||
|
this.limitedVisible = false;
|
||||||
},
|
},
|
||||||
handlePosition(row) {
|
handlePosition(row) {
|
||||||
this.channelCode = row.channelCode;
|
this.channelCode = row.channelCode;
|
||||||
|
|
|
@ -0,0 +1,61 @@
|
||||||
|
<template>
|
||||||
|
<div style="height: 560px">
|
||||||
|
<video id="videoElement" muted="muted"></video>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
channelCode: {
|
||||||
|
type: String,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
flvPlayer: null,
|
||||||
|
params: {
|
||||||
|
json: {
|
||||||
|
data: {
|
||||||
|
channelId: "",
|
||||||
|
streamType: "2",
|
||||||
|
type: "flv",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
code: "video_realtime",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
const scriptInfo = document.createElement("script");
|
||||||
|
scriptInfo.setAttribute("data-callType", "callScript");
|
||||||
|
scriptInfo.src = "https://cdn.bootcdn.net/ajax/libs/flv.js/1.6.2/flv.js";
|
||||||
|
document.head.appendChild(scriptInfo);
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
let that = this;
|
||||||
|
that.params.json.data.channelId = that.channelCode;
|
||||||
|
that.$API.am.video.item.req(that.params).then((res) => {
|
||||||
|
that.url = res.url;
|
||||||
|
if (flvjs.isSupported()) {
|
||||||
|
let videoElement = document.getElementById("videoElement");
|
||||||
|
that.flvPlayer = flvjs.createPlayer({
|
||||||
|
type: "flv",
|
||||||
|
url: res.url,
|
||||||
|
});
|
||||||
|
that.flvPlayer.attachMediaElement(videoElement);
|
||||||
|
that.flvPlayer.load();
|
||||||
|
that.flvPlayer.play();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
unmounted () {
|
||||||
|
debugger;
|
||||||
|
let that = this;
|
||||||
|
that.flvPlayer.pause();
|
||||||
|
that.flvPlayer.unload();
|
||||||
|
that.flvPlayer.detachMediaElement();
|
||||||
|
that.flvPlayer.destroy();
|
||||||
|
that.flvPlayer = null;
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -247,13 +247,32 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="detail-content">
|
<div class="detail-content">
|
||||||
<div class="content-head">
|
<div class="content-head">
|
||||||
<div class="{'areaActive':areaShowType==1} areaNavItem" style="color:#ffffff">围栏</div>
|
<div @click="areaItemHandle(1)" :class="{'areaActive':areaShowType==1,'areaNavItem':1}" style="color:#ffffff">作业</div>
|
||||||
<div class="{'areaActive':areaShowType==2} areaNavItem" style="color:#ffffff">作业</div>
|
<div @click="areaItemHandle(2)" :class="{'areaActive':areaShowType==2,'areaNavItem':1}" style="color:#ffffff">监控</div>
|
||||||
<div class="{'areaActive':areaShowType==3} areaNavItem" style="color:#ffffff">监控</div>
|
<div @click="areaItemHandle(3)" :class="{'areaActive':areaShowType==3,'areaNavItem':1}" style="color:#ffffff">喇叭</div>
|
||||||
<div class="{'areaActive':areaShowType==4} areaNavItem" style="color:#ffffff">喇叭</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="content-body">
|
<div class="content-body">
|
||||||
<el-table>
|
<el-table class="bigScreenTable" v-if="areaShowType==1" :data="areaOperation" :height="300">
|
||||||
|
<el-table-column label="作业简介" prop="name"></el-table-column>
|
||||||
|
<el-table-column label="开始时间" prop="start_time"></el-table-column>
|
||||||
|
<el-table-column label="结束时间" prop="end_time"></el-table-column>
|
||||||
|
<el-table-column label="业务部门">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.dept_ter_">{{scope.row.dept_ter_.name}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-table class="bigScreenTable" v-if="areaShowType==2">
|
||||||
|
<el-table-column label="设备编号"></el-table-column>
|
||||||
|
<el-table-column label="通道名称"></el-table-column>
|
||||||
|
<el-table-column label="类型"></el-table-column>
|
||||||
|
<el-table-column label="是否在线"></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-table class="bigScreenTable" v-if="areaShowType==3">
|
||||||
|
<el-table-column label="喇叭名称"></el-table-column>
|
||||||
|
<el-table-column label="喇叭音量"></el-table-column>
|
||||||
|
<el-table-column label="ip"></el-table-column>
|
||||||
|
<el-table-column label="在线状态"></el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -412,14 +431,14 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="部门">
|
<el-table-column label="部门">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span
|
<span v-if="scope.row.my_info.employee_">{{ scope.row.my_info.employee_.belong_dept_name
|
||||||
v-if="scope.row.my_info.employee_">{{ scope.row.my_info.employee_.belong_dept_name }}</span>
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="岗位">
|
<el-table-column label="岗位">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span
|
<span v-if="scope.row.my_info.employee_">{{ scope.row.my_info.employee_.post_name
|
||||||
v-if="scope.row.my_info.employee_">{{ scope.row.my_info.employee_.post_name }}</span>
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -452,13 +471,15 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="info-item">
|
<div class="info-item">
|
||||||
<span class="info-item-name">部门:</span>
|
<span class="info-item-name">部门:</span>
|
||||||
<span class="info-item-info"
|
<span class="info-item-info" v-if="screenUserItemDetail.belong_dept_">{{
|
||||||
v-if="screenUserItemDetail.belong_dept_">{{ screenUserItemDetail.belong_dept_.name }}</span>
|
screenUserItemDetail.belong_dept_.name
|
||||||
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="info-item">
|
<div class="info-item">
|
||||||
<span class="info-item-name">岗位:</span>
|
<span class="info-item-name">岗位:</span>
|
||||||
<span class="info-item-info"
|
<span class="info-item-info" v-if="screenUserItemDetail.post_">{{
|
||||||
v-if="screenUserItemDetail.post_">{{ screenUserItemDetail.post_.name }}</span>
|
screenUserItemDetail.post_.name
|
||||||
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="info-item">
|
<div class="info-item">
|
||||||
<span class="info-item-name">证件类型:</span>
|
<span class="info-item-name">证件类型:</span>
|
||||||
|
@ -662,23 +683,25 @@
|
||||||
<div class="risk-basic">
|
<div class="risk-basic">
|
||||||
<div class="risk-item">
|
<div class="risk-item">
|
||||||
<span class="risk-item-name">报警区域:</span>
|
<span class="risk-item-name">报警区域:</span>
|
||||||
<span class="risk-item-info"
|
<span class="risk-item-info" v-if="screenWarningItem.area_">{{ screenWarningItem.area_.name
|
||||||
v-if="screenWarningItem.area_">{{ screenWarningItem.area_.name }}</span>
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="risk-item" v-if="screenWarningItem.employee_ !== null">
|
<div class="risk-item" v-if="screenWarningItem.employee_ !== null">
|
||||||
<span class="risk-item-name">触发人:</span>
|
<span class="risk-item-name">触发人:</span>
|
||||||
<span class="risk-item-info"
|
<span class="risk-item-info" v-if="screenWarningItem.employee_">{{
|
||||||
v-if="screenWarningItem.employee_">{{ screenWarningItem.employee_.name }}</span>
|
screenWarningItem.employee_.name
|
||||||
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="risk-item" v-if="screenWarningItem.employee_ !== null">
|
<div class="risk-item" v-if="screenWarningItem.employee_ !== null">
|
||||||
<span class="risk-item-name">触发人部门:</span>
|
<span class="risk-item-name">触发人部门:</span>
|
||||||
<span class="risk-item-info"
|
<span class="risk-item-info" v-if="screenWarningItem.employee_.belong_dept_">{{
|
||||||
v-if="screenWarningItem.employee_.belong_dept_">{{ screenWarningItem.employee_.belong_dept_.name }}</span>
|
screenWarningItem.employee_.belong_dept_.name
|
||||||
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="risk-item">
|
<div class="risk-item">
|
||||||
<span class="risk-item-name">触发事件:</span>
|
<span class="risk-item-name">触发事件:</span>
|
||||||
<span class="risk-item-info" v-for="ite in screenWarningItem.cates_"
|
<span class="risk-item-info" v-for="ite in screenWarningItem.cates_" :key="ite">{{ ite.name
|
||||||
:key="ite">{{ ite.name }}</span>
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="risk-item">
|
<div class="risk-item">
|
||||||
<span class="risk-item-name">触发时间:</span>
|
<span class="risk-item-name">触发时间:</span>
|
||||||
|
@ -738,7 +761,7 @@ export default {
|
||||||
eareMarker: null,
|
eareMarker: null,
|
||||||
dropIndex: '1',
|
dropIndex: '1',
|
||||||
countIndex: '2',
|
countIndex: '2',
|
||||||
areaShowType:'1',
|
areaShowType: '1',
|
||||||
markList: [false, false, false, false, false, false, false],
|
markList: [false, false, false, false, false, false, false],
|
||||||
autoRun: false,
|
autoRun: false,
|
||||||
tracking: false,
|
tracking: false,
|
||||||
|
@ -777,6 +800,7 @@ export default {
|
||||||
postList: [],//岗位列表
|
postList: [],//岗位列表
|
||||||
dangerList: [],//岗位列表
|
dangerList: [],//岗位列表
|
||||||
areaList: [],//区域列表/风险区域列表
|
areaList: [],//区域列表/风险区域列表
|
||||||
|
areaOperation:[],
|
||||||
//数据统计
|
//数据统计
|
||||||
userCount: {
|
userCount: {
|
||||||
total: 0,
|
total: 0,
|
||||||
|
@ -1029,6 +1053,10 @@ export default {
|
||||||
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){
|
||||||
|
this.areaShowType = index;
|
||||||
|
},
|
||||||
|
//报警统计
|
||||||
getWarningTotal() {
|
getWarningTotal() {
|
||||||
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 => {
|
||||||
|
@ -1037,6 +1065,7 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//报警类型
|
||||||
getWarningType() {
|
getWarningType() {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.ecm.event_cate.list.req().then(res => {
|
that.$API.ecm.event_cate.list.req().then(res => {
|
||||||
|
@ -1045,11 +1074,17 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//区域点击事件
|
||||||
areaRowClick(data) {
|
areaRowClick(data) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.areaDetail = true;
|
that.areaDetail = true;
|
||||||
|
this.$API.opm.operation.list.req({area:data.id}).then(res=>{
|
||||||
|
console.log(res)
|
||||||
|
that.areaOperation = res.results;
|
||||||
|
})
|
||||||
// let points = data.third_info.xx_rail.detail.polygon.points[0];
|
// let points = data.third_info.xx_rail.detail.polygon.points[0];
|
||||||
window.map.flyToPosition(new jsmap.JSPoint(114.63168864138028, 38.81254802029822, 0), { duration: 1000 });
|
window.map.flyToPosition(new jsmap.JSPoint(114.63168864138028, 38.81254802029822, 0), { duration: 1000 });
|
||||||
|
|
||||||
},
|
},
|
||||||
//岗位
|
//岗位
|
||||||
getAllPost() {
|
getAllPost() {
|
||||||
|
@ -1134,6 +1169,7 @@ export default {
|
||||||
if (res.err_msg) {
|
if (res.err_msg) {
|
||||||
} else {
|
} else {
|
||||||
that.areaList = res.results;
|
that.areaList = res.results;
|
||||||
|
that.showRiskMarkers();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -1226,7 +1262,8 @@ export default {
|
||||||
show: false
|
show: false
|
||||||
});
|
});
|
||||||
window.map.addLayer(that.riskMarkerLayer);
|
window.map.addLayer(that.riskMarkerLayer);
|
||||||
that.showRiskMarkers();
|
that.getAreas();//区域/风险区域$$
|
||||||
|
|
||||||
},
|
},
|
||||||
//摄像头layer
|
//摄像头layer
|
||||||
cameraMaskerLayers() {//图标文字
|
cameraMaskerLayers() {//图标文字
|
||||||
|
@ -1306,28 +1343,42 @@ export default {
|
||||||
},
|
},
|
||||||
//风险区域
|
//风险区域
|
||||||
showRiskMarkers() {
|
showRiskMarkers() {
|
||||||
var boxMarker = new jsmap.JSBoxMarker({
|
let that = this;
|
||||||
id: 'box',
|
console.log(that.areaList);
|
||||||
position: [
|
// debugger;
|
||||||
{ x: 114.63059258861512, y: 38.81407163905287, z: 0 },
|
that.areaList.forEach(item => {
|
||||||
{ x: 114.63044857916901, y: 38.81396178326786, z: 0 },
|
// debugger
|
||||||
{ x: 114.63060812029352, y: 38.81386267832651, z: 0 },
|
let pointsList = [], floorId = null;
|
||||||
{ x: 114.63073035356713, y: 38.81395745716681, z: 0 },
|
if (item.third_info.xx_rail!==null&&item.third_info.xx_rail!==undefined) {
|
||||||
],
|
floorId = item.third_info.xx_rail.detail.floorId;
|
||||||
floorId: 1,//楼层id
|
let points = item.third_info.xx_rail.detail.polygon.points;
|
||||||
color: 'rgba(255,0,0,0.44)',//颜色
|
pointsList = points.map(item => {
|
||||||
height: 0,//基底高度
|
let obj = item;
|
||||||
stretchHeight: 6,//拉伸高度
|
obj.z = 0;
|
||||||
strokeColor: '#ff0000',//边线颜色
|
return obj
|
||||||
show: true, //是否显示
|
});
|
||||||
depthTest: Boolean,
|
// debugger;
|
||||||
allowPicking: true, //是否允许点击
|
console.log(pointsList);
|
||||||
displayCondition: new jsmap.JSDisplayCondition(0.0, 1000),//可见范围
|
let boxMarker = new jsmap.JSBoxMarker({
|
||||||
callback: (marker) => {
|
id: item.id,
|
||||||
// console.log(marker);
|
position: pointsList,
|
||||||
|
floorId: floorId,//楼层id
|
||||||
|
color: 'rgba(255,0,0,0.44)',//颜色
|
||||||
|
height: 0,//基底高度
|
||||||
|
stretchHeight: 6,//拉伸高度
|
||||||
|
strokeColor: '#ff0000',//边线颜色
|
||||||
|
show: true, //是否显示
|
||||||
|
// depthTest: Boolean,
|
||||||
|
allowPicking: true, //是否允许点击
|
||||||
|
displayCondition: new jsmap.JSDisplayCondition(0.0, 1000),//可见范围
|
||||||
|
callback: (marker) => {
|
||||||
|
// console.log(marker);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
that.riskMarkerLayer.addMarker(boxMarker);
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
this.riskMarkerLayer.addMarker(boxMarker);
|
|
||||||
var boxMarker1 = new jsmap.JSBoxMarker({
|
var boxMarker1 = new jsmap.JSBoxMarker({
|
||||||
id: 'box',
|
id: 'box',
|
||||||
position: [
|
position: [
|
||||||
|
@ -1412,16 +1463,16 @@ export default {
|
||||||
//标记图片
|
//标记图片
|
||||||
let userImage = '';
|
let userImage = '';
|
||||||
if (userList.length > 0) {
|
if (userList.length > 0) {
|
||||||
debugger;
|
// debugger;
|
||||||
console.log(userList);
|
console.log(userList);
|
||||||
debugger;
|
// debugger;
|
||||||
let lng = [114.62923138539462, 114.6315404372349];//经度
|
let lng = [114.62923138539462, 114.6315404372349];//经度
|
||||||
let i = 0;
|
let i = 0;
|
||||||
iconTextMarker = userList[0].mac;
|
iconTextMarker = userList[0].mac;
|
||||||
let employee_ = userList[0].my_info.employee_;
|
let employee_ = userList[0].my_info.employee_;
|
||||||
employee_.mac = userList[0].mac;
|
employee_.mac = userList[0].mac;
|
||||||
console.log(userList[0].my_info.employee_.type)
|
console.log(userList[0].my_info.employee_.type)
|
||||||
debugger;
|
// debugger;
|
||||||
if (userList[0].my_info.employee_.type === 'employee') {
|
if (userList[0].my_info.employee_.type === 'employee') {
|
||||||
userImage = "/img/employee.png"
|
userImage = "/img/employee.png"
|
||||||
} else if (serList[0].my_info.employee_.type === 'remployee') {
|
} else if (serList[0].my_info.employee_.type === 'remployee') {
|
||||||
|
@ -3277,12 +3328,18 @@ export default {
|
||||||
/*background: url(/public/img/left_arrow.png) no-repeat;*/
|
/*background: url(/public/img/left_arrow.png) no-repeat;*/
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
}
|
}
|
||||||
.areaNavItem{
|
|
||||||
|
.areaNavItem {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
|
padding: 8px 16px;
|
||||||
|
border-radius: 15px;
|
||||||
}
|
}
|
||||||
.areaActive{
|
.areaActive {
|
||||||
color: #0bf1ff;
|
border: 1px solid #32fde3;
|
||||||
|
background: #007767;
|
||||||
|
box-shadow: inset 0 0 8px #5aecf0;
|
||||||
}
|
}
|
||||||
|
|
||||||
[class*=" el-icon-"],
|
[class*=" el-icon-"],
|
||||||
[class^=el-icon-] {
|
[class^=el-icon-] {
|
||||||
font-family: element-icons !important;
|
font-family: element-icons !important;
|
||||||
|
|
Loading…
Reference in New Issue