From ea1da83d85059795898ce4b9ec95f8709c649178 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Thu, 04 Nov 2021 15:11:16 +0800
Subject: [PATCH] +

---
 leafletMapOur/grabOrdersMap/js/vueMain.js |   84 +++-
 /dev/null                                 |  411 -------------------------
 pages/grabOrders/feedback.vue             |  131 ++-----
 leafletMapOur/grabOrdersMap/css/body.css  |    4 
 pages/grabOrders/grabOrders.vue           |  217 +++---------
 pages/grabOrders/inPage/page0.vue         |   16 
 pages/grabOrders/map.vue                  |    7 
 pages/grabOrders/inPage/page1.vue         |   14 
 components/seeImges/seeImges.vue          |   30 -
 leafletMapOur/grabOrdersMap/xcxmap.html   |    9 
 store/state.js                            |    4 
 11 files changed, 211 insertions(+), 716 deletions(-)

diff --git a/components/seeImges/seeImges.vue b/components/seeImges/seeImges.vue
index 59d2797..c41cd64 100644
--- a/components/seeImges/seeImges.vue
+++ b/components/seeImges/seeImges.vue
@@ -21,25 +21,21 @@
 <script>
 	export default {
 		props: ['imgs', 'videos', 'type'],
-		// props: [{
-		// 	imgs:{
-		// 		type: Array,
-		// 		default: []
-		// 	},
-		// 	videos:{
-		// 		type: Object,
-		// 		default: []
-		// 	},
-		// 	type:{
-		// 		type: String,
-		// 		default: null
-		// 	},
-		// }],
 		data() {
 			return {
-
+				// uesVideodata: []
 			}
 		},
+		// watch: {
+		// 	"videos"() {
+		// 		// console.log(this.videos)
+		// 		if (this.videos != []) {
+		// 			setTimeout(res=>{
+		// 				this.uesVideodata = this.videos;
+		// 			},500)
+		// 		} else []
+		// 	}
+		// },
 		methods: {
 			//图片删除
 			delelteImg(index) {
@@ -130,8 +126,8 @@
 		.videos {
 			display: inline-block;
 			padding-top: 0.5rem;
-			width: 4rem;
-			height: 4rem;
+			width: 4.2rem;
+			height: 4.2rem;
 			padding: 0 0.2rem 0 0.2rem;
 			margin: 0 0.2rem 0 0.2rem;
 			// border-right: 1px solid rgba($color: #000000, $alpha: 0.5);
diff --git a/leafletMapOur/grabOrdersMap/css/body.css b/leafletMapOur/grabOrdersMap/css/body.css
index 611fae4..ea5ef56 100644
--- a/leafletMapOur/grabOrdersMap/css/body.css
+++ b/leafletMapOur/grabOrdersMap/css/body.css
@@ -129,4 +129,8 @@
 	background-color: #fff;
 	border-bottom: 1px solid #e8e8e8;
 	/* margin-bottom: 10px; */
+}
+.customClass{
+	width: 250px;
+	height: 140px;
 }
\ No newline at end of file
diff --git a/leafletMapOur/grabOrdersMap/js/vueMain.js b/leafletMapOur/grabOrdersMap/js/vueMain.js
index e6c45fd..b180f1d 100644
--- a/leafletMapOur/grabOrdersMap/js/vueMain.js
+++ b/leafletMapOur/grabOrdersMap/js/vueMain.js
@@ -54,33 +54,65 @@
 	},
 	methods: {
 		openAPP(type) {
-			console.log(type)
+			// console.log(type)
+			let that = this;
 			if (type != 1) {
 				//反馈
 				uni.navigateTo({
 					url: '/pages/grabOrders/feedback?data=' + JSON.stringify(this.data)
 				});
 			} else {
+				this.$confirm('是否参与活动:' + this.data.rname + "?", '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'success',
+					center: true,
+					customClass: "customClass"
+				}).then(() => {
+					let url = "http://223.82.109.183:2082/api" + "/taskqd/Graborder",
+						dataAppend = that.data;
+					axios.post(url, dataAppend).then(res => {
+						// console.log(res);
+						if (res.data.msg == "抢单成功") {
+							that.data.type = 0;
+							that.$message({
+								message: res.data.msg,
+								type: 'success'
+							});
+							return;
+						}
+						that.$message({
+							message: res.data.msg,
+							type: 'warning'
+						});
+					})
+				}).catch(() => {
+					// this.$message({
+					// 	type: 'info',
+					// 	message: '已取消删除'
+					// });
+				});
+				// return;
 				//抢单
 				// console.log(this.data)
 				// let up = this.data.appenUrl == '/api' ? "http://192.168.0.107:85" : this.data.appenUrl;
-				let url = "http://223.82.109.183:2082/api" + "/taskqd/Graborder",
-					dataAppend = this.data;
-				axios.post(url, dataAppend).then(res => {
-					console.log(res);
-					if (res.data.msg == "抢单成功") {
-						this.data.type = 0;
-						this.$message({
-							message: res.data.msg,
-							type: 'success'
-						});
-						return;
-					}
-					this.$message({
-						message: res.data.msg,
-						type: 'warning'
-					});
-				})
+				// let url = "http://223.82.109.183:2082/api" + "/taskqd/Graborder",
+				// 	dataAppend = this.data;
+				// axios.post(url, dataAppend).then(res => {
+				// 	console.log(res);
+				// 	if (res.data.msg == "抢单成功") {
+				// 		this.data.type = 0;
+				// 		this.$message({
+				// 			message: res.data.msg,
+				// 			type: 'success'
+				// 		});
+				// 		return;
+				// 	}
+				// 	this.$message({
+				// 		message: res.data.msg,
+				// 		type: 'warning'
+				// 	});
+				// })
 			}
 		},
 		getDataList() {
@@ -89,21 +121,23 @@
 		},
 		beginCome() {
 			var data = {
-				city: "南昌市",
-				content: "按路线巡逻",
-				district: "青云谱区",
+				city: "无数据",
+				content: "无数据",
+				district: "无数据",
 				id: 5,
 				integral: "14",
 				jnum: 2,
 				line: "LINESTRING(115.88518439579809 28.67705200351289,115.89115548582284 28.677382855466767,115.89148633777671 28.675523782583074,115.88565704144649 28.675145666064356,115.88521590550799 28.67700473894805,115.88521590550799 28.67700473894805)",
-				num: 1,
-				province: "江西省",
+				num: 2,
+				province: "无数据",
 				raddress: "",
-				rname: "测试",
+				rname: "无数据",
 				rtype: "0",
 				serid: "1123598821738675201,",
-				time: "2021-11-17 00:00:00",
+				time: "无数据",
 				url: "http://223.82.109.183:2081/zhba/upload/20211102/07fe327a76a43fa8d3431c73febade22.jpg",
+				buttype: "0",
+				type:'1'
 			}
 			//url解码
 			this.data = this.getQueryVariable('data') || data;
diff --git a/leafletMapOur/grabOrdersMap/xcxmap.html b/leafletMapOur/grabOrdersMap/xcxmap.html
index bbe236e..100935f 100644
--- a/leafletMapOur/grabOrdersMap/xcxmap.html
+++ b/leafletMapOur/grabOrdersMap/xcxmap.html
@@ -136,7 +136,14 @@
 					</span>
 				</div>
 				<div class="once-c">
-					<el-button :type="data.type==1?'success':'primary'" @click="openAPP(data.type)">{{data.type==1?'我参与':'我反馈'}}</el-button>
+					<!-- <el-button :type="data.type==1?'success':'primary'" >{{data.type==1?'我参与':'我反馈'}}</el-button> -->
+					<!-- <el-button :type="data.num==data.jnum?'info':(data.type==1?'success':'primary')" @click="openAPP(data.type)" :disabled="data.num==data.jnum">{{data.num==data.jnum?"人数已满":(data.type==1?'我参与':'我反馈')}}</el-button> -->
+					<el-button
+						:type="data.buttype==1?(data.num==data.jnum||data.type==1?'info':'success'):'primary'"
+						@click="openAPP(data.buttype)"
+						:disabled="(data.num==data.jnum)&& data.buttype==1 ||data.type == 1">
+						{{data.buttype==1?(data.num==data.jnum?"人数已满":'我参与'):(data.type == 1?'完成反馈':'上传反馈')}}
+					</el-button>
 				</div>
 			</div>
 			<!-- </div>
diff --git a/pages/grabOrders/feedback copy.vue b/pages/grabOrders/feedback copy.vue
deleted file mode 100644
index 3f4ccf3..0000000
--- a/pages/grabOrders/feedback copy.vue
+++ /dev/null
@@ -1,411 +0,0 @@
-<template>
-	<view class="mapJQtijiao">
-		<!-- <view class="head">
-			<u-navbar :is-fixed="false" :border-bottom="false" :is-back="false" title=""
-				:background="{ background: '#0cd7e5' }">
-				<div>
-					处理结果
-				</div>
-			</u-navbar>
-		</view> -->
-		<view class="mapJQtijiaomain">
-			<view class="title" style="padding-top: 0.5rem;">请输入活动心得:</view>
-			<view class="f">
-				<view class="main" style="margin:0 1rem;">
-					<textarea rows="9" cols="27" placeholder="请输入活动心得。" v-model="longInputD"></textarea>
-				</view>
-			</view>
-			<view class="title" style="padding-top: 0.5rem;">请输入我的意见:</view>
-			<view class="f">
-				<view class="main" style="margin:0 1rem;">
-					<textarea rows="9" cols="27" placeholder="请输入我的意见。" v-model="longInputD1"></textarea>
-				</view>
-			</view>
-			<view class="title">照片上传:</view>
-			<view class="t">
-				<view class="main">
-					<image @tap="takePhoto" src="../../static/JQimg/xiangji.png" mode=""></image>
-				</view>
-				<view class="mains">
-					<seeImgs class="seeImgs" :imgs="imgs" :videos="[]" @del="delImg" :type="'imgs'"></seeImgs>
-				</view>
-			</view>
-			<view class="title">视频上传:</view>
-			<view class="s">
-				<view class="main">
-					<image @tap="takeVideo" src="../../xcxMapJQ/img/shiping.png" mode=""></image>
-				</view>
-				<view class="mains">
-					<seeImgs class="seeImgsVideo" :imgs="[]" :videos="videos" @del="delVideo" :type="'videos'">
-					</seeImgs>
-				</view>
-			</view>
-			<view class="butb">
-				<u-button class="custom-style" type="primary" @click="inits()">我反馈</u-button>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import seeImgs from '../../components/seeImges/seeImges.vue'
-	export default {
-		components: {
-			seeImgs
-		},
-		data() {
-			return {
-				datas: '',
-				longInputD: '',//心得
-				longInputD1: '',//意见
-				imgs: [],
-				videos: [],
-				data:{}
-			}
-		},
-		methods: {
-			onLoad: function(option) {
-				var b;
-				if (option.data == undefined) {
-					this.data = {
-						rname: '无数据',
-						content: '无数据',
-						district: '无数据',
-						place: '无数据',
-						time: '无数据',
-						num: "无数据",
-						ourNum: "无数据",
-						inNum: "无数据",
-						infor: "无数据"
-					}
-					return;
-				}
-				try {
-					b = JSON.parse(option.data);
-				} catch (e) {
-					//TODO handle the exception
-				}
-				// console.log(b);
-				this.data = b;
-			},
-			upData() {
-				console.log('开始上传');
-				var dataList = {
-					jid: this.datas.id,
-					sname: this.$store.state.puserName,
-					phone: this.$store.state.puserIphone,
-					snumber: this.$store.state.puserID,
-					result: this.longInputD,
-					status: 0,
-					tpaddress: '',
-					spaddress: ''
-				};
-				if (this.imgs.length > 0) {
-					var i = this.imgs;
-					for (var k in i) {
-						// console.log(i[k].src)
-						dataList.tpaddress += i[k].src + ','
-					}
-				}
-				if (this.videos.length > 0) {
-					var i = this.videos;
-					for (var k in i) {
-						// console.log(i[k].src)
-						dataList.spaddress += i[k].src + ','
-					}
-				}
-				// console.log(dataList)
-				wx.showLoading({
-					title: "提交中...",
-					mask: true
-				})
-				// console.log(dataList);
-				wx.request({
-					url: that.$store.state.piAPI + '/feedback/feedback/saves', //仅为示例,并非真实接口地址。
-					data: dataList,
-					method: 'POST',
-					header: {
-						"Content-Type": "application/x-www-form-urlencoded"
-					},
-					success: (res) => {
-						if (res.data.code == 200) {
-							wx.showToast({
-								title: '提交成功!',
-								duration: 1000
-							});
-							var time = setTimeout(() => {
-								clearTimeout(time);
-								time = null;
-								uni.redirectTo({
-									url: '/pages/alarm_list/alarm_list'
-								});
-							}, 1500)
-						}
-					}
-				});
-			},
-			takePhoto() {
-				var that = this;
-				wx.chooseImage({
-					count: 4, //可选择数量,默认9
-					sizeType: ['compressed', 'original'], //上传压缩图,原图
-					sourceType: ['album', 'camera'], //从相册选择或从使用相机
-					success: async (res) => {
-						for (var i = 0; i < res.tempFiles.length; i++) {
-							if (res.tempFiles[i].size > 10 * 1024 * 1000) { //上传图片大小限制
-								uni.showToast({
-									title: "照片大小不能10MB",
-									icon: "none"
-								})
-								return
-							}
-						}
-						var tempFilePath = res.tempFilePaths;
-						// try {
-						wx.showLoading({
-							title: "上传中...",
-							mask: true
-						})
-						var that = this;
-						// 循环调用uni.uploadFile ,因微信小程序只支持单文件上传
-						for (var i = 0; i < tempFilePath.length; i++) {
-							wx.uploadFile({
-								// url: 'https://web.byisf.com/api/depl/put-depl', //仅为示例,非真实的接口地址
-								url: 'http://web.byisf.com:82/blade-jfpts/depl/put-depl',
-								filePath: tempFilePath[i],
-								name: 'file',
-								formData: {
-									'user': 'test' // 上传附带参数
-								},
-								success: (data) => {
-									wx.showToast({
-										title: '上传图片成功!',
-										duration: 1000
-									});
-									// 根据接口具体返回格式   赋值具体对应url
-									that.imgs.push({
-										id: i,
-										src: JSON.parse(data.data).data
-									})
-								}
-							});
-						}
-						// } catch (e) {
-						// 	console.log(e);
-						// 	wx.showToast({
-						// 		title: '上传图片失败!',
-						// 		duration: 2000
-						// 	});
-						// } finally {
-						// 	wx.hideLoading();
-						// }
-					}
-				});
-			},
-			delImg(index) {
-				this.imgs.splice(index, 1);
-				// console.log(this.imgs)
-			},
-			takeVideo() {
-				var that = this;
-				wx.chooseVideo({
-					sourceType: ['album', 'camera'],
-					maxDuration: 60,
-					camera: 'back',
-					success(res) {
-						var tempFilePath = res.tempFilePath;
-						// try {
-						wx.showLoading({
-							title: "上传中...",
-							mask: true
-						})
-						wx.uploadFile({
-							// url: 'https://web.byisf.com/api/depl/put-depl', //仅为示例,非真实的接口地址
-							url: 'http://web.byisf.com:82/blade-jfpts/depl/put-depl',
-							filePath: tempFilePath,
-							name: 'file',
-							formData: {
-								'user': 'test' // 上传附带参数
-							},
-							success: (data) => {
-								wx.showToast({
-									title: '上传视频成功!',
-									duration: 1000
-								});
-								// 		// 根据接口具体返回格式   赋值具体对应url
-								that.videos.push({
-									id: that.videos.length,
-									src: JSON.parse(data.data).data
-								})
-								// console.log(JSON.parse(data.data).data)
-							}
-						});
-
-						// } catch (e) {
-						// console.log(e);
-						// wx.showToast({
-						// 	title: '上传视频失败!',
-						// 	duration: 2000
-						// });
-						// } finally {
-						// wx.hideLoading();
-						// }
-					}
-				})
-			},
-			delVideo(index) {
-				this.videos.splice(index, 1);
-				// console.log(this.imgs)
-			},
-		},
-		onLoad(e) {
-			if (e.id == undefined) {
-				e = {
-					id: 422
-				}
-			}
-			// console.log(e);
-			this.datas = e;
-		},
-		inits(){
-			console.log(123)
-			
-		}
-		// onLoad: function(option) {
-		// 	var b;
-		// 	if (option.data == undefined) {
-		// 		this.data = {
-		// 			alarmType: '无数据',
-		// 			bz: '无数据',
-		// 			district: '无数据',
-		// 			place: '无数据',
-		// 			alarmTime: '无数据',
-		// 			num: "无数据",
-		// 			ourNum: "无数据",
-		// 			inNum: "无数据",
-		// 			infor: "无数据"
-		// 		}
-		// 		return;
-		// 	}
-		// 	try {
-		// 		b = JSON.parse(option.data)
-		// 	} catch (e) {
-		// 		//TODO handle the exception
-		// 	}
-		// 	console.log(b);
-		// 	this.data = b;
-		// }
-	}
-</script>
-
-<style lang="scss">
-	page {
-		width: 100%;
-		height: 100%;
-	}
-
-	.mapJQtijiao {
-		width: 100%;
-		height: 100%;
-		margin: 0 auto;
-
-		// .head {
-		// 	position: relative;
-		// 	top: 0;
-		// 	left: 0;
-		// 	z-index: 1;
-		// 	font-size: 16px;
-		// 	font-weight: 600;
-		// 	text-align: center;
-
-		// 	div {
-		// 		width: 100%;
-		// 		border: 1px solid rgba($color: #000000, $alpha: 0);
-		// 	}
-		// }
-
-		.mapJQtijiaomain {
-			width: 100%;
-			height: 100%;
-			// border: 1px solid #000000;
-			box-sizing: border-box;
-			background-color: #F7F7F7;
-
-			.title {
-				margin-left: 1rem;
-				margin-bottom: 0.5rem;
-			}
-		}
-
-		.f {
-			background-color: #fff;
-			padding: 0.5rem 0 0.5rem 0;
-			margin-bottom: 0.5rem;
-
-			.main {
-				margin: 0.5rem;
-				border: 1px solid rgba($color: #000000, $alpha: 0.5);
-				height: 8rem;
-			}
-		}
-
-		.t,
-		.s {
-			background-color: #fff;
-			padding: 0.5rem 0 0.5rem 0;
-			// margin-bottom: 0.5rem;
-			display: flex;
-			align-items: center;
-			// border: 1px solid green;
-			height: 95px;
-			width: 100%;
-
-			.main {
-				// border: 1px solid red;
-
-				image {
-					width: 3rem;
-					height: 3rem;
-					margin-left: 1rem;
-				}
-			}
-
-			.mains {
-				// border: 1px solid red;
-				width: calc(100% - 3rem);
-				height: 75px;
-			}
-		}
-
-		.butb {
-			margin: 1rem auto;
-			width: 6rem;
-			height: 3rem;
-			// // border: 1px solid rgb(46, 118, 228);
-			// border-radius: 1rem;
-			// display: flex;
-			// font-size: 18px;
-			// align-items: cent1er;
-			// justify-con1tent: center;
-			// color: #fff;
-			// background-image: linear-gradient(to right, #4adeff, #55ffff);
-		}
-	}
-
-	// .seeImgs{
-	// 	width: 80%;
-	// 	position:absolute ;
-	// 	top: 13.3rem;
-	// 	right: 0;
-	// }
-	// .seeImgsVideo{
-	// 	width: 80%;
-	// 	position:absolute ;
-	// 	top: 19.8rem;
-	// 	right: 0;
-	// }
-	.custom-style {
-		background-image: linear-gradient(to right, #08EFF6, #0693FD);
-		border-radius: 20px;
-	}
-</style>
diff --git a/pages/grabOrders/feedback.vue b/pages/grabOrders/feedback.vue
index a99407e..145b180 100644
--- a/pages/grabOrders/feedback.vue
+++ b/pages/grabOrders/feedback.vue
@@ -12,13 +12,13 @@
 			<view class="title" style="padding-top: 0.5rem;">请输入任务心得:</view>
 			<view class="f">
 				<view class="main" style="margin:0 1rem;">
-					<textarea rows="9" cols="27" placeholder="请输入任务心得。" v-model="longInputD"></textarea>
+					<textarea rows="9" cols="27" placeholder="请输入任务心得。" v-model="content"></textarea>
 				</view>
 			</view>
 			<view class="title" style="padding-top: 0.5rem;">请输入任务意见:</view>
 			<view class="f">
 				<view class="main" style="margin:0 1rem;">
-					<textarea rows="9" cols="27" placeholder="请输入任务意见。" v-model="longInputD1"></textarea>
+					<textarea rows="9" cols="27" placeholder="请输入任务意见。" v-model="yj"></textarea>
 				</view>
 			</view>
 			<view class="title">照片上传:</view>
@@ -41,7 +41,7 @@
 				</view>
 			</view>
 			<view class="butb">
-				<u-button class="custom-style" type="primary" @click="inits()">我反馈</u-button>
+				<u-button class="custom-style" type="primary" @click="upData">我反馈</u-button>
 			</view>
 		</view>
 	</view>
@@ -55,12 +55,11 @@
 		},
 		data() {
 			return {
-				datas: '',
-				longInputD: '',//心得
-				longInputD1: '',//意见
+				content: '', //心得
+				yj: '', //意见
 				imgs: [],
 				videos: [],
-				data:{}
+				data: {}
 			}
 		},
 		methods: {
@@ -89,45 +88,48 @@
 				this.data = b;
 			},
 			upData() {
-				console.log('开始上传');
+				// console.log('开始上传');
+				let video = "",
+					imgs = "";
+				for (let k in this.imgs) {
+					imgs += this.imgs[k].src;
+					if (k != this.imgs.length - 1) {
+						imgs += ","
+					}
+				}
+				for (let y in this.videos) {
+					video += this.videos[y].src;
+					if (y != this.videos.length - 1) {
+						video += ","
+					}
+				}
 				var dataList = {
-					jid: this.datas.id,
-					sname: this.$store.state.puserName,
-					phone: this.$store.state.puserIphone,
-					snumber: this.$store.state.puserID,
-					result: this.longInputD,
-					status: 0,
-					tpaddress: '',
-					spaddress: ''
+					content: this.content,
+					yj: this.yj,
+					tpurl: imgs,
+					spurl: video,
+					hdid: this.data.id,
+					serid: uni.getStorageSync("ids")
+					// result: this.content,
 				};
-				if (this.imgs.length > 0) {
-					var i = this.imgs;
-					for (var k in i) {
-						// console.log(i[k].src)
-						dataList.tpaddress += i[k].src + ','
-					}
-				}
-				if (this.videos.length > 0) {
-					var i = this.videos;
-					for (var k in i) {
-						// console.log(i[k].src)
-						dataList.spaddress += i[k].src + ','
-					}
-				}
 				// console.log(dataList)
+				// return;
+
 				wx.showLoading({
 					title: "提交中...",
 					mask: true
 				})
 				// console.log(dataList);
 				wx.request({
-					url: that.$store.state.piAPI + '/feedback/feedback/saves', //仅为示例,并非真实接口地址。
+					url: this.$store.state.piAPI + 'taskfk/save', //仅为示例,并非真实接口地址。
 					data: dataList,
 					method: 'POST',
 					header: {
-						"Content-Type": "application/x-www-form-urlencoded"
+						// "Content-Type": "application/x-www-form-urlencoded",
+						"content-type": "application/json"
 					},
 					success: (res) => {
+						// console.log(res)
 						if (res.data.code == 200) {
 							wx.showToast({
 								title: '提交成功!',
@@ -137,10 +139,14 @@
 								clearTimeout(time);
 								time = null;
 								uni.redirectTo({
-									url: '/pages/alarm_list/alarm_list'
+									url: './grabOrders'
 								});
-							}, 1500)
+							}, 1000)
 						}
+						wx.showToast({
+							title: 'over',
+							duration: 1000
+						});
 					}
 				});
 			},
@@ -171,7 +177,7 @@
 						for (var i = 0; i < tempFilePath.length; i++) {
 							wx.uploadFile({
 								// url: 'https://web.byisf.com/api/depl/put-depl', //仅为示例,非真实的接口地址
-								url: that.$store.state.piAPI+'/depl/put-depl',
+								url: that.$store.state.piAPI + '/depl/put-depl',
 								filePath: tempFilePath[i],
 								name: 'file',
 								formData: {
@@ -190,15 +196,6 @@
 								}
 							});
 						}
-						// } catch (e) {
-						// 	console.log(e);
-						// 	wx.showToast({
-						// 		title: '上传图片失败!',
-						// 		duration: 2000
-						// 	});
-						// } finally {
-						// 	wx.hideLoading();
-						// }
 					}
 				});
 			},
