From 2cb95465e8103e518b5d9b51780eba0f083b3ade Mon Sep 17 00:00:00 2001 From: aixianling Date: Mon, 27 Dec 2021 10:07:15 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E7=82=B9=E5=9F=8B=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/AppBuilding/components/searchMap.vue | 18 ++---- .../AppGridManagement/components/detail.vue | 62 ++++++++++--------- src/main.js | 5 +- 3 files changed, 41 insertions(+), 44 deletions(-) diff --git a/src/apps/AppBuilding/components/searchMap.vue b/src/apps/AppBuilding/components/searchMap.vue index 2a801e3a..eaa7a3d7 100644 --- a/src/apps/AppBuilding/components/searchMap.vue +++ b/src/apps/AppBuilding/components/searchMap.vue @@ -26,8 +26,7 @@ 楼栋
列表
- +
- @@ -62,7 +61,7 @@ export default { polygons: [] } }, - computed: {...mapState(['user'])}, + computed: {...mapState(['user', 'config'])}, created() { this.$dict.load('girdType', 'girdLevel') this.areaId = this.user.areaId @@ -82,7 +81,7 @@ export default { arr.push(e.points.map(p => [p.lng, p.lat])) } }) - arr.length>0&&this.renderGridMap(arr) + arr.length > 0 && this.renderGridMap(arr) } }) }, @@ -94,33 +93,38 @@ export default { this.polygons.forEach(e => e.destroy()) this.polygons = [] } - let bounds = [] - paths.forEach((path, i) => { - let color = colors[i % colors.length] - let polygon = new TMap.MultiPolygon({ - map, styles: { - default: new TMap.PolygonStyle({ - showBorder: true, - borderColor: color, - borderWidth: 2, - color: this.$colorUtils.Hex2RGBA(color, 0.1), - borderDashArray: [10, 10] - }) - }, - geometries: [{paths: path.map(e => new TMap.LatLng(e[1], e[0]))}] + if (paths?.length > 0) { + let bounds = [] + paths.forEach((path, i) => { + let color = colors[i % colors.length] + let polygon = new TMap.MultiPolygon({ + map, styles: { + default: new TMap.PolygonStyle({ + showBorder: true, + borderColor: color, + borderWidth: 2, + color: this.$colorUtils.Hex2RGBA(color, 0.1), + borderDashArray: [10, 10] + }) + }, + geometries: [{paths: path.map(e => new TMap.LatLng(e[1], e[0]))}] + }) + this.polygons.push(polygon) + bounds.push(fitBounds(path.map(e => new TMap.LatLng(e[1], e[0])))) }) - this.polygons.push(polygon) - bounds.push(fitBounds(path.map(e => new TMap.LatLng(e[1], e[0])))) - }) - bounds = bounds.reduce((a, b) => { - return fitBounds([ - a.getNorthEast(), - a.getSouthWest(), - b.getNorthEast(), - b.getSouthWest(), - ]); - }); - map.fitBounds(bounds, {padding: 100}) + bounds = bounds.reduce((a, b) => { + return fitBounds([ + a.getNorthEast(), + a.getSouthWest(), + b.getNorthEast(), + b.getSouthWest(), + ]); + }); + map.fitBounds(bounds, {padding: 100}) + } else { + map.setCenter(this.config.latlng) + } + } else { if (count < 5) { setTimeout(() => { diff --git a/src/main.js b/src/main.js index 8b63de46..53c9857d 100644 --- a/src/main.js +++ b/src/main.js @@ -32,5 +32,8 @@ const app = new Vue({ store, ...App }); +store.dispatch("agentSign").then(config => { + store.commit("getConfig", {...config, latlng: [config.lat, config.lng]}) + app.$mount(); +}) -app.$mount(); From 0d42de9d8f6010e985324ccc61b78133c50bfaf5 Mon Sep 17 00:00:00 2001 From: aixianling Date: Mon, 27 Dec 2021 10:10:42 +0800 Subject: [PATCH 2/3] BUG 26057 --- src/apps/AppAskForm/Result.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/AppAskForm/Result.vue b/src/apps/AppAskForm/Result.vue index 185536cf..a8723795 100644 --- a/src/apps/AppAskForm/Result.vue +++ b/src/apps/AppAskForm/Result.vue @@ -73,7 +73,7 @@ export default { }) }, confirm() { - uni.navigateBack({}) + uni.navigateBack({delta:-2}) } }, onShow() { From 8661271f7cca310cae48a08afdcadc13d092a9bb Mon Sep 17 00:00:00 2001 From: aixianling Date: Mon, 27 Dec 2021 10:15:23 +0800 Subject: [PATCH 3/3] BUG 26059 --- src/apps/AppAskForm/Result.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/apps/AppAskForm/Result.vue b/src/apps/AppAskForm/Result.vue index a8723795..bd726760 100644 --- a/src/apps/AppAskForm/Result.vue +++ b/src/apps/AppAskForm/Result.vue @@ -35,7 +35,8 @@ export default { computed: { params() { - return this.$route.query || {} + let {linkUrl} = this.$route.query + return {...this.$route.query, linkUrl: decodeURIComponent(linkUrl)} || {} } }, mounted() { @@ -73,7 +74,7 @@ export default { }) }, confirm() { - uni.navigateBack({delta:-2}) + uni.navigateBack({delta: -2}) } }, onShow() {