PhraseModelChs.vue 24 KB

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