From 2fa0baea929c3a7b56e59c7c922236cb4464954a Mon Sep 17 00:00:00 2001 From: jiangyy Date: Thu, 28 Jul 2022 09:30:00 +0800 Subject: [PATCH] 111 --- .../communityService/fuwujilu/addForm.vue | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/src/views/modules/communityService/fuwujilu/addForm.vue b/src/views/modules/communityService/fuwujilu/addForm.vue index 49d37065..c019c48a 100644 --- a/src/views/modules/communityService/fuwujilu/addForm.vue +++ b/src/views/modules/communityService/fuwujilu/addForm.vue @@ -389,7 +389,7 @@ export default { disabledDate: startDisabledDate }, - showFeedback: true, + showFeedback: false, serviceOptions: [], serviceOptiondList: [], policyList: [], @@ -399,7 +399,9 @@ export default { policyId: '', showPersonList: false, - ruleList: [] + ruleList: [], + + firstInitMap: true, } }, @@ -416,10 +418,15 @@ export default { components: { personList }, async mounted () { this.startLoading() - this.initMap() + + this.getDictOptions(); this.getPolicyList(); - this.$refs.ref_form_feedback.resetFields(); + if (this.showFeedback) { + this.initMap() + this.$refs.ref_form_feedback.resetFields(); + } + if (this.formType === 'add') { this.$refs.ref_form.resetFields(); await this.loadScopeTree() @@ -537,6 +544,13 @@ export default { handleChangeFeedback (val) { this.showFeedback = val + if (this.firstInitMap) { + this.$nextTick(() => { + this.initMap() + }) + + } + }, @@ -797,6 +811,7 @@ export default { // 地图初始化函数,本例取名为init,开发者可根据实际情况定义 initMap () { + // 定义地图中心点坐标 var center = new window.TMap.LatLng(36.0722275, 120.38945519) // 定义map变量,调用 TMap.Map() 构造函数创建地图 @@ -823,6 +838,8 @@ export default { }) this.handleMoveCenter() this.convert() + + this.firstInitMap = false }, setMarker (lat, lng) {