From 13d7349ea1beda3ebd48d27092aed0f17cd1c4b1 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 25 Feb 2022 18:59:42 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/qfqk-android

---
 pages/grabOrders/grabOrdersZAXC/map.vue |  184 +++++++++++++++++++++++++++++++++------------
 1 files changed, 135 insertions(+), 49 deletions(-)

diff --git a/pages/grabOrders/grabOrdersZAXC/map.vue b/pages/grabOrders/grabOrdersZAXC/map.vue
index 1f705ad..278097d 100644
--- a/pages/grabOrders/grabOrdersZAXC/map.vue
+++ b/pages/grabOrders/grabOrdersZAXC/map.vue
@@ -1,11 +1,10 @@
 <template>
 	<view class="content">
-		<!-- <u-top-tips ref="uTips"></u-top-tips> -->
+		<u-top-tips ref="uTips"></u-top-tips>
 		<!-- <u-button type="info" @click="acc">测试</u-button> -->
 		<!-- <web-view :src="urls" @message="message"></web-view> -->
-		<map :scale='18' id="myMap" style="width: 100%" :style="{height: mapHeight + 'px'}" :markers="markersCom"
-			:longitude="longitude" :latitude="latitude" :circles="circlesCom" :polyline="mypolylines"
-			show-location="true">
+		<map :scale='18' id="myMap" style="width: 100%" :style="{height: mapHeight + 'px'}" :markers="markers"
+			:longitude="longitude" :latitude="latitude" :circles="circles" :polyline="mypolylines" show-location="true">
 			<cover-view class="dingwBut" @click="mapControlsBack">
 				<cover-image src="./map/img/dingwei.png" @click="mapControlsBack">
 				</cover-image>
@@ -16,11 +15,11 @@
 			@touchmove="touchmove">
 			<view :class="['activeTip',activeTip?'isOpens':'notOpens'] " :style="{height:'30px'}"></view>
 			<view class="once-b">
-				任务详情
+				巡查详情
 			</view>
 			<view class="once">
 				<span class="once-left">
-					任务标题
+					巡查标题
 				</span>
 				<span class="once-right">
 					{{ourData.rname}}
@@ -28,7 +27,7 @@
 			</view>
 			<view class="once">
 				<span class="once-left">
-					任务内容
+					巡查内容
 				</span>
 				<span class="once-right">
 					{{ourData.content}}
@@ -44,10 +43,18 @@
 			</view>
 			<view class="once">
 				<span class="once-left">
-					任务地区
+					联系方式
 				</span>
 				<span class="once-right">
-					{{ourData.province}}&nbsp;-&nbsp;{{ourData.city}}&nbsp;-&nbsp;{{ourData.district}}
+					<span>{{ourData.phone}}</span>
+				</span>
+			</view>
+			<view class="once">
+				<span class="once-left">
+					集合点
+				</span>
+				<span class="once-right">
+					{{ourData.gathername}}
 				</span>
 			</view>
 			<view class="once">
@@ -122,8 +129,38 @@
 				mapHeight: 0,
 				latitude: 28.687205773173343,
 				longitude: 115.8995839881188,
-				circles: [], //圆
-				markers: [], //标记点
+				circles: [{
+					latitude: '',
+					longitude: '',
+					fillColor: "#D9E6EF", //填充颜色
+					color: "#A7B6CB", //描边的颜色
+					radius: 50, //半径
+					strokeWidth: 2, //描边的宽度
+				}, {
+					latitude: '',
+					longitude: '',
+					fillColor: "#D9E6EF", //填充颜色
+					color: "#A7B6CB", //描边的颜色
+					radius: 10, //半径
+					strokeWidth: 2, //描边的宽度
+				}], //圆
+				markers: [{
+					width: 40,
+					height: 40,
+					id: 1,
+					latitude: '',
+					longitude: '',
+					iconPath: 'http://223.82.109.183:2081/zhba/upload/20220225/f0aecffbaf0a2ce80f7938569da20de7.png',
+				}, {
+					width: 40,
+					height: 40,
+					id: 2,
+					latitude: '',
+					longitude: '',
+					iconPath: 'http://223.82.109.183:2081/zhba/upload/20220225/7b486f647a15e708aca662dbd496dcd3.png',
+				}], //标记点
+				jihecircles: [], //集合点
+				jihemarkers: [], //集合点
 				mypolylines: [{ //指定一系列坐标点,从数组第一项连线至最后一项
 						points: [],
 						color: "#FE0000", //线的颜色
@@ -164,6 +201,7 @@
 					iconPath: "/static/tabbar/addSelectedIcon.png",
 					clickable: true,
 				}], //地图控件
