he2802 4 лет назад
Родитель
Сommit
521496b9a0

+ 30 - 1
common/httpList/goods.js

@@ -86,7 +86,21 @@ export default {
 		})
 	},
 	
-
+	wrongRecordTypeQuestionList(data) {
+		return myRequest({
+			url: '/exam/wwrong/record/type_question_list',
+			data:data,
+			method: 'GET',
+		})
+	},
+	
+	wrongRecordTypeList(data) {
+		return myRequest({
+			url: '/exam/wwrong/record/type_list',
+			data:data,
+			method: 'GET',
+		})
+	},
 
 	listGoodsUserQuestion(data) {
 		return myRequest({
@@ -130,6 +144,21 @@ export default {
 			noToken: true
 		})
 	},
+	wrongRecordExamQuestionList(data) {
+		return myRequest({
+			url: '/exam/wwrong/record/exam_question_list',
+			method: 'get',
+			data:data,
+		})
+	},
+	
+	wrongRecordDelete(data) {
+		return myRequest({
+			url: '/exam/wwrong/record/delete/question',
+			method: 'post',
+			data:data
+		})
+	},
 	
 	goodsCollectExamList(data) {
 		return myRequest({

+ 10 - 0
pages.json

@@ -444,6 +444,16 @@
 					}
 				}
 			},
+			{
+				"path": "subject/collectQuestionTypeBank",
+				"style": {
+					"navigationBarTitleText": "试卷",
+					"app-plus": {
+						"titleNView": false, //禁用原生导航栏 
+						"bounce": "none"
+					}
+				}
+			},
 			{
 				"path": "subject/report",
 				"style": {

+ 129 - 36
pages2/bank/questionBank.vue

@@ -27,13 +27,14 @@
 							<view v-if="!bank.ques">
 								<view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty" @click="radioSelect(item.optionsId,bankIndex)">
 									<view class="activeTI">{{ ast[index] }}</view>
-									{{ item.content }}
+									<view class="flex_auto">{{ item.content }}</view>
+									
 								</view>
 							</view>
 							<view v-if="bank.ques">
 								<view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty">
 									<text :class="{right:(item.optionsId == bank.ques) || (item.optionsId == bank.ans),wrong:(item.optionsId == bank.ques) && (bank.ques != bank.ans)}"  class="activeTI">{{ ast[index] }}</text>
-									{{ item.content }}
+									<view class="flex_auto">{{ item.content }}</view>
 								</view>
 							</view> 
 							<view v-if="bank.ques">
@@ -54,7 +55,7 @@
 							<view v-if="!bank.ques">
 								<view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty" @click="checkboxSelect(item.optionsId,bankIndex,index)">
 									<view :class="{checked:item.checked}" class="activeTI">{{ ast[index] }}</view>
-									{{ item.content }}
+									<view class="flex_auto">{{ item.content }}</view>
 								</view>
 							</view>
 							<view v-if="!bank.ques" class="submit_checkbox" @click="checkboxSubmit(bankIndex)">
@@ -63,7 +64,7 @@
 							<view v-if="bank.ques">
 								<view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty">
 									<text :class="{right:(bank.ques.indexOf(item.optionsId) != -1 ) || (bank.ans.indexOf(item.optionsId) != -1),wrong:(bank.ques.indexOf(item.optionsId) != -1 ) && (bank.ans.indexOf(item.optionsId) == -1)}"  class="activeTI">{{ ast[index] }}</text>
-									{{ item.content }} 
+									<view class="flex_auto">{{ item.content }}</view>
 								</view>
 							</view> 
 							<view v-if="bank.ques">
@@ -343,19 +344,35 @@ export default {
 			recordId:'',
 			isSubmit:false,
 			lastTime:0,
-			timer :null
+			timer :null,
+			wrongList:[]
 		};
 	},
 	onLoad(option){
 		this.id = option.id;
 		this.goodsId = option.goodsid;
 		this.goodsQuestionList();
+		this.wrongRecordExamQuestionList();
 	},
 	onUnload() {
 		console.log(this.ans)
 		this.examRecordEdit();
 	},
 	methods: {
+		/**
+		 * 获取错题集
+		 */
+		wrongRecordExamQuestionList() {
+			this.$api.wrongRecordExamQuestionList({
+				examId:this.id,
+				goodsId:this.goodsId
+			}).then(res => {
+				this.wrongList = res.data.rows
+			})
+		},
+		/**
+		 * 离开页面统计回答正确题数
+		 */
 		examRecordEdit() {
 			if(!this.isSubmit) {
 				
@@ -395,6 +412,9 @@ export default {
 				})
 			}
 		},
+		/**
+		 * 记录总题数
+		 */
 		examRecord() {
 			this.$api.examRecord({
 				examId:this.id,
@@ -405,6 +425,9 @@ export default {
 				
 			})
 		},
+		/**
+		 * @param {Object} second倒计时过滤器
+		 */
 		countdown(second) {
 			if(second) {
 				let h = parseInt(second/60/60 %24);     //   计算小时
@@ -422,12 +445,15 @@ export default {
 			}
 			
 		},
+		/**
+		 * 请求题目列表
+		 */
 		goodsQuestionList() {
 			this.$api.goodsQuestionList({
 				examId:this.id
 			}).then(res => {
 				this.lastTime = res.data.data[0].answerTime && res.data.data[0].answerTime * 60;
-				//考试
+				//考试时间到了自动交卷
 				if(this.lastTime) {
 					this.timer = setInterval(()=>{
 						
@@ -463,13 +489,13 @@ export default {
 							})
 							item.ans = arr;
 							return;
-						} else if(item.type == 5) {
+						} else if(item.type == 5) { //简答题
 							item.ansText = {
 								text: '',
 								imageList: []
 							}
 							
-						} else if(item.type == 4) {
+						} else if(item.type == 4) { //案例题
 							console.log(item.jsonStr)
 							item.ques = []
 							item.current = 0;
@@ -523,6 +549,7 @@ export default {
 			if(this.questionList[bindex].ques) return;
 			this.$set(this.questionList[bindex],'ques',optionsId)
 			
+			// 回答错误
 			if(this.questionList[bindex].ques != this.questionList[bindex].ans) {
 				this.$api.examWrongRecord({
 					"examId": this.id,
@@ -533,12 +560,22 @@ export default {
 					
 				})
 			} else {
+				let question = this.wrongList.find(item => item.questionId == this.questionList[bindex].questionId);
+				if(question) {
+					this.$api.wrongRecordDelete({
+						"examId": +this.id,
+						"goodsId": +this.goodsId,
+						"questionId": this.questionList[bindex].questionId,
+					}).then(res => {
+						
+					})
+				}
 				
 			}
 		},
 		
 		/**
-		 * @param {Object} e单选点击
+		 * @param {Object} e案例单选点击
 		 */
 		radioSelectChild(optionsId,ansIndex,bindex) {
 			if(this.questionList[bindex].ques[ansIndex]) return;
@@ -556,7 +593,7 @@ export default {
 		},
 		
 		/**
-		 * @param {Object} 多选点击
+		 * @param {Object} 案例多选点击
 		 */
 		checkboxSelectChild(bindex,ansIndex,childIndex) {
 			
@@ -581,7 +618,7 @@ export default {
 			let isWrong = this.questionList[bindex].ques.some((quesItem,quesIndex) => {
 				return this.questionList[bindex].ques[quesIndex] != this.questionList[bindex].ans[quesIndex]
 			})
-			
+			// 回答错误
 			if(isWrong) {
 				this.$api.examWrongRecord({
 					"examId": this.id,
@@ -591,11 +628,22 @@ export default {
 				}).then(res => {
 					
 				})
+			} else {
+				let question = this.wrongList.find(item => item.questionId == this.questionList[bindex].questionId);
+				if(question) {
+					this.$api.wrongRecordDelete({
+						"examId": +this.id,
+						"goodsId": +this.goodsId,
+						"questionId": this.questionList[bindex].questionId,
+					}).then(res => {
+						
+					})
+				}
 			}
 		},
 		
 		/**
-		 * @param {Object} 多选确认
+		 * @param {Object} 案例多选确认
 		 */
 		checkboxSubmitChild(bindex,ansIndex) {
 			
@@ -610,10 +658,15 @@ export default {
 			this.$set(this.questionList[bindex].ques,ansIndex,arr)
 		},
 		
+		/**
+		 * @param {Object} index
+		 * @param {Object} bindex 
+		 * 判断题
+		 */
 		judgeSelect(index,bindex) {
 			if(this.questionList[bindex].ques) return;
 			this.$set(this.questionList[bindex],'ques',index+'')
-			
+			// 回答错误
 			if(this.questionList[bindex].ques != this.questionList[bindex].ans) {
 				this.$api.examWrongRecord({
 					"examId": this.id,
@@ -623,9 +676,26 @@ export default {
 				}).then(res => {
 					
 				})
+			} else {
+				let question = this.wrongList.find(item => item.questionId == this.questionList[bindex].questionId);
+				if(question) {
+					this.$api.wrongRecordDelete({
+						"examId": +this.id,
+						"goodsId": +this.goodsId,
+						"questionId": this.questionList[bindex].questionId,
+					}).then(res => {
+						
+					})
+				}
 			}
 		},
 		
+		/**
+		 * @param {Object} ansindex
+		 * @param {Object} childindex
+		 * @param {Object} bindex
+		 * 案例判断题
+		 */
 		judgeSelectChild(ansindex,childindex,bindex) {
 			if(this.questionList[bindex].ques[ansindex]) return;
 			this.$set(this.questionList[bindex].ques,ansindex,childindex+'')
@@ -646,6 +716,10 @@ export default {
 			this.getCollectInfo(this.current)
 		},
 		
+		/**
+		 * @param {Object} current
+		 * 获取收藏信息
+		 */
 		getCollectInfo(current) {
 			this.$api.getCollectInfo({
 				examId:this.id,
@@ -660,6 +734,9 @@ export default {
 			})
 		},
 		
+		/**
+		 * 提交数据
+		 */
 		submit() {
 			let score = 0; //计算总分
 			let reportStatus = 0;
@@ -721,6 +798,11 @@ export default {
 			})
 		},
 		
+		/**
+		 * @param {Object} state
+		 * @param {Object} index
+		 * 收藏
+		 */
 		collect(state,index) {
 			if(!state) {
 				this.$api.collectQuestion({
@@ -752,27 +834,33 @@ export default {
 			return;
 		},
 		
-		click(e) {
-			if(this.ques[this.current]) return;
-			let value = e.currentTarget.dataset.value;
-			this.ques[this.current] = value;
-			this.ques = Object.assign({},this.ques)
-			
-		},
-		
+		/**
+		 * @param {Object} imgIndex
+		 * @param {Object} bankIndex
+		 * 删除简答图片
+		 */
 		deleteImg(imgIndex,bankIndex) {
 			
 			
 			this.questionList[bankIndex].ansText.imageList.splice(imgIndex,1)
 		},
 		
-		
+		/**
+		 * @param {Object} imgIndex
+		 * @param {Object} bankIndex
+		 * @param {Object} ansIndex
+		 * 删除案例题简答图片
+		 */
 		deleteImgChild(imgIndex,bankIndex,ansIndex) {
 			
 			
 			this.questionList[bankIndex].jsonStr[ansIndex].ansText.imageList.splice(imgIndex,1)
 		},
 		
+		/**
+		 * @param {Object} bankindex
+		 * 选择上传图片
+		 */
 		chooseImg(bankindex) {
 			uni.chooseImage({
 				count: 1, //默认9
@@ -808,6 +896,11 @@ export default {
 			})
 		},
 		
+		/**
+		 * @param {Object} bankindex
+		 * @param {Object} ansindex
+		 * 案例题选择上传图片
+		 */
 		chooseImgChild(bankindex,ansindex) {
 			uni.chooseImage({
 				count: 1, //默认9
@@ -898,6 +991,11 @@ export default {
 				});
 			});
 		},
+		/**
+		 * @param {Object} type
+		 * @param {Object} bankindex
+		 * 简答题答案确认
+		 */
 		submitAns(type,bankindex) {
 				
 			console.log(this.questionList[bankindex])
@@ -917,6 +1015,11 @@ export default {
 			
 		},
 		
+		/**
+		 * @param {Object} bankindex
+		 * @param {Object} ansindex
+		 * 案例题简答答案确认
+		 */
 		submitAnsChild(bankindex,ansindex) {
 				
 			if(!this.questionList[bankindex].jsonStr[ansindex].ansText.text && !this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.length) {
@@ -1015,20 +1118,6 @@ export default {
 			
 		},
 		
-		collectQuestion() {
-			this.$api.collectQuestion({
-				examId:this.id
-			}).then(res => {
-				if(res.data.code==200){
-					
-					uni.showToast({
-						title: '收藏成功',
-						duration: 2000,
-						icon:'none'
-					});
-				}
-			})
-		}
 	}
 };
 </script>
@@ -1041,6 +1130,10 @@ export default {
 .lisSty {
 	margin-bottom: 16rpx;
 	display: flex;
+	
+	.flex_auto {
+		flex:1;
+	}
 }
 .activeTI {
 	vertical-align: middle;

+ 8 - 4
pages2/bank/questionBankTest.vue

@@ -27,13 +27,13 @@
 							<view v-if="!ques[bankIndex]">
 								<view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty" @click="radioSelect" :data-index="index" :data-bindex="bankIndex" :data-optionsId="item.optionsId">
 									<view class="activeTI">{{ ast[index] }}</view>
-									{{ item.content }}
+									<view class="flex_auto">{{ item.content }}</view>
 								</view>
 							</view>
 							<view v-if="ques[bankIndex]">
 								<view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty">
 									<text :class="{right:(item.optionsId == ques[bankIndex]) || (item.optionsId == ans[bankIndex]),wrong:(item.optionsId == ques[bankIndex]) && (ques[bankIndex] != ans[bankIndex])}"  class="activeTI">{{ ast[index] }}</text>
-									{{ item.content }}
+									<view class="flex_auto">{{ item.content }}</view>
 								</view>
 							</view> 
 							<view v-if="ques[bankIndex]">
@@ -54,7 +54,7 @@
 							<view v-if="!ques[bankIndex]">
 								<view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty" @click="checkboxSelect" :data-index="index" :data-bindex="bankIndex" :data-optionsId="item.optionsId">
 									<view :class="{checked:item.checked}" class="activeTI">{{ ast[index] }}</view>
-									{{ item.content }}
+									<view class="flex_auto">{{ item.content }}</view>
 								</view>
 							</view>
 							<view v-if="!ques[bankIndex]" class="submit_checkbox" @click="checkboxSubmit" :data-bindex="bankIndex">
@@ -63,7 +63,7 @@
 							<view v-if="ques[bankIndex]">
 								<view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty">
 									<text :class="{right:(ques[bankIndex].indexOf(item.optionsId) != -1 ) || (ans[bankIndex].indexOf(item.optionsId) != -1),wrong:(ques[bankIndex].indexOf(item.optionsId) != -1 ) && (ans[bankIndex].indexOf(item.optionsId) == -1)}"  class="activeTI">{{ ast[index] }}</text>
-									{{ item.content }} 
+									<view class="flex_auto">{{ item.content }}</view>
 								</view>
 							</view> 
 							<view v-if="ques[bankIndex]">
@@ -750,6 +750,10 @@ export default {
 .lisSty {
 	margin-bottom: 16rpx;
 	display: flex;
+	
+	.flex_auto {
+		flex:1;
+	}
 }
 .activeTI {
 	vertical-align: middle;

+ 67 - 35
pages2/subject/collect.vue

@@ -8,10 +8,10 @@
 			<view class="sceenModelBg" @click="hideSceen"></view>
 			<view class="sceenMain">
 				<template v-if="sceenType===1">
-					<view :class="['item',{'active':item.checked}]" v-for="(item, index) in scennList1" :key="index" @click="choSceen(index,'tk')">{{item.name}}</view>
+					<view :class="['item',{'active':item.checked}]" v-for="(item, index) in scennList1" :key="index" @click="choseRecord(index)">{{item.goodsName}}</view>
 				</template>
 				<template v-if="sceenType===2">
-					<view :class="['item',{'active':item.checked}]" v-for="(item, index) in scennList2" :key="index" @click="choSceen(index,'sj')">{{item.name}}</view>
+					<view :class="['item',{'active':item.checked}]" v-for="(item, index) in scennList2" :key="index" @click="choseType(index)">{{item.paperName}}</view>
 				</template>
 			</view>
 		</view>
@@ -31,7 +31,7 @@
 				<view class="item" v-for="(item,index) in testList.rows" :key="index">
 					<view class="title">{{item.examName}}</view>
 					<view class="bt">
-						<view class="left">错题数<text class="num">23</text></view>
+						<view class="left">收藏数<text class="num">{{item.num}}</text></view>
 						<view class="right">
 							<navigator :url="'/pages2/subject/collectBank?id='+item.examId">
 								<view class="btn">重做</view>
@@ -55,7 +55,7 @@
 						<text v-if="item.type==5">简答题</text>
 					</view>
 					<view class="bt">
-						<view class="left">错题数<text class="num">{{item.num}}</text></view>
+						<view class="left">收藏数<text class="num">{{item.num}}</text></view>
 						<view class="right">
 							<navigator :url="'/pages2/subject/collectTypeBank?type='+item.type">
 								<view class="btn">重做</view>
@@ -79,70 +79,102 @@ export default {
 		return {
 			sceenType: null,
 			scennList1:[
-				{id: 1, name: '全部题库记录', checked: true},{id: 1, name: '试卷名称可换行并完整显示'},{id: 1, name: '试卷名称可换行并完整显示'},{id: 1, name: '试卷名称可换行并完整显示'}
+				{goodsId: '', goodsName: '全部题库记录', checked: true}
 			],
 			scennList2:[
-				{id: 1, name: '全部试卷类型', checked: true},{id: 1, name: '模拟卷'},{id: 1, name: '真题'},{id: 1, name: '练习'}
+				{paperId: '', paperName: '全部试卷类型', checked: true}
 			],
 			type:1,
 			testList:[],
-			typeList:[]
+			typeList:[],
+			goodsid:'',
+			paperid:''
 		};
 	},
 	onPullDownRefresh() {},
 	onLoad(option) {
-		this.goodsCollectExamList()
-		this.collectQuestionTypeList();
+		
+		
+		
+		this.listGoodsUserQuestion();
+		this.examaperList();
+		this.getData();
 	},
 	methods: {
+		getData() {
+			if(this.type == 1) {
+				this.goodsCollectExamList()
+			} else if(this.type == 2) {
+				this.collectQuestionTypeList();
+			}
+		},
+		examaperList() {
+			this.$api.examaperList({
+				
+			}).then(res => {
+				this.scennList2 = [...this.scennList2,...res.data.rows];
+			})
+		},
+		
+		listGoodsUserQuestion() {
+			this.$api.listGoodsUserQuestion({
+				
+			}).then(res => {
+				this.scennList1 = [...this.scennList1,...res.data.rows];
+			})
+		},
 		goodsCollectExamList() {
 			this.$api.goodsCollectExamList({
-				
+				paperId:this.paperid,
+				goodsId:this.goodsid
 			}).then(res => {
 				this.testList = res.data 
 			})
 		},
 		collectQuestionTypeList() {
 			this.$api.collectQuestionTypeList({
-				
+				paperId:this.paperid,
+				goodsId:this.goodsid
 			}).then(res => {
 				this.typeList = res.data 
 			})
 		},
 		showSceen(type){
 			this.sceenType = type
-			
 		},
+		/**
+		 * @param {Object} tab切换
+		 */
 		selectType(type) {
 			this.type = type;
-			// if(type == 1) {
-			// 	this.goodsCollectExamList()
-			// } else if(type == 2) {
-			// 	this.goodsCollectList();
-			// }
+			this.getData();
 		},
 		hideSceen(){
 			this.sceenType = null
 		},
-		choSceen(index,type){
-			if(type==='tk'){
-				this.scennList1.forEach((item,idx)=>{
-					this.$set(item, 'checked',false)
-					if(index===idx){
-						this.$set(item, 'checked',true)
-					}
-				})
-			}
-			if(type==='sj'){
-				this.scennList2.forEach((item,idx)=>{
-					this.$set(item, 'checked',false)
-					if(index===idx){
-						this.$set(item, 'checked',true)
-					}
-				})
-			}
+		choseRecord(index) {
 			this.sceenType = null
-		}
+			this.scennList1.forEach((item,idx)=>{
+				this.$set(item, 'checked',false)
+				if(index==idx){
+					this.goodsid = item.goodsId
+					this.$set(item, 'checked',true)
+				}
+			})
+			
+			this.getData()
+		},
+		choseType(index) {
+			this.sceenType = null
+			this.scennList2.forEach((item,idx)=>{
+				this.$set(item, 'checked',false)
+				if(index==idx){
+					this.paperid = item.paperId
+					this.$set(item, 'checked',true)
+				}
+			})
+			this.getData()
+		},
 	}
 };
 </script>

+ 8 - 4
pages2/subject/collectBank.vue

@@ -27,13 +27,13 @@
 							<view v-if="!bank.ques">
 								<view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty" @click="radioSelect(item.optionsId,bankIndex)">
 									<view class="activeTI">{{ ast[index] }}</view>
-									{{ item.content }}
+									<view class="flex_auto">{{ item.content }}</view>
 								</view>
 							</view>
 							<view v-if="bank.ques">
 								<view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty">
 									<text :class="{right:(item.optionsId == bank.ques) || (item.optionsId == bank.ans),wrong:(item.optionsId == bank.ques) && (bank.ques != bank.ans)}"  class="activeTI">{{ ast[index] }}</text>
-									{{ item.content }}
+									<view class="flex_auto">{{ item.content }}</view>
 								</view>
 							</view> 
 							<view v-if="bank.ques">
@@ -54,7 +54,7 @@
 							<view v-if="!bank.ques">
 								<view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty" @click="checkboxSelect(item.optionsId,bankIndex,index)">
 									<view :class="{checked:item.checked}" class="activeTI">{{ ast[index] }}</view>
-									{{ item.content }}
+									<view class="flex_auto">{{ item.content }}</view>
 								</view>
 							</view>
 							<view v-if="!bank.ques" class="submit_checkbox" @click="checkboxSubmit(bankIndex)">
@@ -63,7 +63,7 @@
 							<view v-if="bank.ques">
 								<view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty">
 									<text :class="{right:(bank.ques.indexOf(item.optionsId) != -1 ) || (bank.ans.indexOf(item.optionsId) != -1),wrong:(bank.ques.indexOf(item.optionsId) != -1 ) && (bank.ans.indexOf(item.optionsId) == -1)}"  class="activeTI">{{ ast[index] }}</text>
-									{{ item.content }} 
+									<view class="flex_auto">{{ item.content }}</view>
 								</view>
 							</view> 
 							<view v-if="bank.ques">
@@ -801,6 +801,10 @@ export default {
 .lisSty {
 	margin-bottom: 16rpx;
 	display: flex;
+	
+	.flex_auto {
+		flex:1;
+	}
 }
 .activeTI {
 	vertical-align: middle;

+ 1139 - 0
pages2/subject/collectQuestionTypeBank.vue

@@ -0,0 +1,1139 @@
+<template>
+	<view id="questionBank">
+		<swiper class="swiper" :current="current" @change="swiperChange" :interval="interval">
+			<swiper-item v-for="(bank,bankIndex) in questionList" :key="bankIndex">
+				<view class="pageContent">
+					<view class="pad_8 titBox" >
+						<view class="firstLetter">
+							<view class="leftLetters">
+								<view class="btnType">
+									<text v-if="bank.type==1">单选</text>
+									<text v-if="bank.type==2">多选</text>
+									<text v-if="bank.type==3">判断</text>
+									<text v-if="bank.type==4">案例题</text>
+									<text v-if="bank.type==5">简答题</text>
+								</view>
+								<text>{{bankIndex+1}}/{{questionList.length}}</text>
+							</view>
+							<view style="color: #666;font-size: 28rpx;"></view>
+							<view class="leftLetters"></view>
+						</view>
+						<view class="titles">
+							<rich-text :nodes="bank.content"></rich-text>
+						</view>		
+					</view>
+					<view class="pad_8 titBox">
+						<template v-if="bank.type == 1">
+							<view v-if="!bank.ques">
+								<view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty" @click="radioSelect(item.optionsId,bankIndex)">
+									<view class="activeTI">{{ ast[index] }}</view>
+									<view class="flex_auto">{{ item.content }}</view>
+								</view>
+							</view>
+							<view v-if="bank.ques">
+								<view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty">
+									<text :class="{right:(item.optionsId == bank.ques) || (item.optionsId == bank.ans),wrong:(item.optionsId == bank.ques) && (bank.ques != bank.ans)}"  class="activeTI">{{ ast[index] }}</text>
+									<view class="flex_auto">{{ item.content }}</view>
+								</view>
+							</view> 
+							<view v-if="bank.ques">
+								<view class="pad_8 answer">
+									<view>正确答案:{{ast[bank.ans-1]}}</view>
+									<view v-if="!explain">我的答案:{{ast[bank.ques-1]}}</view>
+								</view>
+								<view class="pad_8 answerInfos">
+									<view class="answerTitle">答案解析</view>
+									<view class="answerContent">
+										<rich-text :nodes="bank.analysisContent"></rich-text>
+									</view>
+								</view>
+							</view>
+						</template>
+						
+						<template v-if="bank.type == 2">
+							<view v-if="!bank.ques">
+								<view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty" @click="checkboxSelect(item.optionsId,bankIndex,index)">
+									<view :class="{checked:item.checked}" class="activeTI">{{ ast[index] }}</view>
+									<view class="flex_auto">{{ item.content }}</view>
+								</view>
+							</view>
+							<view v-if="!bank.ques" class="submit_checkbox" @click="checkboxSubmit(bankIndex)">
+								确认答案
+							</view>
+							<view v-if="bank.ques">
+								<view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty">
+									<text :class="{right:(bank.ques.indexOf(item.optionsId) != -1 ) || (bank.ans.indexOf(item.optionsId) != -1),wrong:(bank.ques.indexOf(item.optionsId) != -1 ) && (bank.ans.indexOf(item.optionsId) == -1)}"  class="activeTI">{{ ast[index] }}</text>
+									<view class="flex_auto">{{ item.content }}</view>
+								</view>
+							</view> 
+							<view v-if="bank.ques">
+								<view class="pad_8 answer">
+									<view>正确答案:
+										<text v-for="ansItem in bank.ans">{{ast[ansItem-1]}}</text>
+									</view>
+									<view v-if="!explain">我的答案:
+										<text v-for="quesItem in bank.ques">{{ast[quesItem-1]}}</text>
+									</view>
+								</view>
+								<view class="pad_8 answerInfos">
+									<view class="answerTitle">答案解析</view>
+									<view class="answerContent">
+										<rich-text :nodes="bank.analysisContent"></rich-text>
+									</view>
+								</view>
+							</view>
+						</template>
+						
+						<template v-if="bank.type == 3">
+							<view v-if="!bank.ques">
+								<view v-for="(item, index) in judge" :key="index" class="lisSty" @click="judgeSelect(index,bankIndex)">
+									<view class="activeTI">{{ ast[index] }}</view>
+									{{ item }}
+								</view>
+							</view>
+							<view v-if="bank.ques">
+								<view v-for="(item, index) in judge" :key="index" class="lisSty">
+									<text :class="{right:(index == bank.ques) || (index == bank.ans),wrong:(index == bank.ques) && (bank.ques != bank.ans)}"  class="activeTI">{{ ast[index] }}</text>
+									{{ item }}
+								</view>
+							</view> 
+							<view v-if="bank.ques">
+								<view class="pad_8 answer">
+									<view>正确答案:{{ast[bank.ans]}}</view>
+									<view v-if="!explain">我的答案:{{ast[bank.ques]}}</view>
+								</view>
+								<view class="pad_8 answerInfos">
+									<view class="answerTitle">答案解析</view>
+									<view class="answerContent">
+										<rich-text :nodes="bank.analysisContent"></rich-text>
+									</view>
+								</view>
+							</view>
+						</template>
+						
+						
+						<!-- 简答题 -->
+						<template v-if="bank.type == 5">
+							<view class="ans">
+								<view class="ans_input" v-if="!bank.ques">
+									<view class="top flex">
+										<image :data-index="bankIndex" class="icon" @click="chooseImg(bankIndex)" src="/static/08-10_032.jpg" mode=""></image>
+										<view class="progress">0/4</view>
+										<view class="submit"  @click="submitAns(bankIndex)" >确认答案</view>
+									</view>
+									<view class="textarea">
+										<textarea v-model="bank.ansText.text" placeholder="在此输入答案"></textarea>
+									</view>
+									<view class="imgs">
+										<view class="img" v-for="(img,imgIndex) in bank.ansText.imageList" >
+											<text @click="deleteImg(imgIndex,bankIndex)">x</text>
+											<image :src="$method.splitImgHost(img, true)"></image>
+										</view>
+									</view>
+								</view>
+								<view class="ans_submit answerInfos" v-if="bank.ques && !explain">
+									<view class="answerTitle">答案我的</view>
+									{{bank.ques.text}}
+									<view class="imgs">
+										<image class="img" v-for="ques in bank.ques.imageList" :src="ques"></image>
+									</view>
+								</view>
+							</view>
+							<view v-if="bank.ques">
+								<view class="pad_8 answerInfos">
+									<view class="answerTitle">答案解析</view>
+									<view class="answerContent">
+										<rich-text :nodes="bank.analysisContent"></rich-text>
+									</view>
+								</view>
+							</view>
+						</template>
+						
+						<!-- 案例题 -->
+						<template v-if="bank.type == 4">
+							<view class="tabs">
+								<view class="tab" :class="{current:tabIndex == bank.current}" :key="tabIndex" v-for="(tab,tabIndex) in bank.jsonStr" @click="tabSelect(tabIndex,bankIndex)">问题{{tabIndex}}</view>
+							</view>
+							<view v-for="(ansItem,ansIndex) in bank.jsonStr" v-if="bank.current == ansIndex" :key="ansIndex">
+								<view class="titles">
+									<rich-text :nodes="ansItem.content"></rich-text>
+								</view>
+								<template v-if="ansItem.type == 1">
+									<view v-if="!bank.ques[ansIndex]">
+										<view v-for="(option, childIndex) in ansItem.optionsList" :key="childIndex" class="lisSty" @click="radioSelectChild(option.optionsId,ansIndex,bankIndex)">
+											<view class="activeTI">{{ ast[childIndex] }}</view>
+											<rich-text class="textChild" :nodes="option.content"></rich-text>
+										</view>
+									</view>
+									<view v-if="bank.ques[ansIndex]">
+										<view v-for="(option, childIndex) in ansItem.optionsList" :key="index" class="lisSty">
+											<text :class="{right:(option.optionsId == bank.ques[ansIndex]) || (option.optionsId == bank.ans[ansIndex]),wrong:(option.optionsId == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}"  class="activeTI">{{ ast[childIndex] }}</text>
+											<rich-text :nodes="option.content"></rich-text>
+										</view>
+									</view> 
+									<view v-if="bank.ques[ansIndex]">
+										<view class="pad_8 answer">
+											<view>正确答案:{{ast[bank.ans[ansIndex]-1]}}</view>
+											<view v-if="!explain">我的答案:{{ast[bank.ques[ansIndex]-1]}}</view>
+										</view>
+										<view class="pad_8 answerInfos">
+											<view class="answerTitle">答案解析</view>
+											<view class="answerContent">
+												<rich-text :nodes="option.analysisContent"></rich-text>
+											</view>
+										</view>
+									</view>
+								</template>
+								
+								<template v-if="ansItem.type == 2">
+									<view v-if="!bank.ques[ansIndex]">
+										<view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty" @click="checkboxSelectChild(bankIndex,ansIndex,childindex)">
+											<view :class="{checked:option.checked}" class="activeTI">{{ ast[childindex] }}</view>
+											<rich-text :nodes="option.content"></rich-text>
+										</view>
+									</view>
+									<view v-if="!bank.ques[ansIndex]" class="submit_checkbox" @click="checkboxSubmitChild(bankIndex,ansIndex)">
+										确认答案
+									</view>
+									<view v-if="bank.ques && bank.ques[ansIndex]">
+										<view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty">
+											<text :class="{right:right(bankIndex,ansIndex,option),wrong:wrong(bankIndex,ansIndex,option)}"  class="activeTI">{{ ast[childindex] }}</text>
+											<rich-text :nodes="option.content"></rich-text>
+										</view>
+									</view> 
+									<view v-if="bank.ques[ansIndex]">
+										<view class="pad_8 answer">
+											<view>正确答案:
+												<text v-for="ansItem1 in bank.ans[ansIndex]">{{ast[ansItem1-1]}}</text>
+											</view>
+											<view v-if="!explain">我的答案:
+												<text v-for="quesItem in bank.ques[ansIndex]">{{ast[quesItem-1]}}</text>
+											</view>
+										</view>
+										<view class="pad_8 answerInfos">
+											<view class="answerTitle">答案解析</view>
+											<view class="answerContent">
+												<rich-text :nodes="ansItem.analysisContent"></rich-text>
+											</view>
+										</view>
+									</view>
+								</template>
+								
+								<template v-if="ansItem.type == 3">
+									<view v-if="!bank.ques[ansIndex]">
+										<view v-for="(option, childindex) in judge" :key="childindex" class="lisSty" @click="judgeSelectChild(ansIndex,childindex,bankIndex)">
+											<view class="activeTI">{{ ast[childindex] }}</view>
+											{{ option }}
+										</view>
+									</view>
+									<view v-if="bank.ques[ansIndex]">
+										<view v-for="(option, childindex) in judge" :key="childindex" class="lisSty">
+											<text :class="{right:(childindex == bank.ques[ansIndex]) || (childindex == bank.ans[ansIndex]),wrong:(childindex == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}"  class="activeTI">{{ ast[childindex] }}</text>
+											{{ option }}
+										</view>
+									</view> 
+									<view v-if="bank.ques[ansIndex]">
+										<view class="pad_8 answer">
+											<view>正确答案:{{ast[bank.ans[ansIndex]]}}</view>
+											<view v-if="!explain">我的答案:{{ast[bank.ques[ansIndex]]}}</view>
+										</view>
+										<view class="pad_8 answerInfos">
+											<view class="answerTitle">答案解析</view>
+											<view class="answerContent">
+												<rich-text :nodes="ansItem.analysisContent"></rich-text>
+											</view>
+										</view>
+									</view>
+								</template>
+								
+								
+								<!-- 简答题 -->
+								<template v-if="ansItem.type == 5">
+									<view class="ans">
+										<view class="ans_input" v-if="!bank.ques[ansIndex]">
+											<view class="top flex">
+												<image class="icon" @click="chooseImgChild(bankIndex,ansIndex)" src="/static/08-10_032.jpg" mode=""></image>
+												<view class="progress">0/4</view>
+												<view class="submit"  @click="submitAnsChild(bankIndex,ansIndex)">确认答案</view>
+											</view>
+											<view class="textarea">
+												<textarea v-model="ansItem.ansText.text" placeholder="在此输入答案"></textarea>
+											</view>
+											<view class="imgs">
+												<view class="img" v-for="(img,imgIndex) in ansItem.ansText.imageList" >
+													<text @click="deleteImgChild(imgIndex,bankIndex,ansIndex)">x</text>
+													<image :src="$method.splitImgHost(img, true)"></image>
+												</view>
+											</view>
+										</view>
+										<view class="ans_submit answerInfos" v-if="bank.ques[ansIndex] && !explain">
+											<view class="answerTitle">答案我的</view>
+											{{bank.ques[ansIndex].text}}
+											<view class="imgs">
+												<image class="img" v-for="ques in bank.ques[ansIndex].imageList" :src="ques"></image>
+											</view>
+										</view>
+									</view>
+									<view v-if="bank.ques[ansIndex]">
+										<view class="pad_8 answerInfos">
+											<view class="answerTitle">答案解析</view>
+											<view class="answerContent">
+												<rich-text :nodes="ansItem.analysisContent"></rich-text>
+											</view>
+										</view>
+									</view>
+								</template>
+								
+								
+							</view>
+						</template>
+						
+						
+					</view>
+					
+				
+					<view class="footer_btn">
+						<view @click="openFooterTab">答题卡</view>
+					</view>
+				</view>
+			</swiper-item>
+		</swiper>
+		
+		<u-popup v-model="show" mode="bottom" border-radius="14" height="680rpx">
+			<view class="popupView">
+				<view class="popupTops">
+					<view class="topIcon"></view>
+					点击编号即可跳转至对应题目
+				</view>
+				<view class="popupContent">
+					<scroll-view scroll-y="true" style="height: 506rpx;">
+						<view class="boxSty">
+							<view v-for="(item, index) in questionList" :key="index" @click="changeIndex(index)" :class="{isRight:isRight(item,index),isWrong:isWrong(item,index)}" class="liListSty">{{ index + 1 }}</view>
+						</view>
+					</scroll-view>
+				</view>
+			</view>
+		</u-popup>
+		
+		<view class="dialog" v-if="showDialog">
+			<view class="text">左右滑动切换上下题</view>
+			<view class="btn" @click="hideDialog">我知道了</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			current:0,
+			questionList:[],
+			ast: ['A', 'B', 'C', 'D','E','F','G'],
+			judge:['错误','正确'],
+			show: false,
+			showDialog:true,
+			bankList: [],
+			collectList:[],
+			type:'',
+			explain:''
+		};
+	},
+	onLoad(option){
+		this.type = option.type;
+		this.explain = option.explain;
+		this.wrongRecordTypeQuestionList();
+	},
+	onUnload() {
+		
+	},
+	methods: {
+		
+		wrongRecordTypeQuestionList() {
+			this.$api.wrongRecordTypeQuestionList({
+				type:this.type
+			}).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;
+				
+			})
+		},
+		/**
+		 * @param {Object} e单选点击
+		 */
+		radioSelect(optionsId,bindex) {
+			if(this.questionList[bindex].ques) return;
+			this.$set(this.questionList[bindex],'ques',optionsId)
+			
+		},
+		
+		/**
+		 * @param {Object} e单选点击
+		 */
+		radioSelectChild(optionsId,ansIndex,bindex) {
+			if(this.questionList[bindex].ques[ansIndex]) return;
+			this.$set(this.questionList[bindex].ques,ansIndex,optionsId)
+			
+		},
+		
+		
+		/**
+		 * @param {Object} 多选点击
+		 */
+		checkboxSelect(optionsId,bindex,index) {
+			
+			this.$set(this.questionList[bindex].jsonStr[index],'checked',!this.questionList[bindex].jsonStr[index].checked)
+		},
+		
+		/**
+		 * @param {Object} 多选点击
+		 */
+		checkboxSelectChild(bindex,ansIndex,childIndex) {
+			
+			this.$set(this.questionList[bindex].jsonStr[ansIndex].optionsList[childIndex],'checked',!this.questionList[bindex].jsonStr[ansIndex].optionsList[childIndex].checked)
+		},
+		
+		/**
+		 * @param {Object} 多选确认
+		 */
+		checkboxSubmit(bindex) {
+			
+			if(this.questionList[bindex].ques) return;
+			let arr = [];
+			this.questionList[bindex].jsonStr.forEach(item => {
+				if(item.checked) {
+					arr.push(item.optionsId)
+				}
+			})
+			
+			this.$set(this.questionList[bindex],'ques',arr)
+			
+		},
+		
+		/**
+		 * @param {Object} 多选确认
+		 */
+		checkboxSubmitChild(bindex,ansIndex) {
+			
+			if(this.questionList[bindex].ques[ansIndex]) return;
+			let arr = [];
+			this.questionList[bindex].jsonStr[ansIndex].optionsList.forEach(item => {
+				if(item.checked) {
+					arr.push(item.optionsId)
+				}
+			})
+			
+			this.$set(this.questionList[bindex].ques,ansIndex,arr)
+		},
+		
+		judgeSelect(index,bindex) {
+			if(this.questionList[bindex].ques) return;
+			this.$set(this.questionList[bindex],'ques',index+'')
+			
+		},
+		
+		judgeSelectChild(ansindex,childindex,bindex) {
+			if(this.questionList[bindex].ques[ansindex]) return;
+			this.$set(this.questionList[bindex].ques,ansindex,childindex+'')
+		},
+		
+		openFooterTab() {
+			this.show = true;
+		},
+		hideDialog() {
+			this.showDialog = false
+		},
+		changeIndex(index) {
+			this.current = index
+		},
+		
+		swiperChange(e) {
+			this.current = e.detail.current;
+		},
+		
+		
+		deleteImg(imgIndex,bankIndex) {
+			
+			
+			this.questionList[bankIndex].ansText.imageList.splice(imgIndex,1)
+		},
+		
+		
+		deleteImgChild(imgIndex,bankIndex,ansIndex) {
+			
+			
+			this.questionList[bankIndex].jsonStr[ansIndex].ansText.imageList.splice(imgIndex,1)
+		},
+		
+		chooseImg(bankindex) {
+			uni.chooseImage({
+				count: 1, //默认9
+				sizeType: ['compressed', ], //可以指定是原图还是压缩图,默认二者都有
+				sourceType: ['album','camera'], //从相册选择
+				success: (res) => {
+					let self = this;
+					// console.log(JSON.stringify(res.tempFilePaths));
+					let img = res.tempFilePaths[0];
+					uni.getImageInfo({
+						src: img,
+						success: async res => {
+							let canvasWidth = res.width; //图片原始长宽
+							let canvasHeight = res.height;
+							if (canvasWidth > 1000 || canvasHeight > 1000) {
+								uni.compressImage({
+									src: img,
+									quality: 75,
+									width: '50%',
+									height: '50%',
+									success: async rest => {
+										const dir = await self.uploadFile(rest.tempFilePath, 0);
+										this.questionList[bankindex].ansText.imageList.push(dir)
+									} 
+								});
+							} else {
+								const dir = await self.uploadFile(img, 0);
+								this.questionList[bankindex].ansText.imageList.push(dir)
+							}
+						}
+					});
+				}
+			})
+		},
+		
+		chooseImgChild(bankindex,ansindex) {
+			uni.chooseImage({
+				count: 1, //默认9
+				sizeType: ['compressed', ], //可以指定是原图还是压缩图,默认二者都有
+				sourceType: ['album','camera'], //从相册选择
+				success: (res) => {
+					let self = this;
+					// console.log(JSON.stringify(res.tempFilePaths));
+					let img = res.tempFilePaths[0];
+					uni.getImageInfo({
+						src: img,
+						success: async res => {
+							let canvasWidth = res.width; //图片原始长宽
+							let canvasHeight = res.height;
+							if (canvasWidth > 1000 || canvasHeight > 1000) {
+								uni.compressImage({
+									src: img,
+									quality: 75,
+									width: '50%',
+									height: '50%',
+									success: async rest => {
+										const dir = await self.uploadFile(rest.tempFilePath, 0);
+										this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.push(dir)
+									} 
+								});
+							} else {
+								const dir = await self.uploadFile(img, 0);
+								this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.push(dir)
+							}
+						}
+					});
+				}
+			})
+		},
+		
+		uploadFile(options, int) {
+			var self = this;
+			return new Promise((resolve, reject) => {
+				var data = {
+					imageStatus: int
+				};
+				self.$api.aliyunpolicy(data).then(res => {
+					console.log(res.data,6)
+					if(res.data.code!=200){
+						self.$method.showToast('签名错误'+JSON.stringify(res.data))
+						return
+					}
+					var ossToken = res.data.data.resultContent;
+					if(ossToken.host==null||ossToken.host==undefined){
+						self.$method.showToast('上传路径报错'+JSON.stringify(res.data))
+						return
+					}
+					uni.uploadFile({
+						url: ossToken.host,
+						name: 'file',
+						filePath: options,
+						fileType: 'image',
+						header: {
+							AuthorizationToken: 'WX ' + uni.getStorageSync('token')
+						},
+						formData: {
+							key: ossToken.dir,
+							OSSAccessKeyId: ossToken.accessid,
+							policy: ossToken.policy,
+							Signature: ossToken.signature,
+							callback: ossToken.callback,
+							success_action_status: 200
+						},
+						success: result => {
+							if (result.statusCode === 200) {
+								resolve(ossToken.dir);
+							} else {
+								uni.showToast({
+									title: '上传失败',
+									icon: 'none'
+								});
+								return;
+							}
+						},
+						fail: error => {
+							uni.showToast({
+								title: '上传接口报错'+error,
+								icon: 'none'
+							});
+							return;
+						}
+					});
+				});
+			});
+		},
+		submitAns(type,bankindex) {
+				
+			console.log(this.questionList[bankindex])
+			if(!this.questionList[bankindex].ansText.text && !this.questionList[bankindex].ansText.imageList.length) {
+				uni.showToast({
+					title: '请输入内容或上传图片',
+					duration: 2000,
+					icon:'none'
+				});
+				return
+			}
+			
+			this.$set(this.ques,bankindex,{
+				imageList:this.questionList[bankindex].ansText.imageList,
+				text:this.questionList[bankindex].ansText.text,
+			})
+			
+		},
+		
+		submitAnsChild(bankindex,ansindex) {
+				
+			if(!this.questionList[bankindex].jsonStr[ansindex].ansText.text && !this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.length) {
+				uni.showToast({
+					title: '请输入内容或上传图片',
+					duration: 2000,
+					icon:'none'
+				});
+				return
+			}
+			
+			this.$set(this.questionList[bankindex].ques,ansindex,{
+				imageList:this.questionList[bankindex].jsonStr[ansindex].ansText.imageList,
+				text:this.questionList[bankindex].jsonStr[ansindex].ansText.text,
+			})
+			
+		},
+		
+		isRight(item,index) {
+			//单选
+			if(this.questionList[index].ques) {
+				if(item.type == 1) {
+					return this.questionList[index].ques == this.questionList[index].ans;
+				//多选
+				} else if(item.type == 2) {
+					//每一项都相等
+					return this.questionList[index].ques.every((item,index) => {
+						return item == this.questionList[index].ans;
+					})
+				//判断
+				} else if(item.type == 3) {
+					return this.questionList[index].ques == this.questionList[index].ans;
+				} else {
+					return false;
+				}
+			} else {
+				return false;
+			}
+			
+		},
+		
+		
+		right(bankIndex,ansIndex,option) {
+			if(this.questionList[bankIndex].ques[ansIndex] && this.questionList[bankIndex].ans[ansIndex]) {
+				
+				if((this.questionList[bankIndex].ques[ansIndex].indexOf(option.optionsId) != -1 ) || (this.questionList[bankIndex].ans[ansIndex].indexOf(option.optionsId) != -1)) {
+					return true
+				} else {
+					return false;
+				}
+			} else {
+				return false;
+			}
+			
+		},
+		
+		wrong(bankIndex,ansIndex,option) {
+			if(this.questionList[bankIndex].ques[ansIndex] && this.questionList[bankIndex].ans[ansIndex]) {
+				
+				if((this.questionList[bankIndex].ques[ansIndex].indexOf(option.optionsId) != -1 ) && (this.questionList[bankIndex].ans[ansIndex].indexOf(option.optionsId) == -1)) {
+					return true;
+				} else {
+					return false;
+				}
+			} else {
+				return false;
+			}
+		},
+		
+		isWrong(item,index) {
+			if(this.questionList[index].ques) {
+				//单选
+				if(item.type == 1) {
+					return this.questionList[index].ques != this.questionList[index].ans;
+				//多选
+				} else if(item.type == 2) {
+					//每一项都相等
+					return this.questionList[index].ques.some((item,index) => {
+						return item != this.questionList[index].ans;
+					})
+				//判断
+				} else if(item.type == 3) {
+					return this.questionList[index].ques != this.questionList[index].ans;
+				} else {
+					return false;
+				}
+			} else {
+				return false;
+			}
+			
+		},
+		
+		tabSelect(index,bankindex) {
+			
+			this.$set(this.questionList[bankindex],'current',index)
+			
+		},
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.swiper {
+	width:100%;
+	height:100vh;
+}
+.lisSty {
+	margin-bottom: 16rpx;
+	display: flex;
+	.flex_auto {
+		flex:1;
+	}
+}
+.activeTI {
+	vertical-align: middle;
+	display: inline-block;
+	border: 1rpx solid #eee;
+	border-radius: 50rpx;
+	height: 48rpx;
+	line-height: 46rpx;
+	text-align: center;
+	width: 48rpx;
+	margin-right: 15rpx;
+	color: #666;
+	font-size: 30rpx;
+	
+	
+	&.right {
+		color:#fff;
+		background:green;
+	}
+	
+	&.wrong {
+		color:#fff;
+		background:red;
+	}
+	
+	&.checked {
+		color:#fff;
+		background:blue;
+	}
+}
+
+.submit_checkbox {
+	margin:20rpx auto;
+	width: 526rpx;
+	height: 80rpx;
+	background: rgba(0, 122, 255, 1);
+	color:#fff;
+	text-align: center;
+	line-height: 80rpx;
+	font-size: 30rpx;
+	border-radius: 40rpx;
+}
+.titles {
+	overflow: hidden;
+	margin-bottom: 24rpx;
+}
+.titBox {
+	padding: 41rpx 25rpx 24rpx 25rpx;
+}
+
+.tabs {
+	margin:10rpx;
+	display: flex;
+	.tab {
+		margin:0 10rpx;
+		width: 96rpx;
+		height: 48rpx;
+		line-height: 48rpx;
+		text-align: center;
+		color:#007AFF;
+		font-size: 28rpx;
+		border-radius: 16rpx;
+		
+		&.current {
+			color:#fff;
+			background: #007AFF;
+		}
+	}
+}
+
+.ans {
+	margin:8rpx 8rpx 8rpx;
+	
+	.ans_input {
+	    border-radius: 16rpx;
+		background:#fff;
+		.top {
+			border-bottom:1rpx solid #EEEEEE;
+			padding: 16rpx;
+			display: flex;
+			align-items: center;
+			
+			.icon {
+				margin-right:20rpx;
+				width: 40rpx;
+				height: 38rpx;
+			}
+			
+			.progress {
+				flex:1;
+			}
+			
+			.submit {
+				width: 168rpx;
+				height: 48rpx;
+				line-height: 48rpx;
+				text-align: center;
+				color:#fff;
+				font-size: 30rpx;
+				background: #007AFF;
+				border-radius: 24rpx;
+			}
+		}
+		
+		.textarea {
+			textarea {
+				width:100%;
+				height:287rpx;
+				padding:10rpx;
+			}
+		}
+		
+		.imgs {
+			overflow: hidden;
+			display: flex;
+			width:100%;
+			.img {
+				width: 104rpx;
+				height: 104rpx;
+				border-radius: 8rpx;
+				position:relative;
+				margin:20rpx;
+				
+				
+				text {
+					position:absolute;
+					right:-15rpx;
+					top:-15rpx;
+					width:30rpx;
+					height:30rpx;
+					text-align: center;
+					line-height: 30rpx;
+					color:#fff;
+					background:red;
+					border-radius:50%;
+				}
+				
+				image {
+					width:100%;
+					height:100%;
+				}
+			}
+		}
+	}
+	
+	.ans_submit {
+		padding:16rpx;
+		border-radius: 16rpx;
+		background:#fff;
+		
+		.imgs {
+			overflow: hidden;
+			display: flex;
+			width:100%;
+			.img {
+				width: 104rpx;
+				height: 104rpx;
+				border-radius: 8rpx;
+				position:relative;
+				margin:20rpx;
+				
+				image {
+					width:100%;
+					height:100%;
+				}
+			}
+		}
+	}
+}
+.firstLetter {
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+	margin-bottom: 30rpx;
+	.leftLetters {
+		display: flex;
+		align-items: center;
+		width: 220rpx;
+		.btnType {
+			padding: 5rpx 10rpx;
+			border: 1rpx solid #007aff;
+			border-radius: 10rpx;
+			background-color: rgba(0, 122, 255, 0.1);
+			font-size: 28rpx;
+			color: #007aff;
+			margin-right: 15rpx;
+		}
+	}
+}
+.popupView {
+	height: 100%;
+	padding-bottom: 100rpx;
+	.popupTops {
+		height: 77rpx;
+		border-bottom: 1rpx solid #eee;
+		text-align: center;
+		line-height: 77rpx;
+		font-size: 24rpx;
+		color: #999;
+		position: relative;
+		.topIcon {
+			position: absolute;
+			top: 10rpx;
+			left: 50%;
+			transform: translateX(-50%);
+			width: 80rpx;
+			height: 8rpx;
+			background-color: #999;
+			border-radius: 4rpx;
+		}
+	}
+	.popupContent {
+	}
+}
+.pageContent {
+	position:relative;
+	background-color: #eaeef1;
+	min-height: 100vh;
+	padding-top: 8rpx;
+	padding-bottom: 100rpx;
+}
+.pad_8 {
+	background-color: #fff;
+	margin: 0rpx 8rpx 8rpx;
+	border-radius: 16rpx;
+}
+.answer {
+	height: 80rpx;
+	line-height: 80rpx;
+	padding: 0rpx 24rpx;
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+	color: #666;
+	font-size: 30rpx;
+}
+.footer_btn {
+	background-color: #fff;
+	z-index: 10078;
+	position: absolute;
+	bottom: 0rpx;
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+	width: 100%;
+	height: 98rpx;
+	padding: 0rpx 38rpx;
+	border-top: 1rpx solid #eee;
+	
+	.collect {
+		visibility: hidden;
+		
+		&.show {
+			visibility: visible;
+		}
+	}
+}
+.boxSty {
+	padding: 44rpx 41rpx 0rpx;
+}
+.liListSty {
+	border:1rpx solid #EEEEEE;
+	width: 88rpx;
+	height: 88rpx;
+	border-radius: 32rpx;
+	text-align: center;
+	line-height: 88rpx;
+	color: #333;
+	font-size: 32rpx;
+	float: left;
+	margin: 20rpx 23rpx;
+	
+	&.isRight {
+		border:1rpx solid #EEEEEE;
+		color:#fff;
+		background: green;
+	}
+	
+	&.isWrong {
+		border:1rpx solid #EEEEEE;
+		color:#fff;
+		background: red;
+	}
+}
+.answerInfos {
+	padding: 25rpx 25rpx 25rpx 23rpx;
+}
+.answerTitle {
+	margin-bottom: 28rpx;
+	color: #666;
+	font-size: 30rpx;
+}
+.answerContent {
+	font-size: 30rpx;
+	color: #666;
+}
+
+.textChild {
+	display: inline-block;
+	vertical-align: middle;
+}
+
+.dialog {
+	position: fixed;
+	left:0;
+	top:0;
+	width:100%;
+	height:100%;
+	background-color: rgba(0,0,0,0.8);
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	justify-content: center;
+	z-index: 20000;
+	
+	.text {
+		font-size: 32rpx;
+		color: #FFFFFF;
+		text-align: center;
+	}
+	
+	.btn {
+		width: 242rpx;
+		height: 82rpx;
+		border: 2rpx solid #FFFFFF;
+		border-radius: 16rpx;
+		text-align: center;
+		line-height: 82rpx;
+		margin:41rpx auto;
+		color:#fff;
+		font-size: 32rpx;
+	}
+}
+</style>

+ 9 - 4
pages2/subject/collectTypeBank.vue

@@ -27,13 +27,14 @@
 							<view v-if="!bank.ques">
 								<view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty" @click="radioSelect(item.optionsId,bankIndex)">
 									<view class="activeTI">{{ ast[index] }}</view>
-									{{ item.content }}
+									<view class="flex_auto">{{ item.content }}</view>
 								</view>
 							</view>
 							<view v-if="bank.ques">
 								<view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty">
 									<text :class="{right:(item.optionsId == bank.ques) || (item.optionsId == bank.ans),wrong:(item.optionsId == bank.ques) && (bank.ques != bank.ans)}"  class="activeTI">{{ ast[index] }}</text>
-									{{ item.content }}
+									<view class="flex_auto">{{ item.content }}</view>
+									
 								</view>
 							</view> 
 							<view v-if="bank.ques">
@@ -54,7 +55,7 @@
 							<view v-if="!bank.ques">
 								<view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty" @click="checkboxSelect(item.optionsId,bankIndex,index)">
 									<view :class="{checked:item.checked}" class="activeTI">{{ ast[index] }}</view>
-									{{ item.content }}
+									<view class="flex_auto">{{ item.content }}</view>
 								</view>
 							</view>
 							<view v-if="!bank.ques" class="submit_checkbox" @click="checkboxSubmit(bankIndex)">
@@ -63,7 +64,7 @@
 							<view v-if="bank.ques">
 								<view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty">
 									<text :class="{right:(bank.ques.indexOf(item.optionsId) != -1 ) || (bank.ans.indexOf(item.optionsId) != -1),wrong:(bank.ques.indexOf(item.optionsId) != -1 ) && (bank.ans.indexOf(item.optionsId) == -1)}"  class="activeTI">{{ ast[index] }}</text>
-									{{ item.content }} 
+									<view class="flex_auto">{{ item.content }}</view>
 								</view>
 							</view> 
 							<view v-if="bank.ques">
@@ -800,6 +801,10 @@ export default {
 .lisSty {
 	margin-bottom: 16rpx;
 	display: flex;
+	
+	.flex_auto {
+		flex:1;
+	}
 }
 .activeTI {
 	vertical-align: middle;

+ 83 - 33
pages2/subject/wrong.vue

@@ -8,10 +8,10 @@
 			<view class="sceenModelBg" @click="hideSceen"></view>
 			<view class="sceenMain">
 				<template v-if="sceenType===1">
-					<view :class="['item',{'active':item.checked}]" v-for="(item, index) in scennList1" :key="index" @click="choSceen(index,'tk')">{{item.name}}</view>
+					<view :class="['item',{'active':item.checked}]" v-for="(item, index) in scennList1" :key="index" @click="choseRecord(index)">{{item.goodsName}}</view>
 				</template>
 				<template v-if="sceenType===2">
-					<view :class="['item',{'active':item.checked}]" v-for="(item, index) in scennList2" :key="index" @click="choSceen(index,'sj')">{{item.name}}</view>
+					<view :class="['item',{'active':item.checked}]" v-for="(item, index) in scennList2" :key="index" @click="choseType(index)">{{item.paperName}}</view>
 				</template>
 			</view>
 		</view>
@@ -23,14 +23,15 @@
 			<view class="wrongHead">
 				<view class="title">错题统计<text class="sub">(不含简答和案例题)</text></view>
 				<view class="progress">
-					
+					<text v-if="type == 1">{{testList.total}}</text>
+					<text v-if="type == 2">{{typeList.total}}</text>
 				</view>
 			</view> 
 			<view class="wrongList" v-if="type == 1">
-				<view class="item" v-for="(item,index) in testList" :key="index">
+				<view class="item" v-for="(item,index) in testList.rows" :key="index">
 					<view class="title">{{item.examName}}</view>
 					<view class="bt">
-						<view class="left">错题数<text class="num">23</text></view>
+						<view class="left">错题数<text class="num">{{item.num}}</text></view>
 						<view class="right">
 							<navigator :url="'/pages2/subject/collectBank?id='+item.examId">
 								<view class="btn">重做</view>
@@ -45,15 +46,21 @@
 			</view>
 			
 			<view class="wrongList" v-if="type == 2">
-				<view class="item" v-for="(item,index) in typeList" :key="index">
-					<view class="title">{{item.examName}}</view>
+				<view class="item" v-for="(item,index) in typeList.rows" :key="index">
+					<view class="title">
+						<text v-if="item.type==1">单选题</text>
+						<text v-if="item.type==2">多选题</text>
+						<text v-if="item.type==3">判断题</text>
+						<text v-if="item.type==4">案例题</text>
+						<text v-if="item.type==5">简答题</text>
+					</view>
 					<view class="bt">
 						<view class="left">错题数<text class="num">{{item.num}}</text></view>
 						<view class="right">
-							<navigator :url="'/pages2/subject/collectTypeBank?type='+item.type">
+							<navigator :url="'/pages2/subject/collectQuestionTypeBank?type='+item.type">
 								<view class="btn">重做</view>
 							</navigator>
-							<navigator :url="'/pages2/subject/collectTypeBank?type='+item.type+'&explain=1'">
+							<navigator :url="'/pages2/subject/collectQuestionTypeBank?type='+item.type+'&explain=1'">
 								<view class="btn">解析</view>
 							</navigator>
 						</view>
@@ -72,30 +79,66 @@ export default {
 		return {
 			sceenType: null,
 			scennList1:[
-				{id: 1, name: '全部题库记录', checked: true},{id: 1, name: '试卷名称可换行并完整显示'},{id: 1, name: '试卷名称可换行并完整显示'},{id: 1, name: '试卷名称可换行并完整显示'}
+				{goodsId: '', goodsName: '全部题库记录', checked: true}
 			],
 			scennList2:[
-				{id: 1, name: '全部试卷类型', checked: true},{id: 1, name: '模拟卷'},{id: 1, name: '真题'},{id: 1, name: '练习'}
+				{paperId: '', paperName: '全部试卷类型', checked: true}
 			],
 			type:1,
 			testList:[],
-			typeList:[]
+			typeList:[],
+			goodsid:'',
+			paperid:''
 		};
 	},
 	onPullDownRefresh() {},
 	onLoad(option) {
-		this.wrongRecordList();
+		this.listGoodsUserQuestion();
+		this.examaperList();
+		this.getData();
 	},
 	methods: {
+		getData() {
+			if(this.type == 1) {
+				this.wrongRecordList()
+			} else if(this.type == 2) {
+				this.wrongRecordTypeList();
+			}
+		},
+		examaperList() {
+			this.$api.examaperList({
+				
+			}).then(res => {
+				this.scennList2 = [...this.scennList2,...res.data.rows];
+			})
+		},
+		
+		listGoodsUserQuestion() {
+			this.$api.listGoodsUserQuestion({
+				
+			}).then(res => {
+				this.scennList1 = [...this.scennList1,...res.data.rows];
+			})
+		},
 		wrongRecordList() {
 			this.$api.wrongRecordList({
-				
+				paperId:this.paperid,
+				goodsId:this.goodsid
 			}).then(res => {
-				this.testList = res.data.rows;
+				this.testList = res.data;
+			})
+		},
+		wrongRecordTypeList() {
+			this.$api.wrongRecordTypeList({
+				paperId:this.paperid,
+				goodsId:this.goodsid
+			}).then(res => {
+				this.typeList = res.data;
 			})
 		},
 		selectType(type) {
 			this.type = type;
+			this.getData();
 		},
 		showSceen(type){
 			this.sceenType = type
@@ -103,25 +146,29 @@ export default {
 		hideSceen(){
 			this.sceenType = null
 		},
-		choSceen(index,type){
-			if(type==='tk'){
-				this.scennList1.forEach((item,idx)=>{
-					this.$set(item, 'checked',false)
-					if(index===idx){
-						this.$set(item, 'checked',true)
-					}
-				})
-			}
-			if(type==='sj'){
-				this.scennList2.forEach((item,idx)=>{
-					this.$set(item, 'checked',false)
-					if(index===idx){
-						this.$set(item, 'checked',true)
-					}
-				})
-			}
+		choseRecord(index) {
 			this.sceenType = null
-		}
+			this.scennList1.forEach((item,idx)=>{
+				this.$set(item, 'checked',false)
+				if(index==idx){
+					this.goodsid = item.goodsId
+					this.$set(item, 'checked',true)
+				}
+			})
+			
+			this.getData()
+		},
+		choseType(index) {
+			this.sceenType = null
+			this.scennList2.forEach((item,idx)=>{
+				this.$set(item, 'checked',false)
+				if(index==idx){
+					this.paperid = item.paperId
+					this.$set(item, 'checked',true)
+				}
+			})
+			this.getData()
+		},
 	}
 };
 </script>
@@ -221,9 +268,12 @@ page {
 	.progress{
 		width: 180rpx;
 		height: 180rpx;
+		line-height: 140rpx;
 		border: 20rpx solid #EEEEEE;
 		border-radius: 50%;
 		margin: 24rpx auto;
+		font-size: 50rpx;
+		text-align: center;
 	}
 }
 .wrongTab{