@@ -221,7 +218,7 @@
 						})
 						wx.uploadFile({
 							// url: 'https://web.byisf.com/api/depl/put-depl', //仅为示例,非真实的接口地址
-							url: that.$store.state.piAPI+'/depl/put-depl',
+							url: that.$store.state.piAPI + '/depl/put-depl',
 							filePath: tempFilePath,
 							name: 'file',
 							formData: {
@@ -240,16 +237,6 @@
 								// console.log(JSON.parse(data.data).data)
 							}
 						});
-
-						// } catch (e) {
-						// console.log(e);
-						// wx.showToast({
-						// 	title: '上传视频失败!',
-						// 	duration: 2000
-						// });
-						// } finally {
-						// wx.hideLoading();
-						// }
 					}
 				})
 			},
@@ -257,40 +244,10 @@
 				this.videos.splice(index, 1);
 				// console.log(this.imgs)
 			},
-		},
-		onLoad(e) {
-			if (e.id == undefined) {
-				e = {
-					id: 422
-				}
+			beforeDestroy() {
+				this.$store.commit("changegotuGrabOrders");
 			}
-			// console.log(e);
-			this.datas = e;
 		}
-		// onLoad: function(option) {
-		// 	var b;
-		// 	if (option.data == undefined) {
-		// 		this.data = {
-		// 			alarmType: '无数据',
-		// 			bz: '无数据',
-		// 			district: '无数据',
-		// 			place: '无数据',
-		// 			alarmTime: '无数据',
-		// 			num: "无数据",
-		// 			ourNum: "无数据",
-		// 			inNum: "无数据",
-		// 			infor: "无数据"
-		// 		}
-		// 		return;
-		// 	}
-		// 	try {
-		// 		b = JSON.parse(option.data)
-		// 	} catch (e) {
-		// 		//TODO handle the exception
-		// 	}
-		// 	console.log(b);
-		// 	this.data = b;
-		// }
 	}
 </script>
 
