AnswerModel.vue 28 KB

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