+				inThere: true,
 			}
 		},
 		methods: {
@@ -253,7 +291,7 @@
 								});
 								setTimeout(function() {
 									uni.redirectTo({
-										url: "/pages/grabOrders/grabOrders?in=true"
+										url: "/pages/grabOrders/grabOrdersZAXC/grabOrders?in=true"
 									})
 								}, 2200)
 							}
@@ -276,7 +314,7 @@
 						// }
 						this.bye = true;
 						uni.redirectTo({
-							url: '/pages/grabOrders/feedback?data=' + JSON.stringify(this.ourData) +
+							url: '/pages/grabOrders/grabOrdersZAXC/feedback?data=' + JSON.stringify(this.ourData) +
 								'&other="11111"'
 						});
 					} else if (that.ourData.butCT == "begin") {
@@ -323,9 +361,10 @@
 							serid: serid,
 							type: type,
 							// data: JSON.stringify(item),
+							goto: "grabOrdersZAXC",
 							that: that,
 							fn: () => {
-								that.getGrabOrders(that.current); //重获取数据
+								// that.getGrabOrders(that.current); //重获取数据
 								// setTimeout(() => {
 								// 	that.openOnce(item);
 								// }, 500)
@@ -440,27 +479,34 @@
 						that.longitude = res.longitude
 						// console.log(that.latitude)
 						// console.log(that.longitude)
-						that.map.moveToLocation({
-							latitude: res.latitude,
-							longitude: res.longitude
-						});
+						if (that.inThere) {
+							that.inThere = false;
+							that.map.moveToLocation({
+								latitude: res.latitude,
+								longitude: res.longitude
+							});
+						}
 						// that.mover(res.longitude, res.latitude); //移动
 						// that.$store.commit("setMsg",d)
 						//标记点
-						that.markers = [{
-							id: 1,
-							latitude: res.latitude,
-							longitude: res.longitude,
-							iconPath: './map/img/dinw/dinw1.png',
-						}]
-						that.circles = [{ //在地图上显示圆
-							latitude: res.latitude,
-							longitude: res.longitude,
-							fillColor: "#D9E6EF", //填充颜色
-							color: "#A7B6CB", //描边的颜色
-							radius: 10, //半径
-							strokeWidth: 2 //描边的宽度
-						}]
+						that.markers[1].latitude = res.latitude;
+						that.markers[1].longitude = res.longitude;
+						that.circles[1].latitude = res.latitude;
+						that.circles[1].longitude = res.longitude;
+						// that.markers = [{
+						// 	id: 1,
+						// 	latitude: res.latitude,
+						// 	longitude: res.longitude,
+						// 	iconPath: './map/img/dinw/dinw1.png',
+						// }]
+						// that.circles = [{ //在地图上显示圆
+						// 	latitude: res.latitude,
+						// 	longitude: res.longitude,
+						// 	fillColor: "#D9E6EF", //填充颜色
+						// 	color: "#A7B6CB", //描边的颜色
+						// 	radius: 10, //半径
+						// 	strokeWidth: 2 //描边的宽度
+						// }]
 						if (val != "notSet") {
 							let d = {
 								id: that.ourData.id,
@@ -555,12 +601,27 @@
 					return this.$store.state.isOnTaskValue;
 				}
 			},
-			circlesCom() {
-				return this.circles.slice(0);
-			},
-			markersCom() {
-				return this.markers.slice(0);
-			},
+			// circlesCom() {
+			// 	// let d = [...this.circles, ...this.jihecircles];
+			// 	let d = [{
+			// 		id: 1,
+			// 		latitude: +data.latlong[0],
+			// 		longitude: +data.latlong[1],
+			// 		iconPath: './map/img/dinw/dinw6.png',
+			// 	}, {
+			// 		id: 2,
+			// 		latitude: +data.latlong[0],
+			// 		longitude: +data.latlong[1],
+			// 		iconPath: './map/img/dinw/dinw6.png',
+			// 	}];
+
+			// 	return d;
+			// },
+			// markersCom() {
+			// 	let d = [...this.markers, ...this.jihemarkers];
+			// 	console.log(d, 6666)
+			// 	return d;
+			// },
 			// mypolylinesCom() {
 			// 	// console.log(this.mypolylines,"333333333333333333333")
 			// 	return this.mypolylines.slice(0);
@@ -595,8 +656,8 @@
 				deep: true
 			}
 		},