diff --git a/pages/grabOrders/grabOrders.vue b/pages/grabOrders/grabOrders.vue
index 991fe37..b187292 100644
--- a/pages/grabOrders/grabOrders.vue
+++ b/pages/grabOrders/grabOrders.vue
@@ -5,10 +5,10 @@
 				swiperWidth="750"></u-tabs-swiper>
 		</view>
 		<swiper :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish"
-			style="height: calc(100% - 40px);width: 100%;">
+			style="height: calc(100% - 40px); width: 100%">
 			<swiper-item class="swiper-item" v-for="(item, index) in list" :key="index"
-				style="height: 100%;width: 100%;">
-				<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="onreachBottom">
+				style="height: 100%; width: 100%">
+				<scroll-view scroll-y style="height: 100%; width: 100%" @scrolltolower="onreachBottom">
 					<page0 :listData="leftdata" :swiperCurrent="0" v-if="item.name == '正在进行'" @openOnce="openOnce"
 						@getOrders="getOrders"></page0>
 					<page1 :listData="rightdata" :swiperCurrent="1" v-if="item.name == '可参与'" @openOnce="openOnce"
@@ -32,28 +32,30 @@
 	</view>
 </template>
 <script>
-	import page0 from "./inPage/page0.vue"
-	import page1 from "./inPage/page1.vue"
+	import page0 from "./inPage/page0.vue";
+	import page1 from "./inPage/page1.vue";
 	export default {
 		components: {
 			page0,
-			page1
+			page1,
 		},
 		data() {
 			return {
 				list: [{
-					name: '正在进行'
-				}, {
-					name: '可参与'
-				}],
+						name: "正在进行",
+					},
+					{
+						name: "可参与",
+					},
+				],
 				// 因为内部的滑动机制限制,请将tabs组件和swiper组件的current用不同变量赋值
 				current: 0, // tabs组件的current值,表示当前活动的tab选项
 				swiperCurrent: 0, // swiper组件的current值,表示当前那个swiper-item是活动的
 				leftdata: [],
 				rightdata: [],
 				showPopup: false,
-				appdetitle: '',
-				popupData:{}
+				appdetitle: "",
+				popupData: {},
 			};
 		},
 		watch: {
@@ -63,7 +65,7 @@
 			},
 			change() {
 				this.getGrabOrders(this.current);
-			}
+			},
 		},
 		mounted() {
 			this.getGrabOrders(this.current);
@@ -71,13 +73,13 @@
 		computed: {
 			change() {
 				return this.$store.state.gotuGrabOrders;
-			}
+			},
 		},
 		methods: {
 			// tabs通知swiper切换
 			tabsChange(index) {
 				this.swiperCurrent = index;
-				console.log(index)
+				// console.log(index);
 			},
 			// swiper-item左右移动,通知tabs的滑块跟随移动
 			transition(e) {
@@ -93,108 +95,103 @@
 				this.current = current;
 			},
 			// scroll-view到底部加载更多
-			onreachBottom() {
-
-			},
+			onreachBottom() {},
 			openOnce(val) {
 				// console.log(this.swiperCurrent)
-				val['type'] = this.swiperCurrent;
-				val['serid'] = uni.getStorageSync('ids') + ",";
-				val['appenUrl'] = this.$store.state.piAPI;
-				// val['apendurl'] = this.swiperCurrent;
-				// if (this.swiperCurrent == 1) {
-				// 	uni.navigateTo({
-				// 		url: './task?data=' + JSON.stringify(val),
-				// 	});
-				// } else {
-				// 	uni.navigateTo({
-				// 		url: './task?data=' + JSON.stringify(val),
-				// 	});
-				// }
+				val["buttype"] = this.swiperCurrent;
+				val["serid"] = uni.getStorageSync("ids") + ",";
+				val["appenUrl"] = this.$store.state.piAPI;
 				//打开地图
 				uni.navigateTo({
-					url: './map?data=' + JSON.stringify(val)
-				})
+					url: "./map?data=" + JSON.stringify(val),
+				});
 			},
 			getGrabOrders(val = 0) {
 				//获取全部的数据
-				// console.log("beggggg")
-				// this["listData" + val] = [];
-				console.log(val)
 				let that = this,
 					d = {
-						serid: uni.getStorageSync('ids'),
-						type: val + '',
+						serid: uni.getStorageSync("ids"),
+						type: val + "",
 					};
 				uni.request({
-					url: this.$store.state.piAPI + "/taskqd/selectLi",
+					url: this.$store.state.piAPI + "taskqd/selectLi",
 					method: "POST",
 					data: d,
 					header: {
-						"content-type": "application/x-www-form-urlencoded"
+						"content-type": "application/x-www-form-urlencoded",
 					},
 					success(res) {
 						const data = res.data.data;
-						console.log(data)
+						// console.log(data);
 						if (val == 1) {
 							that.rightdata = data;
 						} else {
-							that.leftdata = data;
+							let no = [],ok = [];
+							for(var k in data){
+								if(data[k].type !=1 ){
+									no.push(data[k]);
+								}else{
+									ok.push(data[k])
+								}
+							}
+							
+							that.leftdata = [...no,...ok];
 						}
-					}
-				})
+					},
+				});
 			},
 			getOrders(b) {
 				let val = b.val,
 					item = b.item;
 				// console.log(val, item)
 				let that = this;
-				if (val != 0) { //接单
-					this.appdetitle = "是否参与任务:"+item.rname;
+				if (val != 0) {
+					//接单
+					this.appdetitle = "是否参与任务:" + item.rname;
 					this.showPopup = true;
 					this.popupData = item;
 					// return;
-					
-				} else { //反馈
+				} else {
+					//反馈
 					//
 					uni.navigateTo({
-						url: './feedback?data=' + JSON.stringify(item)
+						url: "./feedback?data=" + JSON.stringify(item),
 						// url: "./feedback"
-					})
+					});
 				}
 			},
