diff --git a/src/api/model/third.js b/src/api/model/third.js index 50fa7b08..c790bdce 100644 --- a/src/api/model/third.js +++ b/src/api/model/third.js @@ -68,6 +68,15 @@ export default { ); } }, + xunxiCommon:{ + name: "寻息通用接口", + req: async function(data){ + return await http.post( + `${config.API_URL}/third/xunxi/`, + data + ); + } + }, all:{ name: "全部在线标签列表信息", req: async function(data){ diff --git a/src/views/am/area.vue b/src/views/am/area.vue index 809ee55f..77dfba05 100644 --- a/src/views/am/area.vue +++ b/src/views/am/area.vue @@ -258,6 +258,7 @@ :areaId="areaId" :areaName="areaName" :areaPoints="areaPoints" + :areaFloorId="areaFloorId" @success="handleSaveSuccess" @closed="dialog.saveRail = false" > @@ -307,6 +308,7 @@ export default { areaId: null, areaName: "", areaPoints:[], + areaFloorId:1, cate_: { post: "岗位", org: "单位", people: "人员" }, }; }, @@ -350,6 +352,7 @@ export default { // console.log(row.third_info.xx_rail.detail.polygon.points); if(row.third_info.xx_rail){ this.areaPoints = row.third_info.xx_rail.detail.polygon.points; + this.areaFloorId = row.third_info.xx_rail.detail.floorId; }else{ } diff --git a/src/views/am/area_rail_form.vue b/src/views/am/area_rail_form.vue index 9f7989b0..ca9617d4 100644 --- a/src/views/am/area_rail_form.vue +++ b/src/views/am/area_rail_form.vue @@ -33,7 +33,10 @@ export default { }, areaPoints: { type: Array, - } + }, + areaFloorId:{ + type: Number, + }, }, data() { return { @@ -45,11 +48,12 @@ export default { floorId: 1, railName: '', railType: 1,//1:多边形;0表示圆形 - mapType: 1,//点位信息有经纬度则为2,有xy则为1 + mapType: 2,//点位信息有经纬度则为2,有xy则为1 color: '1', polygon: { points: [] - } + }, + remark:'围栏' }, points: [], areaMarkerLayer: null, @@ -105,7 +109,7 @@ export default { console.log(feature.properties);//type:POLYGON;id:"";name:"";floorNo:"";floorId:"" console.log(feature.geometry);//feature.geometry.coordinates:[[],[]]面数组 this.coordinates.floorId = feature.properties.floorId; - this.coordinates.floorNo = feature.properties.floorNo == '室外' ? 'Floor1' : feature.properties.floorNo; + this.coordinates.floorNo = feature.properties.floorNo == '室外' ? 'Floor1' : 'Floor'+feature.properties.floorId; // this.coordinates.floorId = feature.properties.floorId; that.points = feature.geometry.coordinates[0]; }, @@ -155,18 +159,27 @@ export default { }, //展示已有围栏 areaMarkerLayers() { - debugger; let that = this; let areaPoints = []; that.areaPoints.forEach(item => { - console.log(item) - let point = new jsmap.JSPoint(Number(item.x), Number(item.y), 0); + //console.log(item) + let point = null; + if(item.x){ + point = new jsmap.JSPoint(Number(item.x), Number(item.y), 0); + }else{ + point = new jsmap.JSPoint(Number(item.longitude), Number(item.latitude), 0); + } areaPoints.push(point) }) + debugger; + console.log(that.areaId); + console.log(areaPoints); + console.log(that.areaFloorId); + console.log('00000'); var polygonMarker = new jsmap.JSPolygonMarker({ id: that.areaId,//id position: areaPoints,//坐标集合 - floorId: 1,//楼层id + floorId: that.areaFloorId,//楼层id color: 'rgba(0,0,255,.44)',//填充颜色 strokeColor: 'rgba(0,0,255,.44)',//边线颜色 depthTest: false,//是否开启深度检测 @@ -190,7 +203,7 @@ export default { that.isSaveing = true; that.coordinates.color = 'rgba(255,0,0,.4)'; points.forEach(item => { - let pixel = { x: parseFloat(item[0]), y: parseFloat(item[1]) }; + let pixel = {longitude:parseFloat(item[0]),latitude:parseFloat(item[1])}; pointXY.push(pixel); }); that.coordinates.polygon.points = pointXY; diff --git a/src/views/bigScreen/index.vue b/src/views/bigScreen/index.vue index ba90e100..89cc9f9d 100644 --- a/src/views/bigScreen/index.vue +++ b/src/views/bigScreen/index.vue @@ -51,7 +51,7 @@
查看 @@ -75,7 +75,7 @@
- +
@@ -268,8 +268,9 @@ - - + + +
@@ -412,11 +413,14 @@ 跟踪 - -
+
轨迹
+
+ + 取消轨迹 +
+