questionBank.vue 38 KB

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