Preview.vue 74 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294
  1. <!-- -->
  2. <template>
  3. <div
  4. v-if="cur"
  5. class="NPC-Big-Book-preview adult-book-preview-sty"
  6. :class="[
  7. 'NPC-Big-Book-preview-' + themeColor,
  8. isPhone ? 'NPC-Big-Book-preview-phone' : ''
  9. ]"
  10. >
  11. <div class="NNPE-title NNPE-title-top">
  12. <!-- 页眉 -->
  13. <div class="NNPE-title-left">
  14. <div
  15. v-for="(item, index) in cur.detailList"
  16. :key="index"
  17. class="NNPE-title-item"
  18. >
  19. <template
  20. v-if="
  21. item.detail &&
  22. item.detail.wordsList &&
  23. item.detail.wordsList.length == 0
  24. "
  25. >
  26. <p
  27. v-if="item.detail.sentence"
  28. :class="[
  29. 'content-con',
  30. /^[\u4e00-\u9fa5]/.test(item.detail.sentence) ? 'hasCn' : ''
  31. ]"
  32. v-html="item.detail.sentence"
  33. />
  34. </template>
  35. <template v-else>
  36. <div v-if="item.detail && item.detail.resArr" class="con-box">
  37. <div
  38. v-for="(itemCon, indexCon) in item.detail.resArr"
  39. v-show="itemCon.isShow"
  40. :key="indexCon"
  41. :class="['con-item', indexCon === 0 ? 'con-item-0' : '']"
  42. >
  43. <template
  44. v-if="
  45. item.detail &&
  46. item.detail.wordsList &&
  47. item.detail.wordsList[indexCon + 1] &&
  48. item.detail.wordsList[indexCon + 1].chs &&
  49. chsFhList.indexOf(
  50. item.detail.wordsList[indexCon + 1].chs
  51. ) > -1
  52. "
  53. >
  54. <div class="synthesis-box">
  55. <div>
  56. <span
  57. v-if="itemCon.pinyin"
  58. class="pinyin"
  59. :class="[
  60. noFont.indexOf(itemCon.pinyin) > -1 ? 'noFont' : ''
  61. ]"
  62. >{{ itemCon.pinyin }}</span
  63. >
  64. <span
  65. class="content-con"
  66. :class="
  67. [/^[0-9]*$/.test(itemCon.chs)]
  68. ? /^[\u4e00-\u9fa5]/.test(itemCon.chs)
  69. ? 'hanzi'
  70. : 'en'
  71. : ''
  72. "
  73. >{{ itemCon.chs }}</span
  74. >
  75. </div>
  76. <div
  77. v-if="item.detail.wordsList[indexCon + 1]"
  78. style="text-align: left"
  79. >
  80. <span
  81. v-if="item.detail.wordsList[indexCon + 1].pinyin"
  82. class="pinyin"
  83. :class="[
  84. noFont.indexOf(
  85. item.detail.wordsList[indexCon + 1].pinyin
  86. ) > -1
  87. ? 'noFont'
  88. : ''
  89. ]"
  90. >{{ item.detail.wordsList[indexCon + 1].pinyin }}</span
  91. >
  92. <span
  93. class="content-con"
  94. :class="
  95. [
  96. /^[0-9]*$/.test(
  97. item.detail.wordsList[indexCon + 1].chs
  98. )
  99. ]
  100. ? /^[\u4e00-\u9fa5]/.test(
  101. item.detail.wordsList[indexCon + 1].chs
  102. )
  103. ? 'hanzi'
  104. : 'en'
  105. : ''
  106. "
  107. >{{ item.detail.wordsList[indexCon + 1].chs }}</span
  108. >
  109. </div>
  110. </div>
  111. </template>
  112. <template v-else>
  113. <span
  114. v-if="
  115. item.detail &&
  116. !(
  117. item.detail.wordsList &&
  118. item.detail.wordsList[indexCon - 1] &&
  119. item.detail.wordsList[indexCon - 1].chs &&
  120. chsFhList.indexOf(
  121. item.detail.wordsList[indexCon - 1].chs
  122. ) == -1 &&
  123. chsFhList.indexOf(itemCon.chs) > -1
  124. ) &&
  125. itemCon.pinyin
  126. "
  127. class="pinyin"
  128. :class="[
  129. noFont.indexOf(itemCon.pinyin) > -1 ? 'noFont' : ''
  130. ]"
  131. >{{ itemCon.pinyin }}</span
  132. >
  133. <span
  134. v-if="
  135. item.detail &&
  136. !(
  137. item.detail.wordsList &&
  138. item.detail.wordsList[indexCon - 1] &&
  139. item.detail.wordsList[indexCon - 1].chs &&
  140. chsFhList.indexOf(
  141. item.detail.wordsList[indexCon - 1].chs
  142. ) == -1 &&
  143. chsFhList.indexOf(itemCon.chs) > -1
  144. )
  145. "
  146. class="content-con"
  147. :class="
  148. [/^[0-9]*$/.test(itemCon.chs)]
  149. ? /^[\u4e00-\u9fa5]/.test(itemCon.chs)
  150. ? 'hanzi'
  151. : 'en'
  152. : ''
  153. "
  154. >{{ itemCon.chs }}</span
  155. >
  156. </template>
  157. </div>
  158. </div>
  159. </template>
  160. <p class="NNPE-title-item-en" v-html="item.en" />
  161. </div>
  162. </div>
  163. <div v-if="isShowTitle && !isPhone" class="NNPE-operate">
  164. <a
  165. class="btn-prev"
  166. :class="[preClick ? '' : 'btn-prev-disabled']"
  167. @click="handleNNPEprev"
  168. />
  169. <a
  170. class="btn-next"
  171. :class="[nextClick ? '' : 'btn-next-disabled']"
  172. @click="handleNNPEnext"
  173. />
  174. </div>
  175. </div>
  176. <div class="operater-classTopic" v-if="isPhone">
  177. <div
  178. v-if="isShowTitle && isPhone"
  179. class="NNPE-operate NNPE-operate-phone"
  180. >
  181. <a
  182. class="btn-prev"
  183. :class="[preClick ? '' : 'btn-prev-disabled']"
  184. @click="handleNNPEprev"
  185. />
  186. <a
  187. class="btn-next"
  188. :class="[nextClick ? '' : 'btn-next-disabled']"
  189. @click="handleNNPEnext"
  190. />
  191. </div>
  192. <div
  193. v-if="
  194. cur.classTopic && cur.classTopic.length > 0 && cur.classTopic[0].con
  195. "
  196. class="classTopic-box"
  197. >
  198. <span
  199. v-for="(item, index) in cur.classTopic"
  200. :key="index"
  201. :class="item.font"
  202. >
  203. {{ item.con }}
  204. </span>
  205. </div>
  206. </div>
  207. <template v-else>
  208. <div
  209. v-if="
  210. cur.classTopic && cur.classTopic.length > 0 && cur.classTopic[0].con
  211. "
  212. class="classTopic-box"
  213. >
  214. <span
  215. v-for="(item, index) in cur.classTopic"
  216. :key="index"
  217. :class="item.font"
  218. >
  219. {{ item.con }}
  220. </span>
  221. </div>
  222. </template>
  223. <el-checkbox
  224. v-if="previewType && previewType == 'previewCheck'"
  225. v-model="checkAllNPC"
  226. class="NNPE-Book-content-item-checkbox"
  227. :indeterminate="isIndeterminate"
  228. style="margin:20px 0 0 10px"
  229. @change="handleCheckAllChangeNPC"
  230. >全选</el-checkbox
  231. >
  232. <div v-if="cur" class="NNPE-Book-content-inner">
  233. <div
  234. v-for="(item, index) in cur.cur_fn_data"
  235. :key="index"
  236. class="title-box-preview"
  237. :class="[
  238. !previewType ||
  239. previewType == 'previewCheck' ||
  240. (previewType == 'previewCheckShow' && item.previewShow) ||
  241. JSON.parse(previewGroupId).length == 0
  242. ? 'NNPE-Book-content-item'
  243. : ''
  244. ]"
  245. :style="{
  246. marginTop:
  247. item.table_list[0][0] &&
  248. (item.table_list[0][0].type === 'dialogue_article_chs' ||
  249. item.table_list[0][0].type === 'article_chs') &&
  250. item.table_list[0][0].data.articleHidden === false &&
  251. item.table_list.length === 1
  252. ? '-96px'
  253. : '0'
  254. }"
  255. >
  256. <div v-for="(itemJ, indexJ) in judgeAnswersList" :key="indexJ">
  257. <el-checkbox
  258. v-if="previewType && previewType == 'previewCheck' && item.group_id"
  259. v-model="groupCheckList[index]"
  260. class="NNPE-Book-content-item-checkbox"
  261. :label="item.group_id"
  262. @change="forupdata(index)"
  263. ><br
  264. /></el-checkbox>
  265. <template
  266. v-if="
  267. !previewType ||
  268. previewType == 'previewCheck' ||
  269. (previewType == 'previewCheckShow' && item.previewShow) ||
  270. JSON.parse(previewGroupId).length == 0
  271. "
  272. >
  273. <template v-if="itemJ != 'standardAnswer'">
  274. <div
  275. v-if="
  276. item.number ||
  277. item.z_title ||
  278. item.f_title ||
  279. (item.z_title_detail && item.z_title_detail.sentence) ||
  280. (item.f_title_detail && item.f_title_detail.sentence)
  281. "
  282. class="title-big"
  283. >
  284. <b v-if="item.number">{{ item.number }}</b>
  285. <div
  286. class="title-box-right"
  287. :class="[item.is_textIndex ? 'title-box-right-index' : '']"
  288. >
  289. <template
  290. v-if="item.z_title_detail && item.z_title_detail.sentence"
  291. >
  292. <div class="item-intro">
  293. <OneSentenceTemp
  294. :detail="item.z_title_detail"
  295. :task-model="TaskModel"
  296. :bookanswer="[]"
  297. :correct-answer="[]"
  298. :is-input="false"
  299. :fn_check_list="[]"
  300. :py-number="0"
  301. :record_check="[]"
  302. :max-fontsize="'16'"
  303. />
  304. </div>
  305. </template>
  306. <h2 v-else-if="item.z_title" v-html="item.z_title" />
  307. <template v-if="item.hasOwnProperty('f_title_detail')">
  308. <div v-if="item.f_title_detail.sentence" class="item-intro">
  309. <OneSentenceTemp
  310. :detail="item.f_title_detail"
  311. :task-model="TaskModel"
  312. :bookanswer="[]"
  313. :correct-answer="[]"
  314. :is-input="false"
  315. :fn_check_list="[]"
  316. :py-number="0"
  317. :record_check="[]"
  318. :max-fontsize="'16'"
  319. :style="{
  320. marginTop:
  321. item.z_title ||
  322. (item.z_title_detail &&
  323. item.z_title_detail.sentence)
  324. ? '8px'
  325. : '0'
  326. }"
  327. />
  328. </div>
  329. </template>
  330. <h3
  331. v-else-if="item.f_title"
  332. :style="{
  333. marginTop:
  334. item.z_title ||
  335. (item.z_title_detail && item.z_title_detail.sentence)
  336. ? '8px'
  337. : '0'
  338. }"
  339. v-html="item.f_title"
  340. />
  341. </div>
  342. </div>
  343. <div
  344. class="title-little"
  345. :class="[
  346. (item.little_title_number ||
  347. item.little_title ||
  348. (item.l_title_detail && item.l_title_detail.sentence)) &&
  349. (item.f_title ||
  350. (item.f_title_detail && item.f_title_detail.sentence))
  351. ? 'marginTop'
  352. : 'marginTop-8'
  353. ]"
  354. >
  355. <b v-html="item.little_title_number" />
  356. <template
  357. v-if="item.l_title_detail && item.l_title_detail.sentence"
  358. >
  359. <div class="item-intro">
  360. <OneSentenceTemp
  361. :detail="item.l_title_detail"
  362. :task-model="TaskModel"
  363. :bookanswer="[]"
  364. :correct-answer="[]"
  365. :is-input="false"
  366. :fn_check_list="[]"
  367. :py-number="0"
  368. :record_check="[]"
  369. :max-fontsize="'16'"
  370. />
  371. </div>
  372. </template>
  373. <p v-else-if="item.little_title" v-html="item.little_title" />
  374. </div>
  375. </template>
  376. <div
  377. :class="[
  378. 'NNPE-tableList',
  379. item.is_bg ? 'NNPE-tableList-hasBg' : ''
  380. ]"
  381. >
  382. <h6
  383. v-if="itemJ == 'userAnswer' || itemJ == 'studentAnswer'"
  384. class="standardTitle"
  385. >
  386. {{ itemJ == "userAnswer" ? "Your answer" : "Student answers" }}
  387. </h6>
  388. <h6
  389. v-if="itemJ == 'standardAnswer' && item.ShowstandardAnswer"
  390. class="standardTitle"
  391. >
  392. Standard answer
  393. </h6>
  394. <div
  395. v-for="(items, indexs) in item.table_list"
  396. :key="indexs"
  397. class="NNPE-tableList-tr"
  398. :class="[
  399. indexs === item.table_list.length - 1
  400. ? 'NNPE-tableList-tr-last'
  401. : ''
  402. ]"
  403. >
  404. <div
  405. v-for="(itemss, indexss) in items"
  406. :key="indexss"
  407. :class="[
  408. 'NNPE-tableList-item',
  409. items.length == 1
  410. ? 'NNPE-tableList-item-noMargin'
  411. : 'NNPE-tableList-item' + items.length
  412. ]"
  413. >
  414. <template v-if="itemss.data">
  415. <template v-if="itemss.type == 'ligature_chs'">
  416. <Ligature
  417. :cur-que="itemss.data"
  418. :theme-color="themeColor"
  419. :task-model="TaskModel"
  420. :number="
  421. index +
  422. '_' +
  423. indexs +
  424. '_' +
  425. indexss +
  426. '_' +
  427. currentTreeID
  428. "
  429. :judge-answer="itemJ"
  430. />
  431. </template>
  432. <template v-if="itemss.data.type == 'image'">
  433. <Picture
  434. v-if="refresh"
  435. :cur-que="itemss.data"
  436. :child-type="itemss.type"
  437. :theme-color="themeColor"
  438. :task-model="TaskModel"
  439. :judge-answer="itemJ"
  440. />
  441. </template>
  442. <template
  443. v-if="
  444. itemss.type == 'phrase_chs' && itemJ != 'standardAnswer'
  445. "
  446. >
  447. <WordPhrase
  448. v-if="refresh"
  449. :cur-que="itemss.data"
  450. :theme-color="themeColor"
  451. :task-model="TaskModel"
  452. :index-str="
  453. index +
  454. '_' +
  455. indexs +
  456. '_' +
  457. indexss +
  458. '_' +
  459. currentTreeID
  460. "
  461. :judge-answer="itemJ"
  462. />
  463. </template>
  464. <template
  465. v-if="
  466. itemss.type == 'NewWord_chs' &&
  467. itemJ != 'standardAnswer'
  468. "
  469. >
  470. <WordPhrase
  471. v-if="refresh"
  472. :cur-que="itemss.data"
  473. :theme-color="themeColor"
  474. :current-tree-i-d="currentTreeID"
  475. :indexs="indexs"
  476. :indexss="indexss"
  477. :task-model="TaskModel"
  478. :index-str="
  479. index +
  480. '_' +
  481. indexs +
  482. '_' +
  483. indexss +
  484. '_' +
  485. currentTreeID
  486. "
  487. :judge-answer="itemJ"
  488. :isPhone="isPhone"
  489. />
  490. </template>
  491. <template
  492. v-if="
  493. itemss.type == 'annotation_chs' &&
  494. itemJ != 'standardAnswer'
  495. "
  496. >
  497. <WordPhrase
  498. v-if="refresh"
  499. :cur-que="itemss.data"
  500. :theme-color="themeColor"
  501. :task-model="TaskModel"
  502. :index-str="
  503. index +
  504. '_' +
  505. indexs +
  506. '_' +
  507. indexss +
  508. '_' +
  509. currentTreeID
  510. "
  511. :judge-answer="itemJ"
  512. />
  513. </template>
  514. <template
  515. v-if="
  516. itemss.type == 'notes_chs' && itemJ != 'standardAnswer'
  517. "
  518. >
  519. <Notes
  520. v-if="refresh"
  521. :cur-que="itemss.data"
  522. :theme-color="themeColor"
  523. :task-model="TaskModel"
  524. :judge-answer="itemJ"
  525. />
  526. </template>
  527. <template
  528. v-if="
  529. itemss.type == 'article_chs' &&
  530. itemJ != 'standardAnswer' &&
  531. itemss.data &&
  532. itemss.data.articleHidden !== false
  533. "
  534. >
  535. <ArticleTemChs
  536. v-if="refresh"
  537. :cur-que="itemss.data"
  538. :n-n-p-e-new-word-list="NNPENewWordList"
  539. :n-n-p-e-new-phrase-list="NNPENewPhraseList"
  540. :n-n-p-e-annotation-list="NNPEAnnotationList"
  541. :theme-color="themeColor"
  542. :current-tree-i-d="currentTreeID"
  543. :task-model="TaskModel"
  544. :judge-answer="itemJ"
  545. :col-length="items.length"
  546. :NpcNewWordMp3="NpcNewWordMp3"
  547. />
  548. </template>
  549. <!-- <template v-if="itemss.type == 'sentence_segword_chs'">
  550. <SentenceSegWordViewChs
  551. :cur-que="itemss.data"
  552. :theme-color="themeColor"
  553. v-if="refresh"
  554. />
  555. </template> -->
  556. <template
  557. v-if="
  558. itemss.type == 'dialogue_article_chs' &&
  559. itemJ != 'standardAnswer' &&
  560. itemss.data &&
  561. itemss.data.articleHidden !== false
  562. "
  563. >
  564. <DialogueArticleViewChs
  565. v-if="refresh"
  566. :cur-que="itemss.data"
  567. :n-n-p-e-new-word-list="NNPENewWordList"
  568. :n-n-p-e-new-phrase-list="NNPENewPhraseList"
  569. :n-n-p-e-annotation-list="NNPEAnnotationList"
  570. :color-box="colorBox"
  571. :theme-color="themeColor"
  572. :current-tree-i-d="currentTreeID"
  573. :task-model="TaskModel"
  574. :judge-answer="itemJ"
  575. :col-length="items.length"
  576. :NpcNewWordMp3="NpcNewWordMp3"
  577. />
  578. </template>
  579. <template v-if="itemss.type == 'dialogue_answer_chs'">
  580. <DialogueAnswerViewChs
  581. v-if="refresh"
  582. :cur-que="itemss.data"
  583. :color-box="colorBox"
  584. :theme-color="themeColor"
  585. :task-model="TaskModel"
  586. :judge-answer="itemJ"
  587. :isPhone="isPhone"
  588. />
  589. </template>
  590. <template v-if="itemss.type == 'input_record_chs'">
  591. <InputHasRecord
  592. v-if="refresh"
  593. :cur-que="itemss.data"
  594. :theme-color="themeColor"
  595. :task-model="TaskModel"
  596. :judge-answer="itemJ"
  597. :isPhone="isPhone"
  598. />
  599. </template>
  600. <template v-if="itemss.type == 'recordHZ_inputPY_chs'">
  601. <TextInputRecord
  602. v-if="refresh"
  603. :cur-que="itemss.data"
  604. :theme-color="themeColor"
  605. :task-model="TaskModel"
  606. :judge-answer="itemJ"
  607. :isPhone="isPhone"
  608. />
  609. </template>
  610. <template
  611. v-if="
  612. itemss.type == 'inputItem_chs' ||
  613. itemss.type == 'sentence_input_chs' ||
  614. itemss.type == 'sentence_judge_chs' ||
  615. itemss.type == 'sentence_record_chs' ||
  616. itemss.type == 'sentence_input_record_chs'
  617. "
  618. >
  619. <SentenceInput
  620. v-if="refresh"
  621. :cur-que="itemss.data"
  622. :theme-color="themeColor"
  623. :task-model="TaskModel"
  624. :judge-answer="itemJ"
  625. :type="itemss.type"
  626. />
  627. </template>
  628. <template v-if="itemss.type == 'NumberCombination_chs'">
  629. <NumberSelectHasRecord
  630. v-if="refresh"
  631. :cur-que="itemss.data"
  632. :theme-color="themeColor"
  633. :task-model="TaskModel"
  634. :judge-answer="itemJ"
  635. />
  636. </template>
  637. <template
  638. v-if="
  639. itemss.type === 'voice_matrix' &&
  640. itemJ != 'standardAnswer'
  641. "
  642. >
  643. <voice-matrix
  644. v-if="refresh"
  645. :cur-que="itemss.data"
  646. :theme-color="themeColor"
  647. :task-model="TaskModel"
  648. :judge-answer="itemJ"
  649. />
  650. </template>
  651. <template v-if="itemss.type === 'select_drag'">
  652. <select-drag
  653. v-if="refresh"
  654. :cur-que="itemss.data"
  655. :theme-color="themeColor"
  656. :task-model="TaskModel"
  657. :judge-answer="itemJ"
  658. :isPhone="isPhone"
  659. />
  660. </template>
  661. <template v-if="itemss.type === 'fill_drag'">
  662. <fill-drag
  663. v-if="refresh"
  664. :cur-que="itemss.data"
  665. :theme-color="themeColor"
  666. :task-model="TaskModel"
  667. :judge-answer="itemJ"
  668. :isPhone="isPhone"
  669. />
  670. </template>
  671. <template v-if="itemss.type === 'config_table'">
  672. <configurable-table
  673. v-if="refresh"
  674. :cur-que="itemss.data"
  675. :theme-color="themeColor"
  676. :task-model="TaskModel"
  677. :judge-answer="itemJ"
  678. />
  679. </template>
  680. <template v-if="itemss.type === 'header_separate'">
  681. <header-separate
  682. v-if="refresh"
  683. :cur-que="itemss.data"
  684. :theme-color="themeColor"
  685. :task-model="TaskModel"
  686. :judge-answer="itemJ"
  687. />
  688. </template>
  689. <template v-if="itemss.type == 'toneSelect_chs'">
  690. <SelectTone
  691. v-if="refresh"
  692. :cur-que="itemss.data"
  693. :theme-color="themeColor"
  694. :task-model="TaskModel"
  695. :judge-answer="itemJ"
  696. />
  697. </template>
  698. <template v-if="itemss.type == 'sudoku_chs'">
  699. <Soduko
  700. v-if="refresh"
  701. :cur-que="itemss.data"
  702. :theme-color="themeColor"
  703. :task-model="TaskModel"
  704. :judge-answer="itemJ"
  705. />
  706. </template>
  707. <template v-if="itemss.type == 'single_chs'">
  708. <Single
  709. v-if="refresh"
  710. :cur-que="itemss.data"
  711. :theme-color="themeColor"
  712. :task-model="TaskModel"
  713. :judge-answer="itemJ"
  714. />
  715. </template>
  716. <template v-if="itemss.type == 'text_problem_chs'">
  717. <TextProblem
  718. v-if="refresh"
  719. :cur-que="itemss.data"
  720. :theme-color="themeColor"
  721. :task-model="TaskModel"
  722. :judge-answer="itemJ"
  723. />
  724. </template>
  725. <template
  726. v-if="
  727. itemss.type == 'newWord_preview_chs' &&
  728. itemJ != 'standardAnswer'
  729. "
  730. >
  731. <NewWordShow
  732. v-if="refresh"
  733. :cur-que="itemss.data"
  734. :theme-color="themeColor"
  735. :index-str="index + '_' + indexs + '_' + indexss"
  736. :task-model="TaskModel"
  737. :judge-answer="itemJ"
  738. :isPhone="isPhone"
  739. />
  740. </template>
  741. <template
  742. v-if="itemss.type == 'listen_record_single_syllable_chs'"
  743. >
  744. <SelectYinjie
  745. v-if="refresh"
  746. :cur-que="itemss.data"
  747. :theme-color="themeColor"
  748. :task-model="TaskModel"
  749. :judge-answer="itemJ"
  750. />
  751. </template>
  752. <template v-if="itemss.type == 'sentence_listen_read_chs'">
  753. <SentenceListenRead
  754. v-if="refresh"
  755. :cur-que="itemss.data"
  756. :theme-color="themeColor"
  757. :task-model="TaskModel"
  758. :judge-answer="itemJ"
  759. />
  760. </template>
  761. <template v-if="itemss.type == 'sort_chs'">
  762. <SentenceSortQP
  763. v-if="refresh"
  764. :cur-que="itemss.data"
  765. :theme-color="themeColor"
  766. :task-model="TaskModel"
  767. :judge-answer="itemJ"
  768. />
  769. </template>
  770. <template
  771. v-if="itemss.type == 'checkbox_self_assessment_chs'"
  772. >
  773. <Checkbox
  774. v-if="refresh"
  775. :cur-que="itemss.data"
  776. :theme-color="themeColor"
  777. :task-model="TaskModel"
  778. :judge-answer="itemJ"
  779. />
  780. </template>
  781. <template
  782. v-if="
  783. (itemss.type == 'record_control_mini' ||
  784. itemss.type == 'record_control_normal' ||
  785. itemss.type == 'record_control_pro' ||
  786. itemss.type == 'record_control_promax') &&
  787. itemJ != 'standardAnswer'
  788. "
  789. >
  790. <RecordModule
  791. v-if="refresh"
  792. :cur-que="itemss.data"
  793. :theme-color="themeColor"
  794. :task-model="TaskModel"
  795. :judge-answer="itemJ"
  796. />
  797. </template>
  798. <template
  799. v-if="
  800. (itemss.type == 'upload_control_chs' ||
  801. itemss.type == 'upload_control_preview_chs') &&
  802. itemJ != 'standardAnswer'
  803. "
  804. >
  805. <UploadControlView
  806. v-if="refresh"
  807. :cur-que="itemss.data"
  808. :type="itemss.type"
  809. :theme-color="themeColor"
  810. :task-model="TaskModel"
  811. :judge-answer="itemJ"
  812. />
  813. </template>
  814. <template
  815. v-if="
  816. itemss.type == 'CourseStart_chs' &&
  817. itemJ != 'standardAnswer'
  818. "
  819. >
  820. <CourseStart
  821. v-if="refresh"
  822. :cur-que="itemss.data"
  823. :handle-n-n-p-enext="handleNNPEnext"
  824. :theme-color="themeColor"
  825. :task-model="TaskModel"
  826. :judge-answer="itemJ"
  827. />
  828. </template>
  829. <template
  830. v-if="
  831. itemss.type == 'tinydemo_chs' &&
  832. itemJ != 'standardAnswer'
  833. "
  834. >
  835. <Tinydemo
  836. v-if="refresh"
  837. :cur-que="itemss.data"
  838. :theme-color="themeColor"
  839. :task-model="TaskModel"
  840. :judge-answer="itemJ"
  841. :isPhone="isPhone"
  842. />
  843. </template>
  844. <template
  845. v-if="
  846. itemss.type == 'video_chs' && itemJ != 'standardAnswer'
  847. "
  848. >
  849. <VideoControl
  850. v-if="refresh"
  851. :cur-que="itemss.data"
  852. :type="itemss.type"
  853. :theme-color="themeColor"
  854. :index-str="
  855. index +
  856. '_' +
  857. indexs +
  858. '_' +
  859. indexss +
  860. '_' +
  861. currentTreeID
  862. "
  863. :task-model="TaskModel"
  864. :judge-answer="itemJ"
  865. />
  866. </template>
  867. <template v-if="itemss.type == 'table_chs'">
  868. <TableView
  869. v-if="refresh"
  870. :cur-que="itemss.data"
  871. :type="itemss.type"
  872. :theme-color="themeColor"
  873. :task-model="TaskModel"
  874. :judge-answer="itemJ"
  875. />
  876. </template>
  877. <template v-if="itemss.type == 'play_record_chs'">
  878. <PlayRecordView
  879. v-if="refresh"
  880. :cur-que="itemss.data"
  881. :type="itemss.type"
  882. :theme-color="themeColor"
  883. :task-model="TaskModel"
  884. :judge-answer="itemJ"
  885. />
  886. </template>
  887. <template
  888. v-if="
  889. itemss.type == 'upload_pdf_chs' &&
  890. itemJ != 'standardAnswer'
  891. "
  892. >
  893. <PdfView
  894. v-if="refresh"
  895. :cur-que="itemss.data"
  896. :type="itemss.type"
  897. :theme-color="themeColor"
  898. :task-model="TaskModel"
  899. :judge-answer="itemJ"
  900. />
  901. </template>
  902. <template v-if="itemss.type == 'sentence_segtemp_chs'">
  903. <SentenceModule
  904. v-if="refresh"
  905. :cur-que="itemss.data"
  906. :type="itemss.type"
  907. :theme-color="themeColor"
  908. :task-model="TaskModel"
  909. :judge-answer="itemJ"
  910. />
  911. </template>
  912. <template
  913. v-if="
  914. itemss.type == 'options_list_chs' &&
  915. itemJ != 'standardAnswer'
  916. "
  917. >
  918. <OptionsList
  919. v-if="refresh"
  920. :cur-que="itemss.data"
  921. :theme-color="themeColor"
  922. :index-str="index + '_' + indexs + '_' + indexss"
  923. :task-model="TaskModel"
  924. :judge-answer="itemJ"
  925. />
  926. </template>
  927. <template v-if="itemss.type == 'sentence_single_chs'">
  928. <SentenceMulModule
  929. v-if="refresh"
  930. :cur-que="itemss.data"
  931. :type="itemss.type"
  932. :theme-color="themeColor"
  933. :task-model="TaskModel"
  934. :judge-answer="itemJ"
  935. />
  936. </template>
  937. </template>
  938. </div>
  939. </div>
  940. <div
  941. v-if="isAnswerItemShow && item.showSubmit"
  942. style="text-align: right; padding: 10px 0px 40px 0"
  943. >
  944. <a class="submitLookAnswer" @click="submitLookAnswer(index)">{{
  945. submitCn ? submitCn : "查看答案"
  946. }}</a>
  947. </div>
  948. </div>
  949. </template>
  950. </div>
  951. </div>
  952. </div>
  953. <div v-if="isShowSave || isShowTitle" class="NNPE-title NNPE-title-gray">
  954. <!-- 页眉 v-if="isShowSave"-->
  955. <a v-if="isShowSave" class="submitAnswer" @click="submitUserAnswerNPC"
  956. >提交</a
  957. >
  958. <div v-if="isShowTitle" class="NNPE-operate">
  959. <a
  960. class="btn-prev"
  961. :class="[preClick ? '' : 'btn-prev-disabled']"
  962. @click="handleNNPEprev"
  963. />
  964. <a
  965. class="btn-next"
  966. :class="[nextClick ? '' : 'btn-next-disabled']"
  967. @click="handleNNPEnext"
  968. />
  969. </div>
  970. </div>
  971. <el-dialog
  972. title=""
  973. :close-on-click-modal="false"
  974. :modal-append-to-body="false"
  975. :show-close="false"
  976. append-to-body
  977. :visible.sync="visiblePreviewDialog"
  978. width="890px"
  979. height="80%"
  980. class="previewDialog"
  981. >
  982. <div class="previewDialog-title">
  983. <h2>Reference answer</h2>
  984. <a @click="visiblePreviewDialog = false"
  985. ><img src="../../assets/NPC/icon-close.png"
  986. /></a>
  987. </div>
  988. <PreviewDialogueNPC
  989. v-if="visiblePreviewDialog"
  990. class="previewDialog-content"
  991. :context="contextData"
  992. :que-index="queIndex"
  993. :father-name="fatherName"
  994. :current-tree-i-d="currentTreeID"
  995. :father-tree-data="FatherTreeData"
  996. :change-id="changeId"
  997. :theme-color="themeColor"
  998. :task-model="'ANSWER'"
  999. :NpcNewWordMp3="NpcNewWordMp3"
  1000. />
  1001. </el-dialog>
  1002. </div>
  1003. </template>
  1004. <script>
  1005. import Picture from "./preview/Picture.vue"; // 图片模板
  1006. import Record from "./preview/Record.vue"; // 音频播放
  1007. import Soundrecord from "./preview/Soundrecord.vue"; // 录音模板
  1008. import ArticleTemChs from "./preview/ArticleViewChs/index.vue"; // 文章模板
  1009. import DialogueArticleViewChs from "./preview/DialogueArticleViewChs/index.vue"; // 文章模板
  1010. import SentenceSegWordViewChs from "./preview/SentenceSegWordViewChs.vue"; // 句子分词
  1011. import WordPhrase from "./preview/WordPhrase.vue"; // 生词短语
  1012. import Notes from "./preview/Notes.vue"; // 注释
  1013. import Ligature from "./preview/Ligature.vue";
  1014. import InputHasRecord from "./preview/InputHasRecord.vue"; // 输入加录音
  1015. import TextInputRecord from "./preview/TextInputRecord.vue"; // 文本+输入+录音
  1016. import SentenceInput from "./preview/SentenceInput.vue"; // 输入选项
  1017. import NumberSelectHasRecord from "./preview/NumberSelectHasRecord.vue"; // 数字组合
  1018. import SelectTone from "./preview/SelectTone.vue"; // 选择声调
  1019. import Soduko from "./preview/Soduko.vue"; // 数独
  1020. import Single from "./preview/Single.vue"; // 单选
  1021. import TextProblem from "./preview/TextProblem.vue"; // 课文上方的问题
  1022. import NewWordShow from "./preview/NewWordShow.vue"; // 生字展示
  1023. import SelectYinjie from "./preview/SelectYinjie.vue"; // 选择音节
  1024. import SentenceListenRead from "./preview/SentenceListenRead.vue"; // 听并朗读
  1025. import SentenceSortQP from "./preview/SentenceSortQP.vue"; // 句子拖拽排序
  1026. import Checkbox from "./preview/CheckBoxModule.vue"; // 问卷调查-多选题
  1027. import VoiceMatrix from "./preview/VoiceMatrix.vue"; // 语音矩阵
  1028. import SelectDrag from "./preview/SelectDrag.vue"; // 选择 -> 拖拽
  1029. import FillDrag from "./preview/FillDrag.vue"; // 填空 -> 拖拽
  1030. import ConfigurableTable from "./preview/ConfigurableTable.vue"; // 可配置表格
  1031. import HeaderSeparate from "./preview/HeaderSparate/index.vue"; // 表头分离表格
  1032. import RecordModule from "./preview/RecordModule.vue"; // 录音组件
  1033. import UploadControlView from "./preview/UploadControlView.vue"; // 预览控件
  1034. import DialogueAnswerViewChs from "./preview/DialogueArticleViewChs/DialogueAnswerViewChs.vue"; // 文章模板
  1035. import CourseStart from "./preview/CourseStart.vue"; // 封面
  1036. import Tinydemo from "./preview/TinyModule.vue"; // 富文本
  1037. import VideoControl from "./preview/VideoControl.vue"; // 视频控件
  1038. import TableView from "./preview/TableView.vue"; // 视频控件
  1039. import PdfView from "./preview/PdfView.vue"; // 视频控件
  1040. import SentenceModule from "./preview/SentenceModule.vue"; // 图片模板
  1041. import PlayRecordView from "./preview/PlayRecordView.vue";
  1042. import OptionsList from "./preview/OptionsList.vue"; // 选项模板
  1043. import SentenceMulModule from "./preview/SentenceMulModule.vue"; // 多题干模板
  1044. import PreviewDialogueNPC from "./preview/PreviewDialogueNPC.vue"; // 选项模板
  1045. import OneSentenceTemp from "./preview/components/OneSentenceTemp.vue";
  1046. import { getToken } from "../../utils/auth";
  1047. export default {
  1048. name: "Booknpc",
  1049. components: {
  1050. Picture,
  1051. Record,
  1052. Soundrecord,
  1053. ArticleTemChs,
  1054. DialogueArticleViewChs,
  1055. SentenceSegWordViewChs,
  1056. WordPhrase,
  1057. Notes,
  1058. Ligature,
  1059. InputHasRecord,
  1060. TextInputRecord,
  1061. SentenceInput,
  1062. NumberSelectHasRecord,
  1063. SelectTone,
  1064. Soduko,
  1065. Single,
  1066. TextProblem,
  1067. NewWordShow,
  1068. SelectYinjie,
  1069. SentenceListenRead,
  1070. SentenceSortQP,
  1071. Checkbox,
  1072. VoiceMatrix,
  1073. FillDrag,
  1074. SelectDrag,
  1075. ConfigurableTable,
  1076. HeaderSeparate,
  1077. RecordModule,
  1078. UploadControlView,
  1079. DialogueAnswerViewChs,
  1080. CourseStart,
  1081. Tinydemo,
  1082. VideoControl,
  1083. TableView,
  1084. PdfView,
  1085. PlayRecordView,
  1086. SentenceModule,
  1087. OptionsList,
  1088. PreviewDialogueNPC,
  1089. SentenceMulModule,
  1090. OneSentenceTemp
  1091. },
  1092. props: [
  1093. "context",
  1094. "fatherName",
  1095. "currentTreeID",
  1096. "FatherTreeData",
  1097. "changeId",
  1098. "themeColor",
  1099. "isShowTitle",
  1100. "bookAnswerContent",
  1101. "TaskModel",
  1102. "isShowSave",
  1103. "previewType",
  1104. "previewGroupId",
  1105. "isAnswerItemShow",
  1106. "submitCn"
  1107. ],
  1108. data() {
  1109. return {
  1110. contextData: null,
  1111. answerData: [], // 获取的答案数据
  1112. queIndex: -1, // 题目的索引
  1113. cur: null, // 当前的题目
  1114. watchIndex: -1, // 监听的值
  1115. queList: [],
  1116. queTotal: 0, // 题目总数
  1117. NNPENewWordList: [], // 存放文章的生词
  1118. NNPENewPhraseList: [], // 存放文章的短语
  1119. NNPEAnnotationList: [], // 存放文章注释
  1120. height: "", // 总体的高度
  1121. colorBox: [
  1122. {
  1123. touxiang: "#72B51D",
  1124. bg: "#E9F0DF"
  1125. },
  1126. {
  1127. touxiang: "#DE4444",
  1128. bg: "rgba(222, 68, 68, 0.1)"
  1129. },
  1130. {
  1131. touxiang: "#A7A7A7",
  1132. bg: "#ffffff"
  1133. },
  1134. {
  1135. touxiang: "#4D91F6",
  1136. bg: "#F1F7FF"
  1137. },
  1138. {
  1139. touxiang: "#FF8A00",
  1140. bg: "rgba(255, 138, 0, 0.1)"
  1141. },
  1142. {
  1143. touxiang: "#25C8B4",
  1144. bg: "#D3F4F0"
  1145. },
  1146. {
  1147. touxiang: "#AD44DE",
  1148. bg: "#EFDAF8"
  1149. },
  1150. {
  1151. touxiang: "#CD003E",
  1152. bg: "#F5CCD8"
  1153. },
  1154. {
  1155. touxiang: "#FF4980",
  1156. bg: "#FFDBE6"
  1157. },
  1158. {
  1159. touxiang: "#FAFF00",
  1160. bg: "#FEFFCC"
  1161. },
  1162. {
  1163. touxiang: "#94C748",
  1164. bg: "rgba(148, 199, 72, 0.1)"
  1165. },
  1166. {
  1167. touxiang: "#E2B203",
  1168. bg: "rgba(226, 178, 3, 0.1)"
  1169. },
  1170. {
  1171. touxiang: "rgba(108, 195, 224, 1)",
  1172. bg: "rgba(108, 195, 224, 0.1)"
  1173. },
  1174. {
  1175. touxiang: "rgba(159, 143, 239, 1)",
  1176. bg: "rgba(159, 143, 239, 0.1)"
  1177. },
  1178. {
  1179. touxiang: "rgba(231, 116, 187, 1)",
  1180. bg: "rgba(231, 116, 187, 0.1)"
  1181. }
  1182. ],
  1183. chsFhList: [",", "。", "“", ":", "》", "?", "!", ";"],
  1184. noFont: ["~", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")"], // 对应不要拼音字体
  1185. idArr: [], // 当前的pid
  1186. oldCurrentTreeID: "",
  1187. refresh: true,
  1188. preClick: false, // 上一页是否可点
  1189. nextClick: false, // 下一页是否可点
  1190. answerTime: 0,
  1191. answerTimeInterval: null, // 计时器
  1192. groupIndexList: [], // 勾选groupid数组
  1193. groupCheckList: [], // checkbox 是否选中
  1194. judgeAnswersList: [],
  1195. visiblePreviewDialog: false,
  1196. titleChsFhList: [",", "”", "。", ":", "》", "?", "!", ";"],
  1197. checkAllNPC: false,
  1198. isIndeterminate: false,
  1199. NpcNewWordMp3: "",
  1200. isPhone: false // 是否是移动端打开
  1201. };
  1202. },
  1203. computed: {
  1204. transScale() {
  1205. return function() {
  1206. let width = window.innerWidth;
  1207. let styleConfig = {
  1208. transform: "scale(" + width / 860 + ")"
  1209. };
  1210. return styleConfig;
  1211. };
  1212. }
  1213. },
  1214. watch: {
  1215. context: {
  1216. handler(val, oldVal) {
  1217. const _this = this;
  1218. _this.refresh = false;
  1219. if (val) {
  1220. _this.initContextData();
  1221. if (_this.FatherTreeData) {
  1222. _this.idArr = [];
  1223. _this.FatherTreeData.forEach((item, itemIndex) => {
  1224. this.seekCurrentTree(item);
  1225. });
  1226. }
  1227. _this.handleTitleData();
  1228. if (_this.queIndex == _this.queTotal - 1) {
  1229. this.idArr.forEach((item, i) => {
  1230. if (item == _this.currentTreeID) {
  1231. if (i == 0) {
  1232. _this.preClick = false;
  1233. _this.nextClick = true;
  1234. } else if (i == this.idArr.length - 1) {
  1235. _this.nextClick = false;
  1236. _this.preClick = true;
  1237. } else {
  1238. _this.nextClick = true;
  1239. _this.preClick = true;
  1240. }
  1241. }
  1242. });
  1243. }
  1244. _this.$nextTick(() => {
  1245. // 重新渲染组件
  1246. _this.refresh = true;
  1247. });
  1248. }
  1249. },
  1250. // 深度观察监听
  1251. deep: true
  1252. }
  1253. },
  1254. // 生命周期 - 创建完成(可以访问当前this实例)
  1255. created() {
  1256. console.log("2024-05-27");
  1257. const regExp = /Android|webOS|iPhone|BlackBerry|IEMobile|Opera Mini/i;
  1258. this.isPhone = regExp.test(navigator.userAgent);
  1259. },
  1260. // 生命周期 - 挂载完成(可以访问DOM元素)
  1261. mounted() {
  1262. const _this = this;
  1263. if (_this.context) {
  1264. _this.initContextData();
  1265. _this.handleTitleData();
  1266. }
  1267. if (_this.FatherTreeData) {
  1268. _this.idArr = [];
  1269. _this.FatherTreeData.forEach((item, itemIndex) => {
  1270. this.seekCurrentTree(item);
  1271. });
  1272. if (_this.queIndex == _this.queTotal - 1) {
  1273. this.idArr.forEach((item, i) => {
  1274. if (item == _this.currentTreeID) {
  1275. if (i == 0) {
  1276. _this.preClick = false;
  1277. _this.nextClick = true;
  1278. } else if (i == this.idArr.length - 1) {
  1279. _this.nextClick = false;
  1280. _this.preClick = true;
  1281. } else {
  1282. _this.nextClick = true;
  1283. _this.preClick = true;
  1284. }
  1285. }
  1286. });
  1287. }
  1288. }
  1289. },
  1290. beforeCreate() {}, // 生命周期 - 创建之前
  1291. beforeMount() {}, // 生命周期 - 挂载之前
  1292. beforeUpdate() {}, // 生命周期 - 更新之前
  1293. updated() {}, // 生命周期 - 更新之后
  1294. beforeDestroy() {}, // 生命周期 - 销毁之前
  1295. destroyed() {}, // 生命周期 - 销毁完成
  1296. activated() {},
  1297. // 方法集合
  1298. methods: {
  1299. // 处理数据
  1300. handleTitleData() {
  1301. let _this = this;
  1302. let curQue = JSON.parse(JSON.stringify(this.cur));
  1303. if (curQue.detailList) {
  1304. curQue.detailList.forEach((dItem, dIndex) => {
  1305. let paraArr = [];
  1306. if (dItem.detail) {
  1307. dItem.detail.wordsList.forEach((sItem, sIndex) => {
  1308. let obj = {
  1309. pinyin: sItem.pinyin,
  1310. chs: sItem.chs,
  1311. isShow: true
  1312. };
  1313. paraArr.push(obj);
  1314. });
  1315. this.$set(_this.cur.detailList[dIndex].detail, "resArr", paraArr);
  1316. }
  1317. });
  1318. }
  1319. },
  1320. initContextData() {
  1321. const _this = this;
  1322. // _this.$root.isRecording = false;
  1323. _this.checkAllNPC = false;
  1324. _this.contextData = JSON.parse(JSON.stringify(_this.context));
  1325. _this.queIndex = 0;
  1326. _this.NNPENewWordList = [];
  1327. _this.NNPENewPhraseList = [];
  1328. _this.NNPEAnnotationList = [];
  1329. _this.watchIndex = _this.queIndex + new Date().getTime();
  1330. this.groupCheckList = [];
  1331. let selectGropuIdList = this.previewGroupId
  1332. ? JSON.parse(this.previewGroupId)
  1333. : [];
  1334. this.groupCheckList = [];
  1335. if (_this.contextData) {
  1336. // const list = _this.contextData;
  1337. // if (list && list.length > 0) {
  1338. // _this.queList = list;
  1339. // _this.cur = list[_this.queIndex];
  1340. _this.queTotal = 1;
  1341. // _this.cur.cur_fn_data.forEach((item) => {
  1342. // item.table_list.forEach((items) => {
  1343. // items.forEach((itemss) => {
  1344. // if (itemss.data && itemss.data.type == "NewWord_chs") {
  1345. // _this.NNPENewWordList = _this.NNPENewWordList.concat(
  1346. // itemss.data.option
  1347. // );
  1348. // } else if (itemss.data && itemss.data.type == "notes_chs") {
  1349. // _this.NNPEAnnotationList = _this.NNPEAnnotationList.concat(
  1350. // itemss.data.option
  1351. // );
  1352. // }
  1353. // });
  1354. // });
  1355. // });
  1356. // }
  1357. _this.cur = _this.contextData;
  1358. _this.cur.cur_fn_data.forEach((item, index) => {
  1359. if (item.hasOwnProperty("z_title_detail")) {
  1360. if (item.z_title_detail.wordsList.length > 0) {
  1361. item.z_title_detail.wordsList.forEach((sItem, sIndex) => {
  1362. this.mergeWordSymbol(sItem);
  1363. sItem.fontColor =
  1364. this.themeColor === "green"
  1365. ? "#24b99e"
  1366. : this.themeColor === "brown"
  1367. ? "#bd8865"
  1368. : "#e35454";
  1369. sItem.fontSize = "16px";
  1370. sItem.fontWeight = "bold";
  1371. });
  1372. }
  1373. this.$set(item.z_title_detail, "config", {
  1374. fontColor:
  1375. this.themeColor === "green"
  1376. ? "#24b99e"
  1377. : this.themeColor === "brown"
  1378. ? "#bd8865"
  1379. : "#e35454",
  1380. fontFamily:
  1381. "Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, sans-serif, alabo",
  1382. fontSize: "16px",
  1383. fontWeight: "bold"
  1384. });
  1385. }
  1386. if (item.hasOwnProperty("f_title_detail")) {
  1387. if (item.f_title_detail.wordsList.length > 0) {
  1388. item.f_title_detail.wordsList.forEach((sItem, sIndex) => {
  1389. this.mergeWordSymbol(sItem);
  1390. sItem.fontColor = "#000000";
  1391. sItem.fontSize = "16px";
  1392. });
  1393. }
  1394. this.$set(item.f_title_detail, "config", {
  1395. fontColor: "#000000",
  1396. fontFamily:
  1397. "Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif",
  1398. fontSize: "16px"
  1399. });
  1400. }
  1401. if (item.hasOwnProperty("l_title_detail")) {
  1402. if (item.l_title_detail.wordsList.length > 0) {
  1403. item.l_title_detail.wordsList.forEach((sItem, sIndex) => {
  1404. this.mergeWordSymbol(sItem);
  1405. sItem.fontColor = "#000000";
  1406. sItem.fontSize = "16px";
  1407. });
  1408. }
  1409. this.$set(item.l_title_detail, "config", {
  1410. fontColor: "#000000",
  1411. fontFamily:
  1412. "Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, sans-serif, alabo",
  1413. fontSize: "16px"
  1414. });
  1415. }
  1416. this.groupCheckList.push(false);
  1417. selectGropuIdList.forEach(itemId => {
  1418. itemId.forEach(itemIds => {
  1419. if (item.group_id && itemIds.indexOf(item.group_id[0]) > -1) {
  1420. item.previewShow = true;
  1421. }
  1422. });
  1423. });
  1424. item.showSubmit = false;
  1425. item.table_list.forEach((items, indexs) => {
  1426. items.forEach((itemss, indexss) => {
  1427. if (itemss.data && itemss.type) {
  1428. if (
  1429. (this.previewType &&
  1430. this.previewType == "previewCheckShow" &&
  1431. (JSON.parse(this.previewGroupId).length == 0 ||
  1432. this.previewGroupId.indexOf(item.group_id[0]) > -1)) ||
  1433. !this.previewType
  1434. ) {
  1435. if (
  1436. itemss.type != "article_chs" &&
  1437. itemss.type != "NewWord_chs" &&
  1438. itemss.type != "dialogue_article_chs" &&
  1439. itemss.type != "notes_chs" &&
  1440. itemss.type != "voice_matrix" &&
  1441. itemss.type != "upload_control_chs" &&
  1442. itemss.type != "upload_control_preview_chs" &&
  1443. itemss.type != "record_control_mini" &&
  1444. itemss.type != "record_control_normal" &&
  1445. itemss.type != "record_control_pro" &&
  1446. itemss.type != "record_control_promax" &&
  1447. itemss.type != "text_problem_chs" &&
  1448. itemss.type != "newWord_preview_chs" &&
  1449. itemss.type != "CourseStart_chs" &&
  1450. itemss.type != "tinydemo_chs" &&
  1451. itemss.type != "video_chs" &&
  1452. itemss.type != "play_record_chs" &&
  1453. itemss.type != "upload_pdf_chs" &&
  1454. itemss.type != "options_list_chs" &&
  1455. itemss.type != "sentence_listen_read_chs" &&
  1456. itemss.type != "imgage_image" &&
  1457. itemss.type != "checkbox_self_assessment_chs"
  1458. ) {
  1459. setTimeout(() => {
  1460. let BookanswerStr = JSON.stringify(
  1461. itemss.data.Bookanswer
  1462. );
  1463. let errReg = /\[JUDGE##F##JUDGE\]/g;
  1464. if (errReg.test(BookanswerStr)) {
  1465. item.showSubmit = true;
  1466. }
  1467. this.$forceUpdate();
  1468. }, 100);
  1469. }
  1470. }
  1471. // else if (
  1472. // !this.previewType ||
  1473. // this.previewType != "previewCheckShow"
  1474. // ) {
  1475. // item.showSubmit = true;
  1476. // }
  1477. }
  1478. if (itemss.data && itemss.data.type == "NewWord_chs") {
  1479. _this.NpcNewWordMp3 =
  1480. itemss.data && itemss.data.mp3_list && itemss.data.mp3_list[0]
  1481. ? itemss.data.mp3_list[0].id
  1482. : "";
  1483. itemss.data.option.forEach(itemso => {
  1484. itemso.forEach(itemsos => {
  1485. itemsos.newWordMp3 = _this.NpcNewWordMp3;
  1486. });
  1487. });
  1488. _this.NNPENewWordList = _this.NNPENewWordList.concat(
  1489. itemss.data.option
  1490. );
  1491. } else if (itemss.data && itemss.data.type == "notes_chs") {
  1492. _this.NNPEAnnotationList = _this.NNPEAnnotationList.concat(
  1493. itemss.data.option
  1494. );
  1495. }
  1496. let Bookanswer = this.bookAnswerContent;
  1497. if (Bookanswer) {
  1498. if (this.TaskModel == "ANSWER") {
  1499. let token = getToken();
  1500. let roleAnswer = "studentAnswer";
  1501. if (token) {
  1502. let userInfor = JSON.parse(token);
  1503. let user_type = userInfor.user_type;
  1504. if (user_type == "TEACHER") {
  1505. roleAnswer = "studentAnswer";
  1506. } else {
  1507. roleAnswer = "userAnswer";
  1508. }
  1509. }
  1510. _this.judgeAnswersList = [roleAnswer, "standardAnswer"];
  1511. } else {
  1512. _this.judgeAnswersList = [""];
  1513. }
  1514. let answerData = JSON.parse(Bookanswer);
  1515. if (answerData && itemss.data) {
  1516. let BookanswerRes =
  1517. answerData.length > 0 &&
  1518. answerData[index].table_list &&
  1519. answerData[index].table_list.length > 0 &&
  1520. answerData[index].table_list[indexs].length > 0 &&
  1521. answerData[index].table_list[indexs][indexss].data
  1522. ? answerData[index].table_list[indexs][indexss].data
  1523. .Bookanswer
  1524. : [];
  1525. _this.$set(itemss.data, "Bookanswer", BookanswerRes);
  1526. }
  1527. } else {
  1528. _this.judgeAnswersList = [""];
  1529. }
  1530. });
  1531. });
  1532. item.ShowstandardAnswer = Boolean(
  1533. JSON.stringify(item.table_list).match(/\[JUDGE##F##JUDGE\]/g)
  1534. );
  1535. });
  1536. }
  1537. this.$forceUpdate();
  1538. },
  1539. // 词和标点合一起
  1540. mergeWordSymbol(sItem) {
  1541. if (this.titleChsFhList.indexOf(sItem.chs) > -1) {
  1542. sItem.isShow = false;
  1543. } else {
  1544. sItem.isShow = true;
  1545. }
  1546. },
  1547. // 上一页
  1548. handleNNPEprev() {
  1549. let _this = this;
  1550. _this.puaseAudio();
  1551. if (_this.queIndex == 0) {
  1552. this.idArr.forEach((item, i) => {
  1553. if (item == _this.currentTreeID) {
  1554. if (i == 0) {
  1555. _this.preClick = false;
  1556. _this.nextClick = true;
  1557. } else {
  1558. _this.changeId(this.idArr[i - 1]);
  1559. _this.preClick = true;
  1560. _this.nextClick = true;
  1561. }
  1562. }
  1563. });
  1564. } else {
  1565. _this.queIndex -= 1;
  1566. _this.watchIndex = _this.queIndex + new Date().getTime();
  1567. _this.cur = _this.queList[_this.queIndex];
  1568. }
  1569. },
  1570. // 递归寻找相同的目录并保存目录的pid
  1571. seekCurrentTree(item) {
  1572. if (item.is_courseware == "true") {
  1573. this.idArr.push(item.id);
  1574. }
  1575. if (item.children) {
  1576. item.children.forEach((it, index) => {
  1577. if (it.is_courseware == "true") {
  1578. this.idArr.push(it.id);
  1579. }
  1580. if (it.children) {
  1581. this.seekCurrentTree(it);
  1582. }
  1583. });
  1584. }
  1585. },
  1586. puaseAudio() {
  1587. let audio = document.getElementsByTagName("audio");
  1588. if (
  1589. audio &&
  1590. audio.length > 0 &&
  1591. window.location.href.indexOf("GCLS-Learn") == -1
  1592. ) {
  1593. audio.forEach(item => {
  1594. item.pause();
  1595. });
  1596. }
  1597. let video = document.getElementsByTagName("video");
  1598. if (
  1599. video &&
  1600. video.length > 0 &&
  1601. window.location.href.indexOf("GCLS-Learn") == -1
  1602. ) {
  1603. video.forEach(item => {
  1604. item.pause();
  1605. });
  1606. }
  1607. },
  1608. // 下一页
  1609. handleNNPEnext() {
  1610. const _this = this;
  1611. _this.puaseAudio();
  1612. if (_this.queIndex == _this.queTotal - 1) {
  1613. this.idArr.forEach((item, i) => {
  1614. if (item == _this.currentTreeID) {
  1615. if (i == this.idArr.length - 1) {
  1616. _this.nextClick = false;
  1617. _this.preClick = true;
  1618. } else {
  1619. _this.changeId(this.idArr[i + 1]);
  1620. _this.nextClick = true;
  1621. _this.preClick = true;
  1622. }
  1623. }
  1624. });
  1625. } else {
  1626. _this.queIndex += 1;
  1627. _this.watchIndex = _this.queIndex + new Date().getTime();
  1628. _this.cur = _this.queList[_this.queIndex];
  1629. }
  1630. },
  1631. submitUserAnswerNPC() {
  1632. this.handleAnswerTimeEnd();
  1633. let contextDataStr = JSON.stringify(this.contextData);
  1634. if (!contextDataStr) {
  1635. return;
  1636. }
  1637. let userErrorNumberTotal = 0;
  1638. let userRightNumberTotal = 0;
  1639. let errReg = /\[JUDGE##F##JUDGE\]/g;
  1640. let rightReg = /\[JUDGE##T##JUDGE\]/g;
  1641. if (errReg.test(contextDataStr)) {
  1642. let errorArr = contextDataStr.match(/\[JUDGE##F##JUDGE\]/g);
  1643. userErrorNumberTotal = errorArr.length;
  1644. }
  1645. if (rightReg.test(contextDataStr)) {
  1646. let rightArr = contextDataStr.match(/\[JUDGE##T##JUDGE\]/g);
  1647. userRightNumberTotal = rightArr.length;
  1648. }
  1649. let contextData = JSON.parse(contextDataStr);
  1650. let result = [];
  1651. contextData.cur_fn_data.forEach((item, index) => {
  1652. result[index] = {
  1653. table_list: []
  1654. };
  1655. item.table_list.forEach((items, indexs) => {
  1656. result[index].table_list[indexs] = [];
  1657. items.forEach((itemss, indexss) => {
  1658. if (itemss.data) {
  1659. let Bookanswer = itemss.data.Bookanswer;
  1660. let obj = {
  1661. data: {
  1662. Bookanswer
  1663. }
  1664. };
  1665. result[index].table_list[indexs][indexss] = obj;
  1666. } else {
  1667. result[index].table_list[indexs][indexss] = {
  1668. data: null
  1669. };
  1670. }
  1671. });
  1672. });
  1673. });
  1674. this.$emit(
  1675. "finishTaskMaterial",
  1676. JSON.stringify(result),
  1677. this.answerTime,
  1678. userRightNumberTotal,
  1679. userErrorNumberTotal
  1680. );
  1681. },
  1682. // 开始计算答题用时
  1683. handleAnswerTimeStart() {
  1684. this.answerTime = 0;
  1685. window.clearInterval(this.answerTimeInterval);
  1686. this.answerTimeInterval = window.setInterval(() => {
  1687. this.answerTime++;
  1688. }, 1000);
  1689. },
  1690. // 结束计算答题用时
  1691. handleAnswerTimeEnd() {
  1692. window.clearInterval(this.answerTimeInterval);
  1693. },
  1694. // 提交选中groupid
  1695. submitPreviewGroupId() {
  1696. return JSON.stringify(this.groupIndexList);
  1697. },
  1698. forupdata(indexI, type) {
  1699. if (type === "all") {
  1700. this.groupIndexList = [];
  1701. this.cur.cur_fn_data.forEach((item, index) => {
  1702. this.groupIndexList.push(this.cur.cur_fn_data[index].group_id);
  1703. });
  1704. } else if (
  1705. this.groupIndexList
  1706. .toString()
  1707. .indexOf(this.cur.cur_fn_data[indexI].group_id.toString()) == -1
  1708. ) {
  1709. this.groupIndexList.push(this.cur.cur_fn_data[indexI].group_id);
  1710. } else {
  1711. this.groupIndexList.forEach((items, indexs) => {
  1712. if (
  1713. items.toString() == this.cur.cur_fn_data[indexI].group_id.toString()
  1714. ) {
  1715. this.groupIndexList.splice(indexs, 1);
  1716. return false;
  1717. }
  1718. });
  1719. }
  1720. this.groupCheckList.forEach((item, index) => {
  1721. this.groupCheckList[index] = false;
  1722. });
  1723. if (type === "all") {
  1724. } else {
  1725. this.isIndeterminate = false;
  1726. }
  1727. this.checkAllNPC =
  1728. this.groupIndexList.length === this.cur.cur_fn_data.length;
  1729. this.cur.cur_fn_data.forEach((item, index) => {
  1730. if (
  1731. this.groupIndexList.toString().indexOf(item.group_id.toString()) > -1
  1732. ) {
  1733. this.groupCheckList[index] = true;
  1734. if (type === "all") {
  1735. } else {
  1736. this.isIndeterminate = true;
  1737. }
  1738. }
  1739. });
  1740. this.$forceUpdate();
  1741. },
  1742. submitLookAnswer(ItemIndex) {
  1743. let contextData = this.contextData;
  1744. contextData.cur_fn_data.forEach((item, index) => {
  1745. if (index == ItemIndex) {
  1746. item.showPreview = true;
  1747. } else {
  1748. item.showPreview = false;
  1749. }
  1750. });
  1751. this.visiblePreviewDialog = true;
  1752. // this.submitUserAnswerNPC();
  1753. },
  1754. handleCheckAllChangeNPC(val) {
  1755. if (val) {
  1756. this.forupdata("", "all");
  1757. } else {
  1758. this.groupCheckList.forEach((item, index) => {
  1759. this.groupCheckList[index] = false;
  1760. });
  1761. this.groupIndexList = [];
  1762. this.isIndeterminate = false;
  1763. }
  1764. }
  1765. } // 如果页面有keep-alive缓存功能,这个函数会触发
  1766. };
  1767. </script>
  1768. <style lang="scss" scoped>
  1769. //@import url(); 引入公共css类
  1770. .NPC-Big-Book-preview {
  1771. width: 860px;
  1772. margin: 0 auto;
  1773. position: relative;
  1774. padding-bottom: 120px;
  1775. .NNPE-title {
  1776. background: #e35454;
  1777. border-radius: 0px 0px 16px 16px;
  1778. padding: 7px 24px;
  1779. position: relative;
  1780. height: 64px;
  1781. display: flex;
  1782. align-items: center;
  1783. &.NNPE-title-gray {
  1784. background: #eeeeee;
  1785. border-radius: 0;
  1786. margin-top: 24px;
  1787. .NNPE-operate {
  1788. position: absolute;
  1789. top: 10px;
  1790. right: 20px;
  1791. a {
  1792. background: #fff url("../../assets/newImage/common/btn-pre-black.png")
  1793. center no-repeat;
  1794. background-size: 24px;
  1795. &.btn-next {
  1796. background: #fff
  1797. url("../../assets/newImage/common/btn-next-black.png") center
  1798. no-repeat;
  1799. background-size: 24px;
  1800. }
  1801. &:hover {
  1802. background-color: #fff;
  1803. }
  1804. &:active {
  1805. background-color: #fff;
  1806. }
  1807. &.btn-prev-disabled,
  1808. &.btn-next-disabled {
  1809. background-color: rgba(0, 0, 0, 0.25);
  1810. }
  1811. }
  1812. }
  1813. }
  1814. h1 {
  1815. color: #ffffff;
  1816. font-weight: bold;
  1817. font-size: 16px;
  1818. line-height: 150%;
  1819. margin: 0;
  1820. }
  1821. .NNPE-title-left {
  1822. display: flex;
  1823. color: #ffffff;
  1824. font-size: 18px;
  1825. line-height: 18px;
  1826. align-items: center;
  1827. .NNPE-title-item {
  1828. margin-right: 12px;
  1829. width: max-content;
  1830. }
  1831. .content-con {
  1832. margin: 4px 0;
  1833. font-family: "robot";
  1834. &.hasCn,
  1835. &.hanzi {
  1836. font-family: "FZJCGFKTK";
  1837. }
  1838. &.en {
  1839. font-family: "robot";
  1840. }
  1841. }
  1842. .content-en {
  1843. font-weight: normal;
  1844. line-height: 18px;
  1845. font-family: "robot";
  1846. }
  1847. .NNPE-title-item-en {
  1848. font-weight: normal;
  1849. line-height: 12px;
  1850. font-family: "robot";
  1851. font-size: 12px;
  1852. margin: 0;
  1853. }
  1854. .con-box {
  1855. display: flex;
  1856. flex-flow: wrap;
  1857. justify-content: center;
  1858. align-items: flex-end;
  1859. .con-item {
  1860. text-align: center;
  1861. padding: 0 1px;
  1862. }
  1863. span {
  1864. display: block;
  1865. }
  1866. .pinyin {
  1867. font-family: "GB-PINYINOK-B";
  1868. font-size: 12px;
  1869. line-height: 12px;
  1870. height: 12px;
  1871. &.noFont {
  1872. font-family: initial;
  1873. }
  1874. }
  1875. .synthesis-box {
  1876. display: flex;
  1877. }
  1878. }
  1879. }
  1880. }
  1881. .NNPE-operate {
  1882. position: absolute;
  1883. top: 10px;
  1884. right: 20px;
  1885. a {
  1886. background: #e35454 url("../../assets/newImage/common/btn-pre.png") center
  1887. no-repeat;
  1888. background-size: 24px;
  1889. border-radius: 4px;
  1890. width: 44px;
  1891. height: 44px;
  1892. display: inline-block;
  1893. margin: 0 4px;
  1894. &.btn-next {
  1895. background: #e35454 url("../../assets/newImage/common/btn-next.png")
  1896. center no-repeat;
  1897. background-size: 24px;
  1898. }
  1899. &:hover {
  1900. background-color: #f76565;
  1901. }
  1902. &:active {
  1903. background-color: #d24444;
  1904. }
  1905. &.btn-prev-disabled,
  1906. &.btn-next-disabled {
  1907. background-color: rgba(0, 0, 0, 0.25);
  1908. cursor: not-allowed;
  1909. }
  1910. }
  1911. }
  1912. .classTopic-box {
  1913. background: #e35454;
  1914. border-radius: 8px;
  1915. width: 780px;
  1916. margin: 24px auto 0 auto;
  1917. text-align: center;
  1918. padding: 8px 24px;
  1919. span {
  1920. font-size: 16px;
  1921. line-height: 150%;
  1922. color: #ffffff;
  1923. padding: 0 1px;
  1924. &.cn {
  1925. font-family: "FZJCGFKTK";
  1926. }
  1927. &.en {
  1928. font-family: "robot";
  1929. }
  1930. &.pinyin {
  1931. font-family: "GB-PINYINOK-B";
  1932. }
  1933. }
  1934. }
  1935. .NNPE-Book-content-inner {
  1936. padding: 0 40px;
  1937. .NNPE-Book-content-item {
  1938. position: relative;
  1939. }
  1940. .NNPE-Book-content-item-checkbox {
  1941. position: absolute;
  1942. left: -30px;
  1943. top: 36px;
  1944. }
  1945. > div.title-box-preview {
  1946. padding-top: 32px;
  1947. .title-big {
  1948. display: flex;
  1949. b {
  1950. min-width: 39px;
  1951. height: 24px;
  1952. background: #e35454;
  1953. border-radius: 8px;
  1954. color: #ffffff;
  1955. font-family: "robot";
  1956. display: inline-block;
  1957. text-align: center;
  1958. font-size: 16px;
  1959. line-height: 150%;
  1960. margin-right: 12px;
  1961. padding: 0 4px;
  1962. }
  1963. h2 {
  1964. color: #e35454;
  1965. font-size: 16px;
  1966. line-height: 150%;
  1967. font-weight: bold;
  1968. white-space: pre-wrap;
  1969. word-break: break-word;
  1970. margin: 0;
  1971. }
  1972. h3 {
  1973. color: #000000;
  1974. font-size: 16px;
  1975. line-height: 150%;
  1976. font-weight: normal;
  1977. margin: 0;
  1978. white-space: pre-wrap;
  1979. word-break: break-word;
  1980. }
  1981. .title-box-right-index {
  1982. padding-left: 51px;
  1983. }
  1984. }
  1985. .title-little {
  1986. display: flex;
  1987. margin-bottom: 24px;
  1988. &.marginTop {
  1989. margin-top: 24px;
  1990. }
  1991. &.marginTop-8 {
  1992. margin-top: 8px;
  1993. }
  1994. b,
  1995. p {
  1996. color: #000000;
  1997. font-size: 16px;
  1998. line-height: 150%;
  1999. font-weight: normal;
  2000. margin: 0;
  2001. white-space: pre-wrap;
  2002. word-break: break-word;
  2003. padding-right: 3px;
  2004. }
  2005. }
  2006. }
  2007. .NNPE-tableList {
  2008. background: #fff;
  2009. border-radius: 8px;
  2010. // padding: 12px 8px;
  2011. &.NNPE-tableList-hasBg {
  2012. background: #f7f7f7;
  2013. border: 1px solid rgba(0, 0, 0, 0.1);
  2014. box-sizing: border-box;
  2015. border-radius: 8px;
  2016. }
  2017. .NNPE-tableList-tr {
  2018. display: flex;
  2019. justify-content: space-between;
  2020. // flex-flow: wrap;
  2021. .NNPE-tableList-item {
  2022. width: 100%;
  2023. // margin: 12px 16px;
  2024. // padding: 16px;
  2025. // background: #FFFFFF;
  2026. // border-radius: 4px;
  2027. display: flex;
  2028. flex-flow: wrap;
  2029. justify-content: center;
  2030. &.NNPE-tableList-item-noMargin {
  2031. margin: 0;
  2032. }
  2033. &.NNPE-tableList-item2 {
  2034. width: 378px;
  2035. }
  2036. &.NNPE-tableList-item3 {
  2037. width: 244px;
  2038. }
  2039. &.NNPE-tableList-item4 {
  2040. width: 195px;
  2041. }
  2042. }
  2043. }
  2044. }
  2045. }
  2046. .submitAnswer {
  2047. width: 160px;
  2048. height: 44px;
  2049. border-radius: 4px;
  2050. font-size: 16px;
  2051. line-height: 44px;
  2052. text-align: center;
  2053. font-family: robot;
  2054. background: #e35454;
  2055. color: #fff;
  2056. margin-left: 16px;
  2057. &:hover {
  2058. background-color: #f76565;
  2059. }
  2060. &:active {
  2061. background-color: #d24444;
  2062. }
  2063. }
  2064. &-phone {
  2065. width: 100%;
  2066. // transform-origin: 0 0; /* 设置变换的原点为元素的左上角 */
  2067. // transform: scale(0.6);
  2068. .classTopic-box {
  2069. width: 100%;
  2070. border-radius: 0 0 20px 20px;
  2071. margin-top: 15px;
  2072. }
  2073. .NNPE-title-top {
  2074. position: fixed;
  2075. top: 0;
  2076. left: 0;
  2077. width: 100%;
  2078. z-index: 1;
  2079. }
  2080. .NNPE-Book-content-inner {
  2081. padding: 0 10px;
  2082. }
  2083. .operater-classTopic {
  2084. width: 100%;
  2085. position: relative;
  2086. padding-top: 60px;
  2087. }
  2088. .NNPE-operate-phone {
  2089. width: 100%;
  2090. left: 0;
  2091. top: 0;
  2092. .btn-prev,
  2093. .btn-next {
  2094. position: absolute;
  2095. top: 88px;
  2096. left: 0;
  2097. // z-index: 1;
  2098. width: 20px;
  2099. height: 20px;
  2100. background-color: transparent;
  2101. }
  2102. .btn-next {
  2103. left: auto;
  2104. right: 0;
  2105. }
  2106. }
  2107. }
  2108. }
  2109. .submitLookAnswer {
  2110. color: #fff;
  2111. font-weight: 700;
  2112. font-size: 16px;
  2113. line-height: 24px;
  2114. width: 106px;
  2115. height: 40px;
  2116. background: #e35454;
  2117. border-radius: 8px;
  2118. display: inline-block;
  2119. line-height: 40px;
  2120. text-align: center;
  2121. font-family: "sourceR";
  2122. }
  2123. .NPC-Big-Book-preview-green {
  2124. .submitLookAnswer {
  2125. background: #24b99e;
  2126. }
  2127. .NNPE-title {
  2128. background: #24b99e;
  2129. }
  2130. .NNPE-operate {
  2131. a {
  2132. background: #24b99e url("../../assets/newImage/common/btn-pre.png") center
  2133. no-repeat;
  2134. background-size: 24px;
  2135. &.btn-next {
  2136. background: #24b99e url("../../assets/newImage/common/btn-next.png")
  2137. center no-repeat;
  2138. background-size: 24px;
  2139. }
  2140. &:hover {
  2141. background-color: #3dd4b8;
  2142. }
  2143. &:active {
  2144. background-color: #1fa189;
  2145. }
  2146. }
  2147. }
  2148. .submitAnswer {
  2149. background: #24b99e;
  2150. &:hover {
  2151. background-color: #3dd4b8;
  2152. }
  2153. &:active {
  2154. background-color: #1fa189;
  2155. }
  2156. }
  2157. .classTopic-box {
  2158. background: #24b99e;
  2159. }
  2160. .NNPE-Book-content-inner {
  2161. > div.title-box-preview {
  2162. .title-big {
  2163. b {
  2164. background: #24b99e;
  2165. }
  2166. h2 {
  2167. color: #24b99e;
  2168. }
  2169. }
  2170. }
  2171. }
  2172. }
  2173. .NPC-Big-Book-preview-brown {
  2174. .submitLookAnswer {
  2175. background: #bd8865;
  2176. }
  2177. .NNPE-title {
  2178. background: #bd8865;
  2179. }
  2180. .NNPE-operate {
  2181. a {
  2182. background: #bd8865 url("../../assets/newImage/common/btn-pre.png") center
  2183. no-repeat;
  2184. background-size: 24px;
  2185. &.btn-next {
  2186. background: #bd8865 url("../../assets/newImage/common/btn-next.png")
  2187. center no-repeat;
  2188. background-size: 24px;
  2189. }
  2190. &:hover {
  2191. background-color: #d6a687;
  2192. }
  2193. &:active {
  2194. background-color: #a37557;
  2195. }
  2196. }
  2197. }
  2198. .submitAnswer {
  2199. background: #bd8865;
  2200. &:hover {
  2201. background-color: #d6a687;
  2202. }
  2203. &:active {
  2204. background-color: #a37557;
  2205. }
  2206. }
  2207. .classTopic-box {
  2208. background: #bd8865;
  2209. }
  2210. .NNPE-Book-content-inner {
  2211. > div.title-box-preview {
  2212. .title-big {
  2213. b {
  2214. background: #bd8865;
  2215. }
  2216. h2 {
  2217. color: #bd8865;
  2218. }
  2219. }
  2220. }
  2221. }
  2222. }
  2223. </style>
  2224. <style lang="scss">
  2225. .NNPE-Book-content-item-checkbox {
  2226. .el-checkbox__input.is-indeterminate .el-checkbox__inner::before {
  2227. top: 9px;
  2228. }
  2229. .el-checkbox__inner {
  2230. border: 2px solid #4a99ea;
  2231. width: 24px;
  2232. height: 24px;
  2233. }
  2234. .el-checkbox__inner::after {
  2235. border-width: 2px;
  2236. height: 11px;
  2237. left: 8px;
  2238. top: 2px;
  2239. }
  2240. }
  2241. .previewDialog {
  2242. .el-dialog {
  2243. border-radius: 20px;
  2244. }
  2245. .el-dialog__body,
  2246. .el-dialog__header {
  2247. padding: 0;
  2248. }
  2249. .previewDialog-title {
  2250. padding: 26px 40px;
  2251. border-bottom: 1px solid rgba(51, 51, 51, 0.1);
  2252. position: relative;
  2253. h2 {
  2254. font-weight: 700;
  2255. font-size: 20px;
  2256. line-height: 28px;
  2257. margin: 0;
  2258. font-family: "D-DIN";
  2259. white-space: pre-wrap;
  2260. word-break: break-word;
  2261. }
  2262. a {
  2263. position: absolute;
  2264. width: 32px;
  2265. height: 32px;
  2266. right: 40px;
  2267. top: 26px;
  2268. img {
  2269. width: 100%;
  2270. height: 100%;
  2271. }
  2272. }
  2273. }
  2274. .previewDialog-content {
  2275. max-height: 70vh;
  2276. overflow-y: auto;
  2277. }
  2278. }
  2279. </style>