|
@@ -167,8 +167,8 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
|
|
|
|
- <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
|
|
|
|
|
|
+ <script src="./js/vue.js"></script>
|
|
|
|
+ <script src="./js/axios.min.js"></script>
|
|
<script type="text/javascript">
|
|
<script type="text/javascript">
|
|
//输入经纬度就可以定位
|
|
//输入经纬度就可以定位
|
|
</script>
|
|
</script>
|
|
@@ -199,97 +199,14 @@
|
|
ageControlLocation2: [],
|
|
ageControlLocation2: [],
|
|
gpsControlCoordinate1: [],
|
|
gpsControlCoordinate1: [],
|
|
gpsControlCoordinate2: [],
|
|
gpsControlCoordinate2: [],
|
|
|
|
+ sceneNum:'',
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
|
|
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- // document.getElementById("location1").addEventListener("click", location1);
|
|
|
|
- // document.getElementById("location2").addEventListener("click", location2);
|
|
|
|
- // // document.getElementById("clear").addEventListener("click", clearMap);
|
|
|
|
-
|
|
|
|
- // function location1() {
|
|
|
|
- // let alon = document.getElementById("alon").value;
|
|
|
|
- // let alat = document.getElementById("alat").value;
|
|
|
|
- // addPoint(+alon, +alat, "锚点1")
|
|
|
|
- // }
|
|
|
|
-
|
|
|
|
- // function location2() {
|
|
|
|
- // let blon = document.getElementById("blon").value;
|
|
|
|
- // let blat = document.getElementById("blat").value;
|
|
|
|
- // addPoint(+blon, +blat, "锚点2")
|
|
|
|
- // }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- // let pointLayerArray = [];
|
|
|
|
- // let map = initMap('map');
|
|
|
|
-
|
|
|
|
- // function initMap(divid) {
|
|
|
|
- // let gaodeMapLayer = new ol.layer.Tile({
|
|
|
|
- // source: new ol.source.XYZ({
|
|
|
|
- // url: 'http://wprd03.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}' //高德地图切片访问路径
|
|
|
|
- // })
|
|
|
|
- // });
|
|
|
|
-
|
|
|
|
- // return new ol.Map({
|
|
|
|
- // layers: [gaodeMapLayer],
|
|
|
|
- // target: divid,
|
|
|
|
- // view: new ol.View({
|
|
|
|
- // center: ol.proj.fromLonLat([113.59569403794666,
|
|
|
|
- // 22.36656052911783
|
|
|
|
- // ]), //最初定位的位置
|
|
|
|
- // zoom: 4 //地图层级
|
|
|
|
- // })
|
|
|
|
- // });
|
|
|
|
-
|
|
|
|
- // }
|
|
|
|
-
|
|
|
|
- // function addPoint(lon, lat, text) {
|
|
|
|
-
|
|
|
|
- // let vector = new ol.source.Vector();
|
|
|
|
- // let vLayer = new ol.layer.Vector({
|
|
|
|
- // source: vector
|
|
|
|
- // })
|
|
|
|
- // vLayer.type = "con_point";
|
|
|
|
- // map.addLayer(vLayer)
|
|
|
|
- // pointLayerArray.push(vLayer);
|
|
|
|
- // let labelCoords = ol.proj.transform([lon, lat], "EPSG:4326", "EPSG:3857");
|
|
|
|
- // let feature = new ol.Feature({
|
|
|
|
- // geometry: new ol.geom.Point(labelCoords)
|
|
|
|
- // });
|
|
|
|
- // vector.addFeature(feature);
|
|
|
|
- // vLayer.setStyle(new ol.style.Style({
|
|
|
|
- // image: new ol.style.Circle({ //点样式
|
|
|
|
- // radius: 7,
|
|
|
|
- // fill: new ol.style.Fill({
|
|
|
|
- // color: '#00c033'
|
|
|
|
- // })
|
|
|
|
- // }),
|
|
|
|
- // text: new ol.style.Text({
|
|
|
|
- // text: text,
|
|
|
|
- // font: '15px sans-serif',
|
|
|
|
- // offsetX: 5,
|
|
|
|
- // offsetY: -10,
|
|
|
|
- // fill: new ol.style.Fill({
|
|
|
|
- // color: "#b9391f"
|
|
|
|
- // }),
|
|
|
|
- // stroke: new ol.style.Stroke({
|
|
|
|
- // color: "#b9391f"
|
|
|
|
- // })
|
|
|
|
- // })
|
|
|
|
- // }))
|
|
|
|
- // map.getView().setCenter(labelCoords)
|
|
|
|
- // }
|
|
|
|
-
|
|
|
|
- // function clearMap() {
|
|
|
|
- // pointLayerArray.map(each => {
|
|
|
|
- // if (each.type == "con_point") {
|
|
|
|
- // map.removeLayer(each)
|
|
|
|
- // }
|
|
|
|
- // });
|
|
|
|
- // pointLayerArray = [];
|
|
|
|
- // }
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -319,7 +236,6 @@
|
|
},
|
|
},
|
|
clearMap() {
|
|
clearMap() {
|
|
this.pointLayerArray.map(each => {
|
|
this.pointLayerArray.map(each => {
|
|
- alert(1)
|
|
|
|
if (each.type == "con_point") {
|
|
if (each.type == "con_point") {
|
|
this.map.removeLayer(each)
|
|
this.map.removeLayer(each)
|
|
}
|
|
}
|
|
@@ -392,7 +308,9 @@
|
|
this.gpsControlCoordinate2.push(this.blat - 0)
|
|
this.gpsControlCoordinate2.push(this.blat - 0)
|
|
this.gpsControlCoordinate2.push(this.balt - 0)
|
|
this.gpsControlCoordinate2.push(this.balt - 0)
|
|
|
|
|
|
|
|
+ this.sceneNum = window.location.pathname.split('/')[2]
|
|
},
|
|
},
|
|
|
|
+
|
|
commit() {
|
|
commit() {
|
|
|
|
|
|
this.handleData()
|
|
this.handleData()
|
|
@@ -401,7 +319,8 @@
|
|
ageControlLocation2: this.ageControlLocation2,
|
|
ageControlLocation2: this.ageControlLocation2,
|
|
gpsControlCoordinate1: this.gpsControlCoordinate1,
|
|
gpsControlCoordinate1: this.gpsControlCoordinate1,
|
|
gpsControlCoordinate2: this.gpsControlCoordinate2,
|
|
gpsControlCoordinate2: this.gpsControlCoordinate2,
|
|
- id: 1
|
|
|
|
|
|
+ sceneNum:this.sceneNum,
|
|
|
|
+ // id: 1
|
|
})
|
|
})
|
|
.then(function (response) {
|
|
.then(function (response) {
|
|
alert('成功')
|
|
alert('成功')
|