questionBankExplain.vue 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471
  1. <template>
  2. <view id="questionBank">
  3. <swiper class="swiper" :current="current" @change="swiperChange" :interval="interval">
  4. <swiper-item v-for="(bank,bankIndex) in questionList" :key="bankIndex">
  5. <view class="pageContent">
  6. <view class="pad_8 titBox" >
  7. <view class="firstLetter">
  8. <view class="leftLetters">
  9. <view class="btnType">
  10. <text v-if="bank.type==1">单选</text>
  11. <text v-if="bank.type==2">多选</text>
  12. <text v-if="bank.type==3">判断</text>
  13. <text v-if="bank.type==4">案例</text>
  14. <text v-if="bank.type==5">简答</text>
  15. </view>
  16. <text>{{bankIndex+1}}/{{questionList.length}}</text>
  17. </view>
  18. <view style="color: #666;font-size: 28rpx;"></view>
  19. <view class="leftLetters"></view>
  20. </view>
  21. <view class="titles">
  22. <rich-text :nodes="bank.content"></rich-text>
  23. </view>
  24. </view>
  25. <template v-if="bank.type == 1">
  26. <view class="pad_8 titBox no-margin">
  27. <view v-if="!bank.ques">
  28. <view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty" @click="radioSelect(item.optionsId,bankIndex)">
  29. <view class="activeTI">{{ ast[index] }}</view>
  30. <view class="flex_auto">{{ item.content }}</view>
  31. </view>
  32. </view>
  33. <view v-if="bank.ques">
  34. <view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty">
  35. <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>
  36. <view class="flex_auto">{{ item.content }}</view>
  37. </view>
  38. </view>
  39. <view v-if="bank.ques">
  40. <view class="pad_8 answer">
  41. <view>正确答案:{{ast[bank.ans-1]}}</view>
  42. <view v-if="!explain">我的答案:{{ast[bank.ques-1]}}</view>
  43. </view>
  44. <view class="pad_8 answerInfos">
  45. <view class="answerTitle">答案解析</view>
  46. <view class="answerContent">
  47. <rich-text :nodes="bank.analysisContent"></rich-text>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </template>
  53. <template v-if="bank.type == 2">
  54. <view class="pad_8 titBox no-margin">
  55. <view v-if="!bank.ques">
  56. <view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty" @click="checkboxSelect(item.optionsId,bankIndex,index)">
  57. <view :class="{checked:item.checked}" class="activeTI">{{ ast[index] }}</view>
  58. <view class="flex_auto">{{ item.content }}</view>
  59. </view>
  60. </view>
  61. <view v-if="!bank.ques" class="submit_checkbox" @click="checkboxSubmit(bankIndex)">
  62. 确认答案
  63. </view>
  64. <view v-if="bank.ques">
  65. <view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty">
  66. <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>
  67. <view class="flex_auto">{{ item.content }}</view>
  68. </view>
  69. </view>
  70. <view v-if="bank.ques">
  71. <view class="pad_8 answer">
  72. <view>正确答案:
  73. <text v-for="ansItem in bank.ans">{{ast[ansItem-1]}}</text>
  74. </view>
  75. <view v-if="!explain">我的答案:
  76. <text v-for="quesItem in bank.ques">{{ast[quesItem-1]}}</text>
  77. </view>
  78. </view>
  79. <view class="pad_8 answerInfos">
  80. <view class="answerTitle">答案解析</view>
  81. <view class="answerContent">
  82. <rich-text :nodes="bank.analysisContent"></rich-text>
  83. </view>
  84. </view>
  85. </view>
  86. </view>
  87. </template>
  88. <template v-if="bank.type == 3">
  89. <view class="pad_8 titBox no-margin">
  90. <view v-if="!bank.ques">
  91. <view v-for="(item, index) in judge" :key="index" class="lisSty" @click="judgeSelect(index,bankIndex)">
  92. <view class="activeTI">{{ ast[index] }}</view>
  93. {{ item }}
  94. </view>
  95. </view>
  96. <view v-if="bank.ques">
  97. <view v-for="(item, index) in judge" :key="index" class="lisSty">
  98. <text :class="{right:(index == bank.ques) || (index == bank.ans),wrong:(index == bank.ques) && (bank.ques != bank.ans)}" class="activeTI">{{ ast[index] }}</text>
  99. {{ item }}
  100. </view>
  101. </view>
  102. <view v-if="bank.ques">
  103. <view class="pad_8 answer">
  104. <view>正确答案:{{ast[bank.ans]}}</view>
  105. <view v-if="!explain">我的答案:{{ast[bank.ques]}}</view>
  106. </view>
  107. <view class="pad_8 answerInfos">
  108. <view class="answerTitle">答案解析</view>
  109. <view class="answerContent">
  110. <rich-text :nodes="bank.analysisContent"></rich-text>
  111. </view>
  112. </view>
  113. </view>
  114. </view>
  115. </template>
  116. <!-- 简答题 -->
  117. <template v-if="bank.type == 5">
  118. <view class="pad_8 titBox">
  119. <view class="ans">
  120. <view class="ans_input" v-if="!bank.ques">
  121. <view class="top flex">
  122. <image :data-index="bankIndex" class="icon" @click="chooseImg(bankIndex)" src="/static/camera.png" mode=""></image>
  123. <view class="progress">{{bank.ansText.imageList.length || '0'}}/4</view>
  124. <view class="submit" @click="submitAns(bankIndex)" >确认答案</view>
  125. </view>
  126. <view class="textarea">
  127. <textarea v-model="bank.ansText.text" placeholder="在此输入答案"></textarea>
  128. </view>
  129. <view class="imgs">
  130. <view class="img" v-for="(img,imgIndex) in bank.ansText.imageList" >
  131. <text @click="deleteImg(imgIndex,bankIndex)">x</text>
  132. <image :src="$method.splitImgHost(img, true)"></image>
  133. </view>
  134. </view>
  135. </view>
  136. <view class="ans_submit answerInfos" v-if="bank.ques && !explain">
  137. <view class="answerTitle">我的答案:</view>
  138. {{bank.ques.text}}
  139. <view class="imgs">
  140. <image class="img" v-for="ques in bank.ques.imageList" :src="$method.splitImgHost(ques,true)"></image>
  141. </view>
  142. </view>
  143. </view>
  144. <view v-if="bank.ques">
  145. <view class="pad_8 answerInfos">
  146. <view class="answerTitle">答案解析:</view>
  147. <view class="answerContent">
  148. <rich-text :nodes="bank.analysisContent"></rich-text>
  149. </view>
  150. </view>
  151. </view>
  152. </view>
  153. </template>
  154. <!-- 案例题 -->
  155. <template v-if="bank.type == 4">
  156. <view class="pad_8 titBox">
  157. <view class="tabs">
  158. <view class="tab" :class="{current:tabIndex == bank.current}" :key="tabIndex" v-for="(tab,tabIndex) in bank.jsonStr" @click="tabSelect(tabIndex,bankIndex)">问题{{tabIndex}}</view>
  159. </view>
  160. <view v-for="(ansItem,ansIndex) in bank.jsonStr" v-if="bank.current == ansIndex" :key="ansIndex">
  161. <view class="titles">
  162. <rich-text :nodes="ansItem.content"></rich-text>
  163. </view>
  164. <template v-if="ansItem.type == 1">
  165. <view v-if="!bank.ques[ansIndex]">
  166. <view v-for="(option, childIndex) in ansItem.optionsList" :key="childIndex" class="lisSty" @click="radioSelectChild(option.optionsId,ansIndex,bankIndex)">
  167. <view class="activeTI">{{ ast[childIndex] }}</view>
  168. <rich-text class="textChild" :nodes="option.content"></rich-text>
  169. </view>
  170. </view>
  171. <view v-if="bank.ques[ansIndex]">
  172. <view v-for="(option, childIndex) in ansItem.optionsList" :key="index" class="lisSty">
  173. <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>
  174. <rich-text :nodes="option.content"></rich-text>
  175. </view>
  176. </view>
  177. <view v-if="bank.ques[ansIndex]">
  178. <view class="pad_8 answer">
  179. <view>正确答案:{{ast[bank.ans[ansIndex]-1]}}</view>
  180. <view v-if="!explain">我的答案:{{ast[bank.ques[ansIndex]-1]}}</view>
  181. </view>
  182. <view class="pad_8 answerInfos">
  183. <view class="answerTitle">答案解析</view>
  184. <view class="answerContent">
  185. <rich-text :nodes="option.analysisContent"></rich-text>
  186. </view>
  187. </view>
  188. </view>
  189. </template>
  190. <template v-if="ansItem.type == 2">
  191. <view v-if="!bank.ques[ansIndex]">
  192. <view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty" @click="checkboxSelectChild(bankIndex,ansIndex,childindex)">
  193. <view :class="{checked:option.checked}" class="activeTI">{{ ast[childindex] }}</view>
  194. <rich-text :nodes="option.content"></rich-text>
  195. </view>
  196. </view>
  197. <view v-if="!bank.ques[ansIndex]" class="submit_checkbox" @click="checkboxSubmitChild(bankIndex,ansIndex)">
  198. 确认答案
  199. </view>
  200. <view v-if="bank.ques && bank.ques[ansIndex]">
  201. <view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty">
  202. <text :class="{right:right(bankIndex,ansIndex,option),wrong:wrong(bankIndex,ansIndex,option)}" class="activeTI">{{ ast[childindex] }}</text>
  203. <rich-text :nodes="option.content"></rich-text>
  204. </view>
  205. </view>
  206. <view v-if="bank.ques[ansIndex]">
  207. <view class="pad_8 answer">
  208. <view>正确答案:
  209. <text v-for="ansItem1 in bank.ans[ansIndex]">{{ast[ansItem1-1]}}</text>
  210. </view>
  211. <view v-if="!explain">我的答案:
  212. <text v-for="quesItem in bank.ques[ansIndex]">{{ast[quesItem-1]}}</text>
  213. </view>
  214. </view>
  215. <view class="pad_8 answerInfos">
  216. <view class="answerTitle">答案解析</view>
  217. <view class="answerContent">
  218. <rich-text :nodes="ansItem.analysisContent"></rich-text>
  219. </view>
  220. </view>
  221. </view>
  222. </template>
  223. <template v-if="ansItem.type == 3">
  224. <view v-if="!bank.ques[ansIndex]">
  225. <view v-for="(option, childindex) in judge" :key="childindex" class="lisSty" @click="judgeSelectChild(ansIndex,childindex,bankIndex)">
  226. <view class="activeTI">{{ ast[childindex] }}</view>
  227. {{ option }}
  228. </view>
  229. </view>
  230. <view v-if="bank.ques[ansIndex]">
  231. <view v-for="(option, childindex) in judge" :key="childindex" class="lisSty">
  232. <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>
  233. {{ option }}
  234. </view>
  235. </view>
  236. <view v-if="bank.ques[ansIndex]">
  237. <view class="pad_8 answer">
  238. <view>正确答案:{{ast[bank.ans[ansIndex]]}}</view>
  239. <view v-if="!explain">我的答案:{{ast[bank.ques[ansIndex]]}}</view>
  240. </view>
  241. <view class="pad_8 answerInfos">
  242. <view class="answerTitle">答案解析</view>
  243. <view class="answerContent">
  244. <rich-text :nodes="ansItem.analysisContent"></rich-text>
  245. </view>
  246. </view>
  247. </view>
  248. </template>
  249. <!-- 简答题 -->
  250. <template v-if="ansItem.type == 5">
  251. <view class="ans">
  252. <view class="ans_input" v-if="!bank.ques[ansIndex]">
  253. <view class="top flex">
  254. <image class="icon" @click="chooseImgChild(bankIndex,ansIndex)" src="/static/08-10_032.jpg" mode=""></image>
  255. <view class="progress">0/4</view>
  256. <view class="submit" @click="submitAnsChild(bankIndex,ansIndex)">确认答案</view>
  257. </view>
  258. <view class="textarea">
  259. <textarea v-model="ansItem.ansText.text" placeholder="在此输入答案"></textarea>
  260. </view>
  261. <view class="imgs">
  262. <view class="img" v-for="(img,imgIndex) in ansItem.ansText.imageList" >
  263. <text @click="deleteImgChild(imgIndex,bankIndex,ansIndex)">x</text>
  264. <image :src="$method.splitImgHost(img, true)"></image>
  265. </view>
  266. </view>
  267. </view>
  268. <view class="ans_submit answerInfos" v-if="bank.ques[ansIndex] && !explain">
  269. <view class="answerTitle">答案我的</view>
  270. {{bank.ques[ansIndex].text}}
  271. <view class="imgs">
  272. <image class="img" v-for="ques in bank.ques[ansIndex].imageList" :src="$method.splitImgHost(ques,true)"></image>
  273. </view>
  274. </view>
  275. </view>
  276. <view v-if="bank.ques[ansIndex]">
  277. <view class="pad_8 answerInfos">
  278. <view class="answerTitle">答案解析</view>
  279. <view class="answerContent">
  280. <rich-text :nodes="ansItem.analysisContent"></rich-text>
  281. </view>
  282. </view>
  283. </view>
  284. </template>
  285. </view>
  286. </view>
  287. </template>
  288. <view class="footer_btn" v-if="isContinue || !isHistory">
  289. <view class="collect" :class="{ show: goodsId ? true : false }" @click="collect(collectList[bankIndex], bankIndex)">
  290. <view v-if="collectList[bankIndex]">
  291. <image src="/static/icon/collected.png" mode=""></image>
  292. <view>取消收藏</view>
  293. </view>
  294. <view v-if="!collectList[bankIndex]">
  295. <image src="/static/icon/collect.png" mode=""></image>
  296. <view>收藏</view>
  297. </view>
  298. </view>
  299. <view class="flex_center" @click="openFooterTab">
  300. <view class="up-icon">
  301. <image src="/static/up.png"></image>
  302. </view>
  303. 答题卡
  304. </view>
  305. <view class="collect" :class="{ show: explain ? false : true }" @click="submit">
  306. <view>
  307. <image src="/static/jj.png" mode=""></image>
  308. <view>交卷</view>
  309. </view>
  310. </view>
  311. </view>
  312. </view>
  313. </swiper-item>
  314. </swiper>
  315. <u-popup v-model="show" mode="bottom" border-radius="14" height="680rpx">
  316. <view class="popupView">
  317. <view class="popupTops">
  318. <view class="topIcon"></view>
  319. 点击编号即可跳转至对应题目
  320. </view>
  321. <view class="popupContent">
  322. <scroll-view scroll-y="true" style="height: 506rpx;">
  323. <view class="boxSty">
  324. <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>
  325. </view>
  326. </scroll-view>
  327. </view>
  328. </view>
  329. </u-popup>
  330. <view class="dialog" v-if="showDialog">
  331. <view class="text">左右滑动切换上下题</view>
  332. <view class="btn" @click="hideDialog">我知道了</view>
  333. </view>
  334. </view>
  335. </template>
  336. <script>
  337. export default {
  338. data() {
  339. return {
  340. id:'',
  341. current:0,
  342. questionList:[],
  343. ast: ['A', 'B', 'C', 'D','E','F','G'],
  344. judge:['错误','正确'],
  345. show: false,
  346. showDialog:true,
  347. bankList: [],
  348. collectList:[],
  349. goodsId:'',
  350. explain:'', //是否显示答案
  351. isContinue:'', //是否继续做题
  352. chapterId:'',
  353. moduleId:'',
  354. isHistory:'', //是否显示历史答题记录
  355. isSubmit:false,
  356. };
  357. },
  358. onLoad(option){
  359. this.id = option.id;
  360. this.explain = option.explain;
  361. this.isContinue = option.continue;
  362. this.goodsId = option.goodsid;
  363. this.chapterId = option.chapterId;
  364. this.moduleId = option.moduleId;
  365. this.recordId = option.recordId;
  366. this.isHistory = option.isHistory;
  367. this.goodsQuestionList();
  368. },
  369. onUnload() {
  370. if(this.isSubmit || this.isHistory) {
  371. return
  372. }
  373. this.examRecordEdit();
  374. },
  375. methods: {
  376. /**
  377. * @param {Object} state
  378. * @param {Object} index
  379. * 收藏
  380. */
  381. collect(state, index) {
  382. if (!state) {
  383. this.$api
  384. .collectQuestion({
  385. examId: this.id,
  386. questionId: this.questionList[index].questionId,
  387. goodsId: this.goodsId || ''
  388. })
  389. .then(res => {
  390. if (res.data.code == 200) {
  391. this.$set(this.collectList, index, true);
  392. uni.showToast({
  393. title: '收藏成功',
  394. duration: 2000,
  395. icon: 'none'
  396. });
  397. this.getCollectInfo(index)
  398. }
  399. });
  400. } else {
  401. this.$api.deleteCollectQuestion(this.collectList[index].collectQuestionId).then(res => {
  402. if (res.data.code == 200) {
  403. this.$set(this.collectList, index, false);
  404. uni.showToast({
  405. title: '取消收藏成功',
  406. duration: 2000,
  407. icon: 'none'
  408. });
  409. }
  410. });
  411. }
  412. return;
  413. },
  414. goodsQuestionList() {
  415. //继续答题
  416. if(this.isContinue || this.isHistory) {
  417. console.log(this.isHistory,"历史做题")
  418. console.log(this.isContinue,"继续做题")
  419. this.$api.examReport(this.recordId).then(res => {
  420. let json = JSON.parse(res.data.data.historyExamJson)
  421. this.questionList = json;
  422. })
  423. } else { //解析
  424. this.$api.goodsQuestionList({
  425. examId:this.id
  426. }).then(res => {
  427. res.data.data.forEach((item,index) => {
  428. if(typeof item.jsonStr == 'string') {
  429. item.jsonStr = JSON.parse(item.jsonStr)
  430. if(item.type == 2) { //多选
  431. item.jsonStr.forEach(str => {
  432. str.optionsId = ''+str.optionsId;
  433. })
  434. let arr = item.answerQuestion.split(',');
  435. arr.forEach((a,i) => {
  436. arr[i] = ''+a;
  437. })
  438. item.ans = arr;
  439. if(this.explain) {
  440. item.ques = item.ans;
  441. }
  442. return;
  443. } else if(item.type == 5) {
  444. item.ansText = {
  445. text: '',
  446. imageList: []
  447. }
  448. if(this.explain) {
  449. item.ques = {
  450. text:item.analysisContent
  451. }
  452. return;
  453. }
  454. } else if(item.type == 4) {
  455. console.log(item.jsonStr)
  456. item.ques = []
  457. item.current = 0;
  458. let ansArr = [];
  459. item.jsonStr.forEach((json,index) => {
  460. if(json.type == 1) {
  461. ansArr[index] = json.answerQuestion;
  462. } else if(json.type == 2) {
  463. json.optionsList.forEach(str => {
  464. str.optionsId = ''+str.optionsId;
  465. })
  466. let arr = json.answerQuestion.split(',');
  467. arr.forEach((a,i) => {
  468. arr[i] = ''+a;
  469. })
  470. ansArr[index] = arr
  471. } else if(json.type == 3) {
  472. ansArr[index] = json.answerQuestion;
  473. } else if(json.type == 5) {
  474. ansArr[index] = {
  475. text: '',
  476. imageList: []
  477. }
  478. json.ansText = {
  479. text: '',
  480. imageList: []
  481. }
  482. }
  483. })
  484. item.ans = ansArr
  485. if(this.explain) {
  486. item.ques = item.ans;
  487. }
  488. return;
  489. }
  490. item.ans = item.answerQuestion
  491. if(this.explain) {
  492. item.ques = item.ans;
  493. }
  494. } else {
  495. if(this.explain) {
  496. item.ques = item.ans;
  497. }
  498. }
  499. })
  500. this.questionList = res.data.data;
  501. this.getCollectInfo(this.current);
  502. console.log(this.questionList)
  503. })
  504. }
  505. },
  506. /**
  507. * @param {Object} current
  508. * 获取收藏信息
  509. */
  510. getCollectInfo(current) {
  511. this.$api
  512. .getCollectInfo({
  513. examId: this.id,
  514. questionId: this.questionList[current].questionId,
  515. goodsId: this.goodsId
  516. })
  517. .then(res => {
  518. if (res.data.code == 500) {
  519. this.$set(this.collectList, current, false);
  520. } else if (res.data.code == 200) {
  521. this.$set(this.collectList, current, res.data.data);
  522. }
  523. });
  524. },
  525. /**
  526. * @param {Object} e单选点击
  527. */
  528. radioSelect(optionsId,bindex) {
  529. if(this.questionList[bindex].ques) return;
  530. this.$set(this.questionList[bindex],'ques',optionsId)
  531. },
  532. examRecordEdit() {
  533. if(!this.isSubmit) {
  534. let number = 0;
  535. let score = 0;
  536. let doQuestionNum = 0;
  537. this.questionList.length && this.questionList.forEach((item,index) => {
  538. if(item.type == 1) {
  539. if(item.ques == item.ans) {
  540. score += item.score;
  541. number++
  542. }
  543. if (item.ques) {
  544. doQuestionNum++;
  545. }
  546. } else if(item.type == 2) {
  547. let isRight = item.ques && item.ques.every((quesItem,quesIndex) => {
  548. return item.ques[quesIndex] == item.ans[quesIndex]
  549. })
  550. if(isRight) {
  551. score += item.score;
  552. number++
  553. }
  554. if (item.ques && item.ques.length) {
  555. doQuestionNum++;
  556. }
  557. } else if(item.type == 3) {
  558. if(item.ques == item.ans) {
  559. score += item.score;
  560. number++
  561. }
  562. if (item.ques) {
  563. doQuestionNum++;
  564. }
  565. } else if (item == 4) {
  566. if (item.ques.length) {
  567. doQuestionNum++;
  568. }
  569. } else if (item.type == 5) {
  570. if (item.ques) {
  571. doQuestionNum++;
  572. }
  573. }
  574. })
  575. this.$api.examRecordEdit({
  576. examId:this.id,
  577. goodsId:this.goodsId,
  578. recordId: this.recordId,
  579. rightQuestionNum:number,
  580. status:0,
  581. doQuestionNum: doQuestionNum,
  582. historyExamJson:JSON.stringify(this.questionList)
  583. }).then(res => {
  584. })
  585. }
  586. },
  587. /**
  588. * @param {Object} e单选点击
  589. */
  590. radioSelectChild(optionsId,ansIndex,bindex) {
  591. if(this.questionList[bindex].ques[ansIndex]) return;
  592. this.$set(this.questionList[bindex].ques,ansIndex,optionsId)
  593. },
  594. /**
  595. * @param {Object} 多选点击
  596. */
  597. checkboxSelect(optionsId,bindex,index) {
  598. this.$set(this.questionList[bindex].jsonStr[index],'checked',!this.questionList[bindex].jsonStr[index].checked)
  599. },
  600. /**
  601. * @param {Object} 多选点击
  602. */
  603. checkboxSelectChild(bindex,ansIndex,childIndex) {
  604. this.$set(this.questionList[bindex].jsonStr[ansIndex].optionsList[childIndex],'checked',!this.questionList[bindex].jsonStr[ansIndex].optionsList[childIndex].checked)
  605. },
  606. /**
  607. * 提交数据
  608. */
  609. submit() {
  610. let score = 0; //计算总分
  611. let reportStatus = 0;
  612. let number = 0;
  613. let allScore = 0;
  614. let passScore = 0;
  615. let doWrongQuestionIds = []; //错题和未做题id(客观题)
  616. let doQuestionIds = []; //做过的题目id
  617. let rightQuestionIds = []; //做对的题目id
  618. this.questionList.forEach((item,index) => {
  619. passScore = item.passScore
  620. if(item.type == 1) {
  621. if(item.ques == item.ans) {
  622. score += item.score;
  623. number++
  624. rightQuestionIds.push(item.questionId)
  625. } else { //错误
  626. doWrongQuestionIds.push(item.questionId)
  627. }
  628. allScore += item.score
  629. if (item.ques) {
  630. doQuestionNum++;
  631. doQuestionIds.push(item.questionId)
  632. }
  633. } else if(item.type == 2) {
  634. let isRight = item.ques && item.ques.every((quesItem,quesIndex) => {
  635. return item.ques[quesIndex] == item.ans[quesIndex]
  636. })
  637. if(isRight) {
  638. score += item.score;
  639. number++
  640. rightQuestionIds.push(item.questionId)
  641. } else {
  642. doWrongQuestionIds.push(item.questionId)
  643. }
  644. allScore += item.score
  645. if (item.ques && item.ques.length) {
  646. doQuestionNum++;
  647. doQuestionIds.push(item.questionId)
  648. }
  649. } else if(item.type == 3) {
  650. if(item.ques == item.ans) {
  651. score += item.score;
  652. number++
  653. rightQuestionIds.push(item.questionId)
  654. } else {
  655. doWrongQuestionIds.push(item.questionId)
  656. }
  657. allScore += item.score;
  658. if (item.ques) {
  659. doQuestionNum++;
  660. doQuestionIds.push(item.questionId)
  661. }
  662. } else if (item.type == 4) {
  663. if (item.ques && item.ques.length) {
  664. doQuestionNum++;
  665. }
  666. } else if (item.type == 5) {
  667. if (item.ques) {
  668. doQuestionNum++;
  669. }
  670. }
  671. })
  672. //大于60分及格
  673. if(score >= 60) {
  674. reportStatus = 1
  675. } else {
  676. reportStatus = 0
  677. }
  678. this.$api.examRecordEdit({
  679. examId:this.id,
  680. goodsId:this.goodsId,
  681. reportStatus:reportStatus,
  682. totalScore:allScore,
  683. recordId: this.recordId,
  684. rightQuestionNum:number,
  685. status:1,
  686. doQuestionIds:doQuestionIds.join(','),
  687. rightQuestionIds:rightQuestionIds.join(','),
  688. doQuestionNum: doQuestionNum,
  689. performance: score,
  690. historyExamJson:JSON.stringify(this.questionList)
  691. }).then(res => {
  692. this.isSubmit = true;
  693. if(res.data.code == 200) {
  694. uni.showToast({
  695. title: '交卷成功',
  696. duration: 2000,
  697. icon:'none'
  698. });
  699. setTimeout(() => {
  700. uni.redirectTo({
  701. url:'/pages2/bank/question_report?id='+this.recordId+'&examId='+this.id
  702. })
  703. },2000)
  704. }
  705. })
  706. },
  707. /**
  708. * @param {Object} 多选确认
  709. */
  710. checkboxSubmit(bindex) {
  711. if(this.questionList[bindex].ques) return;
  712. let arr = [];
  713. this.questionList[bindex].jsonStr.forEach(item => {
  714. if(item.checked) {
  715. arr.push(item.optionsId)
  716. }
  717. })
  718. this.$set(this.questionList[bindex],'ques',arr)
  719. },
  720. /**
  721. * @param {Object} 多选确认
  722. */
  723. checkboxSubmitChild(bindex,ansIndex) {
  724. if(this.questionList[bindex].ques[ansIndex]) return;
  725. let arr = [];
  726. this.questionList[bindex].jsonStr[ansIndex].optionsList.forEach(item => {
  727. if(item.checked) {
  728. arr.push(item.optionsId)
  729. }
  730. })
  731. this.$set(this.questionList[bindex].ques,ansIndex,arr)
  732. },
  733. judgeSelect(index,bindex) {
  734. if(this.questionList[bindex].ques) return;
  735. this.$set(this.questionList[bindex],'ques',index+'')
  736. },
  737. judgeSelectChild(ansindex,childindex,bindex) {
  738. if(this.questionList[bindex].ques[ansindex]) return;
  739. this.$set(this.questionList[bindex].ques,ansindex,childindex+'')
  740. },
  741. openFooterTab() {
  742. this.show = true;
  743. },
  744. hideDialog() {
  745. this.showDialog = false
  746. },
  747. changeIndex(index) {
  748. this.current = index
  749. },
  750. swiperChange(e) {
  751. this.current = e.detail.current;
  752. },
  753. deleteImg(imgIndex,bankIndex) {
  754. this.questionList[bankIndex].ansText.imageList.splice(imgIndex,1)
  755. },
  756. deleteImgChild(imgIndex,bankIndex,ansIndex) {
  757. this.questionList[bankIndex].jsonStr[ansIndex].ansText.imageList.splice(imgIndex,1)
  758. },
  759. chooseImg(bankindex) {
  760. uni.chooseImage({
  761. count: 1, //默认9
  762. sizeType: ['compressed', ], //可以指定是原图还是压缩图,默认二者都有
  763. sourceType: ['album','camera'], //从相册选择
  764. success: (res) => {
  765. let self = this;
  766. // console.log(JSON.stringify(res.tempFilePaths));
  767. let img = res.tempFilePaths[0];
  768. uni.getImageInfo({
  769. src: img,
  770. success: async res => {
  771. let canvasWidth = res.width; //图片原始长宽
  772. let canvasHeight = res.height;
  773. if (canvasWidth > 1000 || canvasHeight > 1000) {
  774. uni.compressImage({
  775. src: img,
  776. quality: 75,
  777. width: '50%',
  778. height: '50%',
  779. success: async rest => {
  780. const dir = await self.uploadFile(rest.tempFilePath, 0);
  781. this.questionList[bankindex].ansText.imageList.push(dir)
  782. }
  783. });
  784. } else {
  785. const dir = await self.uploadFile(img, 0);
  786. this.questionList[bankindex].ansText.imageList.push(dir)
  787. }
  788. }
  789. });
  790. }
  791. })
  792. },
  793. chooseImgChild(bankindex,ansindex) {
  794. uni.chooseImage({
  795. count: 1, //默认9
  796. sizeType: ['compressed', ], //可以指定是原图还是压缩图,默认二者都有
  797. sourceType: ['album','camera'], //从相册选择
  798. success: (res) => {
  799. let self = this;
  800. // console.log(JSON.stringify(res.tempFilePaths));
  801. let img = res.tempFilePaths[0];
  802. uni.getImageInfo({
  803. src: img,
  804. success: async res => {
  805. let canvasWidth = res.width; //图片原始长宽
  806. let canvasHeight = res.height;
  807. if (canvasWidth > 1000 || canvasHeight > 1000) {
  808. uni.compressImage({
  809. src: img,
  810. quality: 75,
  811. width: '50%',
  812. height: '50%',
  813. success: async rest => {
  814. const dir = await self.uploadFile(rest.tempFilePath, 0);
  815. this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.push(dir)
  816. }
  817. });
  818. } else {
  819. const dir = await self.uploadFile(img, 0);
  820. this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.push(dir)
  821. }
  822. }
  823. });
  824. }
  825. })
  826. },
  827. uploadFile(options, int) {
  828. var self = this;
  829. return new Promise((resolve, reject) => {
  830. var data = {
  831. imageStatus: int
  832. };
  833. self.$api.aliyunpolicy(data).then(res => {
  834. console.log(res.data,6)
  835. if(res.data.code!=200){
  836. self.$method.showToast('签名错误'+JSON.stringify(res.data))
  837. return
  838. }
  839. var ossToken = res.data.data.resultContent;
  840. if(ossToken.host==null||ossToken.host==undefined){
  841. self.$method.showToast('上传路径报错'+JSON.stringify(res.data))
  842. return
  843. }
  844. uni.uploadFile({
  845. url: ossToken.host,
  846. name: 'file',
  847. filePath: options,
  848. fileType: 'image',
  849. header: {
  850. AuthorizationToken: 'WX ' + uni.getStorageSync('token')
  851. },
  852. formData: {
  853. key: ossToken.dir,
  854. OSSAccessKeyId: ossToken.accessid,
  855. policy: ossToken.policy,
  856. Signature: ossToken.signature,
  857. callback: ossToken.callback,
  858. success_action_status: 200
  859. },
  860. success: result => {
  861. if (result.statusCode === 200) {
  862. resolve(ossToken.dir);
  863. } else {
  864. uni.showToast({
  865. title: '上传失败',
  866. icon: 'none'
  867. });
  868. return;
  869. }
  870. },
  871. fail: error => {
  872. uni.showToast({
  873. title: '上传接口报错'+error,
  874. icon: 'none'
  875. });
  876. return;
  877. }
  878. });
  879. });
  880. });
  881. },
  882. submitAns(bankindex) {
  883. console.log(this.questionList[bankindex])
  884. if(!this.questionList[bankindex].ansText.text && !this.questionList[bankindex].ansText.imageList.length) {
  885. uni.showToast({
  886. title: '请输入内容或上传图片',
  887. duration: 2000,
  888. icon:'none'
  889. });
  890. return
  891. }
  892. this.$set(this.questionList[bankindex],'ques',{
  893. imageList:this.questionList[bankindex].ansText.imageList,
  894. text:this.questionList[bankindex].ansText.text,
  895. })
  896. },
  897. submitAnsChild(bankindex,ansindex) {
  898. if(!this.questionList[bankindex].jsonStr[ansindex].ansText.text && !this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.length) {
  899. uni.showToast({
  900. title: '请输入内容或上传图片',
  901. duration: 2000,
  902. icon:'none'
  903. });
  904. return
  905. }
  906. this.$set(this.questionList[bankindex].ques,ansindex,{
  907. imageList:this.questionList[bankindex].jsonStr[ansindex].ansText.imageList,
  908. text:this.questionList[bankindex].jsonStr[ansindex].ansText.text,
  909. })
  910. },
  911. isRight(item,index) {
  912. //单选
  913. if(this.questionList[index].ques) {
  914. if(item.type == 1) {
  915. return this.questionList[index].ques == this.questionList[index].ans;
  916. //多选
  917. } else if(item.type == 2) {
  918. //每一项都相等
  919. return this.questionList[index].ques.every((item,i) => {
  920. console.log(item == this.questionList[index].ans[i])
  921. return item == this.questionList[index].ans[i];
  922. })
  923. //判断
  924. } else if(item.type == 3) {
  925. return this.questionList[index].ques == this.questionList[index].ans;
  926. } else {
  927. return false;
  928. }
  929. } else {
  930. return false;
  931. }
  932. },
  933. right(bankIndex,ansIndex,option) {
  934. if(this.questionList[bankIndex].ques[ansIndex] && this.questionList[bankIndex].ans[ansIndex]) {
  935. if((this.questionList[bankIndex].ques[ansIndex].indexOf(option.optionsId) != -1 ) || (this.questionList[bankIndex].ans[ansIndex].indexOf(option.optionsId) != -1)) {
  936. return true
  937. } else {
  938. return false;
  939. }
  940. } else {
  941. return false;
  942. }
  943. },
  944. wrong(bankIndex,ansIndex,option) {
  945. if(this.questionList[bankIndex].ques[ansIndex] && this.questionList[bankIndex].ans[ansIndex]) {
  946. if((this.questionList[bankIndex].ques[ansIndex].indexOf(option.optionsId) != -1 ) && (this.questionList[bankIndex].ans[ansIndex].indexOf(option.optionsId) == -1)) {
  947. return true;
  948. } else {
  949. return false;
  950. }
  951. } else {
  952. return false;
  953. }
  954. },
  955. isWrong(item,index) {
  956. if(this.questionList[index].ques) {
  957. //单选
  958. if(item.type == 1) {
  959. return this.questionList[index].ques != this.questionList[index].ans;
  960. //多选
  961. } else if(item.type == 2) {
  962. //每一项都相等
  963. return this.questionList[index].ques.some((item,i) => {
  964. return item != this.questionList[index].ans[i];
  965. })
  966. //判断
  967. } else if(item.type == 3) {
  968. return this.questionList[index].ques != this.questionList[index].ans;
  969. } else {
  970. return false;
  971. }
  972. } else {
  973. return false;
  974. }
  975. },
  976. tabSelect(index,bankindex) {
  977. this.$set(this.questionList[bankindex],'current',index)
  978. },
  979. }
  980. };
  981. </script>
  982. <style lang="scss" scoped>
  983. .swiper {
  984. width:100%;
  985. height:100vh;
  986. }
  987. .lisSty {
  988. margin-bottom: 16rpx;
  989. display: flex;
  990. .flex_auto {
  991. flex:1;
  992. }
  993. }
  994. .activeTI {
  995. vertical-align: middle;
  996. display: inline-block;
  997. border: 1rpx solid #eee;
  998. border-radius: 50rpx;
  999. height: 48rpx;
  1000. line-height: 46rpx;
  1001. text-align: center;
  1002. width: 48rpx;
  1003. margin-right: 15rpx;
  1004. color: #666;
  1005. font-size: 30rpx;
  1006. &.right {
  1007. color:#fff;
  1008. background:green;
  1009. }
  1010. &.wrong {
  1011. color:#fff;
  1012. background:red;
  1013. }
  1014. &.checked {
  1015. color:#fff;
  1016. background:blue;
  1017. }
  1018. }
  1019. .submit_checkbox {
  1020. margin:20rpx auto;
  1021. width: 526rpx;
  1022. height: 80rpx;
  1023. background: rgba(0, 122, 255, 1);
  1024. color:#fff;
  1025. text-align: center;
  1026. line-height: 80rpx;
  1027. font-size: 30rpx;
  1028. border-radius: 40rpx;
  1029. }
  1030. .titles {
  1031. overflow: hidden;
  1032. margin-bottom: 24rpx;
  1033. }
  1034. .titBox {
  1035. padding: 41rpx 25rpx 24rpx 25rpx;
  1036. }
  1037. .tabs {
  1038. margin:10rpx;
  1039. display: flex;
  1040. .tab {
  1041. margin:0 10rpx;
  1042. width: 96rpx;
  1043. height: 48rpx;
  1044. line-height: 48rpx;
  1045. text-align: center;
  1046. color:#007AFF;
  1047. font-size: 28rpx;
  1048. border-radius: 16rpx;
  1049. &.current {
  1050. color:#fff;
  1051. background: #007AFF;
  1052. }
  1053. }
  1054. }
  1055. .ans {
  1056. margin:8rpx 8rpx 8rpx;
  1057. .ans_input {
  1058. border-radius: 16rpx;
  1059. background:#fff;
  1060. .top {
  1061. border-bottom:1rpx solid #EEEEEE;
  1062. padding: 16rpx;
  1063. display: flex;
  1064. align-items: center;
  1065. .icon {
  1066. margin-right:20rpx;
  1067. width: 40rpx;
  1068. height: 38rpx;
  1069. }
  1070. .progress {
  1071. flex:1;
  1072. }
  1073. .submit {
  1074. width: 168rpx;
  1075. height: 48rpx;
  1076. line-height: 48rpx;
  1077. text-align: center;
  1078. color:#fff;
  1079. font-size: 30rpx;
  1080. background: #007AFF;
  1081. border-radius: 24rpx;
  1082. }
  1083. }
  1084. .textarea {
  1085. textarea {
  1086. width:100%;
  1087. height:287rpx;
  1088. padding:10rpx;
  1089. }
  1090. }
  1091. .imgs {
  1092. overflow: hidden;
  1093. display: flex;
  1094. width:100%;
  1095. .img {
  1096. width: 104rpx;
  1097. height: 104rpx;
  1098. border-radius: 8rpx;
  1099. position:relative;
  1100. margin:20rpx;
  1101. text {
  1102. position:absolute;
  1103. right:-15rpx;
  1104. top:-15rpx;
  1105. width:30rpx;
  1106. height:30rpx;
  1107. text-align: center;
  1108. line-height: 30rpx;
  1109. color:#fff;
  1110. background:red;
  1111. border-radius:50%;
  1112. }
  1113. image {
  1114. width:100%;
  1115. height:100%;
  1116. }
  1117. }
  1118. }
  1119. }
  1120. .ans_submit {
  1121. padding:16rpx;
  1122. border-radius: 16rpx;
  1123. background:#fff;
  1124. .imgs {
  1125. overflow: hidden;
  1126. display: flex;
  1127. width:100%;
  1128. .img {
  1129. width: 104rpx;
  1130. height: 104rpx;
  1131. border-radius: 8rpx;
  1132. position:relative;
  1133. margin:20rpx;
  1134. image {
  1135. width:100%;
  1136. height:100%;
  1137. }
  1138. }
  1139. }
  1140. }
  1141. }
  1142. .firstLetter {
  1143. display: flex;
  1144. justify-content: space-between;
  1145. align-items: center;
  1146. margin-bottom: 30rpx;
  1147. .leftLetters {
  1148. display: flex;
  1149. align-items: center;
  1150. width: 220rpx;
  1151. .btnType {
  1152. padding: 5rpx 10rpx;
  1153. border: 1rpx solid #007aff;
  1154. border-radius: 10rpx;
  1155. background-color: rgba(0, 122, 255, 0.1);
  1156. font-size: 28rpx;
  1157. color: #007aff;
  1158. margin-right: 15rpx;
  1159. }
  1160. }
  1161. }
  1162. .popupView {
  1163. height: 100%;
  1164. padding-bottom: 100rpx;
  1165. .popupTops {
  1166. height: 77rpx;
  1167. border-bottom: 1rpx solid #eee;
  1168. text-align: center;
  1169. line-height: 77rpx;
  1170. font-size: 24rpx;
  1171. color: #999;
  1172. position: relative;
  1173. .topIcon {
  1174. position: absolute;
  1175. top: 10rpx;
  1176. left: 50%;
  1177. transform: translateX(-50%);
  1178. width: 80rpx;
  1179. height: 8rpx;
  1180. background-color: #999;
  1181. border-radius: 4rpx;
  1182. }
  1183. }
  1184. .popupContent {
  1185. }
  1186. }
  1187. .pageContent {
  1188. position:relative;
  1189. background-color: #eaeef1;
  1190. height: 100%;
  1191. overflow-y: scroll;
  1192. padding-top: 8rpx;
  1193. padding-bottom: 100rpx;
  1194. }
  1195. .pad_8 {
  1196. background-color: #fff;
  1197. margin: 0rpx 8rpx 8rpx;
  1198. border-radius: 16rpx;
  1199. &.no-margin {
  1200. margin-top:-16rpx;
  1201. border-radius: 0 0 16rpx 16rpx;
  1202. }
  1203. }
  1204. .answer {
  1205. height: 80rpx;
  1206. line-height: 80rpx;
  1207. padding: 0rpx 24rpx;
  1208. display: flex;
  1209. align-items: center;
  1210. justify-content: space-between;
  1211. color: #666;
  1212. font-size: 30rpx;
  1213. }
  1214. .footer_btn {
  1215. background-color: #fff;
  1216. z-index: 10078;
  1217. position: fixed;
  1218. bottom: 0rpx;
  1219. display: flex;
  1220. align-items: center;
  1221. justify-content: space-between;
  1222. width: 100%;
  1223. height: 98rpx;
  1224. padding: 0rpx 38rpx;
  1225. border-top: 1rpx solid #eee;
  1226. .flex_center {
  1227. flex:1;
  1228. display: flex;
  1229. justify-content: center;
  1230. align-items: center;
  1231. flex-direction: column;
  1232. margin:0 200rpx;
  1233. font-size: 24rpx;
  1234. color: #999999;
  1235. .up-icon {
  1236. margin-bottom:18rpx;
  1237. width:100%;
  1238. display: flex;
  1239. justify-content: center;
  1240. image {
  1241. width:58rpx;
  1242. height:21rpx;
  1243. }
  1244. }
  1245. }
  1246. .collect {
  1247. visibility: hidden;
  1248. width:100rpx;
  1249. &.show {
  1250. visibility: visible;
  1251. }
  1252. >view {
  1253. display: flex;
  1254. flex-direction: column;
  1255. align-items: center;
  1256. justify-content: center;
  1257. image {
  1258. width:32rpx;
  1259. height:32rpx;
  1260. margin-bottom:6rpx;
  1261. }
  1262. view {
  1263. font-size: 24rpx;
  1264. color: #999999;
  1265. }
  1266. }
  1267. }
  1268. }
  1269. .boxSty {
  1270. padding: 44rpx 41rpx 0rpx;
  1271. }
  1272. .liListSty {
  1273. border:1rpx solid #EEEEEE;
  1274. width: 88rpx;
  1275. height: 88rpx;
  1276. border-radius: 32rpx;
  1277. text-align: center;
  1278. line-height: 88rpx;
  1279. color: #333;
  1280. font-size: 32rpx;
  1281. float: left;
  1282. margin: 20rpx 23rpx;
  1283. &.isRight {
  1284. border:1rpx solid #EEEEEE;
  1285. color:#fff;
  1286. background: green;
  1287. }
  1288. &.isWrong {
  1289. border:1rpx solid #EEEEEE;
  1290. color:#fff;
  1291. background: red;
  1292. }
  1293. }
  1294. .answerInfos {
  1295. padding: 25rpx 25rpx 25rpx 23rpx;
  1296. }
  1297. .answerTitle {
  1298. margin-bottom: 28rpx;
  1299. color: #666;
  1300. font-size: 30rpx;
  1301. }
  1302. .answerContent {
  1303. font-size: 30rpx;
  1304. color: #666;
  1305. }
  1306. .textChild {
  1307. display: inline-block;
  1308. vertical-align: middle;
  1309. }
  1310. .dialog {
  1311. position: fixed;
  1312. left:0;
  1313. top:0;
  1314. width:100%;
  1315. height:100%;
  1316. background-color: rgba(0,0,0,0.8);
  1317. display: flex;
  1318. flex-direction: column;
  1319. align-items: center;
  1320. justify-content: center;
  1321. z-index: 20000;
  1322. .text {
  1323. font-size: 32rpx;
  1324. color: #FFFFFF;
  1325. text-align: center;
  1326. }
  1327. .btn {
  1328. width: 242rpx;
  1329. height: 82rpx;
  1330. border: 2rpx solid #FFFFFF;
  1331. border-radius: 16rpx;
  1332. text-align: center;
  1333. line-height: 82rpx;
  1334. margin:41rpx auto;
  1335. color:#fff;
  1336. font-size: 32rpx;
  1337. }
  1338. }
  1339. </style>