| 
					
				 | 
			
			
				@@ -24,7 +24,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	import {upload} from '@/api/system/upload.js'	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	import {updateChecklistPoint} from '@/api/aqpt/checklistPoint.js' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	import {updateChecklistPoint,getchecklistRecord} from '@/api/aqpt/checklistPoint.js' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		data() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			return { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -38,12 +38,10 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					attachList:[] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				rules:{}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				point:{} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				point:{}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				itemList:[] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		onBackPress() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		onLoad() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			this.init() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		}, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -51,15 +49,66 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			init(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				let point=uni.getStorageSync('point'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				this.point=point; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				this.getchecklistRecord() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				this.getLocation() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			getchecklistRecord(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				let {checklistId,recordId}=uni.getStorageSync('point'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				if(!checklistId)return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				getchecklistRecord(checklistId,recordId).then((res)=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					let itemList=res.data.itemList 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					let point=null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					let points=[] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					for(let i=0;i<itemList.length;i++){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						if(itemList[i].children){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							itemList[i].children.map(child=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+								child.recordList.map(pointitem=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+									points.push(point) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+								}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						}else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							itemList[i].recordList.map(pointitem=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+									points.push(pointitem) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						}						 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					this.itemList=points 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					this.handles=points.filter(item=>(!item.checkResult&&item.pointId!==this.point.pointId)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			},			 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			getLocation(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				const self=this; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				uni.getLocation({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					type: 'wgs84', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					success: function (res) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						self.formData.dutyLongitude=res.longitude 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						self.formData.dutyLatitude=res.latitude 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				});		 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			async onSubmit() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				let point=uni.getStorageSync('point') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				let attachList=[] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				for(let i=0;i<this.formData.attachList.length;i++){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					let filePath=this.formData.attachList[i].url 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					let fileresq=await upload({filePath}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					let fileresq=await upload({filePath,formData:{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						additions: `经度:${this.formData.dutyLongitude};纬度:${this.formData.dutyLatitude}` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					}}).catch(()=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						uni.showToast({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							icon:'none', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							title:"提交失败!" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						})	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					if(fileresq.includes('html')){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						uni.showToast({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							icon:'none', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							title:"图片上传异常" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					}					 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					fileresq=JSON.parse(fileresq) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					attachList.push(fileresq.data) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					attachList.push(fileresq.data)		 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				await updateChecklistPoint({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					recordId:point.recordId, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -75,15 +124,73 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						title:"提交失败!" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					})				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				uni.showToast({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					icon:'none', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					title:"提交成功!", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					complete() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						uni.redirectTo({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							url:`/pages/index/handle/task/task?rid=${point.recordId}&cid=${point.checklistId}` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				// uni.showToast({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				// 	icon:'none', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				// 	title:"提交成功!", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				// 	duration:1000,					 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				// 	complete() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				// 		uni.redirectTo({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				// 			url:`/pages/app_views/checkList/index/index?type=form&id=${point.checklistId}&recordId=${point.recordId}` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				// 		}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				// 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				// }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				// this.goOnNext();	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				this.batchHandle() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// 批量处理未处理的 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			batchHandle(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				let point=uni.getStorageSync('point') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				if(this.handles.length<1){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					uni.showToast({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						icon:'none', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						title:"处理完毕", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						duration:1000, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						complete() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							uni.redirectTo({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+								url:`/pages/app_views/checkList/index/index?type=form&id=${point.checklistId}&recordId=${point.recordId}` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					})	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					return					 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				let nextPoint=this.handles[0] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				this.formData={ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					checkResult:1,	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					remark:"", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					attachList:[] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				this.handles.shift() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				uni.setStorageSync('point',nextPoint); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				this.point=nextPoint;	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// 批量处理未处理的【按顺序走到最后一个】 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			goOnNext(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				let point=uni.getStorageSync('point')				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				let pointIdex=this.itemList.findIndex(item=>point.pointId===item.pointId) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				let handles=this.itemList.slice(pointIdex+1);			 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				let nextPointIdx=handles.findIndex(item=>(!item.checkResult)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					nextPointIdx=nextPointIdx+pointIdex 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				if(handles.length<1||nextPointIdx<0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					uni.showToast({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						icon:'none', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						title:"处理完毕", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						duration:1000, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						complete() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							uni.redirectTo({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+								url:`/pages/app_views/checkList/index/index?type=form&id=${point.checklistId}&recordId=${point.recordId}` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					})	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				}			 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				this.formData={ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					checkResult:1,	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					remark:"", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					attachList:[] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				}						 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				let nextPoint=this.itemList[nextPointIdx+1]				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				uni.setStorageSync('point',nextPoint);//防止测试刷新数据丢失 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				this.point=nextPoint;					 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			uploadSuccess(e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				let attachList=JSON.parse(JSON.stringify(this.formData.attachList)) 
			 |