wrong-bank.vue 73 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072
  1. <template>
  2. <div class="course-exam">
  3. <Header></Header>
  4. <section class="section">
  5. <div class="container">
  6. <div class="section__header">
  7. <!-- <el-breadcrumb separator="/">
  8. <el-breadcrumb-item
  9. v-for="(item, index) in $route.matched"
  10. :key="index"
  11. :to="{ path: item.path }"
  12. >{{ item.name }}</el-breadcrumb-item
  13. >
  14. </el-breadcrumb> -->
  15. </div>
  16. <div class="section__body">
  17. <div class="explain-record">
  18. <div class="explain-record__body">
  19. <div class="left-box">
  20. <div class="left-box__header">
  21. <el-progress
  22. class="progress"
  23. :text-inside="true"
  24. :stroke-width="26"
  25. :percentage="
  26. toFixed(
  27. (questionOverNum(true) / questionList.length) * 100
  28. ) || 0
  29. "
  30. ></el-progress>
  31. <div class="text">
  32. 已完成<span>{{ questionOverNum(true) }}</span
  33. >/{{ questionList.length }}道题
  34. </div>
  35. </div>
  36. <div class="left-box__body">
  37. <template v-for="(question, questionIndex) in questionList">
  38. <div
  39. class="question"
  40. v-if="question.type == 1 && current == questionIndex"
  41. :key="questionIndex"
  42. >
  43. <div class="question__title">
  44. {{ questionIndex + 1 }}、单选题
  45. </div>
  46. <div
  47. class="question__desc"
  48. v-html="question.content"
  49. ></div>
  50. <div class="question__content">
  51. <div class="question-list" v-if="!question.ques">
  52. <div
  53. class="radio"
  54. v-for="(item, index) in question.jsonStr"
  55. :key="index"
  56. @click="
  57. radioSelect(
  58. question,
  59. questionIndex,
  60. item.optionsId
  61. )
  62. "
  63. >
  64. <div>{{ ast[index] }}. {{ item.content }}</div>
  65. </div>
  66. </div>
  67. <div class="question-list" v-if="question.ques">
  68. <div
  69. class="radio"
  70. :class="{
  71. right:
  72. item.optionsId == question.ques ||
  73. item.optionsId == question.ans,
  74. wrong:
  75. item.optionsId == question.ques &&
  76. question.ques != question.ans,
  77. }"
  78. v-for="(item, index) in question.jsonStr"
  79. :key="index"
  80. >
  81. <div>{{ ast[index] }}. {{ item.content }}</div>
  82. </div>
  83. </div>
  84. <div class="answer-list" v-if="question.ques">
  85. <div class="answer-list__left">
  86. 正确答案:{{ ast[question.ans - 1] }}
  87. </div>
  88. <div class="answer-list__left" v-if="!explain">
  89. 我的答案:{{ ast[question.ques - 1] }}
  90. </div>
  91. </div>
  92. <div class="explain-list" v-if="question.ques">
  93. <div class="explain-list__header">答案解析:</div>
  94. <div
  95. class="explain-list__body"
  96. v-html="question.analysisContent"
  97. ></div>
  98. </div>
  99. </div>
  100. <div class="question__btns">
  101. <!-- <div class="collect" @click="collect">收藏本题</div> -->
  102. </div>
  103. </div>
  104. <div
  105. class="question"
  106. v-if="question.type == 2 && current == questionIndex"
  107. :key="questionIndex"
  108. >
  109. <div class="question__title">
  110. {{ questionIndex + 1 }}、多选题
  111. </div>
  112. <div
  113. class="question__desc"
  114. v-html="question.content"
  115. ></div>
  116. <div class="question__content">
  117. <div class="question-list" v-if="!question.ques">
  118. <el-checkbox
  119. class="checkbox"
  120. v-for="(item, index) in question.jsonStr"
  121. :key="index"
  122. :label="item.optionsId"
  123. v-model="item.checked"
  124. >
  125. <div>{{ ast[index] }}. {{ item.content }}</div>
  126. </el-checkbox>
  127. </div>
  128. <div class="question-list" v-if="question.ques">
  129. <el-checkbox
  130. disabled
  131. class="checkbox"
  132. :class="{
  133. right:
  134. question.ques.indexOf(item.optionsId) != -1 ||
  135. question.ans.indexOf(item.optionsId) != -1,
  136. wrong:
  137. question.ques.indexOf(item.optionsId) != -1 &&
  138. question.ans.indexOf(item.optionsId) == -1,
  139. }"
  140. v-for="(item, index) in question.jsonStr"
  141. :key="index"
  142. :label="item.optionsId"
  143. v-model="item.checked"
  144. >
  145. <div>{{ ast[index] }}. {{ item.content }}</div>
  146. </el-checkbox>
  147. </div>
  148. <div class="answer-list" v-if="question.ques">
  149. <div class="answer-list__left">
  150. 正确答案:
  151. <template v-for="ansItem in question.ans">{{
  152. ast[ansItem - 1]
  153. }}</template>
  154. </div>
  155. <div class="answer-list__left" v-if="!explain">
  156. 我的答案:
  157. <template v-for="quesItem in question.ques">{{
  158. ast[quesItem - 1]
  159. }}</template>
  160. </div>
  161. </div>
  162. <div class="explain-list" v-if="question.ques">
  163. <div class="explain-list__header">答案解析:</div>
  164. <div
  165. class="explain-list__body"
  166. v-if="question.analysisContent"
  167. ></div>
  168. </div>
  169. </div>
  170. <div class="question__btns">
  171. <div
  172. v-if="!question.ques"
  173. class="submit"
  174. @click="checkboxSubmit(question, questionIndex)"
  175. >
  176. 确认答案
  177. </div>
  178. <!-- <div class="collect" @click="collect">收藏本题</div> -->
  179. </div>
  180. </div>
  181. <div
  182. class="question"
  183. v-if="question.type == 3 && current == questionIndex"
  184. :key="questionIndex"
  185. >
  186. <div class="question__title">
  187. {{ questionIndex + 1 }}、判断题
  188. </div>
  189. <div
  190. class="question__desc"
  191. v-html="question.content"
  192. ></div>
  193. <div class="question__content">
  194. <div class="question-list" v-if="!question.ques">
  195. <div
  196. class="radio"
  197. v-for="(item, index) in judge"
  198. :key="index"
  199. @click="judgeSelect(question, questionIndex, index)"
  200. >
  201. <div>{{ ast[index] }}. {{ item }}</div>
  202. </div>
  203. </div>
  204. <div class="question-list" v-if="question.ques">
  205. <div
  206. class="radio"
  207. :class="{
  208. right:
  209. index == question.ques || index == question.ans,
  210. wrong:
  211. index == question.ques &&
  212. question.ques != question.ans,
  213. }"
  214. v-for="(item, index) in judge"
  215. :key="index"
  216. >
  217. <div>{{ ast[index] }}. {{ item }}</div>
  218. </div>
  219. </div>
  220. <div class="answer-list" v-if="question.ques">
  221. <div class="answer-list__left">
  222. 正确答案:{{ ast[question.ans] }}
  223. </div>
  224. <div class="answer-list__left" v-if="!explain">
  225. 我的答案:{{ ast[question.ques] }}
  226. </div>
  227. </div>
  228. <div class="explain-list" v-if="question.ques">
  229. <div class="explain-list__header">答案解析:</div>
  230. <div
  231. class="explain-list__body"
  232. v-html="question.analysisContent"
  233. ></div>
  234. </div>
  235. </div>
  236. <div class="question__btns">
  237. <!-- <div class="collect" @click="collect">收藏本题</div> -->
  238. </div>
  239. </div>
  240. <div
  241. class="question"
  242. v-if="question.type == 4 && current == questionIndex"
  243. :key="questionIndex"
  244. >
  245. <div class="question__title">
  246. {{ questionIndex + 1 }}、案例题
  247. </div>
  248. <div class="question__content">
  249. <el-tabs v-model="question.tabIndex">
  250. <el-tab-pane
  251. v-for="(json, jsonIndex) in question.jsonStr"
  252. :label="'问题' + (jsonIndex + 1)"
  253. :name="jsonIndex + ''"
  254. :key="jsonIndex"
  255. >
  256. <div
  257. class="question"
  258. v-if="json.type == 1"
  259. :key="questionIndex"
  260. >
  261. <div class="question__title">
  262. {{ jsonIndex + 1 }}、单选题
  263. </div>
  264. <div
  265. class="question__desc"
  266. v-html="json.content"
  267. ></div>
  268. <div class="question__content">
  269. <div
  270. class="question-list"
  271. v-if="!question.ques[jsonIndex]"
  272. >
  273. <div
  274. class="radio"
  275. v-for="(item, index) in json.optionsList"
  276. :key="index"
  277. @click="
  278. radioSelectChild(
  279. questionIndex,
  280. jsonIndex,
  281. item.optionsId
  282. )
  283. "
  284. >
  285. <div>
  286. {{ ast[index] }}. {{ item.content }}
  287. </div>
  288. </div>
  289. </div>
  290. <div
  291. class="question-list"
  292. v-if="question.ques[jsonIndex]"
  293. >
  294. <div
  295. class="radio"
  296. :class="{
  297. right:
  298. item.optionsId ==
  299. question.ques[jsonIndex] ||
  300. item.optionsId ==
  301. question.ans[jsonIndex],
  302. wrong:
  303. item.optionsId ==
  304. question.ques[jsonIndex] &&
  305. question.ques[jsonIndex] !=
  306. question.ans[jsonIndex],
  307. }"
  308. v-for="(item, index) in json.optionsList"
  309. :key="index"
  310. >
  311. <div>
  312. {{ ast[index] }}. {{ item.content }}
  313. </div>
  314. </div>
  315. </div>
  316. <div
  317. class="answer-list"
  318. v-if="question.ques[jsonIndex]"
  319. >
  320. <div class="answer-list__left">
  321. 正确答案:{{
  322. ast[question.ans[jsonIndex] - 1]
  323. }}
  324. </div>
  325. <div
  326. class="answer-list__left"
  327. v-if="!explain"
  328. >
  329. 我的答案:{{
  330. ast[question.ques[jsonIndex] - 1]
  331. }}
  332. </div>
  333. </div>
  334. <div
  335. class="explain-list"
  336. v-if="question.ques[jsonIndex]"
  337. >
  338. <div class="explain-list__header">
  339. 答案解析:
  340. </div>
  341. <div
  342. class="explain-list__body"
  343. v-html="json.analysisContent"
  344. ></div>
  345. </div>
  346. </div>
  347. <div class="question__btns"></div>
  348. </div>
  349. <div
  350. class="question"
  351. v-if="json.type == 2"
  352. :key="jsonIndex"
  353. >
  354. <div class="question__title">
  355. {{ jsonIndex + 1 }}、多选题
  356. </div>
  357. <div
  358. class="question__desc"
  359. v-html="json.content"
  360. ></div>
  361. <div class="question__content">
  362. <div
  363. class="question-list"
  364. v-if="!question.ques[jsonIndex]"
  365. >
  366. <el-checkbox
  367. class="checkbox"
  368. v-for="(item, index) in json.optionsList"
  369. :key="index"
  370. :label="item.optionsId"
  371. v-model="item.checked"
  372. >
  373. <div>
  374. {{ ast[index] }}. {{ item.content }}
  375. </div>
  376. </el-checkbox>
  377. </div>
  378. <div
  379. class="question-list"
  380. v-if="question.ques[jsonIndex]"
  381. >
  382. <el-checkbox
  383. disabled
  384. class="checkbox"
  385. :class="{
  386. right:
  387. question.ques[jsonIndex].indexOf(
  388. item.optionsId
  389. ) != -1 ||
  390. question.ans[jsonIndex].indexOf(
  391. item.optionsId
  392. ) != -1,
  393. wrong:
  394. question.ques[jsonIndex].indexOf(
  395. item.optionsId
  396. ) != -1 &&
  397. question.ans[jsonIndex].indexOf(
  398. item.optionsId
  399. ) == -1,
  400. }"
  401. v-for="(item, index) in json.optionsList"
  402. :key="index"
  403. :label="item.optionsId"
  404. v-model="item.checked"
  405. >
  406. <div>
  407. {{ ast[index] }}. {{ item.content }}
  408. </div>
  409. </el-checkbox>
  410. </div>
  411. <div
  412. class="answer-list"
  413. v-if="question.ques[jsonIndex]"
  414. >
  415. <div class="answer-list__left">
  416. 正确答案:
  417. <template
  418. v-for="ansItem in question.ans[jsonIndex]"
  419. >{{ ast[ansItem - 1] }}</template
  420. >
  421. </div>
  422. <div
  423. class="answer-list__left"
  424. v-if="!explain"
  425. >
  426. 我的答案:
  427. <template
  428. v-for="quesItem in question.ques[
  429. jsonIndex
  430. ]"
  431. >{{ ast[quesItem - 1] }}</template
  432. >
  433. </div>
  434. </div>
  435. <div
  436. class="explain-list"
  437. v-if="question.ques[jsonIndex]"
  438. >
  439. <div class="explain-list__header">
  440. 答案解析:
  441. </div>
  442. <div
  443. class="explain-list__body"
  444. v-html="json.analysisContent"
  445. ></div>
  446. </div>
  447. </div>
  448. <div class="question__btns">
  449. <div
  450. v-if="!question.ques[jsonIndex]"
  451. class="submit"
  452. @click="
  453. checkboxSubmitChild(
  454. questionIndex,
  455. jsonIndex
  456. )
  457. "
  458. >
  459. 确认答案
  460. </div>
  461. </div>
  462. </div>
  463. <div
  464. class="question"
  465. v-if="json.type == 3"
  466. :key="jsonIndex"
  467. >
  468. <div class="question__title">
  469. {{ jsonIndex + 1 }}、判断题
  470. </div>
  471. <div
  472. class="question__desc"
  473. v-html="json.content"
  474. ></div>
  475. <div class="question__content">
  476. <div
  477. class="question-list"
  478. v-if="!question.ques[jsonIndex]"
  479. >
  480. <div
  481. class="radio"
  482. v-for="(item, index) in judge"
  483. :key="index"
  484. @click="
  485. judgeSelectChild(
  486. questionIndex,
  487. jsonIndex,
  488. index
  489. )
  490. "
  491. >
  492. <div>{{ ast[index] }}. {{ item }}</div>
  493. </div>
  494. </div>
  495. <div
  496. class="question-list"
  497. v-if="question.ques[jsonIndex]"
  498. >
  499. <div
  500. class="radio"
  501. :class="{
  502. right:
  503. index == question.ques[jsonIndex] ||
  504. index == question.ans[jsonIndex],
  505. wrong:
  506. index == question.ques[jsonIndex] &&
  507. question.ques[jsonIndex] !=
  508. question.ans[jsonIndex],
  509. }"
  510. v-for="(item, index) in judge"
  511. :key="index"
  512. >
  513. <div>{{ ast[index] }}. {{ item }}</div>
  514. </div>
  515. </div>
  516. <div
  517. class="answer-list"
  518. v-if="question.ques[jsonIndex]"
  519. >
  520. <div class="answer-list__left">
  521. 正确答案:{{ ast[question.ans[jsonIndex]] }}
  522. </div>
  523. <div
  524. class="answer-list__left"
  525. v-if="!explain"
  526. >
  527. 我的答案:{{
  528. ast[question.ques[jsonIndex]]
  529. }}
  530. </div>
  531. </div>
  532. <div
  533. class="explain-list"
  534. v-if="question.ques[jsonIndex]"
  535. >
  536. <div class="explain-list__header">
  537. 答案解析:
  538. </div>
  539. <div
  540. class="explain-list__body"
  541. v-html="json.analysisContent"
  542. ></div>
  543. </div>
  544. </div>
  545. <div class="question__btns"></div>
  546. </div>
  547. <div
  548. class="question"
  549. v-if="json.type == 5"
  550. :key="jsonIndex"
  551. >
  552. <div class="question__title">
  553. {{ jsonIndex }}、简答题
  554. </div>
  555. <div
  556. class="question__desc"
  557. v-html="json.content"
  558. ></div>
  559. <div class="question__content">
  560. <div
  561. class="question-list textarea"
  562. v-if="
  563. !(
  564. question.ques[jsonIndex] &&
  565. (question.ques[jsonIndex].imageList
  566. .length ||
  567. question.ques[jsonIndex].text)
  568. )
  569. "
  570. >
  571. <el-input
  572. type="textarea"
  573. rows="5"
  574. v-model="json.ansText.text"
  575. resize="none"
  576. ></el-input>
  577. <div class="upload clearfix">
  578. <div
  579. class="upload__imgs"
  580. v-for="(img, imgIndex) in json.ansText
  581. .imageList"
  582. :key="imgIndex"
  583. >
  584. <img
  585. :src="$tools.splitImgHost(img, true)"
  586. alt=""
  587. />
  588. </div>
  589. <div class="upload__btn">
  590. <i class="el-icon-plus icon"></i>
  591. <p>上传图片</p>
  592. <input
  593. @change="
  594. uploadImgChild(
  595. $event,
  596. questionIndex,
  597. jsonIndex
  598. )
  599. "
  600. type="file"
  601. />
  602. </div>
  603. </div>
  604. </div>
  605. <div
  606. class="explain-list"
  607. v-if="
  608. question.ques[jsonIndex] &&
  609. (question.ques[jsonIndex].imageList
  610. .length ||
  611. question.ques[jsonIndex].text) &&
  612. !explain
  613. "
  614. >
  615. <div class="explain-list__header">
  616. 我的答案:
  617. </div>
  618. <div class="explain-list__body">
  619. <div>
  620. {{ question.ques[jsonIndex].text }}
  621. </div>
  622. <div class="upload clearfix">
  623. <div
  624. class="upload__imgs"
  625. v-for="(img, imgIndex) in question.ques[
  626. jsonIndex
  627. ].imageList"
  628. :key="imgIndex"
  629. >
  630. <img
  631. :src="$tools.splitImgHost(img, true)"
  632. alt=""
  633. />
  634. </div>
  635. </div>
  636. </div>
  637. <div class="explain-list__header">
  638. 答案解析:
  639. </div>
  640. <div
  641. class="explain-list__body"
  642. v-html="question.analysisContent"
  643. ></div>
  644. </div>
  645. </div>
  646. <div class="question__btns">
  647. <div
  648. v-if="
  649. !(
  650. question.ques[jsonIndex] &&
  651. (question.ques[jsonIndex].imageList
  652. .length ||
  653. question.ques[jsonIndex].text)
  654. )
  655. "
  656. class="submit"
  657. @click="
  658. ansSubmitChild(
  659. question,
  660. questionIndex,
  661. jsonIndex
  662. )
  663. "
  664. >
  665. 确认答案
  666. </div>
  667. </div>
  668. </div>
  669. </el-tab-pane>
  670. </el-tabs>
  671. </div>
  672. <div class="question__btns">
  673. <!-- <div class="collect" @click="collect">收藏本题</div> -->
  674. </div>
  675. </div>
  676. <div
  677. class="question"
  678. v-if="question.type == 5 && current == questionIndex"
  679. :key="questionIndex"
  680. >
  681. <div class="question__title">
  682. {{ questionIndex }}、简答题
  683. </div>
  684. <div
  685. class="question__desc"
  686. v-html="question.content"
  687. ></div>
  688. <div class="question__content">
  689. <div
  690. class="question-list textarea"
  691. v-if="
  692. !question.ques.imageList.length &&
  693. !question.ques.text
  694. "
  695. >
  696. <el-input
  697. type="textarea"
  698. rows="5"
  699. v-model="question.ansText.text"
  700. resize="none"
  701. ></el-input>
  702. <div class="upload clearfix">
  703. <div
  704. class="upload__imgs"
  705. v-for="(img, imgIndex) in question.ansText
  706. .imageList"
  707. :key="imgIndex"
  708. >
  709. <img
  710. :src="$tools.splitImgHost(img, true)"
  711. alt=""
  712. />
  713. </div>
  714. <div class="upload__btn">
  715. <i class="el-icon-plus icon"></i>
  716. <p>上传图片</p>
  717. <input
  718. @change="
  719. uploadImg($event, question, questionIndex)
  720. "
  721. type="file"
  722. />
  723. </div>
  724. </div>
  725. </div>
  726. <div
  727. class="explain-list"
  728. v-if="
  729. (question.ques.imageList.length ||
  730. question.ques.text) &&
  731. !explain
  732. "
  733. >
  734. <div class="explain-list__header">我的答案:</div>
  735. <div class="explain-list__body">
  736. <div>{{ question.ques.text }}</div>
  737. <div class="upload clearfix">
  738. <div
  739. class="upload__imgs"
  740. v-for="(img, imgIndex) in question.ques
  741. .imageList"
  742. :key="imgIndex"
  743. >
  744. <img
  745. :src="$tools.splitImgHost(img, true)"
  746. alt=""
  747. />
  748. </div>
  749. </div>
  750. </div>
  751. <div class="explain-list__header">答案解析:</div>
  752. <div
  753. class="explain-list__body"
  754. v-html="question.analysisContent"
  755. ></div>
  756. </div>
  757. </div>
  758. <div class="question__btns">
  759. <div
  760. v-if="
  761. !question.ques.imageList.length &&
  762. !question.ques.text
  763. "
  764. class="submit"
  765. @click="ansSubmit(question, questionIndex)"
  766. >
  767. 确认答案
  768. </div>
  769. <!-- <div class="collect" @click="collect">收藏本题</div> -->
  770. </div>
  771. </div>
  772. </template>
  773. </div>
  774. <div class="left-box__footer">
  775. <div class="btn" @click="prevQuestion">上一题</div>
  776. <div class="btn" @click="nextQuestion">下一题</div>
  777. </div>
  778. </div>
  779. <div class="right-box">
  780. <div class="right-box__header">答题卡</div>
  781. <div class="right-box__body">
  782. <div class="card">
  783. <div class="card__note">
  784. <div class="item">
  785. <div class="box green"></div>
  786. 正确
  787. </div>
  788. <div class="item">
  789. <div class="box red"></div>
  790. 错误
  791. </div>
  792. <div class="item">
  793. <div class="box blue"></div>
  794. 已做未评改
  795. </div>
  796. <div class="item">
  797. <div class="box white"></div>
  798. 未做
  799. </div>
  800. </div>
  801. <div class="card__content">
  802. <ul class="list">
  803. <li
  804. class="item white"
  805. v-for="(item, index) in questionList"
  806. :key="index"
  807. :class="{
  808. green: isRight(item, index),
  809. red: isWrong(item, index),
  810. blue: isOver(item, index),
  811. }"
  812. @click="changeIndex(index)"
  813. >
  814. {{ index + 1 }}
  815. </li>
  816. </ul>
  817. </div>
  818. </div>
  819. </div>
  820. <div class="right-box__footer">
  821. <div class="submit" v-if="!explain" @click="submit">交卷</div>
  822. </div>
  823. </div>
  824. </div>
  825. </div>
  826. </div>
  827. </div>
  828. </section>
  829. <ToolBar></ToolBar>
  830. <Footer></Footer>
  831. </div>
  832. </template>
  833. <script>
  834. import Footer from "@/components/footer/index";
  835. import Header from "@/components/header/index";
  836. import ToolBar from "@/components/toolbar/index";
  837. import { mapMutations } from "vuex";
  838. export default {
  839. name: "BankExplain",
  840. components: {
  841. Footer,
  842. Header,
  843. ToolBar,
  844. },
  845. data() {
  846. return {
  847. questionIndex: 0,
  848. questionList: [],
  849. orderGoodsId: "",
  850. bankList: [],
  851. judge: ["错误", "正确"],
  852. ast: ["A", "B", "C", "D", "E", "F", "G"],
  853. current: 0,
  854. examId: "",
  855. explain: "",
  856. };
  857. },
  858. async mounted() {
  859. this.examId = this.$route.params.examId;
  860. this.explain = this.$route.query.explain || "";
  861. this.orderGoodsId = this.$route.query.orderGoodsId || "";
  862. this.wrongRecordExamQuestionList();
  863. },
  864. methods: {
  865. toFixed(num) {
  866. if (num) {
  867. let str = String(num).indexOf(".");
  868. if (str != -1) {
  869. return +num.toFixed(2);
  870. } else {
  871. return num;
  872. }
  873. } else {
  874. return 0;
  875. }
  876. },
  877. /**
  878. * 请求题目列表
  879. */
  880. wrongRecordExamQuestionList() {
  881. this.$request
  882. .wrongRecordExamQuestionList({
  883. examId: this.examId,
  884. })
  885. .then(async (res) => {
  886. res.rows.forEach((item, index) => {
  887. if (typeof item.jsonStr == "string") {
  888. item.jsonStr = JSON.parse(item.jsonStr);
  889. if (item.type == 2) {
  890. //多选
  891. item.jsonStr.forEach((str) => {
  892. str.optionsId = "" + str.optionsId;
  893. });
  894. let arr = item.answerQuestion.split(",");
  895. arr.forEach((a, i) => {
  896. arr[i] = "" + a;
  897. });
  898. item.ans = arr;
  899. if (this.explain) {
  900. item.ques = item.ans;
  901. }
  902. item.quesSelect = [];
  903. item.analysisContent &&
  904. (item.analysisContent = item.analysisContent.replace(
  905. /<img/gi,
  906. '<img style="max-width:100%;"'
  907. ));
  908. item.content &&
  909. (item.content = item.content.replace(
  910. /<img/gi,
  911. '<img style="max-width:100%;"'
  912. ));
  913. return;
  914. } else if (item.type == 5) {
  915. //简答题
  916. item.ansText = {
  917. text: "",
  918. imageList: [],
  919. };
  920. item.ques = {
  921. text: "",
  922. imageList: [],
  923. };
  924. item.analysisContent &&
  925. (item.analysisContent = item.analysisContent.replace(
  926. /<img/gi,
  927. '<img style="max-width:100%;"'
  928. ));
  929. item.content &&
  930. (item.content = item.content.replace(
  931. /<img/gi,
  932. '<img style="max-width:100%;"'
  933. ));
  934. if (this.explain) {
  935. item.ques = {
  936. text: item.analysisContent,
  937. imageList: [],
  938. };
  939. return;
  940. }
  941. } else if (item.type == 4) {
  942. //案例题
  943. console.log(item.jsonStr);
  944. item.ques = [];
  945. item.tabIndex = "0";
  946. let ansArr = [];
  947. item.jsonStr.forEach((json, index) => {
  948. if (json.type == 1) {
  949. ansArr[index] = json.answerQuestion;
  950. json.content &&
  951. (json.content = json.content.replace(
  952. /<img/gi,
  953. '<img style="max-width:100%;"'
  954. ));
  955. } else if (json.type == 2) {
  956. json.optionsList.forEach((str) => {
  957. str.optionsId = "" + str.optionsId;
  958. });
  959. let arr = json.answerQuestion.split(",");
  960. arr.forEach((a, i) => {
  961. arr[i] = "" + a;
  962. });
  963. ansArr[index] = arr;
  964. json.content &&
  965. (json.content = json.content.replace(
  966. /<img/gi,
  967. '<img style="max-width:100%;"'
  968. ));
  969. } else if (json.type == 3) {
  970. ansArr[index] = json.answerQuestion;
  971. json.content &&
  972. (json.content = json.content.replace(
  973. /<img/gi,
  974. '<img style="max-width:100%;"'
  975. ));
  976. } else if (json.type == 5) {
  977. ansArr[index] = {
  978. text: "",
  979. imageList: [],
  980. };
  981. json.ansText = {
  982. text: "",
  983. imageList: [],
  984. };
  985. json.ques = {
  986. text: "",
  987. imageList: [],
  988. };
  989. json.content &&
  990. (json.content = json.content.replace(
  991. /<img/gi,
  992. '<img style="max-width:100%;"'
  993. ));
  994. }
  995. });
  996. item.analysisContent &&
  997. (item.analysisContent = item.analysisContent.replace(
  998. /<img/gi,
  999. '<img style="max-width:100%;"'
  1000. ));
  1001. item.content &&
  1002. (item.content = item.content.replace(
  1003. /<img/gi,
  1004. '<img style="max-width:100%;"'
  1005. ));
  1006. item.ans = ansArr;
  1007. if (this.explain) {
  1008. item.ques = item.ans;
  1009. }
  1010. return;
  1011. }
  1012. item.analysisContent &&
  1013. (item.analysisContent = item.analysisContent.replace(
  1014. /<img/gi,
  1015. '<img style="max-width:100%;"'
  1016. ));
  1017. item.content &&
  1018. (item.content = item.content.replace(
  1019. /<img/gi,
  1020. '<img style="max-width:100%;"'
  1021. ));
  1022. item.ques = "";
  1023. item.ans = item.answerQuestion;
  1024. if (this.explain) {
  1025. item.ques = item.ans;
  1026. }
  1027. } else {
  1028. if (this.explain) {
  1029. item.ques = item.ans;
  1030. }
  1031. }
  1032. });
  1033. this.questionList = res.rows;
  1034. });
  1035. },
  1036. /**
  1037. * @param {Object}
  1038. * 单选点击确认
  1039. */
  1040. radioSelect(question, questionIndex, optionsId) {
  1041. if (this.questionList[questionIndex].ques) return;
  1042. this.$set(this.questionList[questionIndex], "ques", optionsId);
  1043. // 回答错误
  1044. if (
  1045. this.questionList[questionIndex].ques !=
  1046. this.questionList[questionIndex].ans
  1047. ) {
  1048. } else {
  1049. console.log(this.questionList[questionIndex])
  1050. this.$request
  1051. .wrongRecordDelete({
  1052. examId: this.questionList[questionIndex].examId,
  1053. orderGoodsId: this.$route.query.orderGoodsId,
  1054. questionId: this.questionList[questionIndex].questionId,
  1055. goodsId:this.questionList[questionIndex].goodsId
  1056. })
  1057. .then((res) => {});
  1058. }
  1059. },
  1060. /**
  1061. * @param {Object}
  1062. * 案例单选点击
  1063. */
  1064. radioSelectChild(questionIndex, jsonIndex, optionsId) {
  1065. if (this.questionList[questionIndex].ques[jsonIndex]) return;
  1066. this.$set(this.questionList[questionIndex].ques, jsonIndex, optionsId);
  1067. },
  1068. /**
  1069. * 多选点击确认
  1070. */
  1071. checkboxSubmit(question, questionIndex) {
  1072. if (this.questionList[questionIndex].ques) return;
  1073. let arr = [];
  1074. this.questionList[questionIndex].jsonStr.forEach((item) => {
  1075. if (item.checked) {
  1076. arr.push(item.optionsId);
  1077. }
  1078. });
  1079. if (!arr.length) {
  1080. this.$message({
  1081. type: "warning",
  1082. message: "请选择答案",
  1083. });
  1084. return;
  1085. }
  1086. this.$set(this.questionList[questionIndex], "ques", arr);
  1087. let isWrong = this.questionList[questionIndex].ques.some(
  1088. (quesItem, quesIndex) => {
  1089. return (
  1090. this.questionList[questionIndex].ques[quesIndex] !=
  1091. this.questionList[questionIndex].ans[quesIndex]
  1092. );
  1093. }
  1094. );
  1095. // 回答错误
  1096. if (isWrong) {
  1097. } else {
  1098. let question = this.questionList.find(
  1099. (item) => item.questionId == this.questionList[bindex].questionId
  1100. );
  1101. if (question) {
  1102. this.$request
  1103. .wrongRecordDelete({
  1104. examId: question.examId,
  1105. orderGoodsId: question.orderGoodsId,
  1106. questionId: question.questionId,
  1107. })
  1108. .then((res) => {});
  1109. }
  1110. }
  1111. },
  1112. /**
  1113. * @param {Object}
  1114. * 案例多选确认
  1115. */
  1116. checkboxSubmitChild(questionIndex, ansIndex) {
  1117. if (this.questionList[questionIndex].ques[ansIndex]) return;
  1118. let arr = [];
  1119. this.questionList[questionIndex].jsonStr[ansIndex].optionsList.forEach(
  1120. (item) => {
  1121. if (item.checked) {
  1122. arr.push(item.optionsId);
  1123. }
  1124. }
  1125. );
  1126. if (!arr.length) {
  1127. this.$message({
  1128. type: "warning",
  1129. message: "请选择答案",
  1130. });
  1131. return;
  1132. }
  1133. this.$set(this.questionList[questionIndex].ques, ansIndex, arr);
  1134. },
  1135. /**
  1136. * 判断点击确认
  1137. */
  1138. judgeSelect(question, questionIndex, index) {
  1139. if (question.ques) return;
  1140. this.$set(this.questionList[questionIndex], "ques", index + "");
  1141. // 回答错误
  1142. if (
  1143. this.questionList[questionIndex].ques !=
  1144. this.questionList[questionIndex].ans
  1145. ) {
  1146. } else {
  1147. this.$request
  1148. .wrongRecordDelete({
  1149. examId: this.questionList[questionIndex].examId,
  1150. orderGoodsId: this.questionList[questionIndex].orderGoodsId,
  1151. questionId: this.questionList[questionIndex].questionId,
  1152. })
  1153. .then((res) => {});
  1154. }
  1155. },
  1156. judgeSelectChild(questionIndex, jsonIndex, index) {
  1157. console.log(this.questionList[questionIndex].ques[jsonIndex]);
  1158. if (this.questionList[questionIndex].ques[jsonIndex]) return;
  1159. this.$set(this.questionList[questionIndex].ques, jsonIndex, index + "");
  1160. },
  1161. /**
  1162. * 上传图片
  1163. */
  1164. uploadImg(e, question, questionIndex) {
  1165. var file = e.target.files[0];
  1166. if (file.size > 2 * 1024 * 1024) {
  1167. this.$message.warn("图片不得大于2000kb");
  1168. return;
  1169. }
  1170. var type = e.target.value.toLowerCase().split(".").splice(-1);
  1171. if (
  1172. type[0] != "jpg" &&
  1173. type[0] != "png" &&
  1174. type[0] != "jpeg" &&
  1175. type[0] != "gif"
  1176. ) {
  1177. this.$message.error("上传格式需为:.jpg/.png/.jpeg/gif");
  1178. e.target.value = "";
  1179. return;
  1180. }
  1181. this.$upload.upload(file, 0).then((res) => {
  1182. question.ansText.imageList.push(res);
  1183. });
  1184. },
  1185. /**
  1186. * 案例上传图片
  1187. */
  1188. uploadImgChild(e, questionIndex, jsonIndex) {
  1189. var file = e.target.files[0];
  1190. if (file.size > 2 * 1024 * 1024) {
  1191. this.$message.warn("图片不得大于2000kb");
  1192. return;
  1193. }
  1194. var type = e.target.value.toLowerCase().split(".").splice(-1);
  1195. if (
  1196. type[0] != "jpg" &&
  1197. type[0] != "png" &&
  1198. type[0] != "jpeg" &&
  1199. type[0] != "gif"
  1200. ) {
  1201. this.$message.error("上传格式需为:.jpg/.png/.jpeg/gif");
  1202. e.target.value = "";
  1203. return;
  1204. }
  1205. this.$upload.upload(file, 0).then((res) => {
  1206. this.questionList[questionIndex].jsonStr[
  1207. jsonIndex
  1208. ].ansText.imageList.push(res);
  1209. });
  1210. },
  1211. isOver(item, index) {
  1212. if (this.questionList[index].ques) {
  1213. if (item.type == 4) {
  1214. //案例题
  1215. let isOver = item.jsonStr.every((jsonItem, indexs) => {
  1216. if (
  1217. jsonItem.type == 1 ||
  1218. jsonItem.type == 2 ||
  1219. jsonItem.type == 3
  1220. ) {
  1221. if (item.ques[indexs]) {
  1222. return true;
  1223. } else {
  1224. return false;
  1225. }
  1226. } else if (jsonItem.type == 5) {
  1227. if (
  1228. item.ques[indexs] &&
  1229. (item.ques[indexs].text || item.ques[indexs].imageList.length)
  1230. ) {
  1231. console.log("chil");
  1232. return true;
  1233. } else {
  1234. return false;
  1235. }
  1236. }
  1237. });
  1238. if (isOver) {
  1239. return true;
  1240. } else {
  1241. return false;
  1242. }
  1243. } else if (item.type == 5) {
  1244. //简答题
  1245. //每一项都相等
  1246. if (item.ques && (item.ques.imageList.length || item.ques.text)) {
  1247. return true;
  1248. }
  1249. //判断
  1250. } else {
  1251. return false;
  1252. }
  1253. } else {
  1254. return false;
  1255. }
  1256. },
  1257. ansSubmit(question, questionIndex) {
  1258. if (!question.ansText.text && !question.ansText.imageList.length) {
  1259. this.$message({
  1260. type: "warning",
  1261. message: "请输入内容或上传图片",
  1262. });
  1263. return;
  1264. }
  1265. question.ques.imageList = question.ansText.imageList;
  1266. question.ques.text = question.ansText.text;
  1267. console.log(question.ques);
  1268. },
  1269. ansSubmitChild(question, questionIndex, jsonIndex) {
  1270. if (
  1271. !this.questionList[questionIndex].jsonStr[jsonIndex].ansText.text &&
  1272. !this.questionList[questionIndex].jsonStr[jsonIndex].ansText.imageList
  1273. .length
  1274. ) {
  1275. this.$message({
  1276. type: "warning",
  1277. message: "请输入内容或上传图片",
  1278. });
  1279. return;
  1280. }
  1281. this.$set(this.questionList[questionIndex].ques, jsonIndex, {
  1282. imageList:
  1283. this.questionList[questionIndex].jsonStr[jsonIndex].ansText
  1284. .imageList || [],
  1285. text:
  1286. this.questionList[questionIndex].jsonStr[jsonIndex].ansText.text ||
  1287. "",
  1288. });
  1289. },
  1290. changeIndex(index) {
  1291. this.current = index;
  1292. },
  1293. nextQuestion() {
  1294. if (this.current >= this.questionList.length - 1) {
  1295. this.$message({
  1296. type: "warning",
  1297. message: "已经是最后一题了!",
  1298. });
  1299. return;
  1300. }
  1301. this.current++;
  1302. },
  1303. prevQuestion() {
  1304. if (this.current == 0) {
  1305. this.$message({
  1306. type: "warning",
  1307. message: "已经是第一题了!",
  1308. });
  1309. return;
  1310. } else {
  1311. this.current--;
  1312. }
  1313. },
  1314. isRight(item, index) {
  1315. console.log(item);
  1316. //单选
  1317. if (this.questionList[index].ques) {
  1318. if (item.type == 1) {
  1319. console.log(
  1320. this.questionList[index].ques == this.questionList[index].ans
  1321. );
  1322. return this.questionList[index].ques == this.questionList[index].ans;
  1323. //多选
  1324. } else if (item.type == 2) {
  1325. //每一项都相等
  1326. return this.questionList[index].ans.every((item, i) => {
  1327. return item == this.questionList[index].ques[i];
  1328. });
  1329. //判断
  1330. } else if (item.type == 3) {
  1331. return this.questionList[index].ques == this.questionList[index].ans;
  1332. } else {
  1333. return false;
  1334. }
  1335. } else {
  1336. return false;
  1337. }
  1338. },
  1339. isWrong(item, index) {
  1340. if (this.questionList[index].ques) {
  1341. //单选
  1342. if (item.type == 1) {
  1343. return this.questionList[index].ques != this.questionList[index].ans;
  1344. //多选
  1345. } else if (item.type == 2) {
  1346. //每一项都相等
  1347. return this.questionList[index].ans.some((item, i) => {
  1348. return item != this.questionList[index].ques[i];
  1349. });
  1350. //判断
  1351. } else if (item.type == 3) {
  1352. return this.questionList[index].ques != this.questionList[index].ans;
  1353. } else {
  1354. return false;
  1355. }
  1356. } else {
  1357. return false;
  1358. }
  1359. },
  1360. right(bankIndex, ansIndex, option) {
  1361. if (
  1362. this.questionList[bankIndex].ques[ansIndex] &&
  1363. this.questionList[bankIndex].ans[ansIndex]
  1364. ) {
  1365. if (
  1366. this.questionList[bankIndex].ques[ansIndex].indexOf(
  1367. option.optionsId
  1368. ) != -1 ||
  1369. this.questionList[bankIndex].ans[ansIndex].indexOf(
  1370. option.optionsId
  1371. ) != -1
  1372. ) {
  1373. return true;
  1374. } else {
  1375. return false;
  1376. }
  1377. } else {
  1378. return false;
  1379. }
  1380. },
  1381. wrong(bankIndex, ansIndex, option) {
  1382. if (
  1383. this.questionList[bankIndex].ques[ansIndex] &&
  1384. this.questionList[bankIndex].ans[ansIndex]
  1385. ) {
  1386. if (
  1387. this.questionList[bankIndex].ques[ansIndex].indexOf(
  1388. option.optionsId
  1389. ) != -1 &&
  1390. this.questionList[bankIndex].ans[ansIndex].indexOf(
  1391. option.optionsId
  1392. ) == -1
  1393. ) {
  1394. return true;
  1395. } else {
  1396. return false;
  1397. }
  1398. } else {
  1399. return false;
  1400. }
  1401. },
  1402. /**
  1403. * 获取已经回答的题目数
  1404. * hasSpecail (是否包含简答和案例)
  1405. */
  1406. questionOverNum(hasSpecail) {
  1407. let count = 0;
  1408. this.questionList.forEach((item) => {
  1409. if (item.type == 1 || item.type == 2 || item.type == 3) {
  1410. if (item.ques) {
  1411. count++;
  1412. }
  1413. } else if (item.type == 4) {
  1414. //案例题
  1415. if (hasSpecail) {
  1416. let isOver = item.jsonStr.every((jsonItem, index) => {
  1417. if (
  1418. jsonItem.type == 1 ||
  1419. jsonItem.type == 2 ||
  1420. jsonItem.type == 3
  1421. ) {
  1422. if (item.ques[index]) {
  1423. return true;
  1424. } else {
  1425. return false;
  1426. }
  1427. } else if (jsonItem.type == 5) {
  1428. if (
  1429. item.ques[index] &&
  1430. (item.ques[index].text || item.ques[index].imageList.length)
  1431. ) {
  1432. return true;
  1433. } else {
  1434. return false;
  1435. }
  1436. }
  1437. });
  1438. if (isOver) {
  1439. count++;
  1440. }
  1441. }
  1442. } else if (item.type == 5) {
  1443. //简答题
  1444. if (hasSpecail) {
  1445. if (item.ques && (item.ques.text || item.ques.imageList.length)) {
  1446. console.log(5, item);
  1447. count++;
  1448. }
  1449. }
  1450. }
  1451. });
  1452. return count;
  1453. },
  1454. collect() {
  1455. this.$message({
  1456. message: "试做题目,不支持收藏~",
  1457. type: "warning",
  1458. });
  1459. return;
  1460. },
  1461. submit() {
  1462. this.$message({
  1463. type: "success",
  1464. message: "交卷成功",
  1465. });
  1466. setTimeout(() => {
  1467. this.$router.back(-1);
  1468. }, 2000);
  1469. },
  1470. },
  1471. };
  1472. </script>
  1473. <!-- Add "scoped" attribute to limit CSS to this component only -->
  1474. <style scoped lang="scss">
  1475. .course-exam {
  1476. .section {
  1477. overflow: hidden;
  1478. &__header {
  1479. height: 20px;
  1480. margin-top: 20px;
  1481. }
  1482. &__body {
  1483. .explain-record {
  1484. &__header {
  1485. }
  1486. &__body {
  1487. height: 800px;
  1488. border: 1px solid #eee;
  1489. .left-box {
  1490. float: left;
  1491. width: 970px;
  1492. border-right: 1px solid #eee;
  1493. &__header {
  1494. height: 40px;
  1495. padding-left: 12px;
  1496. border-bottom: 1px solid #eeeeee;
  1497. display: flex;
  1498. align-items: center;
  1499. .progress {
  1500. width: 636px;
  1501. }
  1502. .text {
  1503. margin-left: 15px;
  1504. font-size: 16px;
  1505. span {
  1506. font-family: Microsoft YaHei;
  1507. font-weight: bold;
  1508. color: #3f8dfd;
  1509. line-height: 24px;
  1510. }
  1511. }
  1512. }
  1513. &__body {
  1514. height: 720px;
  1515. border-bottom: 1px solid #eee;
  1516. .question {
  1517. padding: 12px 0 0 12px;
  1518. display: flex;
  1519. flex-direction: column;
  1520. height: 100%;
  1521. &__title {
  1522. padding-left: 12px;
  1523. font-size: 16px;
  1524. font-family: Microsoft YaHei;
  1525. font-weight: bold;
  1526. color: #333333;
  1527. line-height: 24px;
  1528. }
  1529. &__desc {
  1530. padding-left: 12px;
  1531. margin-top: 20px;
  1532. font-size: 16px;
  1533. font-family: Microsoft YaHei;
  1534. font-weight: 400;
  1535. color: #666666;
  1536. line-height: 24px;
  1537. /deep/ img {
  1538. max-width: 100% !important;
  1539. max-height: 400px !important;
  1540. }
  1541. }
  1542. &__content {
  1543. flex: 1;
  1544. overflow-y: scroll;
  1545. &::-webkit-scrollbar {
  1546. width: 6px;
  1547. }
  1548. &::-webkit-scrollbar-track {
  1549. background-color: #fff;
  1550. -webkit-border-radius: 2em;
  1551. -moz-border-radius: 2em;
  1552. border-radius: 2em;
  1553. }
  1554. &::-webkit-scrollbar-thumb {
  1555. background-color: #eeeeee;
  1556. -webkit-border-radius: 2em;
  1557. -moz-border-radius: 2em;
  1558. border-radius: 2em;
  1559. }
  1560. /deep/ .el-tabs__item {
  1561. padding: 0 20px !important;
  1562. height: 40px;
  1563. line-height: 40px;
  1564. }
  1565. .question__content {
  1566. height: auto;
  1567. overflow: auto;
  1568. }
  1569. .question-list {
  1570. padding: 24px 0 0 24px;
  1571. .checkbox,
  1572. .radio {
  1573. cursor: pointer;
  1574. margin-right: 24px;
  1575. padding: 0 24px;
  1576. display: flex;
  1577. align-items: center;
  1578. margin-top: 2px;
  1579. min-height: 40px;
  1580. padding-top: 10px;
  1581. padding-bottom: 10px;
  1582. background: #f5f9ff;
  1583. border-radius: 8px;
  1584. box-sizing: border-box;
  1585. &.right {
  1586. background: #37c65b;
  1587. }
  1588. &.wrong {
  1589. background: #ff3a30;
  1590. }
  1591. }
  1592. &.textarea {
  1593. margin-right: 12px;
  1594. .upload {
  1595. margin-top: 10px;
  1596. &__imgs {
  1597. margin-right: 10px;
  1598. width: 80px;
  1599. height: 80px;
  1600. background: #ffffff;
  1601. border: 1px solid #eeeeee;
  1602. border-radius: 4px;
  1603. position: relative;
  1604. display: flex;
  1605. float: left;
  1606. align-items: center;
  1607. justify-content: center;
  1608. img {
  1609. max-width: 100%;
  1610. max-height: 100%;
  1611. }
  1612. }
  1613. &__btn {
  1614. margin-right: 10px;
  1615. width: 80px;
  1616. height: 80px;
  1617. background: #ffffff;
  1618. border: 1px solid #eeeeee;
  1619. border-radius: 4px;
  1620. position: relative;
  1621. display: flex;
  1622. float: left;
  1623. align-items: center;
  1624. justify-content: center;
  1625. flex-direction: column;
  1626. .icon {
  1627. font-size: 20px;
  1628. color: #3f8dfd;
  1629. }
  1630. p {
  1631. font-size: 12px;
  1632. font-family: Microsoft YaHei;
  1633. font-weight: 400;
  1634. color: #999999;
  1635. line-height: 24px;
  1636. }
  1637. input {
  1638. position: absolute;
  1639. left: 0;
  1640. top: 0;
  1641. display: block;
  1642. width: 100%;
  1643. height: 100%;
  1644. opacity: 0;
  1645. }
  1646. }
  1647. }
  1648. }
  1649. /deep/ .el-checkbox {
  1650. white-space: pre-wrap;
  1651. }
  1652. }
  1653. .answer-list {
  1654. height: 40px;
  1655. border-top: 1px solid #eee;
  1656. border-bottom: 1px solid #eee;
  1657. margin-top: 24px;
  1658. display: flex;
  1659. align-items: center;
  1660. justify-content: space-between;
  1661. padding: 0 24px;
  1662. &__left {
  1663. font-size: 16px;
  1664. font-family: Microsoft YaHei;
  1665. font-weight: 400;
  1666. color: #333333;
  1667. line-height: 24px;
  1668. }
  1669. &__right {
  1670. font-size: 16px;
  1671. font-family: Microsoft YaHei;
  1672. font-weight: 400;
  1673. color: #333333;
  1674. line-height: 24px;
  1675. }
  1676. }
  1677. .explain-list {
  1678. padding: 12px 24px;
  1679. &__header {
  1680. font-size: 16px;
  1681. font-family: Microsoft YaHei;
  1682. font-weight: bold;
  1683. color: #666666;
  1684. line-height: 24px;
  1685. }
  1686. &__body {
  1687. margin-top: 12px;
  1688. font-size: 16px;
  1689. font-family: Microsoft YaHei;
  1690. font-weight: 400;
  1691. color: #666666;
  1692. line-height: 24px;
  1693. }
  1694. .upload {
  1695. margin-top: 10px;
  1696. &__imgs {
  1697. margin-right: 10px;
  1698. width: 80px;
  1699. height: 80px;
  1700. background: #ffffff;
  1701. border: 1px solid #eeeeee;
  1702. border-radius: 4px;
  1703. position: relative;
  1704. display: flex;
  1705. float: left;
  1706. align-items: center;
  1707. justify-content: center;
  1708. img {
  1709. max-width: 100%;
  1710. max-height: 100%;
  1711. }
  1712. }
  1713. }
  1714. }
  1715. }
  1716. &__btns {
  1717. position: relative;
  1718. height: 32px;
  1719. .submit {
  1720. cursor: pointer;
  1721. margin: 0 auto;
  1722. width: 140px;
  1723. height: 32px;
  1724. background: #3f8dfd;
  1725. box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.2);
  1726. border-radius: 16px;
  1727. text-align: center;
  1728. line-height: 32px;
  1729. color: #fff;
  1730. font-size: 16px;
  1731. }
  1732. .collect {
  1733. cursor: pointer;
  1734. position: absolute;
  1735. right: 0;
  1736. top: 5px;
  1737. font-size: 12px;
  1738. font-family: Microsoft YaHei;
  1739. font-weight: 400;
  1740. color: #3f8dfd;
  1741. line-height: 24px;
  1742. }
  1743. }
  1744. }
  1745. }
  1746. &__footer {
  1747. height: 40px;
  1748. display: flex;
  1749. justify-content: space-around;
  1750. align-items: center;
  1751. .btn {
  1752. cursor: pointer;
  1753. width: 140px;
  1754. height: 32px;
  1755. background: #ffffff;
  1756. border: 1px solid #3f8dfd;
  1757. border-radius: 16px;
  1758. line-height: 32px;
  1759. text-align: center;
  1760. color: #3f8dfd;
  1761. }
  1762. }
  1763. }
  1764. .right-box {
  1765. float: right;
  1766. width: 300px;
  1767. &__header {
  1768. height: 40px;
  1769. line-height: 40px;
  1770. font-size: 16px;
  1771. font-family: Microsoft YaHei;
  1772. font-weight: bold;
  1773. color: #333333;
  1774. text-align: center;
  1775. border-bottom: 1px solid #eeeeee;
  1776. }
  1777. &__body {
  1778. height: 720px;
  1779. border-bottom: 1px solid #eee;
  1780. .card {
  1781. &__note {
  1782. display: flex;
  1783. height: 40px;
  1784. align-items: center;
  1785. border-bottom: 1px solid #eee;
  1786. .item {
  1787. display: flex;
  1788. align-items: center;
  1789. margin-left: 10px;
  1790. .box {
  1791. margin-right: 5px;
  1792. width: 16px;
  1793. height: 16px;
  1794. border-radius: 4px;
  1795. &.white {
  1796. background: #ffffff;
  1797. border: 1px solid #eeeeee;
  1798. }
  1799. &.green {
  1800. background: #37c65b;
  1801. }
  1802. &.red {
  1803. background: #ff3a30;
  1804. }
  1805. &.blue {
  1806. background: #3f8dfd;
  1807. }
  1808. }
  1809. }
  1810. }
  1811. &__content {
  1812. height: 410px;
  1813. overflow-y: scroll;
  1814. &::-webkit-scrollbar {
  1815. width: 6px;
  1816. }
  1817. &::-webkit-scrollbar-track {
  1818. background-color: #fff;
  1819. -webkit-border-radius: 2em;
  1820. -moz-border-radius: 2em;
  1821. border-radius: 2em;
  1822. }
  1823. &::-webkit-scrollbar-thumb {
  1824. background-color: #eeeeee;
  1825. -webkit-border-radius: 2em;
  1826. -moz-border-radius: 2em;
  1827. border-radius: 2em;
  1828. }
  1829. .list {
  1830. display: flex;
  1831. flex-wrap: wrap;
  1832. .item {
  1833. width: 40px;
  1834. height: 40px;
  1835. border-radius: 10px;
  1836. text-align: center;
  1837. line-height: 40px;
  1838. margin-left: 16px;
  1839. margin-top: 16px;
  1840. cursor: pointer;
  1841. &.white {
  1842. line-height: 38px;
  1843. color: #333333;
  1844. background: #ffffff;
  1845. border: 1px solid #eeeeee;
  1846. }
  1847. &.green {
  1848. color: #fff;
  1849. background: #37c65b;
  1850. }
  1851. &.red {
  1852. color: #fff;
  1853. background: #ff3a30;
  1854. }
  1855. &.blue {
  1856. border: 1rpx solid #eeeeee;
  1857. color: #fff;
  1858. background: #3f8dfd;
  1859. }
  1860. &.disabled {
  1861. cursor: not-allowed;
  1862. line-height: 38px;
  1863. color: #eeeeee;
  1864. background: #ffffff;
  1865. border: 1px solid #eeeeee;
  1866. }
  1867. }
  1868. }
  1869. }
  1870. }
  1871. }
  1872. &__footer {
  1873. height: 40px;
  1874. display: flex;
  1875. align-items: center;
  1876. justify-content: center;
  1877. .submit {
  1878. cursor: pointer;
  1879. width: 140px;
  1880. height: 32px;
  1881. background: #3f8dfd;
  1882. box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.2);
  1883. border-radius: 16px;
  1884. line-height: 32px;
  1885. text-align: center;
  1886. color: #fff;
  1887. font-size: 16px;
  1888. }
  1889. }
  1890. }
  1891. }
  1892. }
  1893. }
  1894. }
  1895. .take-photo {
  1896. /deep/ .el-dialog__header {
  1897. display: none;
  1898. }
  1899. /deep/ .el-dialog__body {
  1900. padding: 0;
  1901. overflow: unset;
  1902. }
  1903. &__close {
  1904. cursor: pointer;
  1905. position: absolute;
  1906. right: 0;
  1907. top: -28px;
  1908. width: 24px;
  1909. height: 24px;
  1910. line-height: 24px;
  1911. text-align: center;
  1912. color: #eee;
  1913. border: 1px solid #eee;
  1914. border-radius: 50%;
  1915. }
  1916. &__header {
  1917. height: 40px;
  1918. border-bottom: 1px solid #eee;
  1919. line-height: 40px;
  1920. font-size: 16px;
  1921. font-family: Microsoft YaHei;
  1922. font-weight: bold;
  1923. color: #333333;
  1924. padding-left: 24px;
  1925. }
  1926. &__body {
  1927. height: 400px;
  1928. padding: 40px 24px;
  1929. .left-box {
  1930. width: 336px;
  1931. float: left;
  1932. .title {
  1933. font-size: 16px;
  1934. font-family: Microsoft YaHei;
  1935. font-weight: bold;
  1936. color: #ff3b30;
  1937. line-height: 24px;
  1938. }
  1939. .content {
  1940. font-size: 14px;
  1941. font-family: Microsoft YaHei;
  1942. font-weight: 400;
  1943. color: #333333;
  1944. line-height: 28px;
  1945. margin-top: 32px;
  1946. }
  1947. }
  1948. .right-box {
  1949. float: right;
  1950. width: 400px;
  1951. height: 300px;
  1952. video {
  1953. width: 100%;
  1954. height: 100%;
  1955. }
  1956. }
  1957. }
  1958. &__footer {
  1959. height: 90px;
  1960. border-top: 1px solid #eee;
  1961. text-align: center;
  1962. .take {
  1963. display: inline-block;
  1964. width: 200px;
  1965. height: 40px;
  1966. padding: 0;
  1967. border-radius: 20px;
  1968. text-align: center;
  1969. line-height: 40px;
  1970. margin: 24px auto;
  1971. }
  1972. }
  1973. }
  1974. }
  1975. </style>