-		mounted() {},
-		onReady() {
+		// mounted() {},
+		mounted() {
 			let that = this;
 
 			this.types = uni.getSystemInfoSync();
@@ -720,6 +781,8 @@
 					myid: 111,
 					myName: 222,
 					url: "http://223.82.109.183:2081/zhba/upload/20220218/67f0c8bf3e7b5024c64133691f265072.ico",
+					gather: "28.699957,115.862118",
+					gathername: "江西省南昌市红谷滩区沙井街道凤凰中大道南昌市公安局"
 					// })
 				}
 			} else {
@@ -746,8 +809,31 @@
 			if (data.team) {
 				data["teams"] = data.team.split(",");
 			}
+			if (data.gather) {
+				data["latlong"] = data.gather.split(",");
+			}
 			that.ourData = data;
-
+			this.latitude = +data.latlong[0];
+			this.longitude = +data.latlong[1];
+			that.markers[0].latitude = data.latlong[0];
+			that.markers[0].longitude = data.latlong[1];
+			that.circles[0].latitude = data.latlong[0];
+			that.circles[0].longitude = data.latlong[1];
+			//集合标记点
+			// that.jihecircles = [{
+			// 	id: 444,
+			// 	latitude: +data.latlong[0],
+			// 	longitude: +data.latlong[1],
+			// 	iconPath: './map/img/dinw/dinw6.png',
+			// }]
+			// that.jihemarkers = [{ //在地图上显示圆
+			// 	latitude: +data.latlong[0],
+			// 	longitude: +data.latlong[1],
+			// 	fillColor: "#D9E6EF", //填充颜色
+			// 	color: "#A7B6CB", //描边的颜色
+			// 	radius: 20, //半径
+			// 	strokeWidth: 2 //描边的宽度
+			// }]
 
 			uni.getSystemInfo({ //初始化地图高度
 				success(res) {
@@ -906,14 +992,14 @@
 			let line = data.line.split("(")[1].split(")")[0].split(",");
 			// console.log(line[0].split(" ")[1])
 			// console.log(line[0].split(" ")[0])
-			this.latitude = line[0].split(" ")[1];
-			this.longitude = line[0].split(" ")[0];
-			this.map.moveToLocation({
-				// latitude: line[0].split(" ")[1],
-				// longitude: line[0].split(" ")[0]
-				latitude: 40.013305,
-				longitude: 118.685713
-			});
+			// this.latitude = line[0].split(" ")[1];
+			// this.longitude = line[0].split(" ")[0];
+			// this.map.moveToLocation({
+			// 	// latitude: line[0].split(" ")[1],
+			// 	// longitude: line[0].split(" ")[0]
+			// 	latitude: 40.013305,
+			// 	longitude: 118.685713
+			// });
 			let ourline = [];
 			for (let k in line) {
 				let ins = line[k].split(" ");

--
Gitblit v1.9.3