|
@@ -2,7 +2,7 @@
|
|
<view class="container">
|
|
<view class="container">
|
|
<view class="header">
|
|
<view class="header">
|
|
<view class="now-location">
|
|
<view class="now-location">
|
|
- <u-icon name="map" size="36" class="icon"></u-icon>
|
|
|
|
|
|
+ <!-- <u-icon name="map" size="36" class="icon"></u-icon> -->
|
|
<text class="text Medium title">{{position.name}}</text>
|
|
<text class="text Medium title">{{position.name}}</text>
|
|
</view>
|
|
</view>
|
|
<view class="selectType">
|
|
<view class="selectType">
|
|
@@ -25,131 +25,25 @@
|
|
附近暂无相关企业
|
|
附近暂无相关企业
|
|
</view>
|
|
</view>
|
|
<view class="warp">
|
|
<view class="warp">
|
|
- <view class="line-style" @click="lineClick">
|
|
|
|
|
|
+ <view class="line-style" @click="lineClick">
|
|
<text class="top-line"></text>
|
|
<text class="top-line"></text>
|
|
</view>
|
|
</view>
|
|
<scroll-view :scroll-top="scrollTop" :scroll-y="isscroll" @scrolltoupper="upper" @scrolltolower="lower"
|
|
<scroll-view :scroll-top="scrollTop" :scroll-y="isscroll" @scrolltoupper="upper" @scrolltolower="lower"
|
|
@scroll="scroll" :class="{'active':isActive}" class="scroll-style">
|
|
@scroll="scroll" :class="{'active':isActive}" class="scroll-style">
|
|
- <view class="bottom-list-item">
|
|
|
|
- <img class="left-img" src="/static/location.png" alt="">
|
|
|
|
|
|
+ <view class="bottom-list-item" v-for="(item,index) in datalist" :key="index">
|
|
|
|
+ <img class="left-img" :src="item.attachmentAddress" alt="">
|
|
<view class="middle">
|
|
<view class="middle">
|
|
- <text class="title Medium">中天昊元粮库中天昊元粮库</text>
|
|
|
|
- <text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
|
|
|
|
|
|
+ <text class="title Medium">{{item.title}}</text>
|
|
|
|
+ <text
|
|
|
|
+ class="localtion Regular">{{item.province}}{{item.city}}{{item.area}}{{item.detailedAddress}}</text>
|
|
</view>
|
|
</view>
|
|
<text class="line"></text>
|
|
<text class="line"></text>
|
|
<view class="right">
|
|
<view class="right">
|
|
<img class="right-img" src="/static/location.png" alt="">
|
|
<img class="right-img" src="/static/location.png" alt="">
|
|
- <text class="right-bottom Regular">500m</text>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="bottom-list-item">
|
|
|
|
- <img class="left-img" src="/static/location.png" alt="">
|
|
|
|
- <view class="middle">
|
|
|
|
- <text class="title Medium">中天昊元粮库中天昊元粮库</text>
|
|
|
|
- <text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
|
|
|
|
- </view>
|
|
|
|
- <text class="line"></text>
|
|
|
|
- <view class="right">
|
|
|
|
- <img class="right-img" src="/static/location.png" alt="">
|
|
|
|
- <text class="right-bottom Regular">500m</text>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="bottom-list-item">
|
|
|
|
- <img class="left-img" src="/static/location.png" alt="">
|
|
|
|
- <view class="middle">
|
|
|
|
- <text class="title Medium">中天昊元粮库中天昊元粮库</text>
|
|
|
|
- <text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
|
|
|
|
- </view>
|
|
|
|
- <text class="line"></text>
|
|
|
|
- <view class="right">
|
|
|
|
- <img class="right-img" src="/static/location.png" alt="">
|
|
|
|
- <text class="right-bottom Regular">500m</text>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="bottom-list-item">
|
|
|
|
- <img class="left-img" src="/static/location.png" alt="">
|
|
|
|
- <view class="middle">
|
|
|
|
- <text class="title Medium">中天昊元粮库中天昊元粮库</text>
|
|
|
|
- <text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
|
|
|
|
- </view>
|
|
|
|
- <text class="line"></text>
|
|
|
|
- <view class="right">
|
|
|
|
- <img class="right-img" src="/static/location.png" alt="">
|
|
|
|
- <text class="right-bottom Regular">500m</text>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="bottom-list-item">
|
|
|
|
- <img class="left-img" src="/static/location.png" alt="">
|
|
|
|
- <view class="middle">
|
|
|
|
- <text class="title Medium">中天昊元粮库中天昊元粮库</text>
|
|
|
|
- <text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
|
|
|
|
- </view>
|
|
|
|
- <text class="line"></text>
|
|
|
|
- <view class="right">
|
|
|
|
- <img class="right-img" src="/static/location.png" alt="">
|
|
|
|
- <text class="right-bottom Regular">500m</text>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="bottom-list-item">
|
|
|
|
- <img class="left-img" src="/static/location.png" alt="">
|
|
|
|
- <view class="middle">
|
|
|
|
- <text class="title Medium">中天昊元粮库中天昊元粮库</text>
|
|
|
|
- <text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
|
|
|
|
- </view>
|
|
|
|
- <text class="line"></text>
|
|
|
|
- <view class="right">
|
|
|
|
- <img class="right-img" src="/static/location.png" alt="">
|
|
|
|
- <text class="right-bottom Regular">500m</text>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="bottom-list-item">
|
|
|
|
- <img class="left-img" src="/static/location.png" alt="">
|
|
|
|
- <view class="middle">
|
|
|
|
- <text class="title Medium">中天昊元粮库中天昊元粮库</text>
|
|
|
|
- <text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
|
|
|
|
- </view>
|
|
|
|
- <text class="line"></text>
|
|
|
|
- <view class="right">
|
|
|
|
- <img class="right-img" src="/static/location.png" alt="">
|
|
|
|
- <text class="right-bottom Regular">500m</text>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="bottom-list-item">
|
|
|
|
- <img class="left-img" src="/static/location.png" alt="">
|
|
|
|
- <view class="middle">
|
|
|
|
- <text class="title Medium">中天昊元粮库中天昊元粮库</text>
|
|
|
|
- <text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
|
|
|
|
- </view>
|
|
|
|
- <text class="line"></text>
|
|
|
|
- <view class="right">
|
|
|
|
- <img class="right-img" src="/static/location.png" alt="">
|
|
|
|
- <text class="right-bottom Regular">500m</text>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="bottom-list-item">
|
|
|
|
- <img class="left-img" src="/static/location.png" alt="">
|
|
|
|
- <view class="middle">
|
|
|
|
- <text class="title Medium">中天昊元粮库中天昊元粮库</text>
|
|
|
|
- <text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
|
|
|
|
- </view>
|
|
|
|
- <text class="line"></text>
|
|
|
|
- <view class="right">
|
|
|
|
- <img class="right-img" src="/static/location.png" alt="">
|
|
|
|
- <text class="right-bottom Regular">500m</text>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="bottom-list-item">
|
|
|
|
- <img class="left-img" src="/static/location.png" alt="">
|
|
|
|
- <view class="middle">
|
|
|
|
- <text class="title Medium">中天昊元粮库中天昊元粮库</text>
|
|
|
|
- <text class="localtion Regular">辽宁省营口市鲅鱼圈区xx路108号</text>
|
|
|
|
- </view>
|
|
|
|
- <text class="line"></text>
|
|
|
|
- <view class="right">
|
|
|
|
- <img class="right-img" src="/static/location.png" alt="">
|
|
|
|
- <text class="right-bottom Regular">500m</text>
|
|
|
|
|
|
+ <text class="right-bottom Regular">{{metreList[index]}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+
|
|
</scroll-view>
|
|
</scroll-view>
|
|
|
|
|
|
</view>
|
|
</view>
|
|
@@ -160,6 +54,7 @@
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
// import amap from '@/js_sdk/js-amap/amap-wx.130.js'
|
|
// import amap from '@/js_sdk/js-amap/amap-wx.130.js'
|
|
|
|
+ import * as config from '@/config'
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -168,6 +63,8 @@
|
|
old: {
|
|
old: {
|
|
scrollTop: 0
|
|
scrollTop: 0
|
|
},
|
|
},
|
|
|
|
+ metreList: [],
|
|
|
|
+ datalist: [],
|
|
"isActive": false,
|
|
"isActive": false,
|
|
position: {},
|
|
position: {},
|
|
nowLocation: {
|
|
nowLocation: {
|
|
@@ -185,34 +82,52 @@
|
|
latitude: 39.9085,
|
|
latitude: 39.9085,
|
|
longitude: 116.39747,
|
|
longitude: 116.39747,
|
|
iconPath: '../../../static/img/location.png',
|
|
iconPath: '../../../static/img/location.png',
|
|
- }]
|
|
|
|
|
|
+ }],
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
|
|
|
|
},
|
|
},
|
|
onLoad(e) {
|
|
onLoad(e) {
|
|
- this.position = JSON.parse(e.position)
|
|
|
|
- console.log("地点",this.position)
|
|
|
|
- this.nowLocation.latitude = this.position.location.split(',')[1]
|
|
|
|
- this.nowLocation.longitude = this.position.location.split(',')[0]
|
|
|
|
- //获取标记点
|
|
|
|
- this.getMarkers()
|
|
|
|
|
|
+ if (Object.keys(e).length) {
|
|
|
|
+ this.position = JSON.parse(e.position)
|
|
|
|
+ this.nowLocation.latitude = this.position.location.split(',')[1]
|
|
|
|
+ this.nowLocation.longitude = this.position.location.split(',')[0]
|
|
|
|
+ //获取列表数据
|
|
|
|
+ }
|
|
|
|
+ this.getList()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- getMarkers(){
|
|
|
|
- //点击列表标记改变颜色,显示气泡提示
|
|
|
|
- // this.$api.doRequest('get', '/settledCompanyInfo/selectSettledCompanyInfo', {
|
|
|
|
- // pageSize: this.pageSize,
|
|
|
|
- // currentPage: this.currentPage,
|
|
|
|
- // }).then(res => {
|
|
|
|
- // if (res.data.code == 200) {
|
|
|
|
- // this.datalist = res.data.data.records
|
|
|
|
- // }
|
|
|
|
- // })
|
|
|
|
|
|
+ getList(val) {
|
|
|
|
+ this.metreList = []
|
|
|
|
+ let detailedAddress = ""
|
|
|
|
+ if (val) {
|
|
|
|
+ detailedAddress = this.position.name
|
|
|
|
+ }
|
|
|
|
+ console.log("-----------------------")
|
|
|
|
+ getApp().nvueRequst('get', '/settledCompanyInfo/selectSettledCompanyInfo', {
|
|
|
|
+ pageSize: 10000,
|
|
|
|
+ currentPage: 1,
|
|
|
|
+ detailedAddress:detailedAddress
|
|
|
|
+ }).then(res => {
|
|
|
|
+ console.log('res',res)
|
|
|
|
+ if (res.data.code == 200) {debugger
|
|
|
|
+
|
|
|
|
+ this.datalist = res.data.data.records
|
|
|
|
+ let lat1 = this.nowLocation.latitude
|
|
|
|
+ let lng1 = this.nowLocation.longitude
|
|
|
|
+ for(let i = 0;i<this.datalist.length;i++){
|
|
|
|
+ let lat2 = this.datalist[i].latitude
|
|
|
|
+ let lng2 = this.datalist[i].longitude
|
|
|
|
+ console.log("lat1,lng1,lat2,lng2",lat1,lng1,lat2,lng2)
|
|
|
|
+ let _metre = getApp().getDistance(lat1,lng1,lat2,lng2)
|
|
|
|
+ this.metreList.push(_metre)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
- lineClick(){
|
|
|
|
- this.isActive= !this.isActive
|
|
|
|
|
|
+ lineClick() {
|
|
|
|
+ this.isActive = !this.isActive
|
|
// this.isscroll = !this.isscroll
|
|
// this.isscroll = !this.isscroll
|
|
},
|
|
},
|
|
upper: function(e) {
|
|
upper: function(e) {
|
|
@@ -308,7 +223,7 @@
|
|
</script>
|
|
</script>
|
|
<style scoped>
|
|
<style scoped>
|
|
.active {
|
|
.active {
|
|
- height: 583rpx!important;
|
|
|
|
|
|
+ height: 583rpx !important;
|
|
}
|
|
}
|
|
|
|
|
|
.header {
|
|
.header {
|