wrongTypeBank.vue 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779
  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. word-break: break-all;
  1324. }
  1325. }
  1326. .activeTI {
  1327. vertical-align: middle;
  1328. display: inline-block;
  1329. border: 1rpx solid #eee;
  1330. border-radius: 50rpx;
  1331. height: 48rpx;
  1332. line-height: 46rpx;
  1333. text-align: center;
  1334. width: 48rpx;
  1335. margin-right: 15rpx;
  1336. color: #666;
  1337. font-size: 30rpx;
  1338. &.right {
  1339. color: #fff;
  1340. background: #36c75a;
  1341. }
  1342. &.wrong {
  1343. color: #fff;
  1344. background: #ff3b30;
  1345. }
  1346. &.checked {
  1347. color: #fff;
  1348. background: #007aff;
  1349. }
  1350. }
  1351. .submit_checkbox {
  1352. position: fixed;
  1353. left: 0;
  1354. right: 0;
  1355. bottom: 120rpx;
  1356. margin: 20rpx auto;
  1357. width: 526rpx;
  1358. height: 80rpx;
  1359. background: rgba(0, 122, 255, 1);
  1360. color: #fff;
  1361. text-align: center;
  1362. line-height: 80rpx;
  1363. font-size: 30rpx;
  1364. border-radius: 40rpx;
  1365. &.disabled {
  1366. opacity: 0.6;
  1367. }
  1368. }
  1369. .titles {
  1370. overflow: hidden;
  1371. margin-bottom: 24rpx;
  1372. }
  1373. .titBox {
  1374. padding: 41rpx 25rpx 24rpx 25rpx;
  1375. }
  1376. .titBox_title {
  1377. padding: 21rpx;
  1378. }
  1379. .tabs {
  1380. margin: 10rpx;
  1381. display: flex;
  1382. .tab {
  1383. margin: 0 4rpx;
  1384. padding: 10rpx 13rpx;
  1385. text-align: center;
  1386. color: #007aff;
  1387. font-size: 28rpx;
  1388. border-radius: 16rpx;
  1389. background: #fff;
  1390. &.current {
  1391. color: #fff;
  1392. background: #007aff;
  1393. }
  1394. }
  1395. }
  1396. .ans {
  1397. margin: 8rpx 8rpx 8rpx;
  1398. .ans_input {
  1399. border-radius: 16rpx;
  1400. background: #fff;
  1401. .top {
  1402. border-bottom: 1rpx solid #eeeeee;
  1403. padding: 16rpx;
  1404. display: flex;
  1405. align-items: center;
  1406. .icon {
  1407. margin-right: 20rpx;
  1408. width: 40rpx;
  1409. height: 38rpx;
  1410. }
  1411. .progress {
  1412. flex: 1;
  1413. }
  1414. .submit {
  1415. width: 168rpx;
  1416. height: 48rpx;
  1417. line-height: 48rpx;
  1418. text-align: center;
  1419. color: #fff;
  1420. font-size: 30rpx;
  1421. background: #007aff;
  1422. border-radius: 24rpx;
  1423. }
  1424. }
  1425. .textarea {
  1426. textarea {
  1427. width: 100%;
  1428. height: 287rpx;
  1429. padding: 10rpx;
  1430. }
  1431. }
  1432. .imgs {
  1433. overflow: hidden;
  1434. display: flex;
  1435. width: 100%;
  1436. .img {
  1437. width: 104rpx;
  1438. height: 104rpx;
  1439. border-radius: 8rpx;
  1440. position: relative;
  1441. margin: 20rpx;
  1442. text {
  1443. position: absolute;
  1444. right: -15rpx;
  1445. top: -15rpx;
  1446. width: 30rpx;
  1447. height: 30rpx;
  1448. text-align: center;
  1449. line-height: 30rpx;
  1450. color: #fff;
  1451. background: #ff3b30;
  1452. border-radius: 50%;
  1453. }
  1454. image {
  1455. width: 100%;
  1456. height: 100%;
  1457. }
  1458. }
  1459. }
  1460. }
  1461. .ans_submit {
  1462. padding: 16rpx;
  1463. border-radius: 16rpx;
  1464. background: #fff;
  1465. .imgs {
  1466. overflow: hidden;
  1467. display: flex;
  1468. width: 100%;
  1469. .img {
  1470. width: 104rpx;
  1471. height: 104rpx;
  1472. border-radius: 8rpx;
  1473. position: relative;
  1474. margin: 20rpx;
  1475. image {
  1476. width: 100%;
  1477. height: 100%;
  1478. }
  1479. }
  1480. }
  1481. }
  1482. }
  1483. .firstLetter {
  1484. display: flex;
  1485. justify-content: space-between;
  1486. align-items: center;
  1487. margin-bottom: 30rpx;
  1488. .leftLetters {
  1489. display: flex;
  1490. align-items: center;
  1491. width: 220rpx;
  1492. .btnType {
  1493. padding: 5rpx 10rpx;
  1494. border: 1rpx solid #007aff;
  1495. border-radius: 10rpx;
  1496. background-color: rgba(0, 122, 255, 0.1);
  1497. font-size: 28rpx;
  1498. color: #007aff;
  1499. margin-right: 15rpx;
  1500. }
  1501. }
  1502. }
  1503. .popupView {
  1504. height: 100%;
  1505. padding-bottom: 100rpx;
  1506. .popupTops {
  1507. height: 77rpx;
  1508. border-bottom: 1rpx solid #eee;
  1509. text-align: center;
  1510. line-height: 77rpx;
  1511. font-size: 24rpx;
  1512. color: #999;
  1513. position: relative;
  1514. .topIcon {
  1515. position: absolute;
  1516. top: 10rpx;
  1517. left: 50%;
  1518. transform: translateX(-50%);
  1519. width: 80rpx;
  1520. height: 8rpx;
  1521. background-color: #999;
  1522. border-radius: 4rpx;
  1523. }
  1524. }
  1525. .popupContent {
  1526. }
  1527. }
  1528. .pageContent {
  1529. position: relative;
  1530. background-color: #eaeef1;
  1531. height: 100%;
  1532. overflow-y: scroll;
  1533. padding-top: 8rpx;
  1534. padding-bottom: 100rpx;
  1535. }
  1536. .pad_8 {
  1537. background-color: #fff;
  1538. margin: 0rpx 8rpx 8rpx;
  1539. border-radius: 16rpx;
  1540. &.no-margin {
  1541. margin-top: -16rpx;
  1542. border-radius: 0 0 16rpx 16rpx;
  1543. }
  1544. }
  1545. .answer {
  1546. height: 80rpx;
  1547. line-height: 80rpx;
  1548. padding: 0rpx 24rpx;
  1549. display: flex;
  1550. align-items: center;
  1551. justify-content: space-between;
  1552. color: #666;
  1553. font-size: 30rpx;
  1554. }
  1555. .footer_btn {
  1556. background-color: #fff;
  1557. z-index: 10078;
  1558. position: fixed;
  1559. bottom: 0rpx;
  1560. display: flex;
  1561. align-items: center;
  1562. justify-content: space-between;
  1563. width: 100%;
  1564. height: 98rpx;
  1565. padding: 0rpx 38rpx;
  1566. border-top: 1rpx solid #eee;
  1567. .flex_center {
  1568. flex: 1;
  1569. display: flex;
  1570. justify-content: center;
  1571. align-items: center;
  1572. flex-direction: column;
  1573. margin: 0 200rpx;
  1574. font-size: 24rpx;
  1575. color: #999999;
  1576. .up-icon {
  1577. margin-bottom: 18rpx;
  1578. width: 100%;
  1579. display: flex;
  1580. justify-content: center;
  1581. image {
  1582. width: 58rpx;
  1583. height: 21rpx;
  1584. }
  1585. }
  1586. }
  1587. .collect {
  1588. visibility: hidden;
  1589. &.show {
  1590. visibility: visible;
  1591. }
  1592. > view {
  1593. display: flex;
  1594. flex-direction: column;
  1595. align-items: center;
  1596. justify-content: center;
  1597. image {
  1598. width: 32rpx;
  1599. height: 32rpx;
  1600. margin-bottom: 6rpx;
  1601. }
  1602. view {
  1603. font-size: 24rpx;
  1604. color: #999999;
  1605. }
  1606. }
  1607. }
  1608. }
  1609. .boxSty {
  1610. padding: 44rpx 41rpx 0rpx;
  1611. }
  1612. .liListSty {
  1613. border: 1rpx solid #eeeeee;
  1614. width: 88rpx;
  1615. height: 88rpx;
  1616. border-radius: 32rpx;
  1617. text-align: center;
  1618. line-height: 88rpx;
  1619. color: #333;
  1620. font-size: 32rpx;
  1621. float: left;
  1622. margin: 20rpx 23rpx;
  1623. &.isRight {
  1624. border: 1rpx solid #eeeeee;
  1625. color: #fff;
  1626. background: #36c75a;
  1627. }
  1628. &.isWrong {
  1629. border: 1rpx solid #eeeeee;
  1630. color: #fff;
  1631. background: #ff3b30;
  1632. }
  1633. &.isPart {
  1634. border: 1rpx solid #eeeeee;
  1635. color: #fff;
  1636. background: #ffc53d;
  1637. }
  1638. }
  1639. .answerInfos {
  1640. padding: 25rpx 25rpx 25rpx 23rpx;
  1641. }
  1642. .answerTitle {
  1643. margin-bottom: 28rpx;
  1644. color: #666;
  1645. font-size: 30rpx;
  1646. }
  1647. .answerContent {
  1648. font-size: 30rpx;
  1649. color: #666;
  1650. }
  1651. .textChild {
  1652. display: inline-block;
  1653. vertical-align: middle;
  1654. }
  1655. .dialog {
  1656. position: fixed;
  1657. left: 0;
  1658. top: 0;
  1659. width: 100%;
  1660. height: 100%;
  1661. background-color: rgba(0, 0, 0, 0.8);
  1662. display: flex;
  1663. flex-direction: column;
  1664. align-items: center;
  1665. justify-content: center;
  1666. z-index: 20000;
  1667. .pointer {
  1668. width: 338rpx;
  1669. height: 240rpx;
  1670. }
  1671. .text {
  1672. font-size: 32rpx;
  1673. color: #ffffff;
  1674. text-align: center;
  1675. }
  1676. .btn {
  1677. width: 242rpx;
  1678. height: 82rpx;
  1679. border: 2rpx solid #ffffff;
  1680. border-radius: 16rpx;
  1681. text-align: center;
  1682. line-height: 82rpx;
  1683. margin: 41rpx auto;
  1684. color: #fff;
  1685. font-size: 32rpx;
  1686. }
  1687. }
  1688. </style>