collectBank.vue 55 KB

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