wrongTypeBank.vue 53 KB

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