Browse Source

前端gjy

gjy 3 years ago
parent
commit
c46402e366

+ 47 - 13
pages/grain_pulse/distribution/distribution.nvue

@@ -31,15 +31,18 @@
 				<scroll-view :scroll-top="scrollTop" :scroll-y="isscroll" @scrolltoupper="upper" @scrolltolower="lower"
 					@scroll="scroll" :class="{'active':isActive}" class="scroll-style">
 					<view class="bottom-list-item" v-for="(item,index) in datalist" :key="index">
-						<img class="left-img" :src="item.attachmentAddress" alt="">
-						<view class="middle">
-							<text class="title Medium">{{item.title}}</text>
-							<text
+						<view class='left'>
+							<img class="left-img" :src="item.attachmentAddress" alt="">
+							<view class="middle">
+								<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>
 						<view class="right">
-							<img class="right-img" src="/static/location.png" alt="">
+							<img class="right-img" src="/static/img/dizhi.png" alt="">
 							<text class="right-bottom Regular">{{metreList[index]}}</text>
 						</view>
 					</view>
@@ -72,10 +75,11 @@
 					longitude: 116.39747,
 				},
 				showType: false,
+				mainBusinessType:'',
 				enterpriseList: [],
 				// typeStr: '全部类型',
 				index: 0,
-				typeList: ['全部类型', '粮仓', '加工厂'],
+				typeList: ['全部类型', '粮仓', '加工厂','烘干塔','饲料厂','养殖场','粮贸','期货'],
 				title: 'map',
 				covers: [{
 					id: 0,
@@ -91,8 +95,8 @@
 		onLoad(e) {
 			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.nowLocation.latitude = this.position.location.split(',')[1]
+				// this.nowLocation.longitude = this.position.location.split(',')[0]
 				//获取列表数据
 			}
 			this.getList()
@@ -108,8 +112,11 @@
 				getApp().nvueRequst('get', '/settledCompanyInfo/selectSettledCompanyInfo', {
 					pageSize: 10000,
 					currentPage: 1,
-					detailedAddress:detailedAddress
+					detailedAddress:detailedAddress,
+					mainBusinessType:this.mainBusinessType
 				}).then(res => {
+					let newmarker =[];
+					var id=1;
 						console.log('res',res)
 					if (res.data.code == 200) {debugger
 					
@@ -119,10 +126,22 @@
 						for(let i = 0;i<this.datalist.length;i++){
 							let lat2 = this.datalist[i].latitude
 							let lng2 = this.datalist[i].longitude
+							
+									
+									let maker= {
+										id: id++,
+										latitude: this.datalist[i].latitude,
+										longitude:this.datalist[i].longitude,
+										iconPath: '../../../static/img/weizhi@2x.png',
+									}
+									newmarker.push(maker)
+									
 							console.log("lat1,lng1,lat2,lng2",lat1,lng1,lat2,lng2)
 							let _metre = getApp().getDistance(lat1,lng1,lat2,lng2)
 							this.metreList.push(_metre)
 						}
+						// this.covers = newmarker
+						console.log(this.covers)
 					}
 				})
 			},
@@ -141,8 +160,15 @@
 				this.old.scrollTop = e.detail.scrollTop
 			},
 			bindPickerChange: function(e) {
-				console.log('picker发送选择改变,携带值为', e.target)
+				console.log('picker发送选择改变,携带值为', e.detail)
+				
+				if(e.detail.value=='全部类型'){
+					this.mainBusinessType=''
+				}else{
+					this.mainBusinessType=this.typeList[this.index]
+				}
 				this.index = e.detail.value
+				this.getList()
 			},
 			confirm() {
 				console.log('确定')
@@ -326,12 +352,20 @@
 		margin-top: 20rpx;
 		border-bottom: 1px solid #EEEEEE;
 	}
-
-	.left {}
+	.line{
+		border-right:1px solid #EEEEEE;
+		height:80rpx;
+	}
+	.left {
+		flex-direction: row;
+		flex:2;
+	}
 
 	.left-img {
 		width: 102rpx;
 		height: 106rpx;
+		margin-right:20rpx;
+		border-radius:20rpx;
 	}
 
 	.localtion {
@@ -348,13 +382,13 @@
 	.right-img {
 		width: 21rpx;
 		height: 26rpx;
-		background: #AFB3BF;
 	}
 
 	.right {
 		flex-direction: column;
 		justify-content: center;
 		align-items: center;
+		flex:1;
 	}
 
 	.middle {

+ 1 - 2
pages/grain_pulse/distribution/distribution.vue

@@ -39,7 +39,7 @@
 						</view>
 						<text class="line"></text>
 						<view class="right">
-							<img class="right-img" src="/static/location.png" alt="">
+							<img class="right-img" src="/static/img/dizhi.png" alt="">
 							<text class="right-bottom Regular">{{metreList[index]}}</text>
 						</view>
 					</view>
@@ -346,7 +346,6 @@
 	.right-img {
 		width: 21rpx;
 		height: 26rpx;
-		background: #AFB3BF;
 	}
 
 	.right {

+ 12 - 3
pages/grain_pulse/localtion/localtion.nvue

@@ -9,7 +9,10 @@
 			<text class="title">{{dataList.title}}</text>
 			<text class="bottom-content">{{dataList.content}}</text>
 			<view class="bottom-list-item">
-				<text class="bottom-list-item-left">{{dataList.localtion}}</text>
+				<view class='bottom-list-item'>
+				<img class='right-img' src="/static/img/dizhi.png" alt="">
+				<text class="bottom-list-item-left">{{dataList.localtion}}</text>	
+				</view>
 					<text class="metre">{{dataList.metre}}</text>
 			</view>
 		</view>
@@ -47,7 +50,7 @@
 						id: id++,
 						latitude: data.latitude,
 						longitude:data.longitude,
-						iconPath: '../../../static/img/location.png',
+						iconPath: '../../../static/img/weizhi@2x.png',
 					}
 					newmarker.push(maker)
 					this.covers = newmarker
@@ -77,7 +80,7 @@
 		padding: 20rpx;
 	}
 	.map {
-	 height: 1350rpx;
+	 height: 2000rpx;
 	}
 
 	.bottom{
@@ -99,6 +102,12 @@
 	.bottom-list-item-left{
 		font-size: 24rpx;
 	}
+	.right-img {
+		width: 21rpx;
+		height: 26rpx;
+		margin-left:-20rpx;
+		margin-right:10rpx;
+	}
 	.metre{
 		font-size: 24rpx;
 	}

BIN
static/img/dizhi.png


BIN
static/img/dizhi@2x.png


BIN
static/img/dizhi@3x.png


BIN
static/img/weizhi.png


BIN
static/img/weizhi@2x.png


BIN
static/img/weizhi@3x.png