diff --git a/src/views/modules/communityService/dqfwzx/index.vue b/src/views/modules/communityService/dqfwzx/index.vue index b26a50a3..0544cbf9 100644 --- a/src/views/modules/communityService/dqfwzx/index.vue +++ b/src/views/modules/communityService/dqfwzx/index.vue @@ -191,9 +191,7 @@ export default { }, async mounted() { await this.loadAgency(); - await this.getTableData(); - this.initMap(); - this.setMap(); + // await this.getTableData(); }, methods: { // 地图初始化函数,本例取名为init,开发者可根据实际情况定义 @@ -324,6 +322,7 @@ export default { }, async getTableData() { + const oldLen = this.tableData.length; const url = "/gov/org/icpartyservicecenter/partyservicecenterlist"; const { data, code, msg } = await requestPost(url, { orgId: this.agencyId, @@ -333,7 +332,12 @@ export default { console.log("列表请求成功!!!!!!!!!!!!!!"); this.tableData = data; - } else { + + if (data.length > 0 && oldLen == 0) { + await nextTick(100); + this.initMap(); + this.setMap(); + } } },