Parcourir la source

拆分错题解析

chenxiong il y a 3 ans
Parent
commit
540a7554e1
1 fichiers modifiés avec 30 ajouts et 5 suppressions
  1. 30 5
      pages2/bank/questionBankWrongExplain.vue

+ 30 - 5
pages2/bank/questionBankWrongExplain.vue

@@ -47,9 +47,16 @@
 						
 					<template v-if="bank.type == 2">
 						<view class="pad_8 titBox no-margin">
-							<view >
+							
+							<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">
 								<view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty">
-									<text :class="{right:(bank.ques && bank.ques.indexOf(item.optionsId) != -1 ) || (bank.ans && bank.ans.indexOf(item.optionsId) != -1),wrong:(bank.ques && bank.ques.indexOf(item.optionsId) != -1 ) && (bank.ans && bank.ans.indexOf(item.optionsId) == -1)}"  class="activeTI">{{ ast[index] }}</text>
+									<text :class="{right:bank.ques &&( bank.ques.indexOf(item.optionsId) != -1 ) || bank.ans &&( bank.ans.indexOf(item.optionsId) != -1),wrong:bank.ques && (bank.ques.indexOf(item.optionsId) != -1 ) && bank.ans &&  ( bank.ans.indexOf(item.optionsId) == -1)}"  class="activeTI">{{ ast[index] }}</text>
 									<view class="flex_auto">{{ item.content }}</view>
 								</view>
 							</view> 
@@ -130,7 +137,13 @@
 									<rich-text :nodes="ansItem.content"></rich-text>
 								</view>
 								<template v-if="ansItem.type == 1">
-									<view>
+									<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="childIndex" 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>
@@ -151,7 +164,13 @@
 								</template>
 								
 								<template v-if="ansItem.type == 2">
-									<view>
+									<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 && 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>
@@ -176,7 +195,13 @@
 								</template>
 								
 								<template v-if="ansItem.type == 3">
-									<view>
+									<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 }}