he2802 3 жил өмнө
parent
commit
9c37af984a

+ 8 - 6
pages2/bank/questionBankExplain.vue

@@ -292,7 +292,7 @@
 					</view>
 					</view>
 					
 					
 				
 				
-					<view class="footer_btn" v-if="isContinue">
+					<view class="footer_btn" v-if="isContinue || !isHistory">
 						<view class="collect"></view>
 						<view class="collect"></view>
 						<view class="flex_center" @click="openFooterTab">
 						<view class="flex_center" @click="openFooterTab">
 							<view class="up-icon">
 							<view class="up-icon">
@@ -348,10 +348,11 @@ export default {
 			bankList: [],
 			bankList: [],
 			collectList:[],
 			collectList:[],
 			goodsId:'',
 			goodsId:'',
-			explain:'',
-			isContinue:'',
+			explain:'',  	//是否显示答案
+			isContinue:'',  //是否继续做题
 			chapterId:'',
 			chapterId:'',
 			moduleId:'',
 			moduleId:'',
+			isHistory:'',  //是否显示历史答题记录
 			isSubmit:false,
 			isSubmit:false,
 		};
 		};
 	},
 	},
@@ -363,10 +364,11 @@ export default {
 		this.chapterId = option.chapterId;
 		this.chapterId = option.chapterId;
 		this.moduleId = option.moduleId;
 		this.moduleId = option.moduleId;
 		this.recordId = option.recordId;
 		this.recordId = option.recordId;
+		this.isHistory = option.isHistory;
 		this.goodsQuestionList();
 		this.goodsQuestionList();
 	},
 	},
 	onUnload() {
 	onUnload() {
-		if(this.isSubmit) {
+		if(this.isSubmit || this.isHistory) {
 			return
 			return
 		}
 		}
 		this.examRecordEdit();
 		this.examRecordEdit();
@@ -375,7 +377,7 @@ export default {
 		
 		
 		goodsQuestionList() {
 		goodsQuestionList() {
 			//继续答题
 			//继续答题
-			if(this.isContinue) {
+			if(this.isContinue || this.isHistory) {
 				
 				
 				console.log(this.isContinue,"历史做题")
 				console.log(this.isContinue,"历史做题")
 				this.$api.examReport(this.recordId).then(res => {
 				this.$api.examReport(this.recordId).then(res => {
@@ -617,7 +619,7 @@ export default {
 					
 					
 					setTimeout(() => {
 					setTimeout(() => {
 						uni.redirectTo({
 						uni.redirectTo({
-							url:'/pages2/bank/question_report?id='+this.recordId
+							url:'/pages2/bank/question_report?id='+this.recordId+'&examId='+this.id
 						})
 						})
 					},2000)
 					},2000)
 				}
 				}

+ 6 - 6
pages2/bank/questionBankTest.vue

@@ -293,7 +293,12 @@
 					
 					
 				
 				
 					<view class="footer_btn">
 					<view class="footer_btn">
-						<view @click="collect">收藏</view>
+						<view class="collect" @click="collect">
+							<view>
+								<image src="/static/icon/collect.png" mode="widthFix"></image>
+								<view>收藏</view>
+							</view>
+						</view>
 						<view class="flex_center" @click="openFooterTab">
 						<view class="flex_center" @click="openFooterTab">
 							<view class="up-icon">
 							<view class="up-icon">
 								<image src="/static/up.png"></image>
 								<image src="/static/up.png"></image>
@@ -1139,11 +1144,6 @@ export default {
 	}
 	}
 	
 	
 	.collect {
 	.collect {
-		visibility: hidden;
-	
-		&.show {
-			visibility: visible;
-		}
 		
 		
 		>view {
 		>view {
 			display: flex;
 			display: flex;

+ 7 - 4
pages2/bank/question_report.vue

@@ -92,10 +92,7 @@ export default {
 	},
 	},
 	onUnload() {},
 	onUnload() {},
 	computed: { ...mapGetters(['userInfo']) },
 	computed: { ...mapGetters(['userInfo']) },
-	async onLoad(option) {
-		this.id = option.id;
-		this.examId = option.examId;
-		this.hideBtns = Boolean(option.hideBtns);
+	async onShow() {
 		await this.bankExam();
 		await this.bankExam();
 		await this.examReport();
 		await this.examReport();
 		
 		
@@ -165,6 +162,12 @@ export default {
 			}
 			}
 		});
 		});
 	},
 	},
+	async onLoad(option) {
+		this.id = option.id;
+		this.examId = option.examId;
+		this.hideBtns = Boolean(option.hideBtns);
+		
+	},
 	methods: {
 	methods: {
 		backBank() {
 		backBank() {
 			uni.redirectTo({
 			uni.redirectTo({

+ 40 - 11
pages2/bank/question_statistics.vue

@@ -82,6 +82,7 @@
 										>
 										>
 											<view class="btn" v-if="article.recordStatus == 0">继续</view>
 											<view class="btn" v-if="article.recordStatus == 0">继续</view>
 										</navigator>
 										</navigator>
+										<view class="btn" v-if="article.recordStatus == 1" @click="doRepeat(article.recordId,article.examId,article.goodsId,article.moduleExamId,article.chapterExamId)">重做</view>
 									</view>
 									</view>
 								</view>
 								</view>
 								<u-line></u-line>
 								<u-line></u-line>
@@ -127,6 +128,8 @@
 								>
 								>
 									<view class="btn" v-if="article.recordStatus == 0">继续</view>
 									<view class="btn" v-if="article.recordStatus == 0">继续</view>
 								</navigator>
 								</navigator>
+								
+								<view class="btn" v-if="article.recordStatus == 1" @click="doRepeat(article.recordId,article.examId,article.goodsId,0,article.chapterExamId)">重做</view>
 							</view>
 							</view>
 						</view>
 						</view>
 					</template>
 					</template>
@@ -159,6 +162,7 @@
 							>
 							>
 								<view class="btn" v-if="item1.recordStatus == 0">继续</view>
 								<view class="btn" v-if="item1.recordStatus == 0">继续</view>
 							</navigator>
 							</navigator>
+								<view class="btn" v-if="item1.recordStatus == 1" @click="doRepeat(item1.recordId,item1.majorId,item1.goodsId,0,0)">重做</view>
 						</view>
 						</view>
 					</template>
 					</template>
 				</view>
 				</view>
@@ -185,6 +189,9 @@ export default {
 	computed: { ...mapGetters(['userInfo']) },
 	computed: { ...mapGetters(['userInfo']) },
 	onLoad(option) {
 	onLoad(option) {
 		this.id = option.id;
 		this.id = option.id;
+		
+	},
+	onShow() {
 		uni.getSystemInfo({
 		uni.getSystemInfo({
 			success: res => {
 			success: res => {
 				var winW = res.screenWidth;
 				var winW = res.screenWidth;
@@ -194,10 +201,8 @@ export default {
 					.select('.canvas')
 					.select('.canvas')
 					.boundingClientRect()
 					.boundingClientRect()
 					.exec(newRes => {
 					.exec(newRes => {
-						this.goodsBankQuestionNum();
-						this.goodsBankDolist();
 						// this.goodsBankList();
 						// this.goodsBankList();
-
+		
 						var width = newRes[0].width;
 						var width = newRes[0].width;
 						var height = newRes[0].height;
 						var height = newRes[0].height;
 						this.caculateX = winW / 750;
 						this.caculateX = winW / 750;
@@ -209,7 +214,7 @@ export default {
 						context1.arc(this.caculateX * 90, this.caculateX * 90, this.caculateX * 80, 0, 2 * Math.PI, true);
 						context1.arc(this.caculateX * 90, this.caculateX * 90, this.caculateX * 80, 0, 2 * Math.PI, true);
 						context1.stroke();
 						context1.stroke();
 						context1.draw();
 						context1.draw();
-
+		
 						var context2 = uni.createCanvasContext('Canvas2');
 						var context2 = uni.createCanvasContext('Canvas2');
 						this.context2 = context2;
 						this.context2 = context2;
 						context2.setStrokeStyle('#EEEEEE');
 						context2.setStrokeStyle('#EEEEEE');
@@ -217,12 +222,36 @@ export default {
 						context2.arc(this.caculateX * 90, this.caculateX * 90, this.caculateX * 80, 0, 2 * Math.PI, false);
 						context2.arc(this.caculateX * 90, this.caculateX * 90, this.caculateX * 80, 0, 2 * Math.PI, false);
 						context2.stroke();
 						context2.stroke();
 						context2.draw();
 						context2.draw();
+						
+						this.goodsBankQuestionNum();
+						this.goodsBankDolist();
 					});
 					});
 			}
 			}
 		});
 		});
 	},
 	},
-	onShow() {},
 	methods: {
 	methods: {
+		doRepeat(recordId,examId,goodsId,chapterExamId) {
+			uni.showModal({
+			    title: '提示',
+			    content: '是否清空答案重做?',
+				cancelText:'查看上次',
+				cancelColor:'',
+				confirmText:'重做',
+				confirmColor:'',
+			    success: (res) => {
+			        if (res.confirm) {
+						uni.navigateTo({
+							url:'/pages2/bank/questionBank?id=' +examId +'&goodsid=' +goodsId +'&moduleId=0&chapterId=' +chapterExamId
+						})
+			        } else if (res.cancel) {
+						uni.navigateTo({
+							url:'/pages2/bank/questionBankExplain?isHistory=1&recordId='+recordId +'&id=' +examId +'&goodsid=' +goodsId +'&moduleId=0&chapterId=' +chapterExamId
+						})
+			            console.log('查看上次答题');
+			        }
+			    }
+			});
+		},
 		goodsBankDolist() {
 		goodsBankDolist() {
 			this.$api
 			this.$api
 				.goodsBankDolist({
 				.goodsBankDolist({
@@ -259,13 +288,13 @@ export default {
 					this.caculateX * 90,
 					this.caculateX * 90,
 					this.caculateX * 180
 					this.caculateX * 180
 				);
 				);
-				this.context2.save();
-				this.context2.translate(this.caculateX * 90, this.caculateX * 90);
-				this.context2.rotate((-90 * Math.PI) / 180);
+				this.context1.save();
+				this.context1.translate(this.caculateX * 90, this.caculateX * 90);
+				this.context1.rotate((-90 * Math.PI) / 180);
 				this.context1.arc(this.caculateX * 90, this.caculateX * 90, this.caculateX * 80, 0, (this.goodsCount.rightNum / this.goodsCount.totalNum) * 2 * Math.PI, false);
 				this.context1.arc(this.caculateX * 90, this.caculateX * 90, this.caculateX * 80, 0, (this.goodsCount.rightNum / this.goodsCount.totalNum) * 2 * Math.PI, false);
-				this.context2.restore();
+				this.context1.restore();
 				this.context1.stroke();
 				this.context1.stroke();
-				this.context1.draw();
+				this.context1.draw(true);
 
 
 				this.context2.beginPath();
 				this.context2.beginPath();
 				this.context2.setStrokeStyle('#007AFF');
 				this.context2.setStrokeStyle('#007AFF');
@@ -280,7 +309,7 @@ export default {
 				this.context2.arc(this.caculateX * 90, this.caculateX * 90, this.caculateX * 80, 0, (this.goodsCount.doNum / this.goodsCount.totalNum) * 2 * Math.PI, false);
 				this.context2.arc(this.caculateX * 90, this.caculateX * 90, this.caculateX * 80, 0, (this.goodsCount.doNum / this.goodsCount.totalNum) * 2 * Math.PI, false);
 				this.context2.restore();
 				this.context2.restore();
 				this.context2.stroke();
 				this.context2.stroke();
-				this.context2.draw();
+				this.context2.draw(true);
 			});
 			});
 		},
 		},
 		clickModule(id, index) {
 		clickModule(id, index) {

+ 1 - 1
pages2/order/confirm_success.vue

@@ -82,7 +82,7 @@ export default {
 		},
 		},
 		goOrder(){
 		goOrder(){
 			uni.redirectTo({
 			uni.redirectTo({
-			    url: '/pages2/order/index'
+			    url: '/pages2/order/index?current=1'
 			});
 			});
 		},
 		},
 		radioChange(e) {
 		radioChange(e) {

+ 3 - 1
pages2/order/index.vue

@@ -73,7 +73,9 @@ export default {
 		};
 		};
 	},
 	},
 	// onPullDownRefresh() {},
 	// onPullDownRefresh() {},
-	onLoad(option) {},
+	onLoad(option) {
+		this.current = option.current || 0;
+	},
 	onShow() {
 	onShow() {
 		this.getOrderList();
 		this.getOrderList();
 		/* if(this.current === 2 && this.$method.isLogin()){
 		/* if(this.current === 2 && this.$method.isLogin()){

+ 30 - 22
pages2/verify/input.vue

@@ -107,7 +107,7 @@
 					>
 					>
 						<u-input v-model="form.major" :placeholder="`请输入${item.fieldName}`" />
 						<u-input v-model="form.major" :placeholder="`请输入${item.fieldName}`" />
 					</u-form-item>
 					</u-form-item>
-					<u-form-item
+					<!-- <u-form-item
 						:key="index"
 						:key="index"
 						v-if="item.fieldKey == 'apply_post'"
 						v-if="item.fieldKey == 'apply_post'"
 						:label="item.fieldName"
 						:label="item.fieldName"
@@ -116,7 +116,7 @@
 						:prop="item.required ? item.fieldKey : ''"
 						:prop="item.required ? item.fieldKey : ''"
 					>
 					>
 						<u-input v-model="form.apply_post" :placeholder="`请输入${item.fieldName}`" />
 						<u-input v-model="form.apply_post" :placeholder="`请输入${item.fieldName}`" />
-					</u-form-item>
+					</u-form-item> -->
 					<u-form-item
 					<u-form-item
 						:key="index"
 						:key="index"
 						v-if="item.inputType == 2"
 						v-if="item.inputType == 2"
@@ -250,9 +250,7 @@
 									canvas-id="handWriting"
 									canvas-id="handWriting"
 								></canvas>
 								></canvas>
 								<view v-else style="width:100%;height: 100%;position: relative;">
 								<view v-else style="width:100%;height: 100%;position: relative;">
-									<view class="ctoples">
-										图片
-									</view>
+									<view class="ctoples">图片</view>
 									<image style="width:100%;height:100%;" :src="$method.splitImgHost(form[item.fieldKey])" mode=""></image>
 									<image style="width:100%;height:100%;" :src="$method.splitImgHost(form[item.fieldKey])" mode=""></image>
 								</view>
 								</view>
 							</view>
 							</view>
@@ -348,7 +346,12 @@ export default {
 					},
 					},
 					{
 					{
 						validator: (rule, value, callback) => {
 						validator: (rule, value, callback) => {
-							return this.$u.test.mobile(value);
+							var vartest = /^([0-9]{3,4}-)?[0-9]{7,8}$/;
+							if (this.$u.test.mobile(value) || vartest.test(value)) {
+								return true;
+							}else{
+								return false
+							}
 						},
 						},
 						message: '手机号码不正确',
 						message: '手机号码不正确',
 						trigger: ['change', 'blur']
 						trigger: ['change', 'blur']
@@ -397,7 +400,12 @@ export default {
 					},
 					},
 					{
 					{
 						validator: (rule, value, callback) => {
 						validator: (rule, value, callback) => {
-							return this.$u.test.mobile(value);
+							var vartest = /^([0-9]{3,4}-)?[0-9]{7,8}$/;
+							if (this.$u.test.mobile(value) || vartest.test(value)) {
+								return true;
+							}else{
+								return false
+							}
 						},
 						},
 						message: '单位联系电话不正确',
 						message: '单位联系电话不正确',
 						trigger: ['change', 'blur']
 						trigger: ['change', 'blur']
@@ -597,10 +605,10 @@ export default {
 		},
 		},
 		async submits() {
 		async submits() {
 			var ast = this.listData.some(item => {
 			var ast = this.listData.some(item => {
-				return item.fieldKey === 'commitment_electr_signature'
-			})
-			if(ast){
-			await this.subCanvas();
+				return item.fieldKey === 'commitment_electr_signature';
+			});
+			if (ast) {
+				await this.subCanvas();
 			}
 			}
 			this.openVerify = true;
 			this.openVerify = true;
 			this.resultForm(1);
 			this.resultForm(1);
@@ -815,17 +823,17 @@ page {
 }
 }
 </style>
 </style>
 <style scope>
 <style scope>
-	.ctoples{
-		position: absolute;
-		top: 0;
-		left: 0;
-		padding: 2rpx 23rpx;
-		display: inline-block;
-		background-color: rgba(0,0,0,.4);
-		font-size: 28rpx;
-		color: #fff;
-		border-bottom-right-radius: 24rpx;
-	}
+.ctoples {
+	position: absolute;
+	top: 0;
+	left: 0;
+	padding: 2rpx 23rpx;
+	display: inline-block;
+	background-color: rgba(0, 0, 0, 0.4);
+	font-size: 28rpx;
+	color: #fff;
+	border-bottom-right-radius: 24rpx;
+}
 .handWriting {
 .handWriting {
 	width: 100%;
 	width: 100%;
 	height: 100%;
 	height: 100%;