diff --git a/public/data/map/0000/mapConfig.conf b/public/data/map/0000/mapConfig.txt
similarity index 100%
rename from public/data/map/0000/mapConfig.conf
rename to public/data/map/0000/mapConfig.txt
diff --git a/src/api/model/am.js b/src/api/model/am.js
index a035d2db..11139fc1 100644
--- a/src/api/model/am.js
+++ b/src/api/model/am.js
@@ -61,6 +61,24 @@ export default {
}
}
},
+ video: {
+ list: {
+ name: "获取视频设备列表",
+ req: async function(){
+ return await http.post(
+ `${config.API_URL}/third/tdevice/vchannel/`,
+ );
+ }
+ },
+ item:{
+ name: "获取视频",
+ req: async function(data){
+ return await http.post(
+ `${config.API_URL}/third/dahua/`,data
+ );
+ }
+ },
+ },
diff --git a/src/components/scTable/index.vue b/src/components/scTable/index.vue
index 2b59c252..6fd54772 100644
--- a/src/components/scTable/index.vue
+++ b/src/components/scTable/index.vue
@@ -264,7 +264,6 @@ export default {
},
//获取数据
async getData() {
-
this.loading = true;
var reqData = {
[config.request.page]: this.currentPage,
@@ -282,18 +281,15 @@ export default {
try {
var res = await this.apiObj.req(reqData);
if (this.hidePagination) {
-
if (res.length == 0) {
this.emptyText = "暂无数据";
}
if(this.$route.path==='/sys/dept'||this.$route.path==='/sys/perm'){
this.tableData = this.redata(res);
-
console.log(this.tableData)
}else{
this.tableData = res || [];
}
- // this.tableData = res;
this.loading = false;
this.$refs.scTable.setScrollTop(0);
this.$emit("dataChange", res, this.tableData);
@@ -312,11 +308,10 @@ export default {
if (this.hidePagination) {
dataList = response.data || [];
} else {
- dataList = response.rows || [];
+ dataList = response.rows?response.rows:response.data.pageData?response.data.pageData:[];
}
if(this.$route.path==='/sys/dept'||this.$route.path==='/ops/menu'){
this.tableData = this.redata(dataList);
-
console.log(this.tableData)
}else{
this.tableData = dataList || [];
@@ -325,8 +320,6 @@ export default {
this.summary = response.summary || {};
this.loading = false;
this.$refs.scTable.setScrollTop(0);
-
-
this.$emit("dataChange", res, this.tableData);
} catch (error) {
this.loading = false;
@@ -345,7 +338,6 @@ export default {
let obj = posts.reduce((res, v) => (res[v.id] = v , res), {});//Object
let arr = [];
for (let item of posts) {
- //debugger;
if (item.parentId == null) {
arr.push(item);
continue
@@ -354,7 +346,6 @@ export default {
parent.children = parent.children ? parent.children : [];
parent.children.push(item);
}
-
console.log(arr);
return arr;
},
diff --git a/src/config/route.js b/src/config/route.js
index 3574d6a3..12758a7a 100644
--- a/src/config/route.js
+++ b/src/config/route.js
@@ -279,6 +279,15 @@ const routes = [
"icon": "el-icon-menu",
},
"component": "am/em1"
+ },
+ {
+ "name": "monitor",
+ "path": "/am/monitor",
+ "meta": {
+ "title": "视频通道",
+ "icon": "el-icon-menu",
+ },
+ "component": "am/monitor"
},
]
},
diff --git a/src/views/am/area.vue b/src/views/am/area.vue
index 0f01ca0a..8794fbd6 100644
--- a/src/views/am/area.vue
+++ b/src/views/am/area.vue
@@ -46,7 +46,7 @@
-
+
围栏
diff --git a/src/views/am/area_rail_form.vue b/src/views/am/area_rail_form.vue
index bcaef2b4..1b004e39 100644
--- a/src/views/am/area_rail_form.vue
+++ b/src/views/am/area_rail_form.vue
@@ -5,6 +5,20 @@
destroy-on-close
@closed="closeDrawer"
>
+
+
+
+
+
@@ -40,7 +54,17 @@
loading: false,
visible: true,
isSaveing: false,
- coordinates:[],
+ coordinates:{
+ floorNo:'',
+ railName:'',
+ railType:1,//1:多边形;0表示圆形
+ mapType:'1',//点位信息有经纬度则为2,有xy则为1
+ color:'1',
+ polygon:{
+ points:[]
+ }
+ },
+ points:[],
};
},
mounted() {
@@ -97,19 +121,18 @@
let drawTool2 = new jsmap.JSDrawToolControl({
position: jsmap.JSControlPosition.RIGHT_TOP, //画图工具在容器中的相对位置,当前为右上
offset: {
- x: 80,
- y: 180
+ 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:[[],[]]面数组
- that.coordinates = feature.geometry.coordinates[0];
- debugger;
-
+ this.coordinates.floorNo = feature.properties.floorNo;
+ this.coordinates.floorId = feature.properties.floorId;
+ that.points = feature.geometry.coordinates[0];
},
//移除相应面的回调,返回相应面信息
removeCallback: (feature) => {
@@ -132,29 +155,34 @@
},
//表单提交方法
submit() {
- if(this.coordinates.length>0){
- this.isSaveing = true;
- this.$API.am.area.bindRail.req(this.areaId,this.coordinates)
+ let that = this;
+ let pointXY = [];
+ let tool = new jsmap.JSMapCoordTool(window.map);
+ let points = that.points;
+ if(points.length>0){
+ that.isSaveing = true;
+ that.coordinates.color = 'rgba(255,0,0,.4)';
+ debugger;
+ points.forEach(item=>{
+ debugger;
+ 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 => {
- this.isSaveing = false;
- this.visible = false;
- this.$emit("success");
- this.$message.success("操作成功");
+ that.isSaveing = false;
+ that.visible = false;
+ that.$emit("success");
+ that.$message.success("操作成功");
return res
}).catch(err => {
- this.isSaveing = false;
+ that.isSaveing = false;
return err
})
- }else{
-
- }
+ }else{}
},
- /*//表单注入数据
- setData(data) {
- console.log(defaultForm);
- this.areaId = data.id;
- this.areaName = data.name;
- },*/
},
};
diff --git a/src/views/am/monitor.vue b/src/views/am/monitor.vue
new file mode 100644
index 00000000..8edce40d
--- /dev/null
+++ b/src/views/am/monitor.vue
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{scope.row.channelType}}
+
+
+ {{scope.row.cameraType}}
+
+
+
+
+
+
+ 实时监控
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/am/vchannel_view.vue b/src/views/am/vchannel_view.vue
new file mode 100644
index 00000000..a05df522
--- /dev/null
+++ b/src/views/am/vchannel_view.vue
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+ 关闭
+
+
+
+
+
+
+
+
diff --git a/src/views/bigScreen/index.vue b/src/views/bigScreen/index.vue
index 0a0a0d93..5dd738dd 100644
--- a/src/views/bigScreen/index.vue
+++ b/src/views/bigScreen/index.vue
@@ -193,7 +193,8 @@
export default {
data() {
return {
- boxMarkerLayer:null,
+ boxMarkerLayer:null,//盒子图层
+ pointMarkerLayer:null,//点位图层
flyManager:null,
dropIndex:'1',
markList: [false, false, false, false, false, false, false, false],
@@ -336,7 +337,8 @@
}
});
window.map.addControl(drawTool2);
- this.boxMaskerLayer();
+ // this.boxMaskerLayer();
+ this.pointMaskerLayer();
});
window.map.on('mapClickNode', event => {
debugger;
@@ -382,6 +384,60 @@
}
});
this.boxMarkerLayer.addMarker(boxMarker);
+ var boxMarker1 = new jsmap.JSBoxMarker({
+ id: 'box',
+ position: [
+ {x: 114.6284236353879, y: 38.81587979561416, z: 0},
+ {x: 114.62920209224112, y: 38.81519905830823, z: 0},
+ {x: 114.63022009284202, y: 38.81594033572247, z: 0},
+ {x: 114.62938229018444, y: 38.81656925374177, z: 0},
+ ],
+ floorId: 1,//楼层id
+ color: 'rgba(134,255,78,0.44)',//颜色
+ height: 0,//基底高度
+ stretchHeight: 20,//拉伸高度
+ strokeColor: '#87FF4F',//边线颜色
+ show: true, //是否显示
+ depthTest:Boolean,
+ allowPicking: false, //是否允许点击
+ displayCondition: new jsmap.JSDisplayCondition(0.0, 1000),//可见范围
+ callback: (marker) => {
+ console.log(marker);
+ }
+ });
+ this.boxMarkerLayer.addMarker(boxMarker1);
+ },
+ pointMaskerLayer(){
+ this.pointMarkerLayer = new jsmap.JSPointMarkerLayer({
+ minimumLevel:3,
+ maxmumLevel:22,
+ show:false
+ });
+ window.map.addLayer(this.pointMarkerLayer);
+ this.showPointMarkers();
+ },
+ showPointMarkers(){
+ let tool = new jsmap.JSMapCoordTool(window.map);
+ let coordinate = {x:114.63128751408715,y:38.81306617819082};
+ let pixel = tool.mapToScreenCoordinate(coordinate);
+ let pointMarker = new jsmap.JSPointMarker({
+ id:'point1',
+ color: '#00FF00', //填充颜色
+ size: 10, //尺寸
+ position: new jsmap.JSPoint(114.63070237278036, 114.63070237278036, 0), //坐标
+ floorId: 2, //楼层id,默认为1(地面)
+ outlineColor: '#CD5C5C', //边线颜色
+ outlineWidth: 2, //边线宽
+ depthTest: true, //是否开启深度检测
+ show: true, //是否显示
+ allowPicking: true, //是否允许点击
+ displayCondition: new jsmap.JSDisplayCondition(0.0, 1000), //可见范围
+ nearFarScale: new jsmap.JSNearFarScale(0.0, 10.0, 500, 0.5), //比例缩放
+ callback: (node) => {
+ console.log(node);
+ }//回调事件
+ });
+ this.pointMarkerLayer.addMarker(pointMarker);
},
userSelect() {
this.showUserSelect = !this.showUserSelect
@@ -427,7 +483,6 @@
}
this.markList = arr;
} else {
- // this.markList[index] = !this.markList[index];
let list = this.markList.slice(1,8);
if(list.indexOf(true)>-1&&list.indexOf(false)<0){
this.markList[0]=true;
@@ -436,12 +491,15 @@
}
}
debugger;
- if(index === 0&&this.markList[5]||index === 5&&this.markList[5]){
-
+ /*if(this.markList[5]){
this.boxMarkerLayer.show=true;
}else{
- // this.layer.setMarkerVisibleByFilter(false, 'show >= true');
this.boxMarkerLayer.show=false;
+ }*/
+ if(this.markList[2]){
+ this.pointMarkerLayer.show=true;
+ }else{
+ this.pointMarkerLayer.show=false;
}
},
changeDropIndex(index){