index.vue 21 KB

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