Browse Source

修改测试bug和部分样式

chenxiong 3 years ago
parent
commit
a40139e03e

+ 84 - 12
pages2/bank/questionBank.vue

@@ -313,10 +313,27 @@
 
 					<view class="footer_btn">
 						<view class="collect" :class="{ show: goodsId ? true : false }" @click="collect(collectList[bankIndex], bankIndex)">
-							{{ collectList[bankIndex] ? '已收藏' : '未收藏' }}
+							<view v-if="collectList[bankIndex]">
+								<image src="/static/icon/collected.png" mode=""></image>
+								<view>取消收藏</view>
+							</view>
+							<view v-if="!collectList[bankIndex]">
+								<image src="/static/icon/collect.png" mode=""></image>
+								<view>收藏</view>
+							</view>
+						</view>
+						<view class="flex_center" @click="openFooterTab">
+							<view class="up-icon">
+								<image src="/static/up.png"></image>
+							</view>
+							答题卡
+						</view>
+						<view class="collect show" @click="pdsubmit">
+							<view>
+								<image src="/static/jj.png" mode=""></image>
+								<view>交卷</view>
+							</view>
 						</view>
-						<view @click="openFooterTab">答题卡</view>
-						<view @click="pdsubmit">交卷</view>
 					</view>
 				</view>
 			</swiper-item>
