|
@@ -153,7 +153,7 @@
|
|
|
<div class="style"></div>
|
|
|
<!-- <input type="submit" class="submitBtn" value="提交" />
|
|
|
<button id="clear">取消</button> -->
|
|
|
- <div id="clear" @click="getImageTransform">获取信息</div>
|
|
|
+ <!-- <div id="clear" @click="getImageTransform">获取信息</div> -->
|
|
|
<div id="clear" @click="clearMap">取消</div>
|
|
|
<div class="submitBtn" @click="commit()">
|
|
|
提交
|
|
@@ -163,7 +163,7 @@
|
|
|
</div>
|
|
|
<div class="rightBox">
|
|
|
<div class="map-layer">
|
|
|
- <div id="map" class="map"></div>
|
|
|
+ <div id="map" class="map"></div>
|
|
|
<image-tranform :map-ol="map" v-if="map" ref="imageTranform" />
|
|
|
</div>
|
|
|
</div>
|
|
@@ -248,7 +248,8 @@
|
|
|
methods: {
|
|
|
getImageTransform() {
|
|
|
// 地图数据上传 如果用户没有选择数据直接返回true 如果有数据要上传返回promise
|
|
|
- this.$refs.imageTranform.uploadData()
|
|
|
+ console.log(this.$refs.imageTranform)
|
|
|
+ return this.$refs.imageTranform.uploadData()
|
|
|
},
|
|
|
initMap(divid) {
|
|
|
this.pointLayerArray = [];
|
|
@@ -354,9 +355,9 @@
|
|
|
},
|
|
|
|
|
|
commit() {
|
|
|
-
|
|
|
this.handleData()
|
|
|
- axios.post('/indoor/' + this.sceneNum + '/api/controlPoint/save', {
|
|
|
+ Promise.all([
|
|
|
+ axios.post('/indoor/' + this.sceneNum + '/api/controlPoint/save', {
|
|
|
ageControlLocation1: this.ageControlLocation1,
|
|
|
ageControlLocation2: this.ageControlLocation2,
|
|
|
gpsControlCoordinate1: this.gpsControlCoordinate1,
|
|
@@ -364,12 +365,18 @@
|
|
|
sceneNum: this.sceneNum,
|
|
|
// id: 1
|
|
|
})
|
|
|
- .then(function(response) {
|
|
|
- alert('成功')
|
|
|
- })
|
|
|
.catch(function(error) {
|
|
|
- alert('失败')
|
|
|
- });
|
|
|
+ alert('数据集位置上传失败')
|
|
|
+ }),
|
|
|
+
|
|
|
+ this.getImageTransform()
|
|
|
+ .catch(_ => {
|
|
|
+ alert('地图数据上传失败')
|
|
|
+ })
|
|
|
+ ]).then(() => {
|
|
|
+ alert('成功')
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
|
|
|
|