Practicechs.vue 28 KB

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