@@ -482,6 +499,9 @@ export default {
 		}
 	},
 	methods: {
+		/**
+		 * 获取试卷类型2考试,1练习
+		 */
 		bankExam() {
 			this.$api.bankExam(this.id).then(res => {
 				this.bankType = res.data.data.doType;
@@ -1089,20 +1109,24 @@ export default {
 		submit() {
 			let score = 0; //计算总分
 			let reportStatus = 0;
-			let number = 0;
-			let doQuestionNum = 0;
-			let allScore = 0;
+			let number = 0;  //做对的题目数量
+			let doQuestionNum = 0;  //做过的题目数量
+			let allScore = 0;  //总分
 			let passScore = 0;
+			let doQuestionIds = []; //做过的题目id
+			let rightQuestionIds = []; //做对的题目id
 			this.questionList.forEach((item, index) => {
-				passScore = item.passScore
+				// passScore = item.passScore
 				if (item.type == 1) {
 					if (item.ques == item.ans) {
 						score += item.score;
 						number++;
+						rightQuestionIds.push(item.questionId)
 					}
 					allScore += item.score;
 					if (item.ques) {
 						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
 					}
 				} else if (item.type == 2) {
 					let isRight =
@@ -1114,19 +1138,23 @@ export default {
 					if (isRight) {
 						score += item.score;
 						number++;
+						rightQuestionIds.push(item.questionId)
 					}
 					allScore += item.score;
 					if (item.ques && item.ques.length) {
 						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
 					}
 				} else if (item.type == 3) {
 					if (item.ques == item.ans) {
 						score += item.score;
 						number++;
+						rightQuestionIds.push(item.questionId)
 					}
 					allScore += item.score;
 					if (item.ques) {
 						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
 					}
 				} else if (item.type == 4) {
 					if (item.ques && item.ques.length) {
@@ -1138,8 +1166,9 @@ export default {
 					}
 				}
 			});
-
-			if(score >= passScore) {
+			
+			//大于60分及格
+			if(score >= 60) {
 				reportStatus = 1
 			} else {
 				reportStatus = 0
@@ -1153,6 +1182,8 @@ export default {
 					recordId: this.recordId,
 					rightQuestionNum: number,
 					status: 1,
+					doQuestionIds:doQuestionIds.join(','),
+					rightQuestionIds:rightQuestionIds.join(','),
 					doQuestionNum: doQuestionNum,
 					performance: score,
 					totalScore: allScore,
@@ -1171,7 +1202,7 @@ export default {
 
 						setTimeout(() => {
 							uni.redirectTo({
-								url: '/pages2/bank/question_report?id=' + this.recordId
+								url: '/pages2/bank/question_report?examId='+this.id+'&id=' + this.recordId
 							});
 						}, 2000);
 					}
@@ -1496,7 +1527,7 @@ export default {
 <style lang="scss" scoped>
 .swiper {
 	width: 100%;
-	height: calc(100vh - 44px);
+	height: calc(100vh - 65px);
 }
 .lisSty {
 	margin-bottom: 16rpx;
@@ -1720,9 +1751,10 @@ export default {
 .pageContent {
 	position: relative;
 	background-color: #eaeef1;
-	min-height: 100vh;
+	height: 100%;
 	padding-top: 8rpx;
 	padding-bottom: 100rpx;
+	overflow-y: scroll;
 }
 .pad_8 {
 	background-color: #fff;
@@ -1752,12 +1784,52 @@ export default {
 	padding: 0rpx 38rpx;
 	border-top: 1rpx solid #eee;
 
+	.flex_center {
+		flex:1;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		flex-direction: column;
+		margin:0 200rpx;
+		font-size: 24rpx;
+		color: #999999;
+		
+		
+		.up-icon {
+			margin-bottom:18rpx;
+			width:100%;
+			display: flex;
+			justify-content: center;
+			image {
+				width:58rpx;
+				height:21rpx;
+			}
+		}
+	}
 	.collect {
 		visibility: hidden;
 
 		&.show {
 			visibility: visible;
 		}
+		
+		>view {
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			justify-content: center;
+			
+			image {
+				width:32rpx;
+				height:32rpx;
+				margin-bottom:6rpx;
+			}
+			
+			view {
+				font-size: 24rpx;
+				color: #999999;
+			}
+		}
 	}
 }
 .boxSty {

+ 57 - 4
pages2/bank/questionBankExplain.vue

@@ -294,8 +294,18 @@
 				
 					<view class="footer_btn" v-if="isContinue">
 						<view class="collect"></view>
-						<view @click="openFooterTab">答题卡</view>
-						<view @click="submit">交卷</view>
+						<view class="flex_center" @click="openFooterTab">
+							<view class="up-icon">
+								<image src="/static/up.png"></image>
+							</view>
+							答题卡
+						</view>
+						<view class="collect show" @click="submit">
+							<view>
+								<image src="/static/jj.png" mode=""></image>
+								<view>交卷</view>
+							</view>
+						</view>
 					</view>
 				</view>
 			</swiper-item>
@@ -1161,7 +1171,8 @@ export default {
 .pageContent {
 	position:relative;
 	background-color: #eaeef1;
-	min-height: 100vh;
+	height: 100%;
+	overflow-y: scroll;
 	padding-top: 8rpx;
 	padding-bottom: 100rpx;
 }
@@ -1193,12 +1204,54 @@ export default {
 	padding: 0rpx 38rpx;
 	border-top: 1rpx solid #eee;
 	
+	.flex_center {
+		flex:1;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		flex-direction: column;
+		margin:0 200rpx;
+		font-size: 24rpx;
+		color: #999999;
+		
+		
+		.up-icon {
+			margin-bottom:18rpx;
+			width:100%;
+			display: flex;
+			justify-content: center;
+			image {
+				width:58rpx;
+				height:21rpx;
+			}
+		}
+	}
+	
+	
 	.collect {
 		visibility: hidden;
-		
+	
 		&.show {
 			visibility: visible;
 		}
+		
+		>view {
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			justify-content: center;
+			
+			image {
+				width:32rpx;
+				height:32rpx;
+				margin-bottom:6rpx;
+			}
+			
+			view {
+				font-size: 24rpx;
+				color: #999999;
+			}
+		}
 	}
 }
 .boxSty {

+ 53 - 3
pages2/bank/questionBankTest.vue

@@ -294,8 +294,18 @@
 				
 					<view class="footer_btn">
 						<view @click="collect">收藏</view>
-						<view @click="openFooterTab">答题卡</view>
-						<view @click="submit">交卷</view>
+						<view class="flex_center" @click="openFooterTab">
+							<view class="up-icon">
+								<image src="/static/up.png"></image>
+							</view>
+							答题卡
+						</view>
+						<view class="collect show" @click="submit">
+							<view>
+								<image src="/static/jj.png" mode=""></image>
+								<view>交卷</view>
+							</view>
+						</view>
 					</view>
 				</view>
 			</swiper-item>
@@ -1106,12 +1116,52 @@ export default {
 	border-top: 1rpx solid #eee;
 	z-index: 9999999;
 	
+	.flex_center {
+		flex:1;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		flex-direction: column;
+		margin:0 200rpx;
+		font-size: 24rpx;
+		color: #999999;
+		
+		.up-icon {
+			margin-bottom:18rpx;
+			width:100%;
+			display: flex;
+			justify-content: center;
+			image {
+				width:58rpx;
+				height:21rpx;
+			}
+		}
+	}
+	
 	.collect {
 		visibility: hidden;
-		
+	
 		&.show {
 			visibility: visible;
 		}
+		
+		>view {
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			justify-content: center;
+			
+			image {
+				width:32rpx;
+				height:32rpx;
+				margin-bottom:6rpx;
+			}
+			
+			view {
+				font-size: 24rpx;
+				color: #999999;
+			}
+		}
 	}
 }
 .boxSty {

+ 14 - 9
pages2/bank/question_record.vue

@@ -3,13 +3,11 @@
 		<view class="tabs">
 			<view class="tab" :class="{ active: index == 1 }" data-index="1" @click="tab">
 				全部题库记录
-				<u-icon v-if="index == 1" name="arrow-up"></u-icon>
-				<u-icon v-else name="arrow-down"></u-icon>
+				<u-icon class="icon" :class="index ==1? 'animals':''" name="arrow-down"></u-icon>
 			</view>
 			<view class="tab" :class="{ active: index == 2 }" data-index="2" @click="tab">
 				全部试卷类型
-				<u-icon v-if="index == 2" name="arrow-up"></u-icon>
-				<u-icon v-else name="arrow-down"></u-icon>
+				<u-icon class="icon" :class="index ==2? 'animals':''" name="arrow-down"></u-icon>
 			</view>
 		</view>
 
@@ -44,7 +42,7 @@
 					>
 						<view class="btn" v-if="record.status == 1">解析</view>
 					</navigator>
-					<navigator :url="'/pages2/bank/question_report?id=' + record.recordId"><view class="btn" v-if="record.status == 1">报告</view></navigator>
+					<navigator :url="'/pages2/bank/question_report?examId='+record.examId+'&hideBtns=1&id=' + record.recordId"><view class="btn" v-if="record.status == 1">报告</view></navigator>
 					<navigator
 						:url="
 							'/pages2/bank/questionBankExplain?continue=1&recordId=' +
@@ -109,7 +107,9 @@ export default {
 		};
 	},
 	onLoad(option) {
-		
+		this.listGoodsUserQuestion();
+		this.examaperList();
+		this.getExamRecordList();
 	},
 	onPullDownRefresh() {
 		let that = this;
@@ -129,9 +129,7 @@ export default {
 		}
 	},
 	onShow() {
-		this.listGoodsUserQuestion();
-		this.examaperList();
-		this.getExamRecordList();
+		
 	},
 	methods: {
 		getExamRecordList() {
@@ -250,6 +248,10 @@ page {
 }
 </style>
 <style lang="scss" scope>
+	.animals{
+		transition: all 0.3s;
+		transform: rotate(180deg);
+	}
 .tabs {
 	position: fixed;
 	left: 0;
@@ -268,6 +270,9 @@ page {
 
 		&.active {
 			color: #333333;
+			.icon{
+				transform: rotate(180deg);
+			}
 		}
 	}
 }

+ 65 - 50
pages2/bank/question_report.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<view :class="reportdata.reportStatus === 0 ? 'redBtn' : reportdata.reportStatus === 1 ? 'greenBtn' : 'disNone'" v-if="reportdata.reportStatus !== null">
+		<view :class="reportdata.reportStatus === 0 ? 'redBtn' : reportdata.reportStatus === 1 ? 'greenBtn' : 'disNone'" v-if="examData.doType == 2 && reportdata.reportStatus !== null">
 			{{ reportdata.reportStatus === 0 ? '测试未通过' : reportdata.reportStatus === 1 ? '测试通过' : '' }}
 		</view>
 		<view class="top">
@@ -28,10 +28,10 @@
 					</view>
 				</view>
 			</view>
-			<view class="dis_fst">
+			<view class="dis_fst" v-if="!hideBtns">
 				<navigator
 					:url="
-						'/pages2/subject/wrongBank?explain=1&id=' + reportdata.examId
+						'/pages2/subject/wrongBank?isFromReport=1&explain=1&id=' + reportdata.recordId+'&examId='+examData.examId
 					"
 				>
 					<view class="btnACs">错题解析</view>
@@ -81,18 +81,24 @@ export default {
 	data() {
 		return {
 			id: '',
+			hideBtns:false,
+			recordId:'',
 			reportdata: {},
+			examData:{},
+			examId:'',
 			context1: null,
 			context2: null,
 		};
 	},
 	onUnload() {},
 	computed: { ...mapGetters(['userInfo']) },
-	onLoad(option) {
+	async onLoad(option) {
 		this.id = option.id;
-		this.examReport();
-	},
-	onShow() {
+		this.examId = option.examId;
+		this.hideBtns = Boolean(option.hideBtns);
+		await this.bankExam();
+		await this.examReport();
+		
 		uni.getSystemInfo({
 			success: res => {
 				var winW = res.screenWidth;
@@ -107,53 +113,54 @@ export default {
 						var caculateX = winW / 750;
 						var caculateY = winH / 1334;
 						console.log(caculateX);
-						var context1 = uni.createCanvasContext('Canvas1');
-						this.context1 = context1;
-						context1.setStrokeStyle('#EEEEEE');
-						context1.setLineWidth(caculateX * 20);
-						context1.arc(caculateX * 90, caculateX * 90, caculateX * 80, 0, 2 * Math.PI, true);
-						context1.stroke();
-						context1.draw();
 						
-						var context2 = uni.createCanvasContext('Canvas2');
-						this.context2 = context2;
-						context2.setStrokeStyle('#EEEEEE');
-						context2.setLineWidth(caculateX * 20);
-						context2.arc(caculateX * 90, caculateX * 90, caculateX * 80, 0, 2 * Math.PI, true);
-						context2.stroke();
-						context2.draw();
+						if(this.reportdata.totalScore) {
+							var context1 = uni.createCanvasContext('Canvas1');
+							this.context1 = context1;
+							context1.setStrokeStyle('#EEEEEE');
+							context1.setLineWidth(caculateX * 20);
+							context1.arc(caculateX * 90, caculateX * 90, caculateX * 80, 0, 2 * Math.PI, true);
+							context1.stroke();
+							context1.beginPath();
+							context1.setStrokeStyle('#32D74B');
+							context1.setFillStyle('#32D74B');
+							context1.setTextAlign('center');
+							context1.setTextBaseline('middle');
+							context1.setLineCap('round');
+							context1.setFontSize(caculateX * 64);
+							context1.fillText(this.reportdata.performance, caculateX * 90, caculateX * 90, caculateX * 180);
+							context1.setFillStyle('#999999');
+							context1.setFontSize(caculateX * 20);
+							context1.fillText(`满分${this.reportdata.totalScore}`, caculateX * 90, caculateX * 130, caculateX * 180);
+							context1.arc(caculateX * 90, caculateX * 90, caculateX * 80, 0, (this.reportdata.performance / this.reportdata.totalScore) * 2 * Math.PI, false);
+							context1.stroke();
+							context1.draw(true);
+						}
 						
-						await this.examReport();
+						if(this.reportdata.examTime) {
+							var context2 = uni.createCanvasContext('Canvas2');
+							this.context2 = context2;
+							context2.setStrokeStyle('#EEEEEE');
+							context2.setLineWidth(caculateX * 20);
+							context2.arc(caculateX * 90, caculateX * 90, caculateX * 80, 0, 2 * Math.PI, true);
+							context2.stroke();
+							context2.beginPath();
+							context2.setStrokeStyle('#007AFF');
+							context2.setFillStyle('#007AFF');
+							context2.setTextAlign('center');
+							context2.setTextBaseline('middle');
+							context2.setLineCap('round');
+							context2.setFontSize(caculateX * 64);
+							context2.fillText(`${this.reportdata.doTime}'`, caculateX * 90, caculateX * 90, caculateX * 180);
+							context2.setFillStyle('#999999');
+							context2.setFontSize(caculateX * 20);
+							context2.fillText(`限时${this.reportdata.examTime}'`, caculateX * 90, caculateX * 130, caculateX * 180);
+							context2.arc(caculateX * 90, caculateX * 90, caculateX * 80, 0, (this.reportdata.doTime / this.reportdata.examTime) * 2 * Math.PI, false);
+							context2.stroke();
+							context2.draw(true);
+						}
 						
-						context1.beginPath();
-						context1.setStrokeStyle('#32D74B');
-						context1.setFillStyle('#32D74B');
-						context1.setTextAlign('center');
-						context1.setTextBaseline('middle');
-						context1.setLineCap('round');
-						context1.setFontSize(caculateX * 64);
-						context1.fillText(this.reportdata.performance, caculateX * 90, caculateX * 90, caculateX * 180);
-						context1.setFillStyle('#999999');
-						context1.setFontSize(caculateX * 20);
-						context1.fillText(`满分${this.reportdata.totalScore}`, caculateX * 90, caculateX * 130, caculateX * 180);
-						context1.arc(caculateX * 90, caculateX * 90, caculateX * 80, 0, (this.reportdata.performance / this.reportdata.totalScore) * 2 * Math.PI, false);
-						context1.stroke();
-						context1.draw(true);
 						
-						context2.beginPath();
-						context2.setStrokeStyle('#007AFF');
-						context2.setFillStyle('#007AFF');
-						context2.setTextAlign('center');
-						context2.setTextBaseline('middle');
-						context2.setLineCap('round');
-						context2.setFontSize(caculateX * 64);
-						context2.fillText(`${this.reportdata.doTime}'`, caculateX * 90, caculateX * 90, caculateX * 180);
-						context2.setFillStyle('#999999');
-						context2.setFontSize(caculateX * 20);
-						context2.fillText(`限时${this.reportdata.examTime}'`, caculateX * 90, caculateX * 130, caculateX * 180);
-						context2.arc(caculateX * 90, caculateX * 90, caculateX * 80, 0, (this.reportdata.doTime / this.reportdata.examTime) * 2 * Math.PI, false);
-						context2.stroke();
-						context2.draw(true);
 					});
 			}
 		});
@@ -164,6 +171,14 @@ export default {
 				url: '/pages2/bank/my_question'
 			});
 		},
+		bankExam(){
+			return new Promise(resolve =>{
+				this.$api.bankExam(this.examId).then(res => {
+					this.examData = res.data.data;
+				})
+				resolve()
+			})
+		},
 		/**
 		 * 去做题
 		 */

+ 6 - 2
pages2/subject/collect.vue

@@ -1,8 +1,8 @@
 <template>
 	<view class="safeArea">
 		<view class="sceenBox">
-			<view :class="['item', {'active':sceenType===1} ]" @click="showSceen(1)">全部题库记录<u-icon class="icon" name="arrow-down"></u-icon></view>
-			<view :class="['item', {'active':sceenType===2} ]" @click="showSceen(2)">全部试卷类型<u-icon class="icon" name="arrow-down"></u-icon></view>
+			<view :class="['item', {'active':sceenType===1} ]" @click="showSceen(1)">全部题库记录<u-icon class="icon" :class="sceenType ===1 ? 'animals':''"  name="arrow-down"></u-icon></view>
+			<view :class="['item', {'active':sceenType===2} ]" @click="showSceen(2)">全部试卷类型<u-icon class="icon" :class="sceenType ===2 ? 'animals':''"  name="arrow-down"></u-icon></view>
 		</view>
 		<view class="sceenModel" v-if="sceenType">
 			<view class="sceenModelBg" @click="hideSceen"></view>
@@ -197,6 +197,10 @@ page {
 
 </style>
 <style scoped lang="scss">
+	.animals{
+		transition: all 0.3s;
+		transform: rotate(180deg);
+	}
 .sceenBox {
 	width:100%;
 	height: 80rpx;

+ 50 - 3
pages2/subject/collectBank.vue

@@ -293,7 +293,12 @@
 					
 				
 					<view class="footer_btn">
-						<view @click="openFooterTab">答题卡</view>
+						<view class="flex_center" @click="openFooterTab">
+							<view class="up-icon">
+								<image src="/static/up.png"></image>
+							</view>
+							答题卡
+						</view>
 					</view>
 				</view>
 			</swiper-item>
@@ -1022,7 +1027,8 @@ export default {
 .pageContent {
 	position:relative;
 	background-color: #eaeef1;
-	min-height: 100vh;
+	height: 100%;
+	overflow-y: scroll;
 	padding-top: 8rpx;
 	padding-bottom: 100rpx;
 }
@@ -1054,12 +1060,53 @@ export default {
 	padding: 0rpx 38rpx;
 	border-top: 1rpx solid #eee;
 	
+	.flex_center {
+		flex:1;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		flex-direction: column;
+		margin:0 200rpx;
+		font-size: 24rpx;
+		color: #999999;
+		
+		
+		.up-icon {
+			margin-bottom:18rpx;
+			width:100%;
+			display: flex;
+			justify-content: center;
+			image {
+				width:58rpx;
+				height:21rpx;
+			}
+		}
+	}
+	
 	.collect {
 		visibility: hidden;
-		
+	
 		&.show {
 			visibility: visible;
 		}
+		
+		>view {
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			justify-content: center;
+			
+			image {
+				width:32rpx;
+				height:32rpx;
+				margin-bottom:6rpx;
+			}
+			
+			view {
+				font-size: 24rpx;
+				color: #999999;
+			}
+		}
 	}
 }
 .boxSty {

+ 50 - 3
pages2/subject/collectTypeBank.vue

@@ -294,7 +294,12 @@
 					
 				
 					<view class="footer_btn">
-						<view @click="openFooterTab">答题卡</view>
+						<view class="flex_center" @click="openFooterTab">
+							<view class="up-icon">
+								<image src="/static/up.png"></image>
+							</view>
+							答题卡
+						</view>
 					</view>
 				</view>
 			</swiper-item>
@@ -1022,7 +1027,8 @@ export default {
 .pageContent {
 	position:relative;
 	background-color: #eaeef1;
-	min-height: 100vh;
+	height: 100%;
+	overflow-y: scroll;
 	padding-top: 8rpx;
 	padding-bottom: 100rpx;
 }
@@ -1054,12 +1060,53 @@ export default {
 	padding: 0rpx 38rpx;
 	border-top: 1rpx solid #eee;
 	
+	.flex_center {
+		flex:1;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		flex-direction: column;
+		margin:0 200rpx;
+		font-size: 24rpx;
+		color: #999999;
+		
+		
+		.up-icon {
+			margin-bottom:18rpx;
+			width:100%;
+			display: flex;
+			justify-content: center;
+			image {
+				width:58rpx;
+				height:21rpx;
+			}
+		}
+	}
+	
 	.collect {
 		visibility: hidden;
-		
+	
 		&.show {
 			visibility: visible;
 		}
+		
+		>view {
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			justify-content: center;
+			
+			image {
+				width:32rpx;
+				height:32rpx;
+				margin-bottom:6rpx;
+			}
+			
+			view {
+				font-size: 24rpx;
+				color: #999999;
+			}
+		}
 	}
 }
 .boxSty {

+ 6 - 2
pages2/subject/wrong.vue

@@ -1,8 +1,8 @@
 <template>
 	<view class="safeArea">
 		<view class="sceenBox">
-			<view :class="['item', {'active':sceenType===1} ]" @click="showSceen(1)">全部题库记录<u-icon class="icon" name="arrow-down"></u-icon></view>
-			<view :class="['item', {'active':sceenType===2} ]" @click="showSceen(2)">全部试卷类型<u-icon class="icon" name="arrow-down"></u-icon></view>
+			<view :class="['item', {'active':sceenType===1} ]" @click="showSceen(1)">全部题库记录<u-icon class="icon" :class="sceenType ===1 ? 'animals':''"  name="arrow-down"></u-icon></view>
+			<view :class="['item', {'active':sceenType===2} ]" @click="showSceen(2)">全部试卷类型<u-icon class="icon" :class="sceenType ===2? 'animals':''"  name="arrow-down"></u-icon></view>
 		</view>
 		<view class="sceenModel" v-if="sceenType">
 			<view class="sceenModelBg" @click="hideSceen"></view>
@@ -194,6 +194,10 @@ page {
 
 </style>
 <style scoped lang="scss">
+	.animals{
+		transition: all 0.3s;
+		transform: rotate(180deg);
+	}
 .sceenBox {
 	width:100%;
 	height: 80rpx;

+ 162 - 8
pages2/subject/wrongBank.vue

@@ -293,7 +293,12 @@
 					
 				
 					<view class="footer_btn">
-						<view @click="openFooterTab">答题卡</view>
+						<view class="flex_center" @click="openFooterTab">
+							<view class="up-icon">
+								<image src="/static/up.png"></image>
+							</view>
+							答题卡
+						</view>
 					</view>
 				</view>
 			</swiper-item>
@@ -333,24 +338,131 @@ export default {
 			judge:['错误','正确'],
 			show: false,
 			showDialog:true,
+			isFromReport:'',  //来自答题报告
 			bankList: [],
 			collectList:[],
 			goodsId:'',
-			explain:''
+			examId:'',
+			explain:'',
 		};
 	},
 	onLoad(option){
-		this.id = option.id;
-		this.explain = option.explain;
-		this.wrongRecordExamQuestionList();
+		this.id = option.id || '';
+		this.examId = option.examId || '';
+		this.isFromReport = option.isFromReport;
+		this.explain = option.explain || '';
+		
+		// if(this.isFromReport) { //通过答题报告查询错题列表
+		// 	this.wrongRecordList();
+		// } else { //通过错题集查询错题列表
+			this.wrongRecordExamQuestionList();
+		// }
+		
 	},
 	onUnload() {
 		
 	},
 	methods: {
+		/**
+		 * 通过答题报告查询错题列表
+		 */
+		wrongRecordList() {
+			this.$api.wrongRecordList({
+				recordId:this.id,
+			}).then(res => {
+				res.data.rows.forEach((item,index) => {
+					if(typeof item.jsonStr == 'string') {
+						item.jsonStr = JSON.parse(item.jsonStr)
+						
+						if(item.type == 2) { //多选
+							item.jsonStr.forEach(str => {
+								str.optionsId = ''+str.optionsId;
+							})
+							let arr = item.answerQuestion.split(',');
+							arr.forEach((a,i) => {
+								arr[i] = ''+a;
+							})
+							item.ans = arr;
+							if(this.explain) {
+								item.ques = item.ans;
+							}
+							return;
+						} else if(item.type == 5) {
+							item.ansText = {
+								text: '',
+								imageList: []
+							}
+							
+							if(this.explain) {
+								item.ques = {
+									text:item.analysisContent
+								}
+								
+								return;
+							}
+							
+							
+						} else if(item.type == 4) {
+							console.log(item.jsonStr)
+							item.ques = []
+							item.current = 0;
+							let ansArr = []; 
+							item.jsonStr.forEach((json,index) => {
+								if(json.type == 1) {
+									ansArr[index] = json.answerQuestion;
+								} else if(json.type == 2) {
+									json.optionsList.forEach(str => {
+										str.optionsId = ''+str.optionsId;
+									})
+									let arr = json.answerQuestion.split(',');
+									arr.forEach((a,i) => {
+										arr[i] = ''+a;
+									})
+									ansArr[index] = arr
+								} else if(json.type == 3) {
+									ansArr[index] = json.answerQuestion;
+								} else if(json.type == 5) {
+									ansArr[index] = {
+										text: '',
+										imageList: []
+									}
+									json.ansText = {
+										text: '',
+										imageList: []
+									}
+								}
+							})
+							
+							item.ans = ansArr
+							if(this.explain) {
+								item.ques = item.ans;
+							}
+							return;
+							
+						}
+						
+						item.ans = item.answerQuestion
+						if(this.explain) {
+							item.ques = item.ans;
+						}
+					} else {
+						if(this.explain) {
+							item.ques = item.ans;
+						}
+					}
+					
+				})
+				
+				this.questionList = res.data.rows;
+			})
+		},
+		/**
+		 * 通过错题集查询错题列表
+		 */
 		wrongRecordExamQuestionList() {
 			this.$api.wrongRecordExamQuestionList({
-				examId:this.id
+				examId:this.examId,
+				recordId:this.id,
 			}).then(res => {
 				
 				res.data.rows.forEach((item,index) => { 
@@ -1068,7 +1180,8 @@ export default {
 .pageContent {
 	position:relative;
 	background-color: #eaeef1;
-	min-height: 100vh;
+	height: 100%;
+	overflow-y: scroll;
 	padding-top: 8rpx;
 	padding-bottom: 100rpx;
 }
@@ -1100,12 +1213,53 @@ export default {
 	padding: 0rpx 38rpx;
 	border-top: 1rpx solid #eee;
 	
+	.flex_center {
+		flex:1;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		flex-direction: column;
+		margin:0 200rpx;
+		font-size: 24rpx;
+		color: #999999;
+		
+		
+		.up-icon {
+			margin-bottom:18rpx;
+			width:100%;
+			display: flex;
+			justify-content: center;
+			image {
+				width:58rpx;
+				height:21rpx;
+			}
+		}
+	}
+	
 	.collect {
 		visibility: hidden;
-		
+	
 		&.show {
 			visibility: visible;
 		}
+		
+		>view {
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			justify-content: center;
+			
+			image {
+				width:32rpx;
+				height:32rpx;
+				margin-bottom:6rpx;
+			}
+			
+			view {
+				font-size: 24rpx;
+				color: #999999;
+			}
+		}
 	}
 }
 .boxSty {

+ 50 - 3
pages2/subject/wrongTypeBank.vue

@@ -293,7 +293,12 @@
 					
 				
 					<view class="footer_btn">
-						<view @click="openFooterTab">答题卡</view>
+						<view class="flex_center" @click="openFooterTab">
+							<view class="up-icon">
+								<image src="/static/up.png"></image>
+							</view>
+							答题卡
+						</view>
 					</view>
 				</view>
 			</swiper-item>
@@ -1067,7 +1072,8 @@ export default {
 .pageContent {
 	position:relative;
 	background-color: #eaeef1;
-	min-height: 100vh;
+	height: 100%;
+	overflow-y: scroll;
 	padding-top: 8rpx;
 	padding-bottom: 100rpx;
 }
@@ -1099,12 +1105,53 @@ export default {
 	padding: 0rpx 38rpx;
 	border-top: 1rpx solid #eee;
 	
+	.flex_center {
+		flex:1;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		flex-direction: column;
+		margin:0 200rpx;
+		font-size: 24rpx;
+		color: #999999;
+		
+		
+		.up-icon {
+			margin-bottom:18rpx;
+			width:100%;
+			display: flex;
+			justify-content: center;
+			image {
+				width:58rpx;
+				height:21rpx;
+			}
+		}
+	}
+	
 	.collect {
 		visibility: hidden;
-		
+	
 		&.show {
 			visibility: visible;
 		}
+		
+		>view {
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			justify-content: center;
+			
+			image {
+				width:32rpx;
+				height:32rpx;
+				margin-bottom:6rpx;
+			}
+			
+			view {
+				font-size: 24rpx;
+				color: #999999;
+			}
+		}
 	}
 }
 .boxSty {

BIN
static/icon/collect.png


BIN
static/icon/collected.png