-			confirms(){
+			confirms() {
 				let that = this;
-				this.popupData['serid'] = uni.getStorageSync('ids') + ",";
+				this.popupData["serid"] = uni.getStorageSync("ids") + ",";
 				// console.log(item)
 				// return;
 				uni.request({
-					url: this.$store.state.piAPI + "/taskqd/Graborder",
+					url: this.$store.state.piAPI + "taskqd/Graborder",
 					method: "POST",
 					// data: {
 					// 	securityId: this.$store.state.puserID,
 					// 	status: tab
 					// },
 					header: {
-						'content-type': "application/json"
+						"content-type": "application/json",
 					},
 					data: this.popupData,
 					success(res) {
 						const data = res.data.msg;
-						console.log(data)
+						// console.log(data);
 						if (data == "抢单成功") {
 							uni.showToast({
 								title: data,
-								duration: 2000
+								duration: 2000,
 							});
 						}
 						// that.listData = data;
 						// that.getGrabOrders(this.);
 						that.$store.commit("changegotuGrabOrders");
-					}
-				})
-			}
-		}
+					},
+				});
+			},
+		},
 	};
 </script>
 
@@ -204,102 +201,8 @@
 		width: 100%;
 	}
 
-	// .once {
-	// 	width: calc(100% - 10px);
-	// 	height: 100px;
-	// 	border: 1px solid #d0d0d0;
-	// 	padding: 8px;
-	// 	box-sizing: border-box;
-	// 	margin: 5px;
-	// 	border-radius: 8px;
-	// 	display: flex;
-	// 	align-items: center;
-	// 	justify-content: center;
-
-	// 	.onve-left {
-	// 		width: 75%;
-	// 		display: flex;
-	// 		align-items: center;
-	// 		justify-content: center;
-
-	// 		.o-l-img {
-	// 			width: 80px;
-	// 			height: 80px;
-	// 			background-color: #d0d0d0;
-	// 			margin-right: 5px;
-	// 			border-radius: 7px;
-
-	// 			image {
-	// 				width: 100%;
-	// 				height: 100%;
-	// 				border-radius: 7px;
-	// 			}
-	// 		}
-
-	// 		.o-l-main {
-	// 			width: calc(100% - 85px);
-	// 			height: 80px;
-	// 			display: flex;
-	// 			// align-items: center;
-	// 			justify-content: center;
-	// 			flex-direction: column;
-
-	// 			.o-l-m-up {
-	// 				height: 30px;
-	// 				font-size: 16px;
-	// 			}
-	// 		}
-	// 	}
-
-	// 	.onve-right {
-	// 		width: 25%;
-	// 		display: flex;
-	// 		align-items: center;
-	// 		justify-content: center;
-	// 		flex-direction: column;
-
-	// 		view {
-	// 			margin-top: 10px;
-	// 		}
-	// 	}
-
-	// 	// .onceUp {
-	// 	// 	width: 100%;
-	// 	// 	height: 25%;
-	// 	// 	padding-bottom: 5px !important;
-	// 	// 	border-bottom: 1px solid #d0d0d0;
-	// 	// }
-
-	// 	// .onceMain {
-	// 	// 	width: 100%;
-	// 	// 	height: 80%;
-	// 	// 	display: flex;
-	// 	// 	align-items: center;
-	// 	// 	justify-content: center;
-
-	// 	// 	.o-m-left {
-	// 	// 		width: 80%;
-	// 	// 		height: 100%;
-	// 	// 		border: 1 solid #d0d0d0;
-	// 	// 		display: flex;
-	// 	// 		// align-items: center;
-	// 	// 		justify-content: center;
-	// 	// 		flex-direction: column;
-
-	// 	// 		view {
-	// 	// 			margin-top: 2.5px;
-	// 	// 			padding-bottom: 2.5px;
-	// 	// 		}
-	// 	// 	}
-	// 	// }
-
-	// }
-
-	// .orange {
-	// 	color: orange;
-	// }
-
-	// .green {
-	// 	color: #00ba15;
+	// .uni-scroll-view{
+	// 	height: 100% !important;
+	// 	border: 1px solid red
 	// }
 </style>
