diff --git a/src/views/am/vchannel_view.vue b/src/views/am/vchannel_view.vue index cb051f0f..464fc15f 100644 --- a/src/views/am/vchannel_view.vue +++ b/src/views/am/vchannel_view.vue @@ -77,6 +77,7 @@ export default { }) this.form.area = this.channelArea; this.form.areas = this.channelAreas; + this.form.location = this.channelLocation; debugger; this.getArea(); }, @@ -119,6 +120,7 @@ export default { console.log(that.channelLocation) //如果位置已标记,显示上次标记的位置 if (that.channelLocation.x) { + window.map.flyToPosition(new jsmap.JSPoint(that.channelLocation.x, that.channelLocation.y,that.channelLocation.z), { duration: 1000 }); var pointMarker = new jsmap.JSPointMarker({ color: '#536dfe', //填充颜色 size: 2, //尺寸 @@ -151,6 +153,7 @@ export default { //画图结束的回调,返回所画的点的信息 callback: (feature) => { + that.form.location = []; console.log('add', feature); console.log(feature.properties);//type:POINT;id:"";name:"";floorNo:"";floorId:"" console.log(feature.geometry);//type:POINT;coordinates:[114.63028499839209,38.81195080123784,0] @@ -193,8 +196,13 @@ export default { //表单提交方法 submit() { let that = this; - let item = this.form.location; - that.form.location = { x: item[0], y: item[1], z: item[2] ,floorNo:item[3],floorId:item[4]}; + debugger;if(that.form.location.x){ + debugger; + }else{ + debugger; + let item = this.form.location; + that.form.location = { x: item[0], y: item[1], z: item[2] ,floorNo:item[3],floorId:item[4]}; + } that.$API.am.tdevice.labelLocation.req(that.channelId, that.form) .then(res => { that.isSaveing = false; diff --git a/src/views/bigScreen/index.vue b/src/views/bigScreen/index.vue index ba288c7d..ba90e100 100644 --- a/src/views/bigScreen/index.vue +++ b/src/views/bigScreen/index.vue @@ -374,7 +374,7 @@