Pārlūkot izejas kodu

Signed-off-by: zhaobao <528046418@qq.com>

zhaobao 1 gadu atpakaļ
vecāks
revīzija
3ae8792393
2 mainītis faili ar 40 papildinājumiem un 12 dzēšanām
  1. 36 9
      pages/app_views/checkList/form/form.vue
  2. 4 3
      pages/index/index.vue

+ 36 - 9
pages/app_views/checkList/form/form.vue

@@ -87,15 +87,42 @@
 						title:"提交失败!"
 					})				
 				})
-				uni.showToast({
-					icon:'none',
-					title:"提交成功!",
-					complete() {
-						uni.redirectTo({
-							url:`/pages/app_views/checkList/index/index?type=form&id=${point.checklistId}&recordId=${point.recordId}`
-						})
-					}
-				})
+			    this.batchHandle()						
+				// uni.showToast({
+				// 	icon:'none',
+				// 	title:"提交成功!",
+				// 	complete() {
+				// 		uni.redirectTo({
+				// 			url:`/pages/app_views/checkList/index/index?type=form&id=${point.checklistId}&recordId=${point.recordId}`
+				// 		})
+				// 	}
+				// })
+			},
+			// 批量处理未处理的
+			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;	
 			},
 			uploadSuccess(e){
 				let attachList=JSON.parse(JSON.stringify(this.formData.attachList))

+ 4 - 3
pages/index/index.vue

@@ -38,7 +38,7 @@
 	import {getByQr,getApps} from '@/api/system/scan.js'
 	import {getQueryParams} from '@/utils/index.js'
 	import {setToken} from '@/utils/auth.js';
-		
+	import {getUserInfo} from '@/api/system/user.js'	
 	export default {
 		data() {
 			return {
@@ -63,6 +63,8 @@
 					setToken(options.token)					
 				}
 				uni.getStorageSync('isLogin',true)
+				const {data} = await getUserInfo()
+				uni.setStorageSync('userId',data.accountId)	
 				this.getData(options)
 			},
 			getData({ocId, code}){
@@ -82,8 +84,7 @@
 						targetTitle:res.data.targetTitle,
 						ocId,
 						code
-					})	
-				    uni.setStorageSync('userId',res.data.target.accountId)								
+					})								
 					let desc="";
 					if(type===1){desc=res.data.target.riskPointDesc}
 					if(type===2){