diff --git a/pages/grabOrders/inPage/page0.vue b/pages/grabOrders/inPage/page0.vue
index 2750089..6929383 100644
--- a/pages/grabOrders/inPage/page0.vue
+++ b/pages/grabOrders/inPage/page0.vue
@@ -1,7 +1,5 @@
 <template>
 	<view class="onveMain">
-
-
 		<view class="once" v-for="(item,index) in listData" :key="index" @click="openOnce(item)">
 			<view class="onve-left">
 				<view class="o-l-img">
@@ -22,15 +20,16 @@
 				</view>
 			</view>
 			<view class="onve-right">
-				<u-button :class="[swiperCurrent == 0?'orange':'green']" size="mini"
+				<u-button :class="[swiperCurrent == 0?'orange':'green']" size="mini" :disabled="item.type == 1"
 					@click="getOrders(swiperCurrent,item)">
-					{{swiperCurrent == 0?"上传反馈":'我要参与'}}
+					{{item.type == 1?"完成反馈":"上传反馈"}}
 				</u-button>
 				<view class="o-r-$">
 					积分:{{item.integral}}
 				</view>
 			</view>
 		</view>
+		<u-divider>没有更多了</u-divider>
 	</view>
 </template>
 
@@ -41,10 +40,10 @@
 			openOnce(val) {
 				this.$emit("openOnce", val);
 			},
