AnswerModel.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947
  1. <!-- -->
  2. <template>
  3. <div class="NNPE-ArticleView" v-if="curQue">
  4. <div
  5. class="aduioLine-box"
  6. v-if="
  7. curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url
  8. "
  9. >
  10. <AudioLine
  11. audioId="'answerAudio'"
  12. :mp3="curQue.mp3_list[0].url"
  13. :getCurTime="getCurTime"
  14. ref="audioLine"
  15. />
  16. </div>
  17. <template v-if="resArr.length > 0">
  18. <div class="NPC-sentences-list">
  19. <p class="notice" v-if="curQue.notice">{{ curQue.notice }}</p>
  20. <div
  21. :class="[
  22. 'NNPE-detail',
  23. item.isTitle ? 'NNPE-detail-title' : '',
  24. item.timeList.length > 0 &&
  25. curTime >= item.timeList[0].bg &&
  26. curTime <= item.timeList[item.timeList.length - 1].ed
  27. ? 'active'
  28. : '',
  29. ]"
  30. v-for="(item, index) in resArr"
  31. :key="'detail' + index"
  32. >
  33. <div :class="['article-content', isHasRemark ? 'hasRemark' : '']">
  34. <RoleChs :curRole="item.roleDetail" :type="1" />
  35. <div class="wordsList-box">
  36. <div
  37. class="roleDetail"
  38. v-if="item.roleDetail.detail.wordsList.length > 0"
  39. >
  40. <span class="pinyin">{{
  41. item.roleDetail.detail.wordsList | handlePinyin
  42. }}</span>
  43. <span class="chs">{{
  44. item.roleDetail.detail.wordsList | handleChs
  45. }}</span>
  46. </div>
  47. <div
  48. class="para-con"
  49. :style="{ background: item.roleDetail.color.bg }"
  50. >
  51. <div
  52. class="NNPE-words"
  53. v-for="(pItem, pIndex) in item.wordsList"
  54. :key="'wordsList' + pIndex"
  55. :class="[pItem.wordIndex == 0 ? 'textLeft' : 'textCenter']"
  56. >
  57. <template v-if="!pItem.width">
  58. <template v-if="pItem.isShow">
  59. <template
  60. v-if="
  61. item.wordsList[pIndex + 1] &&
  62. item.wordsList[pIndex + 1].chs &&
  63. chsFhList.indexOf(item.wordsList[pIndex + 1].chs) > -1
  64. "
  65. >
  66. <span class="NNPE-words-box">
  67. <span
  68. v-if="pyPosition == 'top'"
  69. class="NNPE-pinyin"
  70. :class="[
  71. pItem.className ? pItem.className : '',
  72. pItem.pinyin && noFont.indexOf(pItem.pinyin) > -1
  73. ? 'noFont'
  74. : '',
  75. ]"
  76. >{{ pItem.pinyin }}</span
  77. >
  78. <template v-if="!pItem.isHeng">
  79. <span
  80. class="NNPE-chs"
  81. :class="[
  82. item.timeList.length > 0 &&
  83. curTime >=
  84. item.timeList[pItem.sentIndex]
  85. .wordsResultList[pItem.wordIndex].wordBg &&
  86. curTime <= item.timeList[pItem.sentIndex].ed
  87. ? 'wordActive'
  88. : '',
  89. ]"
  90. >{{ pItem.chs }}</span
  91. >
  92. </template>
  93. <template v-else>
  94. <!-- <input
  95. v-model="pItem.answer"
  96. class="answer-input"
  97. /> -->
  98. <div class="answer-input" contenteditable="true">
  99. {{ pItem.answer }}
  100. </div>
  101. </template>
  102. <span
  103. v-if="pyPosition == 'bottom'"
  104. class="NNPE-pinyin"
  105. :class="[
  106. pItem.className ? pItem.className : '',
  107. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  108. ]"
  109. >{{ pItem.pinyin }}</span
  110. >
  111. </span>
  112. <span class="NNPE-words-box">
  113. <span
  114. v-if="pyPosition == 'top'"
  115. class="NNPE-pinyin"
  116. :class="[
  117. noFont.indexOf(
  118. item.wordsList[pIndex + 1].pinyin
  119. ) > -1
  120. ? 'noFont'
  121. : '',
  122. ]"
  123. style="text-align: left"
  124. >{{ item.wordsList[pIndex + 1].pinyin }}</span
  125. >
  126. <span
  127. class="NNPE-chs"
  128. style="text-align: left"
  129. :class="[
  130. item.timeList.length > 0 &&
  131. curTime >=
  132. item.timeList[pItem.sentIndex].wordsResultList[
  133. pItem.wordIndex
  134. ].wordBg &&
  135. curTime <= item.timeList[pItem.sentIndex].ed
  136. ? 'wordActive'
  137. : '',
  138. ]"
  139. >{{ item.wordsList[pIndex + 1].chs }}</span
  140. >
  141. <span
  142. v-if="pyPosition == 'bottom'"
  143. class="NNPE-pinyin"
  144. :class="[
  145. noFont.indexOf(
  146. item.wordsList[pIndex + 1].pinyin
  147. ) > -1
  148. ? 'noFont'
  149. : '',
  150. ]"
  151. style="text-align: left"
  152. >{{ item.wordsList[pIndex + 1].pinyin }}</span
  153. >
  154. </span>
  155. </template>
  156. <!--下一个元素不是标点-->
  157. <template v-else>
  158. <span
  159. v-if="pyPosition == 'top'"
  160. class="NNPE-pinyin"
  161. :class="[
  162. pItem.padding ? 'padding' : '',
  163. pItem.className ? pItem.className : '',
  164. noFont.indexOf(item.wordsList[pIndex + 1].pinyin) >
  165. -1
  166. ? 'noFont'
  167. : '',
  168. ]"
  169. >{{ pItem.pinyin }}</span
  170. >
  171. <template v-if="!pItem.isHeng">
  172. <span
  173. v-if="pItem.chs != '#'"
  174. class="NNPE-chs"
  175. :class="[
  176. item.timeList.length > 0 &&
  177. curTime >=
  178. item.timeList[pItem.sentIndex].wordsResultList[
  179. pItem.wordIndex
  180. ].wordBg &&
  181. curTime <= item.timeList[pItem.sentIndex].ed
  182. ? 'wordActive'
  183. : '',
  184. pItem.padding ? 'padding' : '',
  185. ]"
  186. >{{ pItem.chs }}</span
  187. >
  188. </template>
  189. <template v-else>
  190. <!-- <input v-model="pItem.answer" class="answer-input" /> -->
  191. <div class="answer-input" contenteditable="true">
  192. {{ pItem.answer }}
  193. </div>
  194. </template>
  195. <span
  196. v-if="pyPosition == 'bottom'"
  197. class="NNPE-pinyin"
  198. :class="[
  199. pItem.padding ? 'padding' : '',
  200. pItem.className ? pItem.className : '',
  201. noFont.indexOf(item.wordsList[pIndex + 1].pinyin) >
  202. -1
  203. ? 'noFont'
  204. : '',
  205. ]"
  206. >{{ pItem.pinyin }}</span
  207. >
  208. </template>
  209. </template>
  210. </template>
  211. <template v-else>
  212. <span
  213. :style="{
  214. height: pItem.height + 'px',
  215. width: pItem.width + 'px',
  216. }"
  217. ></span>
  218. </template>
  219. </div>
  220. <div v-if="item.enwords" class="enwords">
  221. {{ item.enwords }}
  222. </div>
  223. </div>
  224. <div class="clearFix"></div>
  225. <div class="answer-box">
  226. <div class="input-record" v-if="item.isRecord">
  227. <Soundrecord
  228. @handleWav="handleWav"
  229. type="normal"
  230. class="normal-box"
  231. />
  232. </div>
  233. <template
  234. class="input-record"
  235. v-if="curQue.fn_list && curQue.fn_list[1].isFn"
  236. >
  237. <div class="judge-box">
  238. <a
  239. :class="[
  240. 'right-btn',
  241. Bookanswer[index] == 'right' ? 'active' : '',
  242. ]"
  243. @click="handleSelectJudge('right', index)"
  244. ></a>
  245. <a
  246. :class="[
  247. 'error-btn',
  248. Bookanswer[index] == 'error' ? 'active' : '',
  249. ]"
  250. @click="handleSelectJudge('error', index)"
  251. ></a>
  252. </div>
  253. </template>
  254. </div>
  255. </div>
  256. </div>
  257. <div
  258. class="remarkBox remark-top"
  259. v-if="
  260. item.remarkDetail &&
  261. (item.remarkDetail.chs || item.remarkDetail.en)
  262. "
  263. >
  264. <RemarkChs :remarkDetail="item.remarkDetail" />
  265. </div>
  266. </div>
  267. <!-- <div class="dia-article-record">
  268. <Soundrecord @handleWav="handleWav" type="promax" class="luyin-box" />
  269. </div> -->
  270. </div>
  271. </template>
  272. <template v-if="paraArr.length > 0">
  273. <div class="NPC-sentences-list">
  274. <p class="notice" v-if="curQue.notice">{{ curQue.notice }}</p>
  275. <div
  276. :class="['NNPE-detail', item.isTitle ? 'NNPE-detail-title' : '']"
  277. v-for="(item, index) in paraArr"
  278. :key="'detail' + index"
  279. >
  280. <div :class="['article-content', isHasRemark ? 'hasRemark' : '']">
  281. <RoleChs :curRole="item.roleDetail" :type="1" />
  282. <div class="wordsList-box">
  283. <div
  284. class="roleDetail"
  285. v-if="item.roleDetail.detail.wordsList.length > 0"
  286. >
  287. <span class="pinyin">{{
  288. item.roleDetail.detail.wordsList | handlePinyin
  289. }}</span>
  290. <span class="chs">{{
  291. item.roleDetail.detail.wordsList | handleChs
  292. }}</span>
  293. </div>
  294. <div
  295. class="para-con"
  296. :style="{ background: item.roleDetail.color.bg }"
  297. >
  298. <div
  299. class="NNPE-words"
  300. v-for="(pItem, pIndex) in item.wordsList"
  301. :key="'wordsList' + pIndex"
  302. >
  303. <template v-if="!pItem.isHeng">
  304. <span class="NNPE-para-pinyin padding">{{
  305. pItem.con
  306. }}</span>
  307. </template>
  308. <template v-else>
  309. <!-- <input v-model="pItem.answer" class="answer-input" /> -->
  310. <div class="answer-input" contenteditable="true">
  311. {{ pItem.answer }}
  312. </div>
  313. </template>
  314. </div>
  315. <div v-if="item.enwords" class="enwords">
  316. {{ item.enwords }}
  317. </div>
  318. </div>
  319. <div class="clearFix"></div>
  320. <div class="answer-box">
  321. <div class="input-record" v-if="item.isRecord">
  322. <Soundrecord
  323. @handleWav="handleWav"
  324. type="normal"
  325. class="normal-box"
  326. />
  327. </div>
  328. <template
  329. class="input-record"
  330. v-if="curQue.fn_list && curQue.fn_list[1].isFn"
  331. >
  332. <div class="judge-box">
  333. <a
  334. :class="[
  335. 'right-btn',
  336. Bookanswer[index] == 'right' ? 'active' : '',
  337. ]"
  338. @click="handleSelectJudge('right', index)"
  339. ></a>
  340. <a
  341. :class="[
  342. 'error-btn',
  343. Bookanswer[index] == 'error' ? 'active' : '',
  344. ]"
  345. @click="handleSelectJudge('error', index)"
  346. ></a>
  347. </div>
  348. </template>
  349. </div>
  350. </div>
  351. </div>
  352. <div
  353. class="remarkBox remark-top"
  354. v-if="
  355. item.remarkDetail &&
  356. (item.remarkDetail.chs || item.remarkDetail.en)
  357. "
  358. >
  359. <RemarkChs :remarkDetail="item.remarkDetail" />
  360. </div>
  361. </div>
  362. <!-- <div class="dia-article-record">
  363. <Soundrecord @handleWav="handleWav" type="promax" class="luyin-box" />
  364. </div> -->
  365. </div>
  366. </template>
  367. </div>
  368. </template>
  369. <script>
  370. import { timeStrToSen } from "@/utils/index";
  371. import AudioLine from "../AudioLine.vue";
  372. import RoleChs from "./RoleChs.vue";
  373. import RemarkChs from "./RemarkChs.vue";
  374. import Soundrecord from "../Soundrecord.vue";
  375. export default {
  376. name: "DialogueNormalModelChs",
  377. props: ["curQue", "pyPosition", "colorBox", "saveBookanswer", "listIndex"],
  378. components: {
  379. AudioLine,
  380. RoleChs,
  381. RemarkChs,
  382. Soundrecord,
  383. },
  384. filters: {
  385. handlePinyin(wordsList) {
  386. let str = "";
  387. wordsList.forEach((item, index) => {
  388. if (index < wordsList.length - 1) {
  389. str += item.pinyin + " ";
  390. } else {
  391. str += item.pinyin;
  392. }
  393. });
  394. return str;
  395. },
  396. handleChs(wordsList) {
  397. let str = "";
  398. wordsList.forEach((item, index) => {
  399. if (index < wordsList.length - 1) {
  400. str += item.chs + " ";
  401. } else {
  402. str += item.chs;
  403. }
  404. });
  405. return str;
  406. },
  407. },
  408. data() {
  409. return {
  410. resArr: [],
  411. curTime: 0, //单位s
  412. chsFhList: [",", "。", "“", ":", "》", "《", "?", "!", ";"],
  413. enFhList: [",", ".", ";", "?", "!", ":", ">", "<"],
  414. newWords: ["鱼", "辩礼义"],
  415. noFont: ["~", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "/"],
  416. oldHz: "",
  417. hz: "",
  418. top: 0,
  419. left: 0,
  420. articleImg: {}, // 文章图片
  421. isHasRemark: false,
  422. paraArr: [],
  423. answer: [],
  424. };
  425. },
  426. computed: {
  427. Bookanswer: function () {
  428. let arr = [];
  429. this.curQue.detail.forEach((item) => {
  430. arr.push("");
  431. });
  432. return arr;
  433. },
  434. },
  435. watch: {},
  436. //方法集合
  437. methods: {
  438. // 判断题选择
  439. handleSelectJudge(obj, index) {
  440. let _this = this;
  441. this.$set(this.Bookanswer, index, obj);
  442. this.$forceUpdate();
  443. if (_this.saveBookanswer) {
  444. _this.saveBookanswer(this.Bookanswer, this.listIndex);
  445. }
  446. },
  447. handleWav() {},
  448. getCurTime(curTime) {
  449. this.curTime = curTime * 1000;
  450. },
  451. handleData() {
  452. let resArr = [];
  453. let reg = /_{2,}/g;
  454. let leg = this.curQue.detail.length;
  455. let curQue = JSON.parse(JSON.stringify(this.curQue));
  456. curQue.detail.forEach((dItem, dIndex) => {
  457. let isRecord = 0;
  458. let roleDetail = this.getRole(dItem);
  459. let remarkDetail = dItem.remark;
  460. if (remarkDetail && (remarkDetail.chs || remarkDetail.en)) {
  461. this.isHasRemark = true;
  462. }
  463. let paraArr = [];
  464. if (dItem.wordsList && dItem.wordsList.length > 0) {
  465. dItem.wordsList.forEach((sItem, sIndex) => {
  466. sItem.forEach((wItem, wIndex) => {
  467. this.mergeWordSymbol(wItem);
  468. let obj = {
  469. paraIndex: dIndex, //段落索引
  470. sentIndex: sIndex, //在段落中句子索引
  471. wordIndex: wIndex, //单词的索引
  472. pinyin: wItem.pinyin,
  473. chs: wItem.chs,
  474. isHeng: reg.test(wItem.chs),
  475. padding: true, //wItem.padding,
  476. className: wItem.className,
  477. isShow: wItem.isShow,
  478. isNewWord: this.newWords.indexOf(wItem.chs) > -1 ? true : false,
  479. };
  480. if (obj.isHeng) {
  481. isRecord = isRecord + 1;
  482. obj.answer = "";
  483. }
  484. paraArr.push(obj);
  485. });
  486. });
  487. let curSentencesLeg = dItem.sentences.length;
  488. let startLeg = dIndex == 0 ? 0 : curQue.detail[dIndex - 1].endLeg;
  489. let endLeg = startLeg + curSentencesLeg;
  490. dItem.endLeg = endLeg;
  491. let timeList = [];
  492. if (curQue.wordTime && curQue.wordTime.length > 0) {
  493. timeList = curQue.wordTime.slice(startLeg, endLeg);
  494. }
  495. let enwords =
  496. dItem.sentencesEn && dItem.sentencesEn.length > 0
  497. ? dItem.sentencesEn.join(" ")
  498. : "";
  499. let paraObj = {
  500. wordsList: paraArr,
  501. enwords: enwords,
  502. timeList: timeList,
  503. roleDetail: roleDetail,
  504. remarkDetail: remarkDetail,
  505. isRecord: isRecord > 0 ? true : false,
  506. };
  507. resArr.push(paraObj);
  508. }
  509. });
  510. this.resArr = resArr;
  511. console.log("Normal");
  512. console.log(this.resArr);
  513. // 循环文章图片
  514. if (curQue.img_list) {
  515. curQue.img_list.forEach((item) => {
  516. this.articleImg[item.imgNumber] = item.url;
  517. });
  518. }
  519. },
  520. handlePYData() {
  521. let pararArr = [];
  522. let curQue = JSON.parse(JSON.stringify(this.curQue));
  523. curQue.detail.forEach((dItem, dIndex) => {
  524. let para = dItem.para;
  525. let paraObj = this.handlePara(para);
  526. let roleDetail = this.getRole(dItem);
  527. let remarkDetail = dItem.remark;
  528. if (remarkDetail && (remarkDetail.chs || remarkDetail.en)) {
  529. this.isHasRemark = true;
  530. }
  531. let obj = {
  532. wordsList: paraObj.wordsList,
  533. roleDetail: roleDetail,
  534. remarkDetail: remarkDetail,
  535. isRecord: paraObj.isRecord,
  536. };
  537. pararArr.push(obj);
  538. });
  539. this.paraArr = pararArr;
  540. },
  541. //词和标点合一起
  542. mergeWordSymbol(wItem) {
  543. if (this.chsFhList.indexOf(wItem.chs) > -1) {
  544. wItem.isShow = false;
  545. } else {
  546. wItem.isShow = true;
  547. }
  548. },
  549. //获取角色
  550. getRole(dItem) {
  551. let roleIndex = dItem.roleIndex;
  552. let resObj = null;
  553. let roleList = JSON.parse(JSON.stringify(this.curQue.roleList));
  554. for (let i = 0; i < roleList.length; i++) {
  555. let item = roleList[i];
  556. if (item.id == roleIndex) {
  557. resObj = item;
  558. resObj.color = this.colorBox[i];
  559. break;
  560. }
  561. }
  562. return resObj;
  563. },
  564. //判断是否有padding
  565. judgePad(sItem, wItem, curIndex) {
  566. let leg = sItem.length;
  567. if (curIndex < leg - 1) {
  568. let nextIndex = curIndex + 1;
  569. let chs = sItem[nextIndex].chs;
  570. if (
  571. this.chsFhList.indexOf(chs) > -1 ||
  572. this.chsFhList.indexOf(wItem.chs) > -1
  573. ) {
  574. wItem.padding = false;
  575. } else {
  576. wItem.padding = true;
  577. }
  578. if (this.enFhList.indexOf(wItem.pinyin) > -1) {
  579. wItem.className = "textLeft";
  580. }
  581. }
  582. },
  583. //转化时间
  584. handleTimeList(list) {
  585. let listRes = [];
  586. list.forEach((item) => {
  587. let res = timeStrToSen(item);
  588. listRes.push(res);
  589. });
  590. return listRes;
  591. },
  592. //点击播放某个句子
  593. handleChangeTime(time) {
  594. this.curTime = time;
  595. this.$refs.audioLine.onTimeupdateTime(time / 1000);
  596. },
  597. //处理数组
  598. handlePara(para) {
  599. para = para.trim();
  600. para = para.replace(/\s+/g, " ");
  601. para = para.replace(/_{2,}/g, "^ ");
  602. let paraArr = para.split(/\s/g);
  603. let resArr = [];
  604. paraArr.forEach((item, index) => {
  605. let obj = {
  606. isHeng: false,
  607. con: item,
  608. };
  609. if (item == "^") {
  610. obj.isHeng = true;
  611. obj.answer = "";
  612. }
  613. resArr.push(obj);
  614. });
  615. let isRecord = /^/g.test(para);
  616. return { wordsList: resArr, isRecord: isRecord };
  617. },
  618. },
  619. //生命周期 - 创建完成(可以访问当前this实例)
  620. created() {},
  621. //生命周期 - 挂载完成(可以访问DOM元素)
  622. mounted() {
  623. if (this.curQue) {
  624. if (this.curQue.font == "cn" || !this.curQue.font) {
  625. this.handleData();
  626. } else {
  627. this.handlePYData();
  628. }
  629. }
  630. },
  631. beforeCreate() {}, //生命周期 - 创建之前
  632. beforeMount() {}, //生命周期 - 挂载之前
  633. beforeUpdate() {}, //生命周期 - 更新之前
  634. updated() {}, //生命周期 - 更新之后
  635. beforeDestroy() {}, //生命周期 - 销毁之前
  636. destroyed() {}, //生命周期 - 销毁完成
  637. activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
  638. };
  639. </script>
  640. <style lang='scss' scoped>
  641. //@import url(); 引入公共css类
  642. .NNPE-ArticleView {
  643. width: 100%;
  644. .clearFix {
  645. clear: both;
  646. overflow: hidden;
  647. }
  648. .NPC-sentences-list {
  649. .NPC-article-empty {
  650. display: flex;
  651. justify-content: flex-start;
  652. align-items: flex-start;
  653. > div {
  654. height: 24px;
  655. &.empty-left {
  656. width: 100%;
  657. box-sizing: border-box;
  658. &.hasRemark {
  659. width: 553px;
  660. box-sizing: border-box;
  661. border-right: 1px rgba(0, 0, 0, 0.1) solid;
  662. }
  663. }
  664. &.empty-right {
  665. flex: 1;
  666. }
  667. }
  668. &-bottom {
  669. > div {
  670. height: 40px;
  671. }
  672. }
  673. }
  674. .dia-article-record {
  675. width: 100%;
  676. border-top: 1px solid rgba(0, 0, 0, 0.1);
  677. .luyin-box {
  678. justify-content: start;
  679. padding: 8px 12px;
  680. height: 40px;
  681. width: 280px;
  682. justify-content: flex-start;
  683. }
  684. }
  685. }
  686. .NNPE-detail {
  687. clear: both;
  688. overflow: hidden;
  689. display: flex;
  690. justify-content: flex-start;
  691. align-items: flex-start;
  692. &.active {
  693. background: rgba(0, 0, 0, 0.06);
  694. }
  695. .article-content {
  696. width: 100%;
  697. box-sizing: border-box;
  698. padding: 8px 24px 8px 24px;
  699. display: flex;
  700. justify-content: flex-start;
  701. align-items: flex-start;
  702. &.hasRemark {
  703. width: 553px;
  704. border-right: 1px rgba(0, 0, 0, 0.1) solid;
  705. padding: 8px 0px 8px 23px;
  706. }
  707. &.paraLast {
  708. padding-bottom: 24px;
  709. }
  710. }
  711. .NNPE-words {
  712. float: left;
  713. &-box {
  714. float: left;
  715. > span {
  716. display: block;
  717. &.NNPE-pinyin {
  718. font-family: "GB-PINYINOK-B";
  719. font-weight: normal;
  720. font-size: 14px;
  721. line-height: 22px;
  722. color: #000000;
  723. height: 21px;
  724. &.noFont {
  725. font-family: initial;
  726. }
  727. &.textLeft {
  728. text-align: left;
  729. }
  730. }
  731. &.NNPE-chs {
  732. font-family: "FZJCGFKTK";
  733. font-size: 20px;
  734. line-height: 28px;
  735. color: #000000;
  736. &.active {
  737. background: rgba(60, 200, 99, 0.2);
  738. }
  739. &.wordActive {
  740. color: #de4444;
  741. }
  742. }
  743. &.padding {
  744. padding: 0 3px;
  745. }
  746. }
  747. }
  748. &.textLeft {
  749. text-align: left;
  750. }
  751. &.textCenter {
  752. text-align: center;
  753. }
  754. > span {
  755. display: block;
  756. &.NNPE-pinyin {
  757. font-family: "GB-PINYINOK-B";
  758. font-weight: normal;
  759. font-size: 14px;
  760. line-height: 22px;
  761. color: #000000;
  762. height: 21px;
  763. &.noFont {
  764. font-family: initial;
  765. }
  766. &.textLeft {
  767. text-align: left;
  768. }
  769. }
  770. &.NNPE-chs {
  771. font-family: "FZJCGFKTK";
  772. font-size: 20px;
  773. line-height: 28px;
  774. color: #000000;
  775. &.active {
  776. background: rgba(60, 200, 99, 0.2);
  777. }
  778. &.wordActive {
  779. color: #de4444;
  780. }
  781. }
  782. &.padding {
  783. padding: 0 3px;
  784. }
  785. }
  786. .answer-input {
  787. min-height: 31px;
  788. box-sizing: border-box;
  789. border: 0;
  790. border-bottom: 1px #000 solid;
  791. background: 0 0;
  792. min-width: 100px;
  793. outline: 0;
  794. text-align: left;
  795. font-family: "FZJCGFKTK";
  796. font-size: 20px;
  797. padding: 0 10px;
  798. box-sizing: border-box;
  799. color: #000000;
  800. line-height: 150%;
  801. }
  802. }
  803. .enwords {
  804. font-family: "robot";
  805. font-weight: normal;
  806. font-size: 14px;
  807. line-height: 22px;
  808. color: rgba(0, 0, 0, 0.85);
  809. }
  810. &.NNPE-detail-title {
  811. .wordsList-box {
  812. > div {
  813. display: flex;
  814. justify-content: center;
  815. }
  816. }
  817. }
  818. .index {
  819. width: 48px;
  820. box-sizing: border-box;
  821. padding: 8px;
  822. text-align: right;
  823. border-right: 1px solid rgba(0, 0, 0, 0.1);
  824. b {
  825. font-weight: 400;
  826. color: #000000;
  827. line-height: 1.5;
  828. }
  829. }
  830. .wordsList-box {
  831. width: 100%;
  832. padding: 0px 24px 0px 8px;
  833. clear: both;
  834. overflow: hidden;
  835. .roleDetail {
  836. height: 36px;
  837. display: flex;
  838. justify-content: flex-start;
  839. align-items: center;
  840. .pinyin {
  841. font-family: "GB-PINYINOK-B";
  842. font-size: 14px;
  843. line-height: 22px;
  844. color: rgba(0, 0, 0, 0.85);
  845. margin-right: 4px;
  846. }
  847. .chs {
  848. font-family: "FZJCGFKTK";
  849. font-size: 16px;
  850. line-height: 24px;
  851. color: rgba(0, 0, 0, 0.85);
  852. }
  853. }
  854. > .para-con {
  855. float: left;
  856. border: 1px solid rgba(0, 0, 0, 0.1);
  857. box-sizing: border-box;
  858. padding: 8px 12px 8px 12px;
  859. border-radius: 8px;
  860. }
  861. > img {
  862. width: 100%;
  863. display: block;
  864. }
  865. .input-record {
  866. margin-right: 8px;
  867. .mini-box {
  868. width: 64px;
  869. border: 1px solid rgba(0, 0, 0, 0.1);
  870. border-radius: 8px;
  871. padding: 0 12px;
  872. }
  873. .normal-box {
  874. width: 129px;
  875. border: 1px solid rgba(0, 0, 0, 0.1);
  876. border-radius: 8px;
  877. padding: 0 12px;
  878. }
  879. }
  880. }
  881. }
  882. .remarkBox {
  883. flex: 1;
  884. display: flex;
  885. align-items: center;
  886. justify-content: center;
  887. &.remark72 {
  888. padding-top: 72px;
  889. }
  890. &.remark-top {
  891. padding-top: 44px;
  892. }
  893. }
  894. .NNPE-para-pinyin {
  895. font-weight: normal;
  896. font-size: 20px;
  897. line-height: 28px;
  898. color: #000000;
  899. height: 28px;
  900. }
  901. }
  902. .judge-box {
  903. display: flex;
  904. justify-content: center;
  905. a {
  906. width: 32px;
  907. height: 32px;
  908. background: #fff url("../../../../assets/newImage/common/right-btn.png")
  909. center no-repeat;
  910. background-size: 24px;
  911. border-radius: 8px;
  912. border: 1px solid rgba(0, 0, 0, 0.1);
  913. &:hover,
  914. &.active {
  915. background-color: #e5fff0;
  916. border-color: #00c850;
  917. }
  918. }
  919. a.error-btn {
  920. background: #fff url("../../../../assets/newImage/common/error-btn.png")
  921. center no-repeat;
  922. background-size: 24px;
  923. margin-left: 4px;
  924. &:hover,
  925. &.active {
  926. background-color: #ffe5e5;
  927. border-color: #de4444;
  928. }
  929. }
  930. }
  931. .answer-box {
  932. display: flex;
  933. justify-content: flex-start;
  934. align-items: center;
  935. margin-top: 8px;
  936. }
  937. </style>