From bdc730749709a486230137816d59a19baa0ac2a7 Mon Sep 17 00:00:00 2001 From: liuye Date: Thu, 10 Feb 2022 17:44:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AiTMap.vue | 59 ++++++++++++++++++--------- src/saas/AppBackUserList/UserInfo.vue | 8 +++- 2 files changed, 46 insertions(+), 21 deletions(-) diff --git a/src/components/AiTMap.vue b/src/components/AiTMap.vue index 2486313a..ed3ec44e 100644 --- a/src/components/AiTMap.vue +++ b/src/components/AiTMap.vue @@ -40,6 +40,7 @@ export default { } }, methods: { + ...mapActions(['wxInvoke']), injectLib(url, cb) { const script = document.createElement('script') script.type = 'text/javascript'; @@ -54,29 +55,49 @@ export default { var latLng = {} if(this.config.lat) { //通用版 latLng = this.config + this.mapLib = TMap + this.tmap = new TMap.Map(this.$refs.tmap, { + zoom: 11, + center: new TMap.LatLng(latLng.lat, latLng.lng), + ...this.ops + }) + this.$emit('loaded') + this.$emit('update:lib', TMap) + this.$emit('update:map', this.tmap) + this.areaId && this.getMapArea() }else { //上架版 - wx.getLocation({ - type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02' - success: (res) => { - console.log(res) - latLng = { - lat: res.latitude, - lng: res.longitude - } + + this.wxInvoke(['getLocation', { + }, (res) => { + latLng = { + lat: res.latitude, + lng: res.longitude } - }); + this.mapLib = TMap + this.tmap = new TMap.Map(this.$refs.tmap, { + zoom: 11, + center: new TMap.LatLng(latLng.lat, latLng.lng), + ...this.ops + }) + this.$emit('loaded') + this.$emit('update:lib', TMap) + this.$emit('update:map', this.tmap) + this.areaId && this.getMapArea() + }]) + + // wx.getLocation({ + // type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02' + // success: (res) => { + // console.log(res) + // latLng = { + // lat: res.latitude, + // lng: res.longitude + // } + // } + // }); } - this.mapLib = TMap - this.tmap = new TMap.Map(this.$refs.tmap, { - zoom: 11, - center: new TMap.LatLng(latLng.lat, latLng.lng), - ...this.ops - }) - this.$emit('loaded') - this.$emit('update:lib', TMap) - this.$emit('update:map', this.tmap) - this.areaId && this.getMapArea() + }, fitBounds(latLngList, count = 0) { // 由多边形顶点坐标数组计算能完整呈现该多边形的最小矩形范围 diff --git a/src/saas/AppBackUserList/UserInfo.vue b/src/saas/AppBackUserList/UserInfo.vue index 54345f26..584e4ba1 100644 --- a/src/saas/AppBackUserList/UserInfo.vue +++ b/src/saas/AppBackUserList/UserInfo.vue @@ -108,13 +108,17 @@

{{item.content}}

{{item.createTime}} - {{item.createUserName}} + + 网格员: +
异常解除人
-
{{info.releaseName}}
+
+ +
异常解除时间