index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717
  1. <!-- eslint-disable vue/no-v-html -->
  2. <template>
  3. <div class="article-preview" :style="getAreaStyle()">
  4. <SerialNumberPosition v-if="isEnable(data.property.sn_display_mode)" :property="data.property" />
  5. <div class="main">
  6. <div class="NPC-ArticleView NPC-ArticleView-container">
  7. <div class="ArticleView-header">
  8. <a class="ArticleView-full" @click="fullScreen">黑板模式</a>
  9. <div>
  10. <div
  11. v-if="
  12. (tokenData && tokenData.popedom_code_list && tokenData.popedom_code_list.indexOf(2100001) != -1) ||
  13. (tokenData && tokenData.user_type === 'APP')
  14. "
  15. class="left"
  16. :style="{ marginLeft: '104px' }"
  17. @click="submit"
  18. >
  19. <!-- <img src="@/assets/wbfx-icon.png" alt="" /> -->
  20. 文本分析
  21. </div>
  22. </div>
  23. <div class="right">
  24. <template v-if="data.property.is_enable_new_word === 'true'">
  25. <el-switch
  26. v-model="showPhrases"
  27. style="display: block"
  28. :active-color="bookInfo.theme_color"
  29. inactive-color="rgba(0,0,0,0.1)"
  30. active-text=""
  31. inactive-text="本课生词"
  32. @change="handleSwitchChange('showPractice', 'showWord')"
  33. />
  34. </template>
  35. <template v-if="data.property.is_enable_read === 'true'">
  36. <el-switch
  37. v-model="showPractice"
  38. style="display: block"
  39. :active-color="bookInfo.theme_color"
  40. inactive-color="rgba(0,0,0,0.1)"
  41. active-text=""
  42. inactive-text="语音练习"
  43. @change="handleSwitchChange('showPhrases', 'showWord')"
  44. />
  45. </template>
  46. <template v-if="data.property.is_enable_word === 'true'">
  47. <el-switch
  48. v-model="showWord"
  49. style="display: block"
  50. :active-color="bookInfo.theme_color"
  51. inactive-color="rgba(0,0,0,0.1)"
  52. active-text=""
  53. inactive-text="取词"
  54. @change="handleSwitchChange('showPhrases', 'showPractice')"
  55. />
  56. </template>
  57. </div>
  58. <!-- <div class="setting-fontsize">
  59. <a @click="handleFontsize('-')"
  60. ><img src="@/assets/newImage/common/btn-reduce.png"
  61. /></a>
  62. <img src="@/assets/newImage/common/font-size.png" />
  63. <a @click="handleFontsize('+')"
  64. ><img src="@/assets/newImage/common/btn-increase.png"
  65. /></a>
  66. </div> -->
  67. </div>
  68. <div ref="ArticleViewbody" class="ArticleView-body">
  69. <NormalModelChs
  70. v-if="!showPhrases && !showPractice && !showWord"
  71. :cur-que="data"
  72. :title-fontsize="titleFontsize"
  73. :word-fontsize="wordFontsize"
  74. :body-left="bodyLeft"
  75. :body-width="bodyWidth"
  76. :theme-color="bookInfo.theme_color"
  77. :no-font="noFont"
  78. :config="config"
  79. :NNPEAnnotationList="NNPEAnnotationList"
  80. :col-length="colLength"
  81. @changeConfig="changeConfig"
  82. />
  83. <PhraseModel
  84. v-if="showPhrases"
  85. :cur-que="data"
  86. :title-fontsize="titleFontsize"
  87. :word-fontsize="wordFontsize"
  88. :NNPENewWordList="NNPENewWordList"
  89. :theme-color="bookInfo.theme_color"
  90. :no-font="noFont"
  91. :current-tree-i-d="courseware_id"
  92. :body-left="bodyLeft"
  93. :config="config"
  94. :TaskModel="isJudgingRightWrong ? 'ANSWER' : ''"
  95. :NNPEAnnotationList="NNPEAnnotationList"
  96. :col-length="colLength"
  97. :NpcNewWordMp3="NpcNewWordMp3"
  98. @changeConfig="changeConfig"
  99. />
  100. <Practice
  101. v-if="showPractice"
  102. :cur-que="data"
  103. :title-fontsize="titleFontsize"
  104. :word-fontsize="wordFontsize"
  105. :theme-color="bookInfo.theme_color"
  106. :no-font="noFont"
  107. :NNPENewWordList="NNPENewWordList"
  108. :current-tree-i-d="courseware_id"
  109. :config="config"
  110. :TaskModel="isJudgingRightWrong ? 'ANSWER' : ''"
  111. :col-length="colLength"
  112. :NpcNewWordMp3="NpcNewWordMp3"
  113. :is-full="isFull"
  114. @changeConfig="changeConfig"
  115. />
  116. <WordModel
  117. v-if="showWord"
  118. :cur-que="data"
  119. :title-fontsize="titleFontsize"
  120. :word-fontsize="wordFontsize"
  121. :body-left="bodyLeft"
  122. :body-width="bodyWidth"
  123. :NNPENewWordList="NNPENewWordList"
  124. :theme-color="bookInfo.theme_color"
  125. :no-font="noFont"
  126. :current-tree-i-d="courseware_id"
  127. :config="config"
  128. :TaskModel="isJudgingRightWrong ? 'ANSWER' : ''"
  129. :col-length="colLength"
  130. @changeConfig="changeConfig"
  131. />
  132. </div>
  133. <div :id="'screen-' + mathNum" class="voice-full-screen">
  134. <Voicefullscreen
  135. v-if="isFull && resObj"
  136. :theme-color="bookInfo.theme_color"
  137. :cur-que="data"
  138. :sent-list="resObj.sentList"
  139. :sent-index="0"
  140. :mp3="data.mp3_list && data.mp3_list[0] ? data.mp3_list[0].url : ''"
  141. :no-font="noFont"
  142. :NNPENewWordList="NNPENewWordList"
  143. :current-tree-i-d="courseware_id"
  144. :is-full="isFull"
  145. :config="config"
  146. :TaskModel="isJudgingRightWrong ? 'ANSWER' : ''"
  147. :NpcNewWordMp3="NpcNewWordMp3"
  148. @handleWav="handleWav"
  149. @changePinyin="changePinyins"
  150. @changeEN="changeENs"
  151. @exitFullscreen="exitFullscreen"
  152. @changeIsFull="changeIsFull"
  153. />
  154. </div>
  155. </div>
  156. <template v-if="data.new_word_list.new_word_list.length > 0">
  157. <NewWordPreview :newData="data.new_word_list"></NewWordPreview>
  158. </template>
  159. <template v-if="data.other_word_list.new_word_list.length > 0">
  160. <NewWordPreview :newData="data.other_word_list"></NewWordPreview>
  161. </template>
  162. <template v-if="data.notes_list.option.length > 0">
  163. <NotesPreview :notesData="data.notes_list"></NotesPreview>
  164. </template>
  165. </div>
  166. </div>
  167. </template>
  168. <script>
  169. import { getArticleData } from '@/views/book/courseware/data/article';
  170. import PreviewMixin from '../common/PreviewMixin';
  171. import PhraseModel from './PhraseModelChs.vue';
  172. import NormalModelChs from './NormalModelChs.vue';
  173. import Practice from './Practicechs.vue'; // 语音练习模式
  174. import WordModel from './WordModelChs.vue'; // 语音练习模式
  175. import Voicefullscreen from './Voicefullscreen.vue';
  176. import { getToken } from '@/utils/auth';
  177. import { analysSubmit, GetFileURLMap } from '@/api/app';
  178. import NewWordPreview from '../new_word/NewWordPreview.vue';
  179. import NotesPreview from '../notes/NotesPreview.vue';
  180. export default {
  181. name: 'ArticlePreview',
  182. components: {
  183. NormalModelChs,
  184. Practice,
  185. WordModel,
  186. PhraseModel,
  187. Voicefullscreen,
  188. NewWordPreview,
  189. NotesPreview,
  190. },
  191. mixins: [PreviewMixin],
  192. inject: ['bookInfo'],
  193. data() {
  194. return {
  195. data: getArticleData(),
  196. showPreview: true, // 全文预览
  197. showPhrases: false, // 显示单词和短语
  198. showPractice: false, // 语音练习
  199. showWord: false, // 取词
  200. titleFontsize: 20, // 标题字号初始值
  201. wordFontsize: 16, // 文章内容字号初始值
  202. bodyLeft: 0,
  203. bodyWidth: 0,
  204. noFont: ['~', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '/'],
  205. config: {
  206. isShowEN: false,
  207. isHasEN: false,
  208. isShowPY: false,
  209. isHasPY: false,
  210. },
  211. userAnswer: {
  212. normalModel: {
  213. recordList: [],
  214. },
  215. writeModel: {}, // 生词/取词模式
  216. practiceModel: {}, // 练习模式
  217. },
  218. tokenData: getToken(),
  219. mathNum: Math.random().toString(36).substr(2),
  220. isFull: false,
  221. resObj: null,
  222. chsFhList: [',', '。', '”', ':', '》', '?', '!', ';', '、'],
  223. highWords: null,
  224. highWordsArr: [],
  225. highIndex: 0,
  226. newWordList: [],
  227. NNPEAnnotationList: [],
  228. NNPENewWordList: [],
  229. NpcNewWordMp3: [],
  230. colLength: 1,
  231. courseware_id: this.$route.params.id,
  232. };
  233. },
  234. computed: {},
  235. watch: {
  236. 'data.content': {
  237. handler(val) {
  238. if (val) {
  239. this.handleData();
  240. let _this = this;
  241. if (!this.isJudgingRightWrong) {
  242. let userAnswer = JSON.parse(JSON.stringify(_this.userAnswer));
  243. _this.$set(this.data, 'Bookanswer', userAnswer);
  244. }
  245. _this.$nextTick(() => {
  246. _this.bodyLeft = _this.$refs.ArticleViewbody.getBoundingClientRect().left;
  247. });
  248. for (let i = 0; i < this.data.detail.length; i++) {
  249. let enStr = this.data.detail[i].sentencesEn ? this.data.detail[i].sentencesEn.join('') : '';
  250. if (enStr) {
  251. this.config.isShowEN = false;
  252. this.config.isHasEN = true;
  253. }
  254. let pinyin = this.handleObj(this.data.detail[i].wordsList);
  255. if (pinyin) {
  256. this.config.isShowPY = true;
  257. this.config.isHasPY = true;
  258. }
  259. if (enStr && pinyin) {
  260. break;
  261. }
  262. }
  263. }
  264. },
  265. deep: true,
  266. immediate: true,
  267. },
  268. },
  269. created() {},
  270. methods: {
  271. changeConfig(obj) {
  272. this.config[obj] = !this.config[obj];
  273. },
  274. changeIsFull() {
  275. this.isFull = false;
  276. },
  277. // 拼音的显示和隐藏
  278. changePinyins() {
  279. if (this.config.isHasPY) {
  280. this.changeConfig('isShowPY');
  281. }
  282. },
  283. // 英文的显示和隐藏
  284. changeENs() {
  285. if (this.config.isHasEN) {
  286. this.changeConfig('isShowEN');
  287. }
  288. },
  289. // 处理字体大小
  290. handleFontsize(symbol) {
  291. if (symbol == '+') {
  292. if (this.wordFontsize < 24) {
  293. this.titleFontsize += 2;
  294. this.wordFontsize += 2;
  295. }
  296. } else if (symbol == '-') {
  297. if (this.wordFontsize > 12) {
  298. this.titleFontsize -= 2;
  299. this.wordFontsize -= 2;
  300. }
  301. }
  302. },
  303. // 切换开关
  304. handleSwitchChange(obj1, obj2) {
  305. this[obj1] = false;
  306. this[obj2] = false;
  307. this.showPreview = false;
  308. },
  309. handleObj(list) {
  310. let pinyin = '';
  311. list.forEach((item) => {
  312. item.forEach((items) => {
  313. if (items.pinyin) pinyin += items.pinyin;
  314. });
  315. });
  316. return pinyin;
  317. },
  318. submit() {
  319. let loading = this.$loading({
  320. lock: true,
  321. text: 'Loading',
  322. spinner: 'el-icon-loading',
  323. background: 'rgba(0, 0, 0, 0.7)',
  324. });
  325. analysSubmit({
  326. app_user_id: '',
  327. text: this.data.content,
  328. })
  329. .then((res) => {
  330. window.open(`${window.location.origin}/GCLS-TC/#/textanalysis/Result?id=${res.record.id}&type=文本分析`);
  331. loading.close();
  332. })
  333. .catch((res) => {
  334. loading.close();
  335. });
  336. },
  337. // 语音全屏
  338. fullScreen() {
  339. this.pauseAudio();
  340. this.pauseVideo();
  341. this.isFull = true;
  342. this.goFullscreen();
  343. },
  344. pauseAudio() {
  345. let audio = document.getElementsByTagName('audio');
  346. if (audio && audio.length > 0 && window.location.href.indexOf('GCLS-Learn') == -1 && audio.forEach) {
  347. audio.forEach((item) => {
  348. item.pause();
  349. });
  350. }
  351. },
  352. pauseVideo() {
  353. let video = document.getElementsByTagName('video');
  354. if (video && video.length > 0 && window.location.href.indexOf('GCLS-Learn') == -1 && video.forEach) {
  355. video.forEach((item) => {
  356. item.pause();
  357. });
  358. }
  359. },
  360. goFullscreen() {
  361. let id = `screen-${this.mathNum}`;
  362. let element = document.getElementById(id);
  363. if (element.requestFullscreen) {
  364. element.requestFullscreen();
  365. } else if (element.msRequestFullscreen) {
  366. element.msRequestFullscreen();
  367. } else if (element.mozRequestFullScreen) {
  368. element.mozRequestFullScreen();
  369. } else if (element.webkitRequestFullscreen) {
  370. element.webkitRequestFullscreen();
  371. }
  372. },
  373. exitFullscreen() {
  374. this.isFull = false;
  375. if (document.exitFullscreen) {
  376. document.exitFullscreen();
  377. } else if (document.msExitFullscreen) {
  378. document.msExitFullscreen();
  379. } else if (document.mozCancelFullScreen) {
  380. document.mozCancelFullScreen();
  381. } else if (document.webkitExitFullscreen) {
  382. document.webkitExitFullscreen();
  383. }
  384. },
  385. handleData() {
  386. if (this.data.mp3_list && this.data.mp3_list.length > 0) {
  387. GetFileURLMap({ file_id_list: [this.data.mp3_list[0].file_id] }).then(({ url_map }) => {
  388. this.data.mp3_list[0].url = url_map[this.data.mp3_list[0].file_id];
  389. });
  390. }
  391. this.NNPENewWordList = this.data.new_word_list_other_component_input
  392. .concat(this.data.new_word_list.new_word_list)
  393. .concat(this.data.other_word_list.new_word_list);
  394. this.NNPEAnnotationList = this.data.notes_list.option;
  395. let resArr = [];
  396. let sentArrTotal = [];
  397. let timeArr = [];
  398. let curQue = JSON.parse(JSON.stringify(this.data));
  399. let wordTimeList = curQue.wordTime;
  400. let dhaspinyin = false; // 每段是否有拼音
  401. let dhaspinyinArr = [];
  402. curQue.detail.forEach((dItem, dIndex) => {
  403. dhaspinyin = false;
  404. dItem.wordsList.forEach((sItem, sIndex) => {
  405. let sentArr = [];
  406. let sentence = dItem.sentences[sIndex];
  407. sItem.forEach((wItem, wIndex) => {
  408. let startIndex = wIndex == 0 ? 0 : sentArr[wIndex - 1].startIndex + sentArr[wIndex - 1].chs.length;
  409. let endIndex = wIndex == 0 ? wItem.chs.length : sentArr[wIndex - 1].endIndex + wItem.chs.length;
  410. // this.judgePad(sItem, wItem, wIndex);
  411. this.mergeWordSymbol(wItem);
  412. let words = '';
  413. if (this.newWordList.length > 0) {
  414. if (!this.highWords) {
  415. this.findLightWord(wItem, wIndex, sentence, sItem);
  416. words = this.highWords ? this.highWords.words : '';
  417. } else if (wIndex > this.highWords.endIndex - 1) {
  418. this.highWords = null;
  419. this.findLightWord(wItem, wIndex, sentence, sItem);
  420. words = this.highWords ? this.highWords.words : '';
  421. } else {
  422. words = this.highWords ? this.highWords.words : '';
  423. }
  424. }
  425. let obj = {
  426. paraIndex: dIndex, // 段落索引
  427. sentIndex: sIndex, // 在段落中句子索引
  428. wordIndex: wIndex, // 单词的索引
  429. pinyin: wItem.pinyin,
  430. chs: wItem.chs,
  431. padding: true,
  432. className: wItem.className,
  433. isShow: wItem.isShow,
  434. startIndex,
  435. endIndex,
  436. leg: wItem.chs.length,
  437. timeList: [],
  438. words,
  439. config: {
  440. fontFamily: wItem.fontFamily,
  441. },
  442. };
  443. sentArr.push(obj);
  444. if (wItem.pinyin) dhaspinyin = true;
  445. });
  446. let objs = {
  447. sentArr,
  448. enwords: dItem.sentencesEn && dItem.sentencesEn[sIndex] && dItem.sentencesEn[sIndex].replace(/\'/g, '’'),
  449. };
  450. sentArrTotal.push(sentArr);
  451. resArr.push(objs);
  452. });
  453. timeArr.push(dItem.timeList);
  454. dhaspinyinArr.push(dhaspinyin);
  455. });
  456. if (wordTimeList && wordTimeList.length > 0) {
  457. this.mergeWordTime(sentArrTotal, wordTimeList);
  458. }
  459. let timeList = [];
  460. timeArr.forEach((item) => {
  461. item.forEach((aItem) => {
  462. if (timeList.indexOf(aItem) < 0) {
  463. timeList.push(aItem);
  464. }
  465. });
  466. });
  467. this.resObj = {
  468. sentList: resArr,
  469. timeList,
  470. dhaspinyinArr,
  471. };
  472. },
  473. mergeWordTime(resArr, wordTimeList) {
  474. resArr.forEach((item, index) => {
  475. let wordsResultList = wordTimeList[index].wordsResultList;
  476. item.forEach((wItem) => {
  477. let startIndex = wItem.startIndex;
  478. let endIndex = wItem.endIndex;
  479. wItem.timeList = wordsResultList.slice(startIndex, endIndex);
  480. });
  481. });
  482. },
  483. findLightWord(wItem, startIndex, sentence, sItem) {
  484. let endIndex = 0;
  485. let words = '';
  486. this.newWordList.forEach((item) => {
  487. if (item.length == 1) {
  488. if (item == wItem.chs && !wItem.banLight) {
  489. words = wItem.chs;
  490. endIndex = startIndex + 1;
  491. }
  492. } else if (item[0] == wItem.chs && sentence.indexOf(item) > -1) {
  493. let index = null;
  494. let chsStr = '';
  495. for (let i = startIndex; i < sItem.length + 1; i++) {
  496. index = i;
  497. if (chsStr.length == item.length) {
  498. break;
  499. } else {
  500. chsStr += sItem[i] ? sItem[i].chs : '';
  501. }
  502. }
  503. if (chsStr == item && !wItem.banLight) {
  504. words = item;
  505. endIndex = index;
  506. }
  507. } else if (wItem.new_word && wItem.new_word == item && !wItem.banLight) {
  508. words = item;
  509. endIndex = startIndex + 1;
  510. }
  511. });
  512. if (words) {
  513. this.highWords = { words, endIndex };
  514. } else {
  515. this.highWords = null;
  516. }
  517. },
  518. // 词和标点合一起
  519. mergeWordSymbol(wItem) {
  520. if (this.chsFhList.indexOf(wItem.chs) > -1) {
  521. wItem.isShow = false;
  522. } else {
  523. wItem.isShow = true;
  524. }
  525. },
  526. handleWav(list, tmIndex) {
  527. tmIndex = tmIndex || 0;
  528. this.data.Bookanswer.practiceModel[tmIndex] = {
  529. recordList: [],
  530. };
  531. this.$set(this.data.Bookanswer.practiceModel[tmIndex], 'recordList', list);
  532. },
  533. handleNewword() {
  534. let NewWordList = [];
  535. this.NNPENewWordList.forEach((wItem) => {
  536. // item.forEach((wItem) => {
  537. if (wItem.new_word) {
  538. NewWordList.push(wItem.new_word);
  539. } else if (wItem.detail && wItem.detail.sentence) {
  540. NewWordList.push(wItem.detail.sentence);
  541. }
  542. // });
  543. });
  544. this.newWordList = JSON.parse(JSON.stringify(NewWordList));
  545. },
  546. },
  547. };
  548. </script>
  549. <style lang="scss" scoped>
  550. @use '@/styles/mixin.scss' as *;
  551. .article-preview {
  552. @include preview-base;
  553. .main {
  554. display: grid;
  555. row-gap: 24px;
  556. align-items: center;
  557. }
  558. .NPC-ArticleView {
  559. width: 100%;
  560. .ArticleView-full {
  561. position: absolute;
  562. top: 0;
  563. left: 0;
  564. z-index: 1;
  565. padding-left: 24px;
  566. font-size: 16px;
  567. font-weight: bold;
  568. line-height: 24px;
  569. color: #000;
  570. background: url('@/assets/full-screen-red.png') left center no-repeat;
  571. background-size: 20px 20px;
  572. }
  573. .ArticleView-header {
  574. position: relative;
  575. display: flex;
  576. align-items: center;
  577. justify-content: space-between;
  578. height: 24px;
  579. margin-bottom: 16px;
  580. .left {
  581. display: flex;
  582. align-items: center;
  583. justify-content: center;
  584. padding-left: 24px;
  585. font-size: 16px;
  586. font-weight: bold;
  587. line-height: 24px;
  588. cursor: pointer;
  589. background: url('@/assets/wbfx-icon.png') left center no-repeat;
  590. background-size: 20px;
  591. img {
  592. width: 20px;
  593. height: 20px;
  594. margin-right: 4px;
  595. }
  596. }
  597. .right {
  598. display: flex;
  599. }
  600. .setting-fontsize {
  601. display: flex;
  602. margin-left: 24px;
  603. a {
  604. box-sizing: border-box;
  605. display: block;
  606. width: 24px;
  607. height: 24px;
  608. border: 1px solid rgba(0, 0, 0, 10%);
  609. border-radius: 4px;
  610. }
  611. img {
  612. width: 100%;
  613. }
  614. > img {
  615. width: 24px;
  616. margin: 0 8px;
  617. }
  618. }
  619. }
  620. .ArticleView-body {
  621. box-sizing: border-box;
  622. background: #fff;
  623. border: 1px solid rgba(0, 0, 0, 10%);
  624. border-radius: 8px;
  625. .aduioLine-box {
  626. width: 100%;
  627. border-bottom: 1px solid rgba(0, 0, 0, 10%);
  628. }
  629. }
  630. }
  631. }
  632. </style>
  633. <style lang="scss">
  634. .NPC-ArticleView {
  635. .ArticleView-header {
  636. .el-switch {
  637. margin-left: 24px;
  638. }
  639. .el-switch__core {
  640. width: 44px !important;
  641. height: 24px;
  642. border-radius: 20px;
  643. }
  644. .el-switch__core::after {
  645. top: 3px;
  646. left: 3px;
  647. }
  648. .el-switch.is-checked .el-switch__core::after {
  649. left: 100%;
  650. margin-left: -19px;
  651. }
  652. .el-switch__label {
  653. color: #000;
  654. }
  655. .el-switch__label.is-active {
  656. color: rgba($color: #000, $alpha: 30%);
  657. }
  658. .el-switch__label--left {
  659. margin-right: 8px;
  660. }
  661. }
  662. .pinyin-16 {
  663. background: url('@/assets/icon/pinyin-16-normal-red.png') no-repeat left top;
  664. background-size: 100% 100%;
  665. &.disabled {
  666. background: url('@/assets/icon/pinyin-16-disable-Black.png') no-repeat left top;
  667. background-size: 100% 100%;
  668. }
  669. }
  670. .EN-16 {
  671. background: url('@/assets/icon/EN-16-normal-red.png') no-repeat left top;
  672. background-size: 100% 100%;
  673. &.disabled {
  674. background: url('@/assets/icon/EN-16-disable-Black.png') no-repeat left top;
  675. background-size: 100% 100%;
  676. }
  677. }
  678. }
  679. .ArticleView-body {
  680. .aduioLine-box {
  681. width: 100%;
  682. border-bottom: 1px solid rgba(0, 0, 0, 10%);
  683. }
  684. }
  685. </style>