From ae18bbe9d231a986dbf3d3e0a162f2760720107f Mon Sep 17 00:00:00 2001 From: xyq <392009588@qq.com> Date: Fri, 22 Sep 2023 14:28:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=85=E5=9F=BA=E5=9C=B0=E8=B0=83=E6=9F=A5?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/homesteadSurvey/add.vue | 11 +++++++---- src/views/homesteadSurvey/fsssAdd.vue | 13 ++++++++----- src/views/homesteadSurvey/nhDetails.vue | 4 ++-- src/views/homesteadSurvey/nhcyList.vue | 8 ++++++++ src/views/homesteadSurvey/wcnhList.vue | 2 +- src/views/homesteadSurvey/zrzAdd.vue | 17 ++++++++++++----- src/views/sunVillage_info/list_cbfsq.vue | 5 +++++ 7 files changed, 43 insertions(+), 17 deletions(-) diff --git a/src/views/homesteadSurvey/add.vue b/src/views/homesteadSurvey/add.vue index 22f58a05..419f4f26 100644 --- a/src/views/homesteadSurvey/add.vue +++ b/src/views/homesteadSurvey/add.vue @@ -852,10 +852,13 @@ export default { if(this.form.id == null){ let surveyItem = JSON.parse(localStorage.getItem("surveyItem")); - this.$set(this.form, 'theGeomJson', JSON.parse( this.form.theGeomJson)); - if(this.form.theGeomJson.hasOwnProperty('coordinates')) // 从后台获取的 - this.$set(this.form, 'theGeomJson',this.form.theGeomJson.coordinates); - this.$set(this.form, 'theGeomJson', JSON.stringify( this.form.theGeomJson)); + if(this.form.theGeomJson instanceof Array){ + this.$set(this.form, 'theGeomJson', JSON.stringify( this.form.theGeomJson)); + }else if(typeof this.form.theGeomJson === 'string'){ + let theGeometry = JSON.parse( this.form.theGeomJson); + if(theGeometry.hasOwnProperty('coordinates')) // 从后台获取的 + this.$set(this.form, 'theGeomJson', JSON.stringify(theGeometry.coordinates)); + } this.$set(this.form, 'surveyId', surveyItem.id) addZjdzd(this.form).then(response => { let _this =this; diff --git a/src/views/homesteadSurvey/fsssAdd.vue b/src/views/homesteadSurvey/fsssAdd.vue index b768c4f9..daf1039c 100644 --- a/src/views/homesteadSurvey/fsssAdd.vue +++ b/src/views/homesteadSurvey/fsssAdd.vue @@ -44,7 +44,7 @@ - +

附属设施信息

diff --git a/src/views/homesteadSurvey/zrzAdd.vue b/src/views/homesteadSurvey/zrzAdd.vue index c090134f..9213441b 100644 --- a/src/views/homesteadSurvey/zrzAdd.vue +++ b/src/views/homesteadSurvey/zrzAdd.vue @@ -270,10 +270,17 @@ export default { submitzjd(){ this.$refs.form.validate().then(() => { if(this.form.id == null){ - this.$set(this.form, 'theGeomJson', JSON.parse( this.form.theGeomJson)); - if(this.form.theGeomJson.hasOwnProperty('coordinates')) // 从后台获取的 - this.$set(this.form, 'theGeomJson',this.form.theGeomJson.coordinates); - this.$set(this.form, 'theGeomJson', JSON.stringify( this.form.theGeomJson)); + // this.$set(this.form, 'theGeomJson', JSON.parse( this.form.theGeomJson)); + // if(this.form.theGeomJson.hasOwnProperty('coordinates')) // 从后台获取的 + // this.$set(this.form, 'theGeomJson',this.form.theGeomJson.coordinates); + // this.$set(this.form, 'theGeomJson', JSON.stringify( this.form.theGeomJson)); + if(this.form.theGeomJson instanceof Array){ + this.$set(this.form, 'theGeomJson', JSON.stringify( this.form.theGeomJson)); + }else if(typeof this.form.theGeomJson === 'string'){ + let theGeometry = JSON.parse( this.form.theGeomJson); + if(theGeometry.hasOwnProperty('coordinates')) // 从后台获取的 + this.$set(this.form, 'theGeomJson', JSON.stringify(theGeometry.coordinates)); + } addZrz(this.form).then(response => { let _this =this this.$toast({ @@ -332,7 +339,7 @@ export default { onMapDrawFinished(data) { console.info(data); this.drawInsert = data; - this.form.theGeomJson = JSON.stringify(this.drawInsert); + this.form.theGeomJson = this.drawInsert; }, // 当申请地图被重置时 onMapDrawReseted() { diff --git a/src/views/sunVillage_info/list_cbfsq.vue b/src/views/sunVillage_info/list_cbfsq.vue index 111ceb66..f77913d4 100644 --- a/src/views/sunVillage_info/list_cbfsq.vue +++ b/src/views/sunVillage_info/list_cbfsq.vue @@ -93,6 +93,11 @@ 授权完成 --> +
+ + 授权 + +