Practicechs.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844
  1. <!-- -->
  2. <template>
  3. <div class="NNPE-ArticleView" v-if="curQue">
  4. <a class="ArticleView-full" @click="fullScreen">全屏模式</a>
  5. <div class="aduioLine-box aduioLine-practice">
  6. <div
  7. class="aduioLine-content"
  8. v-if="
  9. curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].id
  10. "
  11. >
  12. <AudioLine
  13. audioId="artPraAudio"
  14. :mp3="curQue.mp3_list[0].id"
  15. :getCurTime="getCurTime"
  16. ref="audioLine"
  17. :stopAudio="stopAudio"
  18. :width="555"
  19. :mp3Source="curQue.mp3_list[0].source"
  20. :ed="ed"
  21. type="audioLine"
  22. @handleChangeStopAudio="handleChangeStopAudio"
  23. @emptyEd="emptyEd"
  24. />
  25. </div>
  26. <div class="aduioLine-right">
  27. <span
  28. :class="['Repeat-16', isRepeat ? '' : 'disabled']"
  29. @click="changeRepeat"
  30. ></span>
  31. <span
  32. :class="['pinyin-16', config.isShowPY ? '' : 'disabled']"
  33. @click="changePinyin"
  34. ></span>
  35. <span
  36. :class="['EN-16', config.isShowEN ? '' : 'disabled']"
  37. @click="changeEN"
  38. ></span>
  39. </div>
  40. </div>
  41. <template v-if="resObj">
  42. <!-- -->
  43. <div class="NPC-sentences-list">
  44. <div
  45. :class="['NNPE-detail-box', sentIndex == index ? 'active' : '']"
  46. v-for="(item, index) in resObj.sentList"
  47. :key="'detail' + index"
  48. >
  49. <div
  50. :class="['NNPE-detail']"
  51. @click="
  52. handleChangeTime(
  53. curQue.wordTime &&
  54. curQue.wordTime[index] &&
  55. curQue.wordTime[index].bg,
  56. index,
  57. curQue.wordTime &&
  58. curQue.wordTime[index] &&
  59. curQue.wordTime[index].ed
  60. )
  61. "
  62. >
  63. <div
  64. class="NNPE-words"
  65. v-for="(pItem, pIndex) in item"
  66. :key="'wordsList' + pIndex"
  67. :class="[pItem.wordIndex == 0 ? 'textLeft' : 'textCenter']"
  68. >
  69. <template v-if="!pItem.width">
  70. <template v-if="pItem.isShow">
  71. <template
  72. v-if="
  73. item[pIndex + 1].chs &&
  74. chsFhList.indexOf(item[pIndex + 1].chs) > -1
  75. "
  76. >
  77. <span class="NNPE-words-box">
  78. <template v-if="curQue.pyPosition == 'top'">
  79. <span
  80. v-if="config.isShowPY"
  81. class="NNPE-pinyin"
  82. :class="[
  83. pItem.className ? pItem.className : '',
  84. sentIndex == index ? 'wordBlank' : '',
  85. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  86. ]"
  87. >{{ pItem.pinyin }}</span
  88. >
  89. </template>
  90. <span
  91. class="NNPE-chs"
  92. :class="[
  93. pItem.padding && config.isShowPY ? 'padding' : '',
  94. sentIndex == index ? 'wordBlank' : '',
  95. ]"
  96. >
  97. <template>
  98. <span
  99. v-for="(wItem, wIndex) in pItem.leg"
  100. :key="'ci' + wIndex + pIndex + index"
  101. :class="[
  102. pItem.timeList[wIndex] &&
  103. curTime >= pItem.timeList[wIndex].wordBg &&
  104. curTime <= curQue.wordTime[index].ed
  105. ? 'active'
  106. : '',
  107. sentIndex == index ? 'wordBlank' : '',
  108. ]"
  109. >{{ pItem.chs[wIndex] }}</span
  110. >
  111. </template>
  112. </span>
  113. <template v-if="curQue.pyPosition == 'bottom'">
  114. <span
  115. v-if="config.isShowPY"
  116. class="NNPE-pinyin"
  117. :class="[
  118. pItem.className ? pItem.className : '',
  119. sentIndex == index ? 'wordBlank' : '',
  120. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  121. ]"
  122. >{{ pItem.pinyin }}</span
  123. >
  124. </template>
  125. </span>
  126. <span class="NNPE-words-box">
  127. <template v-if="curQue.pyPosition == 'top'">
  128. <span
  129. v-if="config.isShowPY"
  130. :class="[
  131. 'NNPE-pinyin',
  132. sentIndex == index ? 'wordBlank' : '',
  133. noFont.indexOf(item[pIndex + 1].pinyin) > -1
  134. ? 'noFont'
  135. : '',
  136. ]"
  137. style="text-align: left"
  138. >{{ item[pIndex + 1].pinyin }}</span
  139. >
  140. </template>
  141. <span class="NNPE-chs" style="text-align: left">
  142. <span
  143. :class="[
  144. pItem.timeList[pItem.leg - 1] &&
  145. curQue.wordTime &&
  146. curTime >= pItem.timeList[pItem.leg - 1].wordBg &&
  147. curTime <= curQue.wordTime[index].ed
  148. ? 'active'
  149. : '',
  150. sentIndex == index ? 'wordBlank' : '',
  151. ]"
  152. >
  153. {{ item[pIndex + 1].chs }}</span
  154. >
  155. </span>
  156. <template v-if="curQue.pyPosition == 'bottom'">
  157. <span
  158. v-if="config.isShowPY"
  159. :class="[
  160. 'NNPE-pinyin',
  161. sentIndex == index ? 'wordBlank' : '',
  162. noFont.indexOf(item[pIndex + 1].pinyin) > -1
  163. ? 'noFont'
  164. : '',
  165. ]"
  166. style="text-align: left"
  167. >{{ item[pIndex + 1].pinyin }}</span
  168. >
  169. </template>
  170. </span>
  171. </template>
  172. <template v-else>
  173. <template v-if="curQue.pyPosition == 'top'">
  174. <span
  175. v-if="config.isShowPY"
  176. class="NNPE-pinyin"
  177. :class="[
  178. pItem.padding ? 'padding' : '',
  179. pItem.className ? pItem.className : '',
  180. sentIndex == index ? 'wordBlank' : '',
  181. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  182. ]"
  183. >{{ pItem.pinyin }}</span
  184. >
  185. </template>
  186. <span
  187. class="NNPE-chs"
  188. :class="[
  189. pItem.padding && config.isShowPY ? 'padding' : '',
  190. sentIndex == index ? 'wordBlank' : '',
  191. ]"
  192. >
  193. <template>
  194. <span
  195. v-for="(wItem, wIndex) in pItem.leg"
  196. :key="'ci' + wIndex + pIndex + index"
  197. :class="[
  198. pItem.timeList[wIndex] &&
  199. curQue.wordTime &&
  200. curQue.wordTime[index] &&
  201. curTime >= pItem.timeList[wIndex].wordBg &&
  202. curTime <= curQue.wordTime[index].ed
  203. ? 'active'
  204. : '',
  205. sentIndex == index ? 'wordBlank' : '',
  206. ]"
  207. >{{ pItem.chs[wIndex] }}</span
  208. >
  209. </template>
  210. </span>
  211. <template v-if="curQue.pyPosition == 'bottom'">
  212. <span
  213. v-if="config.isShowPY"
  214. class="NNPE-pinyin"
  215. :class="[
  216. pItem.padding ? 'padding' : '',
  217. pItem.className ? pItem.className : '',
  218. sentIndex == index ? 'wordBlank' : '',
  219. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  220. ]"
  221. >{{ pItem.pinyin }}</span
  222. >
  223. </template>
  224. </template>
  225. </template>
  226. </template>
  227. <template v-else>
  228. <span
  229. :style="{
  230. height: pItem.height + 'px',
  231. width: pItem.width + 'px',
  232. }"
  233. ></span>
  234. </template>
  235. </div>
  236. </div>
  237. <div
  238. v-show="
  239. (curQue.wordTime &&
  240. curQue.wordTime[index] &&
  241. curTime >= curQue.wordTime[index].bg &&
  242. curTime <= curQue.wordTime[index].ed) ||
  243. sentIndex == index
  244. "
  245. class="Soundrecord-content"
  246. >
  247. <div class="Soundrecord-content-inner">
  248. <Soundrecord
  249. @handleWav="handleWav"
  250. type="promax"
  251. class="luyin-box"
  252. @getWavblob="getWavblob"
  253. @handleParentPlay="handleParentPlay"
  254. @sentPause="sentPause"
  255. />
  256. <div
  257. class="compare-box"
  258. v-if="curQue.mp3_list && curQue.mp3_list.length > 0"
  259. >
  260. <Audio-compare
  261. :themeColor="themeColor"
  262. :index="index"
  263. :sentIndex="sentIndex"
  264. :url="curQue.mp3_list[0].id"
  265. :bg="curQue.wordTime[index].bg"
  266. :ed="curQue.wordTime[index].ed"
  267. :wavblob="wavblob"
  268. :getCurTime="getCurTime"
  269. :sentPause="sentPause"
  270. :isRecord="isRecord"
  271. :handleChangeStopAudio="handleChangeStopAudio"
  272. />
  273. </div>
  274. </div>
  275. <span class="full-screen-icon" @click="fullScreen"> </span>
  276. </div>
  277. </div>
  278. </div>
  279. </template>
  280. <div class="voice-full-screen" :id="'screen-' + mathNum">
  281. <Voicefullscreen
  282. v-if="isFull && resObj"
  283. :themeColor="themeColor"
  284. :curQue="curQue"
  285. :sentList="resObj.sentList"
  286. :sentIndex="sentIndex"
  287. :mp3="curQue.mp3_list[0].id"
  288. :noFont="noFont"
  289. :NNPENewWordList="NNPENewWordList"
  290. :currentTreeID="currentTreeID"
  291. :config="config"
  292. @changePinyin="changePinyin"
  293. @changeEN="changeEN"
  294. @exitFullscreen="exitFullscreen"
  295. @changeIsFull="changeIsFull"
  296. />
  297. </div>
  298. </div>
  299. </template>
  300. <script>
  301. import { timeStrToSen } from "@/utils/index";
  302. import AudioLine from "../AudioLine.vue";
  303. import Soundrecord from "../../preview/Soundrecord.vue"; // 录音模板
  304. import AudioCompare from "../AudioCompare.vue";
  305. import Voicefullscreen from "../Voicefullscreen.vue";
  306. export default {
  307. name: "ArticleView",
  308. props: [
  309. "curQue",
  310. "noFont",
  311. "themeColor",
  312. "NNPENewWordList",
  313. "currentTreeID",
  314. "config",
  315. ],
  316. components: {
  317. AudioLine,
  318. Soundrecord,
  319. AudioCompare,
  320. Voicefullscreen,
  321. },
  322. data() {
  323. return {
  324. resObj: null,
  325. curTime: 0, //单位s
  326. chsFhList: [",", "。", "“", ":", "》", "《", "?", "!", ";"],
  327. enFhList: [",", ".", ";", "?", "!", ":", ">", "<"],
  328. stopAudio: false,
  329. sentIndex: 0,
  330. isRepeat: false,
  331. currSent: null, //当前句子的时间
  332. isRecord: false,
  333. wavblob: null,
  334. isFull: false,
  335. mathNum: Math.random().toString(36).substr(2),
  336. ed: undefined,
  337. };
  338. },
  339. computed: {
  340. isPlaying: function () {
  341. let playing = false;
  342. if (this.$refs.audioLine) {
  343. playing = this.$refs.audioLine.audio.isPlaying;
  344. }
  345. return playing;
  346. },
  347. },
  348. watch: {
  349. sentIndex: {
  350. handler: function (newVal, oldVal) {
  351. if (newVal != oldVal) {
  352. this.wavblob = "";
  353. }
  354. },
  355. deep: true,
  356. },
  357. },
  358. //方法集合
  359. methods: {
  360. //拼音的显示和隐藏
  361. changePinyin() {
  362. if (this.config.isHasPY) {
  363. this.$emit("changeConfig", "isShowPY");
  364. }
  365. },
  366. // 英文的显示和隐藏
  367. changeEN() {
  368. if (this.config.isHasEN) {
  369. this.$emit("changeConfig", "isShowEN");
  370. }
  371. },
  372. pauseAudio() {
  373. let audio = document.getElementsByTagName("audio");
  374. audio.forEach((item) => {
  375. item.pause();
  376. });
  377. },
  378. //语音全屏
  379. fullScreen() {
  380. this.pauseAudio();
  381. this.isFull = true;
  382. this.goFullscreen();
  383. },
  384. goFullscreen() {
  385. let id = "screen-" + this.mathNum;
  386. var element = document.getElementById(id);
  387. if (element.requestFullscreen) {
  388. element.requestFullscreen();
  389. } else if (element.msRequestFullscreen) {
  390. element.msRequestFullscreen();
  391. } else if (element.mozRequestFullScreen) {
  392. element.mozRequestFullScreen();
  393. } else if (element.webkitRequestFullscreen) {
  394. element.webkitRequestFullscreen();
  395. }
  396. },
  397. exitFullscreen() {
  398. this.isFull = false;
  399. if (document.exitFullscreen) {
  400. document.exitFullscreen();
  401. } else if (document.msExitFullscreen) {
  402. document.msExitFullscreen();
  403. } else if (document.mozCancelFullScreen) {
  404. document.mozCancelFullScreen();
  405. } else if (document.webkitExitFullscreen) {
  406. document.webkitExitFullscreen();
  407. }
  408. },
  409. changeIsFull() {
  410. this.isFull = false;
  411. },
  412. getWavblob(wavblob) {
  413. this.wavblob = wavblob;
  414. },
  415. sentPause(isRecord) {
  416. this.isRecord = isRecord;
  417. },
  418. getCurTime(curTime) {
  419. let _this = this;
  420. if (_this.isRepeat) {
  421. let time = curTime * 1000;
  422. if (time > _this.currSent.ed || time < _this.currSent.bg) {
  423. _this.curTime = _this.currSent.bg;
  424. this.$refs.audioLine.onTimeupdateTime(_this.currSent.bg / 1000);
  425. } else {
  426. _this.curTime = curTime * 1000;
  427. }
  428. } else {
  429. _this.curTime = curTime * 1000;
  430. _this.getSentIndex(_this.curTime);
  431. }
  432. },
  433. getSentIndex(curTime) {
  434. for (let i = 0; i < this.curQue.wordTime.length; i++) {
  435. let bg = this.curQue.wordTime[i].bg;
  436. let ed = this.curQue.wordTime[i].ed;
  437. if (curTime >= bg && curTime <= ed) {
  438. this.sentIndex = i;
  439. break;
  440. }
  441. }
  442. },
  443. handleData() {
  444. let resArr = [],
  445. timeArr = [];
  446. let curQue = JSON.parse(JSON.stringify(this.curQue));
  447. let wordTimeList = curQue.wordTime;
  448. curQue.detail.forEach((dItem, dIndex) => {
  449. dItem.wordsList.forEach((sItem, sIndex) => {
  450. let sentArr = [];
  451. sItem.forEach((wItem, wIndex) => {
  452. let startIndex =
  453. wIndex == 0
  454. ? 0
  455. : sentArr[wIndex - 1].startIndex +
  456. sentArr[wIndex - 1].chs.length;
  457. let endIndex =
  458. wIndex == 0
  459. ? wItem.chs.length
  460. : sentArr[wIndex - 1].endIndex + wItem.chs.length;
  461. // this.judgePad(sItem, wItem, wIndex);
  462. this.mergeWordSymbol(sItem, wItem, wIndex);
  463. let obj = {
  464. paraIndex: dIndex, //段落索引
  465. sentIndex: sIndex, //在段落中句子索引
  466. wordIndex: wIndex, //单词的索引
  467. pinyin: wItem.pinyin,
  468. chs: wItem.chs,
  469. padding: true,
  470. className: wItem.className,
  471. isShow: wItem.isShow,
  472. startIndex: startIndex,
  473. endIndex: endIndex,
  474. leg: wItem.chs.length,
  475. timeList: [],
  476. };
  477. sentArr.push(obj);
  478. });
  479. resArr.push(sentArr);
  480. });
  481. timeArr.push(dItem.timeList);
  482. });
  483. if (wordTimeList && wordTimeList.length > 0) {
  484. this.mergeWordTime(resArr, wordTimeList);
  485. }
  486. let timeList = [];
  487. timeArr.forEach((item) => {
  488. item.forEach((aItem) => {
  489. if (timeList.indexOf(aItem) < 0) {
  490. timeList.push(aItem);
  491. }
  492. });
  493. });
  494. this.resObj = { sentList: resArr, timeList: timeList };
  495. console.log(this.resObj);
  496. },
  497. mergeWordTime(resArr, wordTimeList) {
  498. resArr.forEach((item, index) => {
  499. let wordsResultList = wordTimeList[index].wordsResultList;
  500. item.forEach((wItem) => {
  501. let startIndex = wItem.startIndex;
  502. let endIndex = wItem.endIndex;
  503. wItem.timeList = wordsResultList.slice(startIndex, endIndex);
  504. });
  505. });
  506. },
  507. //词和标点合一起
  508. mergeWordSymbol(sItem, wItem, curIndex) {
  509. let leg = sItem.length;
  510. if (curIndex < leg - 1) {
  511. let nextIndex = curIndex + 1;
  512. if (this.chsFhList.indexOf(wItem.chs) > -1) {
  513. wItem.isShow = false;
  514. } else {
  515. wItem.isShow = true;
  516. }
  517. }
  518. },
  519. //判断是否有padding
  520. judgePad(sItem, wItem, curIndex) {
  521. let leg = sItem.length;
  522. if (curIndex < leg - 1) {
  523. let nextIndex = curIndex + 1;
  524. let chs = sItem[nextIndex].chs;
  525. if (
  526. this.chsFhList.indexOf(chs) > -1 ||
  527. this.chsFhList.indexOf(wItem.chs) > -1
  528. ) {
  529. wItem.padding = false;
  530. } else {
  531. wItem.padding = true;
  532. }
  533. if (this.enFhList.indexOf(wItem.pinyin) > -1) {
  534. wItem.className = "textLeft";
  535. }
  536. }
  537. },
  538. //转化时间
  539. handleTimeList(list) {
  540. let listRes = [];
  541. list.forEach((item) => {
  542. let res = timeStrToSen(item);
  543. listRes.push(res);
  544. });
  545. return listRes;
  546. },
  547. //计算总时间
  548. countWordTime(sentArr) {
  549. let total = 0;
  550. sentArr.forEach((item) => {
  551. total += item.endTime;
  552. });
  553. return total;
  554. },
  555. //点击播放某个句子
  556. handleChangeTime(time, index, ed) {
  557. let _this = this;
  558. if (this.isRepeat) {
  559. _this.currSent = _this.curQue.wordTime[index];
  560. }
  561. _this.sentIndex = index;
  562. _this.ed = ed;
  563. if (time) {
  564. _this.curTime = time;
  565. _this.$refs.audioLine.onTimeupdateTime(time / 1000, true);
  566. }
  567. },
  568. emptyEd() {
  569. this.ed = undefined;
  570. },
  571. handleWav(data) {},
  572. // 录音时暂停音频播放
  573. handleParentPlay() {
  574. this.stopAudio = true;
  575. },
  576. // 音频播放时改变布尔值
  577. handleChangeStopAudio() {
  578. this.stopAudio = false;
  579. },
  580. // 单句是否重复播放
  581. changeRepeat() {
  582. let _this = this;
  583. _this.isRepeat = !_this.isRepeat;
  584. this.currSent = _this.curQue.wordTime[_this.sentIndex];
  585. },
  586. },
  587. //生命周期 - 创建完成(可以访问当前this实例)
  588. created() {},
  589. //生命周期 - 挂载完成(可以访问DOM元素)
  590. mounted() {
  591. if (this.curQue) {
  592. this.handleData();
  593. }
  594. },
  595. beforeCreate() {}, //生命周期 - 创建之前
  596. beforeMount() {}, //生命周期 - 挂载之前
  597. beforeUpdate() {}, //生命周期 - 更新之前
  598. updated() {}, //生命周期 - 更新之后
  599. beforeDestroy() {}, //生命周期 - 销毁之前
  600. destroyed() {}, //生命周期 - 销毁完成
  601. activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
  602. };
  603. </script>
  604. <style lang='scss' scoped>
  605. //@import url(); 引入公共css类
  606. .NNPE-ArticleView {
  607. width: 100%;
  608. position: relative;
  609. .ArticleView-full {
  610. position: absolute;
  611. top: -33px;
  612. background: url("../../../../assets/NPC/full-screen-red.png") left center
  613. no-repeat;
  614. background-size: 16px 16px;
  615. padding-left: 24px;
  616. color: #000000;
  617. font-size: 14px;
  618. line-height: 24px;
  619. font-weight: bold;
  620. left: 0;
  621. z-index: 99999;
  622. }
  623. .NPC-sentences-list {
  624. padding: 16px 0;
  625. }
  626. .aduioLine-content {
  627. flex: 1;
  628. }
  629. .NNPE-detail-box {
  630. width: 100%;
  631. box-sizing: border-box;
  632. margin-bottom: 8px;
  633. box-sizing: border-box;
  634. padding: 8px 24px 8px;
  635. &.active {
  636. background: rgba(222, 68, 68, 0.15);
  637. }
  638. }
  639. .aduioLine-practice {
  640. display: flex;
  641. justify-content: flex-start;
  642. align-items: center;
  643. .aduioLine-right {
  644. display: flex;
  645. justify-content: space-between;
  646. align-items: center;
  647. width: 92px;
  648. height: 40px;
  649. box-sizing: border-box;
  650. padding: 0 12px;
  651. border-left: 1px solid rgba(0, 0, 0, 0.1);
  652. > span {
  653. width: 16px;
  654. height: 16px;
  655. cursor: pointer;
  656. }
  657. }
  658. }
  659. .NNPE-detail {
  660. clear: both;
  661. overflow: hidden;
  662. .NNPE-words {
  663. float: left;
  664. &-box {
  665. float: left;
  666. > span {
  667. display: block;
  668. &.NNPE-pinyin {
  669. font-family: "GB-PINYINOK-B";
  670. font-weight: normal;
  671. font-size: 14px;
  672. line-height: 20px;
  673. color: rgba(0, 0, 0, 0.45);
  674. height: 20px;
  675. &.noFont {
  676. font-family: initial;
  677. }
  678. &.textLeft {
  679. text-align: left;
  680. }
  681. &.wordBlank {
  682. color: rgba(0, 0, 0, 0.85);
  683. }
  684. }
  685. &.NNPE-chs {
  686. font-family: "FZJCGFKTK";
  687. font-size: 20px;
  688. line-height: 28px;
  689. color: rgba(0, 0, 0, 0.45);
  690. .active {
  691. color: #de4444;
  692. }
  693. &.wordBlank {
  694. color: rgba(0, 0, 0, 0.85);
  695. }
  696. }
  697. // &.padding {
  698. // padding-right: 6px;
  699. // }
  700. }
  701. }
  702. &.textLeft {
  703. text-align: left;
  704. }
  705. &.textCenter {
  706. text-align: center;
  707. }
  708. > span {
  709. display: block;
  710. &.NNPE-pinyin {
  711. font-family: "GB-PINYINOK-B";
  712. font-weight: normal;
  713. font-size: 14px;
  714. line-height: 20px;
  715. color: rgba(0, 0, 0, 0.45);
  716. height: 20px;
  717. &.noFont {
  718. font-family: initial;
  719. }
  720. &.textLeft {
  721. text-align: left;
  722. }
  723. &.wordBlank {
  724. color: rgba(0, 0, 0, 0.85);
  725. }
  726. }
  727. &.NNPE-chs {
  728. font-family: "FZJCGFKTK";
  729. font-size: 20px;
  730. line-height: 28px;
  731. color: rgba(0, 0, 0, 0.45);
  732. .active {
  733. color: #de4444;
  734. }
  735. &.wordBlank {
  736. color: rgba(0, 0, 0, 0.85);
  737. }
  738. }
  739. &.padding {
  740. padding: 0 3px;
  741. }
  742. }
  743. }
  744. }
  745. .Soundrecord-content {
  746. margin-top: 8px;
  747. display: flex;
  748. justify-content: space-between;
  749. align-items: center;
  750. &-inner {
  751. display: flex;
  752. justify-content: flex-start;
  753. align-items: center;
  754. width: 304px;
  755. border-radius: 8px;
  756. background: #ffffff;
  757. padding: 4px 12px;
  758. border: 1px solid rgba(0, 0, 0, 0.1);
  759. .luyin-box {
  760. width: 280px;
  761. }
  762. .compare-box {
  763. height: 32px;
  764. display: flex;
  765. justify-content: center;
  766. align-items: center;
  767. }
  768. }
  769. .full-screen-icon {
  770. width: 16px;
  771. height: 16px;
  772. background: url("../../../../assets/NPC/full-screen-red.png") no-repeat
  773. left top;
  774. background-size: 100% 100%;
  775. cursor: pointer;
  776. }
  777. }
  778. }
  779. .NPC-Big-Book-preview-green {
  780. .NNPE-ArticleView {
  781. .NNPE-detail-box {
  782. &.active {
  783. background: rgba(36, 185, 158, 0.15);
  784. }
  785. }
  786. .NNPE-detail {
  787. .NNPE-words {
  788. &-box {
  789. > span {
  790. &.NNPE-chs {
  791. .active {
  792. color: #24b99e;
  793. }
  794. }
  795. }
  796. }
  797. > span {
  798. &.NNPE-chs {
  799. .active {
  800. color: #24b99e;
  801. }
  802. }
  803. }
  804. }
  805. }
  806. }
  807. }
  808. .NPC-Big-Book-preview-brown {
  809. .NNPE-ArticleView {
  810. .NNPE-detail-box {
  811. &.active {
  812. background: rgba(189, 136, 101, 0.15);
  813. }
  814. }
  815. .NNPE-detail {
  816. .NNPE-words {
  817. &-box {
  818. > span {
  819. &.NNPE-chs {
  820. .active {
  821. color: #bd8865;
  822. }
  823. }
  824. }
  825. }
  826. > span {
  827. &.NNPE-chs {
  828. .active {
  829. color: #bd8865;
  830. }
  831. }
  832. }
  833. }
  834. }
  835. }
  836. }
  837. </style>