wrongTypeBank.vue 53 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778
  1. <template>
  2. <view id="questionBank">
  3. <nav-bar title="试卷"></nav-bar>
  4. <swiper
  5. class="swiper"
  6. :current="current"
  7. @change="swiperChange"
  8. :interval="interval"
  9. >
  10. <swiper-item v-for="(bank, bankIndex) in questionList" :key="bankIndex">
  11. <view class="pageContent">
  12. <view class="pad_8 titBox">
  13. <view class="firstLetter">
  14. <view class="leftLetters">
  15. <view class="btnType">
  16. <text v-if="bank.type == 1">单选</text>
  17. <text v-if="bank.type == 2">多选</text>
  18. <text v-if="bank.type == 3">判断</text>
  19. <text v-if="bank.type == 4">案例题</text>
  20. <text v-if="bank.type == 5">简答题</text>
  21. </view>
  22. <text>{{ bankIndex + 1 }}/{{ questionList.length }}</text>
  23. </view>
  24. <view style="color: #666; font-size: 28rpx"></view>
  25. <view class="leftLetters"></view>
  26. </view>
  27. <view class="titles">
  28. <rich-text :nodes="bank.content"></rich-text>
  29. </view>
  30. </view>
  31. <template v-if="bank.type == 1">
  32. <view class="pad_8 titBox no-margin">
  33. <view v-if="!bank.ques">
  34. <view
  35. v-for="(item, index) in bank.jsonStr"
  36. :key="index"
  37. class="lisSty"
  38. @click="radioSelect(item.optionsId, bankIndex)"
  39. >
  40. <view class="activeTI">{{ ast[index] }}</view>
  41. <view class="flex_auto">
  42. {{ item.content }}
  43. <view v-if="item.imgUrl">
  44. <image
  45. style="width: 600rpx"
  46. mode="widthFix"
  47. :src="$method.splitImgHost(item.imgUrl)"
  48. ></image>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. <view v-if="bank.ques">
  54. <view
  55. v-for="(item, index) in bank.jsonStr"
  56. :key="index"
  57. class="lisSty"
  58. >
  59. <text
  60. :class="{
  61. right:
  62. item.optionsId == bank.ques ||
  63. item.optionsId == bank.ans,
  64. wrong:
  65. item.optionsId == bank.ques && bank.ques != bank.ans,
  66. }"
  67. class="activeTI"
  68. >{{ ast[index] }}</text
  69. >
  70. <view class="flex_auto">
  71. {{ item.content }}
  72. <view v-if="item.imgUrl">
  73. <image
  74. style="width: 600rpx"
  75. mode="widthFix"
  76. :src="$method.splitImgHost(item.imgUrl)"
  77. ></image>
  78. </view>
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. <view v-if="bank.ques">
  84. <view class="pad_8 answer">
  85. <view>正确答案:{{ ast[bank.ans - 1] }}</view>
  86. <view v-if="!explain">我的答案:{{ ast[bank.ques - 1] }}</view>
  87. </view>
  88. <view class="pad_8 answerInfos">
  89. <view class="answerTitle">答案解析</view>
  90. <view class="answerContent">
  91. <rich-text :nodes="bank.analysisContent"></rich-text>
  92. </view>
  93. </view>
  94. </view>
  95. </template>
  96. <template v-if="bank.type == 2">
  97. <view class="pad_8 titBox no-margin">
  98. <view v-if="!bank.ques">
  99. <view
  100. v-for="(item, index) in bank.jsonStr"
  101. :key="index"
  102. class="lisSty"
  103. @click="checkboxSelect(item.optionsId, bankIndex, index)"
  104. >
  105. <view :class="{ checked: item.checked }" class="activeTI">{{
  106. ast[index]
  107. }}</view>
  108. <view class="flex_auto">
  109. {{ item.content }}
  110. <view v-if="item.imgUrl">
  111. <image
  112. style="width: 600rpx"
  113. mode="widthFix"
  114. :src="$method.splitImgHost(item.imgUrl)"
  115. ></image>
  116. </view>
  117. </view>
  118. </view>
  119. </view>
  120. <view
  121. v-if="!bank.ques"
  122. class="submit_checkbox"
  123. :class="{ disabled: !isCheckboxChecked(bank.jsonStr) }"
  124. @click="checkboxSubmit(bankIndex)"
  125. >
  126. 确认答案
  127. </view>
  128. <view v-if="bank.ques">
  129. <view
  130. v-for="(item, index) in bank.jsonStr"
  131. :key="index"
  132. class="lisSty"
  133. >
  134. <text
  135. :class="{
  136. right:
  137. bank.ques.indexOf(item.optionsId) != -1 ||
  138. bank.ans.indexOf(item.optionsId) != -1,
  139. wrong:
  140. bank.ques.indexOf(item.optionsId) != -1 &&
  141. bank.ans.indexOf(item.optionsId) == -1,
  142. }"
  143. class="activeTI"
  144. >{{ ast[index] }}</text
  145. >
  146. <view class="flex_auto">
  147. {{ item.content }}
  148. <view v-if="item.imgUrl">
  149. <image
  150. style="width: 600rpx"
  151. mode="widthFix"
  152. :src="$method.splitImgHost(item.imgUrl)"
  153. ></image>
  154. </view>
  155. </view>
  156. </view>
  157. </view>
  158. </view>
  159. <view v-if="bank.ques">
  160. <view class="pad_8 answer">
  161. <view
  162. >正确答案:
  163. <text v-for="ansItem in bank.ans">{{
  164. ast[ansItem - 1]
  165. }}</text>
  166. </view>
  167. <view v-if="!explain"
  168. >我的答案:
  169. <text v-for="quesItem in bank.ques">{{
  170. ast[quesItem - 1]
  171. }}</text>
  172. </view>
  173. </view>
  174. <view class="pad_8 answerInfos">
  175. <view class="answerTitle">答案解析</view>
  176. <view class="answerContent">
  177. <rich-text :nodes="bank.analysisContent"></rich-text>
  178. </view>
  179. </view>
  180. </view>
  181. </template>
  182. <template v-if="bank.type == 3">
  183. <view class="pad_8 titBox no-margin">
  184. <view v-if="!bank.ques">
  185. <view
  186. v-for="(item, index) in judge"
  187. :key="index"
  188. class="lisSty"
  189. @click="judgeSelect(index, bankIndex)"
  190. >
  191. <view class="activeTI">{{ ast[index] }}</view>
  192. <view class="flex_auto">
  193. {{ item }}
  194. <view v-if="item.imgUrl">
  195. <image
  196. style="width: 600rpx"
  197. mode="widthFix"
  198. :src="$method.splitImgHost(item.imgUrl)"
  199. ></image>
  200. </view>
  201. </view>
  202. </view>
  203. </view>
  204. <view v-if="bank.ques">
  205. <view
  206. v-for="(item, index) in judge"
  207. :key="index"
  208. class="lisSty"
  209. >
  210. <text
  211. :class="{
  212. right: index == bank.ques || index == bank.ans,
  213. wrong: index == bank.ques && bank.ques != bank.ans,
  214. }"
  215. class="activeTI"
  216. >{{ ast[index] }}</text
  217. >
  218. <view class="flex_auto">
  219. {{ item }}
  220. <view v-if="item.imgUrl">
  221. <image
  222. style="width: 600rpx"
  223. mode="widthFix"
  224. :src="$method.splitImgHost(item.imgUrl)"
  225. ></image>
  226. </view>
  227. </view>
  228. </view>
  229. </view>
  230. </view>
  231. <view v-if="bank.ques">
  232. <view class="pad_8 answer">
  233. <view>正确答案:{{ ast[bank.ans] }}</view>
  234. <view v-if="!explain">我的答案:{{ ast[bank.ques] }}</view>
  235. </view>
  236. <view class="pad_8 answerInfos">
  237. <view class="answerTitle">答案解析</view>
  238. <view class="answerContent">
  239. <rich-text :nodes="bank.analysisContent"></rich-text>
  240. </view>
  241. </view>
  242. </view>
  243. </template>
  244. <!-- 简答题 -->
  245. <template v-if="bank.type == 5">
  246. <view class="pad_8 titBox">
  247. <view class="ans">
  248. <view class="ans_input" v-if="!bank.ques">
  249. <view class="top flex">
  250. <image
  251. :data-index="bankIndex"
  252. class="icon"
  253. @click="chooseImg(bankIndex)"
  254. src="/static/08-10_032.jpg"
  255. mode=""
  256. ></image>
  257. <view class="progress"
  258. >{{ bank.ansText.imageList.length || "0" }}/4</view
  259. >
  260. <view class="submit" @click="submitAns(bankIndex)"
  261. >确认答案</view
  262. >
  263. </view>
  264. <view class="textarea">
  265. <textarea
  266. v-model="bank.ansText.text"
  267. placeholder="在此输入答案"
  268. ></textarea>
  269. </view>
  270. <view class="imgs">
  271. <view
  272. class="img"
  273. v-for="(img, imgIndex) in bank.ansText.imageList"
  274. :key="imgIndex"
  275. >
  276. <text @click="deleteImg(imgIndex, bankIndex)">x</text>
  277. <image :src="$method.splitImgHost(img, true)"></image>
  278. </view>
  279. </view>
  280. </view>
  281. <view
  282. class="ans_submit answerInfos"
  283. v-if="bank.ques && !explain"
  284. >
  285. <view class="answerTitle">我的答案:</view>
  286. {{ bank.ques.text }}
  287. <view class="imgs">
  288. <image
  289. class="img"
  290. :key="quesIndex"
  291. v-for="(ques, quesIndex) in bank.ques.imageList"
  292. :src="$method.splitImgHost(ques, true)"
  293. ></image>
  294. </view>
  295. </view>
  296. </view>
  297. </view>
  298. <view v-if="bank.ques">
  299. <view class="pad_8 answerInfos">
  300. <view class="answerTitle">答案解析:</view>
  301. <view class="answerContent">
  302. <rich-text :nodes="bank.analysisContent"></rich-text>
  303. </view>
  304. </view>
  305. </view>
  306. </template>
  307. <!-- 案例题 -->
  308. <template v-if="bank.type == 4">
  309. <view class="tabs">
  310. <view
  311. class="tab"
  312. :class="{ current: tabIndex == bank.current }"
  313. :key="tabIndex"
  314. v-for="(tab, tabIndex) in bank.jsonStr"
  315. @click="tabSelect(tabIndex, bankIndex)"
  316. >问题{{ tabIndex + 1 }}</view
  317. >
  318. </view>
  319. <view
  320. v-for="(ansItem, ansIndex) in bank.jsonStr"
  321. v-if="bank.current == ansIndex"
  322. :key="ansIndex"
  323. >
  324. <template v-if="ansItem.type == 1">
  325. <view class="pad_8 titBox">
  326. <view class="titles">
  327. <rich-text :nodes="ansItem.content"></rich-text>
  328. </view>
  329. <view v-if="!bank.ques[ansIndex]">
  330. <view
  331. v-for="(option, childIndex) in ansItem.optionsList"
  332. :key="childIndex"
  333. class="lisSty"
  334. @click="
  335. radioSelectChild(option.optionsId, ansIndex, bankIndex)
  336. "
  337. >
  338. <view class="activeTI">{{ ast[childIndex] }}</view>
  339. <view class="flex_auto">
  340. <rich-text
  341. class="textChild"
  342. :nodes="option.content"
  343. ></rich-text>
  344. <view v-if="option.imgUrl">
  345. <image
  346. style="width: 600rpx"
  347. mode="widthFix"
  348. :src="$method.splitImgHost(option.imgUrl)"
  349. ></image>
  350. </view>
  351. </view>
  352. </view>
  353. </view>
  354. <view v-if="bank.ques[ansIndex]">
  355. <view
  356. v-for="(option, childIndex) in ansItem.optionsList"
  357. :key="childIndex"
  358. class="lisSty"
  359. >
  360. <text
  361. :class="{
  362. right:
  363. option.optionsId == bank.ques[ansIndex] ||
  364. option.optionsId == bank.ans[ansIndex],
  365. wrong:
  366. option.optionsId == bank.ques[ansIndex] &&
  367. bank.ques[ansIndex] != bank.ans[ansIndex],
  368. }"
  369. class="activeTI"
  370. >{{ ast[childIndex] }}</text
  371. >
  372. <view class="flex_auto">
  373. <rich-text :nodes="option.content"></rich-text>
  374. <view v-if="option.imgUrl">
  375. <image
  376. style="width: 600rpx"
  377. mode="widthFix"
  378. :src="$method.splitImgHost(option.imgUrl)"
  379. ></image>
  380. </view>
  381. </view>
  382. </view>
  383. </view>
  384. </view>
  385. <view v-if="bank.ques[ansIndex]">
  386. <view class="pad_8 answer">
  387. <view>正确答案:{{ ast[bank.ans[ansIndex] - 1] }}</view>
  388. <view v-if="!explain"
  389. >我的答案:{{ ast[bank.ques[ansIndex] - 1] }}</view
  390. >
  391. </view>
  392. <view class="pad_8 answerInfos">
  393. <view class="answerTitle">答案解析</view>
  394. <view class="answerContent">
  395. <rich-text :nodes="option.analysisContent"></rich-text>
  396. </view>
  397. </view>
  398. </view>
  399. </template>
  400. <template v-if="ansItem.type == 2">
  401. <view class="pad_8 titBox">
  402. <view class="titles">
  403. <rich-text :nodes="ansItem.content"></rich-text>
  404. </view>
  405. <view v-if="!bank.ques[ansIndex]">
  406. <view
  407. v-for="(option, childindex) in ansItem.optionsList"
  408. :key="childindex"
  409. class="lisSty"
  410. @click="
  411. checkboxSelectChild(bankIndex, ansIndex, childindex)
  412. "
  413. >
  414. <view
  415. :class="{ checked: option.checked }"
  416. class="activeTI"
  417. >{{ ast[childindex] }}</view
  418. >
  419. <view class="flex_auto">
  420. <rich-text :nodes="option.content"></rich-text>
  421. <view v-if="option.imgUrl">
  422. <image
  423. style="width: 600rpx"
  424. mode="widthFix"
  425. :src="$method.splitImgHost(option.imgUrl)"
  426. ></image>
  427. </view>
  428. </view>
  429. </view>
  430. </view>
  431. <view
  432. v-if="!bank.ques[ansIndex]"
  433. class="submit_checkbox"
  434. :class="{
  435. disabled: !isCheckboxChecked(ansItem.optionsList),
  436. }"
  437. @click="checkboxSubmitChild(bankIndex, ansIndex)"
  438. >
  439. 确认答案
  440. </view>
  441. <view v-if="bank.ques && bank.ques[ansIndex]">
  442. <view
  443. v-for="(option, childindex) in ansItem.optionsList"
  444. :key="childindex"
  445. class="lisSty"
  446. >
  447. <text
  448. :class="{
  449. right: right(bankIndex, ansIndex, option),
  450. wrong: wrong(bankIndex, ansIndex, option),
  451. }"
  452. class="activeTI"
  453. >{{ ast[childindex] }}</text
  454. >
  455. <view class="flex_auto">
  456. <rich-text :nodes="option.content"></rich-text>
  457. <view v-if="option.imgUrl">
  458. <image
  459. style="width: 600rpx"
  460. mode="widthFix"
  461. :src="$method.splitImgHost(option.imgUrl)"
  462. ></image>
  463. </view>
  464. </view>
  465. </view>
  466. </view>
  467. </view>
  468. <view v-if="bank.ques[ansIndex]">
  469. <view class="pad_8 answer">
  470. <view
  471. >正确答案:
  472. <text
  473. :key="ansItemIndex1"
  474. v-for="(ansItem1, ansItemIndex1) in bank.ans[ansIndex]"
  475. >{{ ast[ansItem1 - 1] }}</text
  476. >
  477. </view>
  478. <view v-if="!explain"
  479. >我的答案:
  480. <text
  481. :key="quesItemIndex"
  482. v-for="(quesItem, quesItemIndex) in bank.ques[ansIndex]"
  483. >{{ ast[quesItem - 1] }}</text
  484. >
  485. </view>
  486. </view>
  487. <view class="pad_8 answerInfos">
  488. <view class="answerTitle">答案解析</view>
  489. <view class="answerContent">
  490. <rich-text :nodes="ansItem.analysisContent"></rich-text>
  491. </view>
  492. </view>
  493. </view>
  494. </template>
  495. <template v-if="ansItem.type == 3">
  496. <view class="pad_8 titBox">
  497. <view class="titles">
  498. <rich-text :nodes="ansItem.content"></rich-text>
  499. </view>
  500. <view v-if="!bank.ques[ansIndex]">
  501. <view
  502. v-for="(option, childindex) in judge"
  503. :key="childindex"
  504. class="lisSty"
  505. @click="judgeSelectChild(ansIndex, childindex, bankIndex)"
  506. >
  507. <view class="activeTI">{{ ast[childindex] }}</view>
  508. <view class="flex_auto">
  509. {{ option }}
  510. <view v-if="option.imgUrl">
  511. <image
  512. style="width: 600rpx"
  513. mode="widthFix"
  514. :src="$method.splitImgHost(option.imgUrl)"
  515. ></image>
  516. </view>
  517. </view>
  518. </view>
  519. </view>
  520. <view v-if="bank.ques[ansIndex]">
  521. <view
  522. v-for="(option, childindex) in judge"
  523. :key="childindex"
  524. class="lisSty"
  525. >
  526. <text
  527. :class="{
  528. right:
  529. childindex == bank.ques[ansIndex] ||
  530. childindex == bank.ans[ansIndex],
  531. wrong:
  532. childindex == bank.ques[ansIndex] &&
  533. bank.ques[ansIndex] != bank.ans[ansIndex],
  534. }"
  535. class="activeTI"
  536. >{{ ast[childindex] }}</text
  537. >
  538. <view class="flex_auto">
  539. {{ option }}
  540. <view v-if="option.imgUrl">
  541. <image
  542. style="width: 600rpx"
  543. mode="widthFix"
  544. :src="$method.splitImgHost(option.imgUrl)"
  545. ></image>
  546. </view>
  547. </view>
  548. </view>
  549. </view>
  550. </view>
  551. <view v-if="bank.ques[ansIndex]">
  552. <view class="pad_8 answer">
  553. <view>正确答案:{{ ast[bank.ans[ansIndex]] }}</view>
  554. <view v-if="!explain"
  555. >我的答案:{{ ast[bank.ques[ansIndex]] }}</view
  556. >
  557. </view>
  558. <view class="pad_8 answerInfos">
  559. <view class="answerTitle">答案解析</view>
  560. <view class="answerContent">
  561. <rich-text :nodes="ansItem.analysisContent"></rich-text>
  562. </view>
  563. </view>
  564. </view>
  565. </template>
  566. <!-- 简答题 -->
  567. <template v-if="ansItem.type == 5">
  568. <view class="pad_8 titBox_title">
  569. <view class="titles">
  570. <rich-text :nodes="ansItem.content"></rich-text>
  571. </view>
  572. </view>
  573. <view class="pad_8 titBox_title">
  574. <view class="ans">
  575. <view class="ans_input" v-if="!bank.ques[ansIndex]">
  576. <view class="top flex">
  577. <image
  578. class="icon"
  579. @click="chooseImgChild(bankIndex, ansIndex)"
  580. src="/static/08-10_032.jpg"
  581. mode=""
  582. ></image>
  583. <view class="progress"
  584. >{{ ansItem.ansText.imageList.length || "0" }}/4</view
  585. >
  586. <view
  587. class="submit"
  588. @click="submitAnsChild(bankIndex, ansIndex)"
  589. >确认答案</view
  590. >
  591. </view>
  592. <view class="textarea">
  593. <textarea
  594. v-model="ansItem.ansText.text"
  595. placeholder="在此输入答案"
  596. ></textarea>
  597. </view>
  598. <view class="imgs">
  599. <view
  600. class="img"
  601. v-for="(img, imgIndex) in ansItem.ansText.imageList"
  602. :key="imgIndex"
  603. >
  604. <text
  605. @click="
  606. deleteImgChild(imgIndex, bankIndex, ansIndex)
  607. "
  608. >x</text
  609. >
  610. <image :src="$method.splitImgHost(img, true)"></image>
  611. </view>
  612. </view>
  613. </view>
  614. <view
  615. class="ans_submit answerInfos"
  616. v-if="bank.ques[ansIndex] && !explain"
  617. >
  618. <view class="answerTitle">我的答案</view>
  619. {{ bank.ques[ansIndex].text }}
  620. <view class="imgs">
  621. <image
  622. class="img"
  623. :key="quesIndex"
  624. v-for="(ques, quesIndex) in bank.ques[ansIndex]
  625. .imageList"
  626. :src="$method.splitImgHost(ques, true)"
  627. ></image>
  628. </view>
  629. </view>
  630. </view>
  631. </view>
  632. <view v-if="bank.ques[ansIndex]">
  633. <view class="pad_8 answerInfos">
  634. <view class="answerTitle">答案解析</view>
  635. <view class="answerContent">
  636. <rich-text :nodes="ansItem.analysisContent"></rich-text>
  637. </view>
  638. </view>
  639. </view>
  640. </template>
  641. </view>
  642. </template>
  643. <view class="footer_btn">
  644. <view class="flex_center" @click="openFooterTab">
  645. <view class="up-icon">
  646. <image src="/static/up.png"></image>
  647. </view>
  648. 答题卡
  649. </view>
  650. <view class="collect" :class="{ show: !explain }" @click="pdsubmit">
  651. <view>
  652. <image src="/static/jj.png" mode=""></image>
  653. <view>交卷</view>
  654. </view>
  655. </view>
  656. </view>
  657. </view>
  658. </swiper-item>
  659. </swiper>
  660. <u-popup v-model="show" mode="bottom" border-radius="14" height="680rpx">
  661. <view class="popupView">
  662. <view class="popupTops">
  663. <view class="topIcon"></view>
  664. 点击编号即可跳转至对应题目
  665. </view>
  666. <view class="popupContent">
  667. <scroll-view scroll-y="true" style="height: 506rpx">
  668. <view class="boxSty">
  669. <view
  670. v-for="(item, index) in questionList"
  671. :key="index"
  672. @click="changeIndex(index)"
  673. :class="{
  674. isRight: isRight(item, index),
  675. isWrong: isWrong(item, index),
  676. isPart: isPart(item, index),
  677. }"
  678. class="liListSty"
  679. >{{ index + 1 }}</view
  680. >
  681. </view>
  682. </scroll-view>
  683. </view>
  684. </view>
  685. </u-popup>
  686. <view class="dialog" v-if="showDialog">
  687. <image class="pointer" src="/static/pointer.png"></image>
  688. <view class="text">左右滑动切换上下题</view>
  689. <view class="btn" @click="hideDialog">我知道了</view>
  690. </view>
  691. </view>
  692. </template>
  693. <script>
  694. export default {
  695. data() {
  696. return {
  697. current: 0,
  698. questionList: [],
  699. ast: ["A", "B", "C", "D", "E", "F", "G"],
  700. judge: ["错误", "正确"],
  701. show: false,
  702. showDialog: false,
  703. bankList: [],
  704. collectList: [],
  705. type: "",
  706. explain: "",
  707. };
  708. },
  709. onLoad(option) {
  710. this.type = option.type;
  711. this.explain = option.explain;
  712. let showDialog = uni.getStorageSync("showDialog");
  713. if (showDialog) {
  714. this.showDialog = false;
  715. } else {
  716. this.showDialog = true;
  717. uni.setStorageSync("showDialog", "1");
  718. }
  719. this.wrongRecordTypeQuestionList();
  720. },
  721. onUnload() {},
  722. methods: {
  723. wrongRecordTypeQuestionList() {
  724. this.$api
  725. .wrongRecordTypeQuestionList({
  726. type: this.type,
  727. })
  728. .then((res) => {
  729. res.data.rows.forEach((item, index) => {
  730. if (typeof item.jsonStr == "string") {
  731. item.jsonStr = JSON.parse(item.jsonStr);
  732. if (item.type == 2) {
  733. //多选
  734. item.jsonStr.forEach((str) => {
  735. str.optionsId = "" + str.optionsId;
  736. });
  737. let arr = item.answerQuestion.split(",");
  738. arr.forEach((a, i) => {
  739. arr[i] = "" + a;
  740. });
  741. item.ans = arr;
  742. if (this.explain) {
  743. item.ques = item.ans;
  744. }
  745. item.analysisContent &&
  746. (item.analysisContent = item.analysisContent.replace(
  747. /<img/gi,
  748. '<img style="max-width:100%;"'
  749. ));
  750. item.content &&
  751. (item.content = item.content.replace(
  752. /<img/gi,
  753. '<img style="max-width:100%;"'
  754. ));
  755. return;
  756. } else if (item.type == 5) {
  757. item.ansText = {
  758. text: "",
  759. imageList: [],
  760. };
  761. item.analysisContent &&
  762. (item.analysisContent = item.analysisContent.replace(
  763. /<img/gi,
  764. '<img style="max-width:100%;"'
  765. ));
  766. item.content &&
  767. (item.content = item.content.replace(
  768. /<img/gi,
  769. '<img style="max-width:100%;"'
  770. ));
  771. if (this.explain) {
  772. item.ques = {
  773. text: item.analysisContent,
  774. };
  775. return;
  776. }
  777. } else if (item.type == 4) {
  778. console.log(item.jsonStr);
  779. item.ques = [];
  780. item.current = 0;
  781. let ansArr = [];
  782. item.jsonStr.forEach((json, index) => {
  783. if (json.type == 1) {
  784. ansArr[index] = json.answerQuestion;
  785. json.content &&
  786. (json.content = json.content.replace(
  787. /<img/gi,
  788. '<img style="max-width:100%;"'
  789. ));
  790. } else if (json.type == 2) {
  791. json.optionsList.forEach((str) => {
  792. str.optionsId = "" + str.optionsId;
  793. });
  794. let arr = json.answerQuestion.split(",");
  795. arr.forEach((a, i) => {
  796. arr[i] = "" + a;
  797. });
  798. ansArr[index] = arr;
  799. json.content &&
  800. (json.content = json.content.replace(
  801. /<img/gi,
  802. '<img style="max-width:100%;"'
  803. ));
  804. } else if (json.type == 3) {
  805. ansArr[index] = json.answerQuestion;
  806. json.content &&
  807. (json.content = json.content.replace(
  808. /<img/gi,
  809. '<img style="max-width:100%;"'
  810. ));
  811. } else if (json.type == 5) {
  812. ansArr[index] = {
  813. text: "",
  814. imageList: [],
  815. };
  816. json.ansText = {
  817. text: "",
  818. imageList: [],
  819. };
  820. json.content &&
  821. (json.content = json.content.replace(
  822. /<img/gi,
  823. '<img style="max-width:100%;"'
  824. ));
  825. }
  826. });
  827. item.ans = ansArr;
  828. item.analysisContent &&
  829. (item.analysisContent = item.analysisContent.replace(
  830. /<img/gi,
  831. '<img style="max-width:100%;"'
  832. ));
  833. item.content &&
  834. (item.content = item.content.replace(
  835. /<img/gi,
  836. '<img style="max-width:100%;"'
  837. ));
  838. if (this.explain) {
  839. item.ques = item.ans;
  840. }
  841. return;
  842. }
  843. item.analysisContent &&
  844. (item.analysisContent = item.analysisContent.replace(
  845. /<img/gi,
  846. '<img style="max-width:100%;"'
  847. ));
  848. item.content &&
  849. (item.content = item.content.replace(
  850. /<img/gi,
  851. '<img style="max-width:100%;"'
  852. ));
  853. item.ans = item.answerQuestion;
  854. if (this.explain) {
  855. item.ques = item.ans;
  856. }
  857. } else {
  858. if (this.explain) {
  859. item.ques = item.ans;
  860. }
  861. }
  862. });
  863. this.questionList = res.data.rows;
  864. });
  865. },
  866. /**
  867. * @param {Object} e单选点击
  868. */
  869. radioSelect(optionsId, bindex) {
  870. if (this.questionList[bindex].ques) return;
  871. this.$set(this.questionList[bindex], "ques", optionsId);
  872. // 回答错误
  873. if (this.questionList[bindex].ques != this.questionList[bindex].ans) {
  874. } else {
  875. this.$api
  876. .wrongRecordDelete({
  877. examId: this.questionList[bindex].examId,
  878. orderGoodsId: this.questionList[bindex].orderGoodsId,
  879. questionId: this.questionList[bindex].questionId,
  880. })
  881. .then((res) => {});
  882. }
  883. },
  884. /**
  885. * @param {Object} e单选点击
  886. */
  887. radioSelectChild(optionsId, ansIndex, bindex) {
  888. if (this.questionList[bindex].ques[ansIndex]) return;
  889. this.$set(this.questionList[bindex].ques, ansIndex, optionsId);
  890. },
  891. /**
  892. * @param {Object} 多选点击
  893. */
  894. checkboxSelect(optionsId, bindex, index) {
  895. this.$set(
  896. this.questionList[bindex].jsonStr[index],
  897. "checked",
  898. !this.questionList[bindex].jsonStr[index].checked
  899. );
  900. },
  901. /**
  902. * @param {Object} 多选点击
  903. */
  904. checkboxSelectChild(bindex, ansIndex, childIndex) {
  905. this.$set(
  906. this.questionList[bindex].jsonStr[ansIndex].optionsList[childIndex],
  907. "checked",
  908. !this.questionList[bindex].jsonStr[ansIndex].optionsList[childIndex]
  909. .checked
  910. );
  911. },
  912. isCheckboxChecked(arr) {
  913. return arr.some((item) => {
  914. if (item.checked) {
  915. return true;
  916. }
  917. });
  918. },
  919. /**
  920. * @param {Object} 多选确认
  921. */
  922. checkboxSubmit(bindex) {
  923. if (this.questionList[bindex].ques) return;
  924. let arr = [];
  925. this.questionList[bindex].jsonStr.forEach((item) => {
  926. if (item.checked) {
  927. arr.push(item.optionsId);
  928. }
  929. });
  930. if (!arr.length) {
  931. uni.showToast({
  932. title: "请选择答案",
  933. icon: "none",
  934. });
  935. return;
  936. }
  937. this.$set(this.questionList[bindex], "ques", arr);
  938. let isWrong = this.questionList[bindex].ques.some(
  939. (quesItem, quesIndex) => {
  940. return (
  941. this.questionList[bindex].ques[quesIndex] !=
  942. this.questionList[bindex].ans[quesIndex]
  943. );
  944. }
  945. );
  946. // 回答错误
  947. if (isWrong) {
  948. } else {
  949. let question = this.questionList.find(
  950. (item) => item.questionId == this.questionList[bindex].questionId
  951. );
  952. if (question) {
  953. this.$api
  954. .wrongRecordDelete({
  955. examId: question.examId,
  956. orderGoodsId: question.orderGoodsId,
  957. questionId: question.questionId,
  958. })
  959. .then((res) => {});
  960. }
  961. }
  962. },
  963. /**
  964. * @param {Object} 多选确认
  965. */
  966. checkboxSubmitChild(bindex, ansIndex) {
  967. if (this.questionList[bindex].ques[ansIndex]) return;
  968. let arr = [];
  969. this.questionList[bindex].jsonStr[ansIndex].optionsList.forEach(
  970. (item) => {
  971. if (item.checked) {
  972. arr.push(item.optionsId);
  973. }
  974. }
  975. );
  976. if (!arr.length) {
  977. uni.showToast({
  978. title: "请选择答案",
  979. icon: "none",
  980. });
  981. return;
  982. }
  983. this.$set(this.questionList[bindex].ques, ansIndex, arr);
  984. },
  985. judgeSelect(index, bindex) {
  986. if (this.questionList[bindex].ques) return;
  987. this.$set(this.questionList[bindex], "ques", index + "");
  988. // 回答错误
  989. if (this.questionList[bindex].ques != this.questionList[bindex].ans) {
  990. } else {
  991. this.$api
  992. .wrongRecordDelete({
  993. examId: this.questionList[bindex].examId,
  994. orderGoodsId: this.questionList[bindex].orderGoodsId,
  995. questionId: this.questionList[bindex].questionId,
  996. })
  997. .then((res) => {});
  998. }
  999. },
  1000. judgeSelectChild(ansindex, childindex, bindex) {
  1001. if (this.questionList[bindex].ques[ansindex]) return;
  1002. this.$set(this.questionList[bindex].ques, ansindex, childindex + "");
  1003. },
  1004. openFooterTab() {
  1005. this.show = true;
  1006. },
  1007. hideDialog() {
  1008. this.showDialog = false;
  1009. },
  1010. changeIndex(index) {
  1011. this.current = index;
  1012. },
  1013. swiperChange(e) {
  1014. this.current = e.detail.current;
  1015. },
  1016. deleteImg(imgIndex, bankIndex) {
  1017. this.questionList[bankIndex].ansText.imageList.splice(imgIndex, 1);
  1018. },
  1019. deleteImgChild(imgIndex, bankIndex, ansIndex) {
  1020. this.questionList[bankIndex].jsonStr[ansIndex].ansText.imageList.splice(
  1021. imgIndex,
  1022. 1
  1023. );
  1024. },
  1025. chooseImg(bankindex) {
  1026. uni.chooseImage({
  1027. count: 1, //默认9
  1028. sizeType: ["compressed"], //可以指定是原图还是压缩图,默认二者都有
  1029. sourceType: ["album", "camera"], //从相册选择
  1030. success: (res) => {
  1031. let self = this;
  1032. // console.log(JSON.stringify(res.tempFilePaths));
  1033. let img = res.tempFilePaths[0];
  1034. uni.getImageInfo({
  1035. src: img,
  1036. success: async (res) => {
  1037. let canvasWidth = res.width; //图片原始长宽
  1038. let canvasHeight = res.height;
  1039. if (canvasWidth > 1000 || canvasHeight > 1000) {
  1040. uni.compressImage({
  1041. src: img,
  1042. quality: 75,
  1043. width: "50%",
  1044. height: "50%",
  1045. success: async (rest) => {
  1046. const dir = await self.uploadFile(rest.tempFilePath, 0);
  1047. this.questionList[bankindex].ansText.imageList.push(dir);
  1048. },
  1049. });
  1050. } else {
  1051. const dir = await self.uploadFile(img, 0);
  1052. this.questionList[bankindex].ansText.imageList.push(dir);
  1053. }
  1054. },
  1055. });
  1056. },
  1057. });
  1058. },
  1059. chooseImgChild(bankindex, ansindex) {
  1060. uni.chooseImage({
  1061. count: 1, //默认9
  1062. sizeType: ["compressed"], //可以指定是原图还是压缩图,默认二者都有
  1063. sourceType: ["album", "camera"], //从相册选择
  1064. success: (res) => {
  1065. let self = this;
  1066. // console.log(JSON.stringify(res.tempFilePaths));
  1067. let img = res.tempFilePaths[0];
  1068. uni.getImageInfo({
  1069. src: img,
  1070. success: async (res) => {
  1071. let canvasWidth = res.width; //图片原始长宽
  1072. let canvasHeight = res.height;
  1073. if (canvasWidth > 1000 || canvasHeight > 1000) {
  1074. uni.compressImage({
  1075. src: img,
  1076. quality: 75,
  1077. width: "50%",
  1078. height: "50%",
  1079. success: async (rest) => {
  1080. const dir = await self.uploadFile(rest.tempFilePath, 0);
  1081. this.questionList[bankindex].jsonStr[
  1082. ansindex
  1083. ].ansText.imageList.push(dir);
  1084. },
  1085. });
  1086. } else {
  1087. const dir = await self.uploadFile(img, 0);
  1088. this.questionList[bankindex].jsonStr[
  1089. ansindex
  1090. ].ansText.imageList.push(dir);
  1091. }
  1092. },
  1093. });
  1094. },
  1095. });
  1096. },
  1097. uploadFile(options, int) {
  1098. var self = this;
  1099. return new Promise((resolve, reject) => {
  1100. var data = {
  1101. imageStatus: int,
  1102. };
  1103. self.$api.aliyunpolicy(data).then((res) => {
  1104. console.log(res.data, 6);
  1105. if (res.data.code != 200) {
  1106. self.$method.showToast("签名错误" + JSON.stringify(res.data));
  1107. return;
  1108. }
  1109. var ossToken = res.data.data.resultContent;
  1110. if (ossToken.host == null || ossToken.host == undefined) {
  1111. self.$method.showToast("上传路径报错" + JSON.stringify(res.data));
  1112. return;
  1113. }
  1114. uni.uploadFile({
  1115. url: ossToken.host,
  1116. name: "file",
  1117. filePath: options,
  1118. fileType: "image",
  1119. header: {
  1120. AuthorizationToken: "WX " + uni.getStorageSync("token"),
  1121. },
  1122. formData: {
  1123. key: ossToken.dir,
  1124. OSSAccessKeyId: ossToken.accessid,
  1125. policy: ossToken.policy,
  1126. Signature: ossToken.signature,
  1127. callback: ossToken.callback,
  1128. success_action_status: 200,
  1129. },
  1130. success: (result) => {
  1131. if (result.statusCode === 200) {
  1132. resolve(ossToken.dir);
  1133. } else {
  1134. uni.showToast({
  1135. title: "上传失败",
  1136. icon: "none",
  1137. });
  1138. return;
  1139. }
  1140. },
  1141. fail: (error) => {
  1142. uni.showToast({
  1143. title: "上传接口报错" + error,
  1144. icon: "none",
  1145. });
  1146. return;
  1147. },
  1148. });
  1149. });
  1150. });
  1151. },
  1152. submitAns(bankindex) {
  1153. console.log(this.questionList[bankindex]);
  1154. if (
  1155. !this.questionList[bankindex].ansText.text &&
  1156. !this.questionList[bankindex].ansText.imageList.length
  1157. ) {
  1158. uni.showToast({
  1159. title: "请输入内容或上传图片",
  1160. duration: 2000,
  1161. icon: "none",
  1162. });
  1163. return;
  1164. }
  1165. this.$set(this.questionList[bankindex], "ques", {
  1166. imageList: this.questionList[bankindex].ansText.imageList,
  1167. text: this.questionList[bankindex].ansText.text,
  1168. });
  1169. },
  1170. submitAnsChild(bankindex, ansindex) {
  1171. if (
  1172. !this.questionList[bankindex].jsonStr[ansindex].ansText.text &&
  1173. !this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.length
  1174. ) {
  1175. uni.showToast({
  1176. title: "请输入内容或上传图片",
  1177. duration: 2000,
  1178. icon: "none",
  1179. });
  1180. return;
  1181. }
  1182. this.$set(this.questionList[bankindex].ques, ansindex, {
  1183. imageList:
  1184. this.questionList[bankindex].jsonStr[ansindex].ansText.imageList,
  1185. text: this.questionList[bankindex].jsonStr[ansindex].ansText.text,
  1186. });
  1187. },
  1188. isRight(item, index) {
  1189. //单选
  1190. if (this.questionList[index].ques) {
  1191. if (item.type == 1) {
  1192. return this.questionList[index].ques == this.questionList[index].ans;
  1193. //多选
  1194. } else if (item.type == 2) {
  1195. //每一项都相等
  1196. return this.questionList[index].ans.every((item, i) => {
  1197. return item == this.questionList[index].ques[i];
  1198. });
  1199. //判断
  1200. } else if (item.type == 3) {
  1201. return this.questionList[index].ques == this.questionList[index].ans;
  1202. } else {
  1203. return false;
  1204. }
  1205. } else {
  1206. return false;
  1207. }
  1208. },
  1209. right(bankIndex, ansIndex, option) {
  1210. if (
  1211. this.questionList[bankIndex].ques[ansIndex] &&
  1212. this.questionList[bankIndex].ans[ansIndex]
  1213. ) {
  1214. if (
  1215. this.questionList[bankIndex].ques[ansIndex].indexOf(
  1216. option.optionsId
  1217. ) != -1 ||
  1218. this.questionList[bankIndex].ans[ansIndex].indexOf(
  1219. option.optionsId
  1220. ) != -1
  1221. ) {
  1222. return true;
  1223. } else {
  1224. return false;
  1225. }
  1226. } else {
  1227. return false;
  1228. }
  1229. },
  1230. wrong(bankIndex, ansIndex, option) {
  1231. if (
  1232. this.questionList[bankIndex].ques[ansIndex] &&
  1233. this.questionList[bankIndex].ans[ansIndex]
  1234. ) {
  1235. if (
  1236. this.questionList[bankIndex].ques[ansIndex].indexOf(
  1237. option.optionsId
  1238. ) != -1 &&
  1239. this.questionList[bankIndex].ans[ansIndex].indexOf(
  1240. option.optionsId
  1241. ) == -1
  1242. ) {
  1243. return true;
  1244. } else {
  1245. return false;
  1246. }
  1247. } else {
  1248. return false;
  1249. }
  1250. },
  1251. isWrong(item, index) {
  1252. if (this.questionList[index].ques) {
  1253. //单选
  1254. if (item.type == 1) {
  1255. return this.questionList[index].ques != this.questionList[index].ans;
  1256. //多选
  1257. } else if (item.type == 2) {
  1258. //每一项都相等
  1259. return this.questionList[index].ques.some((item, i) => {
  1260. return this.questionList[index].ans.indexOf(item) == -1;
  1261. });
  1262. //判断
  1263. } else if (item.type == 3) {
  1264. return this.questionList[index].ques != this.questionList[index].ans;
  1265. } else {
  1266. return false;
  1267. }
  1268. } else {
  1269. return false;
  1270. }
  1271. },
  1272. isPart(item, index) {
  1273. if (this.questionList[index].ques) {
  1274. if (item.type == 2) {
  1275. let isWrong = this.questionList[index].ques.some((item, i) => {
  1276. return this.questionList[index].ans.indexOf(item) == -1;
  1277. });
  1278. let isRight = this.questionList[index].ans.every((item, i) => {
  1279. return item == this.questionList[index].ques[i];
  1280. });
  1281. if (!isRight && !isWrong) {
  1282. return true;
  1283. }
  1284. }
  1285. } else {
  1286. return false;
  1287. }
  1288. },
  1289. tabSelect(index, bankindex) {
  1290. this.$set(this.questionList[bankindex], "current", index);
  1291. },
  1292. pdsubmit() {
  1293. uni.showToast({
  1294. icon: "none",
  1295. title: "交卷成功",
  1296. duration: 1000,
  1297. });
  1298. setTimeout(() => {
  1299. uni.navigateBack({
  1300. delta: 1,
  1301. });
  1302. }, 1000);
  1303. },
  1304. },
  1305. };
  1306. </script>
  1307. <style lang="scss" scoped>
  1308. #questionBank {
  1309. width: 100%;
  1310. height: 100vh;
  1311. display: flex;
  1312. flex-direction: column;
  1313. }
  1314. .swiper {
  1315. width: 100%;
  1316. flex: 1;
  1317. }
  1318. .lisSty {
  1319. margin-bottom: 16rpx;
  1320. display: flex;
  1321. align-items: center;
  1322. .flex_auto {
  1323. flex: 1;
  1324. }
  1325. }
  1326. .activeTI {
  1327. vertical-align: middle;
  1328. display: inline-block;
  1329. border: 1rpx solid #eee;
  1330. border-radius: 50rpx;
  1331. height: 48rpx;
  1332. line-height: 46rpx;
  1333. text-align: center;
  1334. width: 48rpx;
  1335. margin-right: 15rpx;
  1336. color: #666;
  1337. font-size: 30rpx;
  1338. &.right {
  1339. color: #fff;
  1340. background: #36c75a;
  1341. }
  1342. &.wrong {
  1343. color: #fff;
  1344. background: #ff3b30;
  1345. }
  1346. &.checked {
  1347. color: #fff;
  1348. background: #007aff;
  1349. }
  1350. }
  1351. .submit_checkbox {
  1352. position: fixed;
  1353. left: 0;
  1354. right: 0;
  1355. bottom: 120rpx;
  1356. margin: 20rpx auto;
  1357. width: 526rpx;
  1358. height: 80rpx;
  1359. background: rgba(0, 122, 255, 1);
  1360. color: #fff;
  1361. text-align: center;
  1362. line-height: 80rpx;
  1363. font-size: 30rpx;
  1364. border-radius: 40rpx;
  1365. &.disabled {
  1366. opacity: 0.6;
  1367. }
  1368. }
  1369. .titles {
  1370. overflow: hidden;
  1371. margin-bottom: 24rpx;
  1372. }
  1373. .titBox {
  1374. padding: 41rpx 25rpx 24rpx 25rpx;
  1375. }
  1376. .titBox_title {
  1377. padding: 21rpx;
  1378. }
  1379. .tabs {
  1380. margin: 10rpx;
  1381. display: flex;
  1382. .tab {
  1383. margin: 0 4rpx;
  1384. padding: 10rpx 13rpx;
  1385. text-align: center;
  1386. color: #007aff;
  1387. font-size: 28rpx;
  1388. border-radius: 16rpx;
  1389. background: #fff;
  1390. &.current {
  1391. color: #fff;
  1392. background: #007aff;
  1393. }
  1394. }
  1395. }
  1396. .ans {
  1397. margin: 8rpx 8rpx 8rpx;
  1398. .ans_input {
  1399. border-radius: 16rpx;
  1400. background: #fff;
  1401. .top {
  1402. border-bottom: 1rpx solid #eeeeee;
  1403. padding: 16rpx;
  1404. display: flex;
  1405. align-items: center;
  1406. .icon {
  1407. margin-right: 20rpx;
  1408. width: 40rpx;
  1409. height: 38rpx;
  1410. }
  1411. .progress {
  1412. flex: 1;
  1413. }
  1414. .submit {
  1415. width: 168rpx;
  1416. height: 48rpx;
  1417. line-height: 48rpx;
  1418. text-align: center;
  1419. color: #fff;
  1420. font-size: 30rpx;
  1421. background: #007aff;
  1422. border-radius: 24rpx;
  1423. }
  1424. }
  1425. .textarea {
  1426. textarea {
  1427. width: 100%;
  1428. height: 287rpx;
  1429. padding: 10rpx;
  1430. }
  1431. }
  1432. .imgs {
  1433. overflow: hidden;
  1434. display: flex;
  1435. width: 100%;
  1436. .img {
  1437. width: 104rpx;
  1438. height: 104rpx;
  1439. border-radius: 8rpx;
  1440. position: relative;
  1441. margin: 20rpx;
  1442. text {
  1443. position: absolute;
  1444. right: -15rpx;
  1445. top: -15rpx;
  1446. width: 30rpx;
  1447. height: 30rpx;
  1448. text-align: center;
  1449. line-height: 30rpx;
  1450. color: #fff;
  1451. background: #ff3b30;
  1452. border-radius: 50%;
  1453. }
  1454. image {
  1455. width: 100%;
  1456. height: 100%;
  1457. }
  1458. }
  1459. }
  1460. }
  1461. .ans_submit {
  1462. padding: 16rpx;
  1463. border-radius: 16rpx;
  1464. background: #fff;
  1465. .imgs {
  1466. overflow: hidden;
  1467. display: flex;
  1468. width: 100%;
  1469. .img {
  1470. width: 104rpx;
  1471. height: 104rpx;
  1472. border-radius: 8rpx;
  1473. position: relative;
  1474. margin: 20rpx;
  1475. image {
  1476. width: 100%;
  1477. height: 100%;
  1478. }
  1479. }
  1480. }
  1481. }
  1482. }
  1483. .firstLetter {
  1484. display: flex;
  1485. justify-content: space-between;
  1486. align-items: center;
  1487. margin-bottom: 30rpx;
  1488. .leftLetters {
  1489. display: flex;
  1490. align-items: center;
  1491. width: 220rpx;
  1492. .btnType {
  1493. padding: 5rpx 10rpx;
  1494. border: 1rpx solid #007aff;
  1495. border-radius: 10rpx;
  1496. background-color: rgba(0, 122, 255, 0.1);
  1497. font-size: 28rpx;
  1498. color: #007aff;
  1499. margin-right: 15rpx;
  1500. }
  1501. }
  1502. }
  1503. .popupView {
  1504. height: 100%;
  1505. padding-bottom: 100rpx;
  1506. .popupTops {
  1507. height: 77rpx;
  1508. border-bottom: 1rpx solid #eee;
  1509. text-align: center;
  1510. line-height: 77rpx;
  1511. font-size: 24rpx;
  1512. color: #999;
  1513. position: relative;
  1514. .topIcon {
  1515. position: absolute;
  1516. top: 10rpx;
  1517. left: 50%;
  1518. transform: translateX(-50%);
  1519. width: 80rpx;
  1520. height: 8rpx;
  1521. background-color: #999;
  1522. border-radius: 4rpx;
  1523. }
  1524. }
  1525. .popupContent {
  1526. }
  1527. }
  1528. .pageContent {
  1529. position: relative;
  1530. background-color: #eaeef1;
  1531. height: 100%;
  1532. overflow-y: scroll;
  1533. padding-top: 8rpx;
  1534. padding-bottom: 100rpx;
  1535. }
  1536. .pad_8 {
  1537. background-color: #fff;
  1538. margin: 0rpx 8rpx 8rpx;
  1539. border-radius: 16rpx;
  1540. &.no-margin {
  1541. margin-top: -16rpx;
  1542. border-radius: 0 0 16rpx 16rpx;
  1543. }
  1544. }
  1545. .answer {
  1546. height: 80rpx;
  1547. line-height: 80rpx;
  1548. padding: 0rpx 24rpx;
  1549. display: flex;
  1550. align-items: center;
  1551. justify-content: space-between;
  1552. color: #666;
  1553. font-size: 30rpx;
  1554. }
  1555. .footer_btn {
  1556. background-color: #fff;
  1557. z-index: 10078;
  1558. position: fixed;
  1559. bottom: 0rpx;
  1560. display: flex;
  1561. align-items: center;
  1562. justify-content: space-between;
  1563. width: 100%;
  1564. height: 98rpx;
  1565. padding: 0rpx 38rpx;
  1566. border-top: 1rpx solid #eee;
  1567. .flex_center {
  1568. flex: 1;
  1569. display: flex;
  1570. justify-content: center;
  1571. align-items: center;
  1572. flex-direction: column;
  1573. margin: 0 200rpx;
  1574. font-size: 24rpx;
  1575. color: #999999;
  1576. .up-icon {
  1577. margin-bottom: 18rpx;
  1578. width: 100%;
  1579. display: flex;
  1580. justify-content: center;
  1581. image {
  1582. width: 58rpx;
  1583. height: 21rpx;
  1584. }
  1585. }
  1586. }
  1587. .collect {
  1588. visibility: hidden;
  1589. &.show {
  1590. visibility: visible;
  1591. }
  1592. > view {
  1593. display: flex;
  1594. flex-direction: column;
  1595. align-items: center;
  1596. justify-content: center;
  1597. image {
  1598. width: 32rpx;
  1599. height: 32rpx;
  1600. margin-bottom: 6rpx;
  1601. }
  1602. view {
  1603. font-size: 24rpx;
  1604. color: #999999;
  1605. }
  1606. }
  1607. }
  1608. }
  1609. .boxSty {
  1610. padding: 44rpx 41rpx 0rpx;
  1611. }
  1612. .liListSty {
  1613. border: 1rpx solid #eeeeee;
  1614. width: 88rpx;
  1615. height: 88rpx;
  1616. border-radius: 32rpx;
  1617. text-align: center;
  1618. line-height: 88rpx;
  1619. color: #333;
  1620. font-size: 32rpx;
  1621. float: left;
  1622. margin: 20rpx 23rpx;
  1623. &.isRight {
  1624. border: 1rpx solid #eeeeee;
  1625. color: #fff;
  1626. background: #36c75a;
  1627. }
  1628. &.isWrong {
  1629. border: 1rpx solid #eeeeee;
  1630. color: #fff;
  1631. background: #ff3b30;
  1632. }
  1633. &.isPart {
  1634. border: 1rpx solid #eeeeee;
  1635. color: #fff;
  1636. background: #FFC53D;
  1637. }
  1638. }
  1639. .answerInfos {
  1640. padding: 25rpx 25rpx 25rpx 23rpx;
  1641. }
  1642. .answerTitle {
  1643. margin-bottom: 28rpx;
  1644. color: #666;
  1645. font-size: 30rpx;
  1646. }
  1647. .answerContent {
  1648. font-size: 30rpx;
  1649. color: #666;
  1650. }
  1651. .textChild {
  1652. display: inline-block;
  1653. vertical-align: middle;
  1654. }
  1655. .dialog {
  1656. position: fixed;
  1657. left: 0;
  1658. top: 0;
  1659. width: 100%;
  1660. height: 100%;
  1661. background-color: rgba(0, 0, 0, 0.8);
  1662. display: flex;
  1663. flex-direction: column;
  1664. align-items: center;
  1665. justify-content: center;
  1666. z-index: 20000;
  1667. .pointer {
  1668. width: 338rpx;
  1669. height: 240rpx;
  1670. }
  1671. .text {
  1672. font-size: 32rpx;
  1673. color: #ffffff;
  1674. text-align: center;
  1675. }
  1676. .btn {
  1677. width: 242rpx;
  1678. height: 82rpx;
  1679. border: 2rpx solid #ffffff;
  1680. border-radius: 16rpx;
  1681. text-align: center;
  1682. line-height: 82rpx;
  1683. margin: 41rpx auto;
  1684. color: #fff;
  1685. font-size: 32rpx;
  1686. }
  1687. }
  1688. </style>