From f4555eaeae3c5f154d4f407e94b72743a499884a Mon Sep 17 00:00:00 2001 From: liuye Date: Thu, 11 May 2023 14:23:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E4=B8=8A=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wuxi/AppHandSnapshot/AppHandSnapshot.vue | 3 + src/project/wuxi/AppHandSnapshot/Content.vue | 2 + src/project/wuxi/AppHandSnapshot/Detail.vue | 6 +- src/project/wuxi/AppHandSnapshot/Map.vue | 170 ++++++++++++++++-- .../AppHandSnapshot/components/img/search.png | Bin 0 -> 854 bytes 5 files changed, 168 insertions(+), 13 deletions(-) create mode 100644 src/project/wuxi/AppHandSnapshot/components/img/search.png diff --git a/src/project/wuxi/AppHandSnapshot/AppHandSnapshot.vue b/src/project/wuxi/AppHandSnapshot/AppHandSnapshot.vue index c7276aeb..84013bc5 100644 --- a/src/project/wuxi/AppHandSnapshot/AppHandSnapshot.vue +++ b/src/project/wuxi/AppHandSnapshot/AppHandSnapshot.vue @@ -79,6 +79,9 @@ export default { uni.$on('showTab', () => { this.isTab = true }) + uni.$on('getListInit', () => { + this.$nextTick(() => this.$refs['List'].getListInit()) + }) this.$nextTick(() => this.$refs['List'].getListInit()) }, diff --git a/src/project/wuxi/AppHandSnapshot/Content.vue b/src/project/wuxi/AppHandSnapshot/Content.vue index ec808b5a..fdba5ef6 100644 --- a/src/project/wuxi/AppHandSnapshot/Content.vue +++ b/src/project/wuxi/AppHandSnapshot/Content.vue @@ -97,6 +97,7 @@ export default { }, confirm() { + if(this.flag) return if (this.status == 1 && !this.forms.name) { return this.$u.toast('请选择转交对象') } @@ -106,6 +107,7 @@ export default { if (this.status != 1 && !this.forms.content) { return this.$u.toast('请输入意见') } + this.flag = true this.submit() }, submit() { //status 1转交 2拒绝受理 3我已办结 diff --git a/src/project/wuxi/AppHandSnapshot/Detail.vue b/src/project/wuxi/AppHandSnapshot/Detail.vue index 3b6696cb..763fff13 100644 --- a/src/project/wuxi/AppHandSnapshot/Detail.vue +++ b/src/project/wuxi/AppHandSnapshot/Detail.vue @@ -94,7 +94,7 @@
-
+
转交事件 @@ -142,7 +142,7 @@ export default { const list = this.data.processList.map(e => ({ ...e, avatar: getAvatar(e.girdMemberName), - statusLabel: this.$dict.getLabel('clapDoStatus', e.doStatus) + statusLabel: this.$dict.getLabel('residentReportDoStatus', e.doStatus) })) if (this.evaluation.id) { const {id, createUserName, score, createTime: doTime, content: doExplain} = this.evaluation @@ -159,7 +159,7 @@ export default { watch: {}, onLoad(o) { this.id = o.id - this.$dict.load('realityStatus', 'clapDoStatus', 'residentEventSource').then(() => { + this.$dict.load('clapEventStatus','residentEventSource', 'residentReportDoStatus').then(() => { this.getDetail() }) diff --git a/src/project/wuxi/AppHandSnapshot/Map.vue b/src/project/wuxi/AppHandSnapshot/Map.vue index dde1a78e..d73d4269 100644 --- a/src/project/wuxi/AppHandSnapshot/Map.vue +++ b/src/project/wuxi/AppHandSnapshot/Map.vue @@ -4,6 +4,21 @@ 当前
位置
--> + + +
+
+

{{ item.title }}

+

{{ item.address }}

+
+ +
+
@@ -25,7 +40,8 @@ export default { markerLayer: '', isFlag: false, latLng: {lat: '', lng: ''}, - address: '' + address: '', + addressList: [] } }, computed: {...mapState(['user'])}, @@ -54,16 +70,76 @@ export default { } }) }, - getLocale() { - uni.getLocation({ - type: 'wgs84', - geocode: true, - success: (res) => { - const lat = res.latitude; - const lng = res.longitude; - this.handleMapClick({latlng: {lat, lng}}) + onChange () { + if (this.timeout) { + clearTimeout(this.timeout) + } + this.timeout = setTimeout(() => { + this.currIndex = -1 + new this.lib.service.Suggestion({ + pageSize: 20 + }).getSuggestions({ + keyword: this.address + }).then(res => { + this.addressList = [] + if (res.data.length) { + this.addressList = res.data + } + }) + }, 500) + }, + getAddress () { + new this.lib.service.Search({ + pageSize: 20 + }).explore({ + center: this.latLng, + radius: 2000, + orderBy: '_distance' + }).then(res => { + this.addressList = [] + if (res.data.length) { + this.addressList = res.data + } + }) + }, + chooseAddress (index) { + this.address = this.addressList[index].address + this.latLng = {lat: this.addressList[index].location.lat, lng: this.addressList[index].location.lng} + this.addMarker(this.addressList[index].location) + }, + addMarker (position) { + if (this.marker) { + this.marker.setMap(null) + this.marker = null + } + this.marker = new this.lib.MultiMarker({ + id: 'marker-layer', + map: this.map, + styles: { + marker: new this.lib.MarkerStyle({ + width: 30, + height: 45, + anchor: { x: 10, y: 30 } + }), }, - }); + geometries: [{ + id: 'marker', + styleId: 'marker', + position: position, + properties: { + title: 'marker' + } + }] + }) + this.easeTo(position) + }, + + easeTo (position) { + this.map.easeTo({ + center: position, + zoom: 17 + }, + { duration: 500 }) }, handleMapClick(evt) { console.log(evt) @@ -164,5 +240,79 @@ uni-page-body { color: #FFF; } } + .address-search { + display: flex; + align-items: center; + height: 100px; + padding: 0 32px; + + .address-search__wrapper { + display: flex; + align-items: center; + width: 100%; + height: 72px; + padding: 0 32px; + background: #F6F7F9; + border-radius: 36px; + + image { + width: 48px; + height: 48px; + } + + input { + flex: 1; + font-size: 26px; + color: #333; + } + } + } + scroll-view { + height: 400px; + padding: 0 32px; + + .address-item { + display: flex; + justify-content: space-between; + align-items: center; + padding: 32px 0; + border-bottom: 1px solid #EEEEEE; + + &:last-child { + border: none; + } + + .left { + flex: 1; + margin-right: 20px; + } + + .right { + flex-shrink: 1; + width: 32px; + height: 32px; + border-radius: 50%; + border: 4px solid #CCCCCC; + transition: all ease 0.3s; + + &.active { + border: 10px solid #1365DD; + } + } + + h2 { + margin-bottom: 20px; + color: #222222; + font-weight: 600; + font-size: 34px; + } + + p { + line-height: 1.2; + color: #999999; + font-size: 28px; + } + } + } } diff --git a/src/project/wuxi/AppHandSnapshot/components/img/search.png b/src/project/wuxi/AppHandSnapshot/components/img/search.png new file mode 100644 index 0000000000000000000000000000000000000000..601a7b3ccd42de9f44bde576c5d48ab313326726 GIT binary patch literal 854 zcmV-c1F8IpP)Px&5J^NqRA@u(m`hI+Q547j=T0k_$il>xuyLWXa%*BDYT|_W|laQl;ybVTT$KVJRKs+u(jE)!=zl8;&3{WsjSEQ8F zAZqg!4D*T*qCab-Uiz|YGFS;9U$jQRd>=%@^~<1n5YOz>XkiVl%l7}RSZm*?au=9- z34DGt24)GOd%3he78JrafTR4ghTxY3kjbX?4?6`@C|YMEFa_Xfy+2qAA+86_gfD& z0Ud~so0%Xnl{31tUIh5l7|#IqQd!mT#a(R#aCWz{X%>`IPVZ~)2^Fo1BdSZRXMjm_ zZkU-K)R%XfA55n%sH$e$O%zLS-Nq*3y8}kgxQag?0G7p!R1JWT9W->iA(fvA)5;K| zP)h=#G+^kuiZjmu`J!d-qV4u1vPzvpw^E-~CUk8c&6JLpE4=9ZUe2ZU4i$gi0ZeNR zj23&6YGQxeaPPTQl?h#&@tJoAw92m)rw`V1hTf{;?>_=)D4}G6I`8yGtb``bh&OTM zm(j>?WcCUX>7#@V5XNCn6WS~@pQ@iC@N1<8*xksDMO&&bahcWe;#f z@Nc@)g@!A%z%9F6XtqvS0cpw*o;R}Xn5tJwyKETL0&wFUS{XtaV6!I_F7-+9X>fHK z*zzGj2_g`Hn-!JMDtYsDUlAa;h07*qoM6N<$f(vSTdjJ3c literal 0 HcmV?d00001