-			getOrders(val,item) {
+			getOrders(val, item) {
 				let b = {
-					val:val,
-					item:item
+					val: val,
+					item: item
 				}
 				this.$emit("getOrders", b);
 			}
@@ -53,10 +52,11 @@
 </script>
 
 <style lang="scss" scoped>
-	.onveMain{
+	.onveMain {
 		width: 100%;
 		height: auto;
 	}
+
 	.once {
 		width: calc(100% - 10px);
 		height: 100px;
diff --git a/pages/grabOrders/inPage/page1.vue b/pages/grabOrders/inPage/page1.vue
index 5d039b7..6dda674 100644
--- a/pages/grabOrders/inPage/page1.vue
+++ b/pages/grabOrders/inPage/page1.vue
@@ -21,15 +21,16 @@
 				</view>
 			</view>
 			<view class="onve-right">
-				<u-button :class="[swiperCurrent == 0?'orange':'green']" size="mini"
+				<u-button :class="[swiperCurrent == 0?'orange':'green']" size="mini" :disabled="item.num==item.jnum"
 					@click="getOrders(swiperCurrent,item)">
-					{{swiperCurrent == 0?"上传反馈":'我要参与'}}
+					{{item.num==item.jnum?"人数已满":"我要参与"}}
 				</u-button>
 				<view class="o-r-$">
 					积分:{{item.integral}}
 				</view>
 			</view>
 		</view>
+		<u-divider>没有更多了</u-divider>
 	</view>
 </template>
 
@@ -40,10 +41,10 @@
 			openOnce(val) {
 				this.$emit("openOnce", val);
 			},
-			getOrders(val,item) {
+			getOrders(val, item) {
 				let b = {
-					val:val,
-					item:item
+					val: val,
+					item: item
 				}
 				this.$emit("getOrders", b);
 			}
@@ -52,10 +53,11 @@
 </script>
 
 <style lang="scss" scoped>
-	.onveMain{
+	.onveMain {
 		width: 100%;
 		height: auto;
 	}
+
 	.once {
 		width: calc(100% - 10px);
 		height: 100px;
diff --git a/pages/grabOrders/map.vue b/pages/grabOrders/map.vue
index 6f7f521..15d2547 100644
--- a/pages/grabOrders/map.vue
+++ b/pages/grabOrders/map.vue
@@ -19,7 +19,7 @@
 			// console.log(options.data);
 			if (options.data == undefined) {
 				data =
-					'{"id":7,"rname":"无数据","content":"无数据","time":"2021-11-02 16:31:47","province":"江西省","city":"南昌市","district":"青山湖区","jnum":2,"line":"LINESTRING(115.95983713142935 28.674674492655765,115.96086709969107 28.7012820060835,115.97254007332388 28.701625328837405,115.97305505745474 28.68875072556592,115.96704690926138 28.68274257737256,115.96739023201529 28.674674492655765,115.9600087928063 28.674846154032718,115.95983713142935 28.674846154032718)","raddress":null,"rtype":"0","serid":"1416311615662448641,1123598821738675201","num":2,"integral":"100","url":"http://223.82.109.183:2081/zhba/upload/20211102/7050fe68e5d1e9921a3e93329996a943.png","current":0}'
+					'{"id":7,"rname":"无数据","content":"无数据","time":"2021-11-02 16:31:47","province":"江西省","city":"南昌市","district":"青山湖区","jnum":2,"line":"LINESTRING(115.95983713142935 28.674674492655765,115.96086709969107 28.7012820060835,115.97254007332388 28.701625328837405,115.97305505745474 28.68875072556592,115.96704690926138 28.68274257737256,115.96739023201529 28.674674492655765,115.9600087928063 28.674846154032718,115.95983713142935 28.674846154032718)","raddress":null,"rtype":"0","serid":"1416311615662448641,1123598821738675201","num":2,"integral":"100","url":"http://223.82.109.183:2081/zhba/upload/20211102/7050fe68e5d1e9921a3e93329996a943.png","current":0,"buttype":0}'
 			} else {
 				data = options.data;
 			}
@@ -30,9 +30,12 @@
 			// console.log(a)
 			// let a = "grabOrdersMap/xcxmap.html";
 			// this.urls = "http://223.82.109.183:2082/" + a + "?data=" + data;
-			let name = 2;
+			let name = 2; //1是本地  2是服务器
 			// let name = 1;
 			let b = this.$store.state.piAPI;
+			if( b == '/api'){
+				name = 1;
+			}
 			let a = name == 1 ? "http://127.0.0.1:8848/qfqk-android/leafletMapOur/" :b.slice(0, b.indexOf('api'));
 			// this.urls = a + "grabOrdersMap/xcxmap.html?data=" + data;
 			// a = a.slice(0, a.indexOf('api'));
diff --git a/store/state.js b/store/state.js
index cadd63c..638ed61 100644
--- a/store/state.js
+++ b/store/state.js
@@ -4,9 +4,9 @@
 		useName: '过客',
 	},
 	logPath: '',
-	piAPI: 'http://223.82.109.183:2082/api/',
+	// piAPI: 'http://223.82.109.183:2082/api/',
 	// piAPI: 'http://192.168.0.107:85', //唐
-	// piAPI: '/api', //本地转发
+	piAPI: '/api', //本地转发
 	//piAPI: 'http://s16s652780.51mypc.cn/api/',
 	//piAPI: 'http://192.168.0.113:83/',
 	//piAPI: 'http://192.168.0.111:83/',

--
Gitblit v1.9.3