Voicefullscreen.vue 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493
  1. <!-- -->
  2. <template>
  3. <div :class="['voicefull', bgIndex == 0 ? 'bg1' : 'bg2']" v-if="item">
  4. <div
  5. class="voicefull-top"
  6. @mouseover="setTopShow(true)"
  7. @mouseleave="setTopShow(false)"
  8. >
  9. <div :class="[isTopShow ? 'voicefull-top-show' : 'voicefull-top-hidden']">
  10. <!-- <div class="top-left"> -->
  11. <div
  12. :class="['op-btn close-btn', bgIndex == 1 ? 'op-btn-green' : '']"
  13. @click="exitFullScreen"
  14. >
  15. <span
  16. :class="['close-icon', bgIndex == 1 ? 'close-icon-white' : '']"
  17. >
  18. <i class="el-icon-close"></i>
  19. </span>
  20. </div>
  21. <div :class="['select-bg', bgIndex == 1 ? 'select-bg-blue' : '']">
  22. <div :class="['bg-green-box', bgIndex == 1 ? 'active' : '']">
  23. <span
  24. :class="['bg-green', bgIndex == 1 ? 'active' : '']"
  25. @click="changeBg(1)"
  26. ></span>
  27. </div>
  28. <div :class="['bg-white-box', bgIndex == 0 ? 'active' : '']">
  29. <span
  30. :class="['bg-white', bgIndex == 0 ? 'active' : '']"
  31. @click="changeBg(0)"
  32. ></span>
  33. </div>
  34. </div>
  35. <!-- </div> -->
  36. <!-- <div class="top-middle"> -->
  37. <template v-if="mp3">
  38. <AudioLineSentence
  39. :key="'sent' + curSentIndex"
  40. :mp3="mp3"
  41. :getCurTime="getCurTime"
  42. ref="audioLineSent"
  43. :audioId="'artPraAudioId' + curSentIndex"
  44. :stopAudio="stopAudio"
  45. :width="120"
  46. :hideSlider="true"
  47. :bg="bg"
  48. :ed="ed"
  49. :curTime="curTime"
  50. :maxTime="maxTime"
  51. :bgIndex="bgIndex"
  52. :isRepeat="isRepeat"
  53. :isAuto="isAuto"
  54. @playChange="playChange"
  55. @rollSentence="rollSentence"
  56. />
  57. </template>
  58. <div
  59. :class="['op-btn', bgIndex == 1 ? 'op-btn-green' : '']"
  60. @click="setStatus"
  61. >
  62. <span
  63. :class="[
  64. 'repeat-icon',
  65. !isRepeat && !isAuto ? 'disabled' : '',
  66. !isRepeat && isAuto ? 'auto-icon' : '',
  67. isRepeat && bgIndex == 1 ? 'repeat-icon-yellow' : '',
  68. !isRepeat && isAuto && bgIndex == 1 ? 'auto-icon-yellow' : '',
  69. ]"
  70. >
  71. <svg-icon v-if="isRepeat" icon-class="repeat"></svg-icon>
  72. <svg-icon v-else icon-class="repeat-line"></svg-icon>
  73. </span>
  74. </div>
  75. <div
  76. :class="['op-btn', bgIndex == 1 ? 'op-btn-green' : '']"
  77. @click="handleColl"
  78. title="点击收藏后可在“个人中心”-“我的收藏”查看"
  79. >
  80. <span
  81. :class="[
  82. 'coll-icon',
  83. !isCollArr[curSentIndex] ? 'disabled' : '',
  84. isCollArr[curSentIndex] && bgIndex == 1
  85. ? 'coll-icon-yellow'
  86. :isCollArr[curSentIndex] && bgIndex == 0
  87. ? 'coll-icon-green':'',
  88. ]"
  89. >
  90. <svg-icon v-if="!isCollArr[curSentIndex]" icon-class="like-line" className="icon-like"></svg-icon>
  91. <svg-icon v-else icon-class="like" className="icon-like"></svg-icon>
  92. </span>
  93. </div>
  94. <div :class="['set-fontSize', bgIndex == 1 ? 'set-fontSize-green' : '']">
  95. <div
  96. @click="setFontSizeFlag=!setFontSizeFlag"
  97. >
  98. <svg-icon icon-class="font-size"></svg-icon>
  99. </div>
  100. <div class="font-size-box" :class="[bgIndex == 1 ? 'font-size-box-green' : '']" v-if="setFontSizeFlag">
  101. <el-input-number v-model="hzSize" :step="4" :max="76" :min="34"></el-input-number>
  102. </div>
  103. </div>
  104. </div>
  105. <!-- </div> -->
  106. </div>
  107. <div class="voicefull-content" v-if="item">
  108. <div
  109. class="vc-box"
  110. @mousemove="showPrevNext(true, 'isShowLeft')"
  111. @mouseleave="showPrevNext(false, 'isShowLeft')"
  112. >
  113. <div
  114. :class="[
  115. 'vc-left vc-left-grey',
  116. isShowLeft && bgIndex == 0 ? 'vc-left-black' : '',
  117. isShowLeft && bgIndex == 1 ? 'vc-left-white' : '',
  118. curSentIndex == 0 ? 'hidden' : '',
  119. ]"
  120. @click="prevSentence"
  121. ></div>
  122. </div>
  123. <div class="vc-main">
  124. <div class="item-sent">
  125. <div style="clear: both; overflow: hidden"></div>
  126. <div
  127. class="nnpe-sentence-box"
  128. v-for="(pItem, pIndex) in item"
  129. :key="'wordsList' + pIndex"
  130. @dblclick="showWordDetail($event, pItem)"
  131. @click="playWord(pItem,pIndex)"
  132. >
  133. <template v-if="pItem.isShow">
  134. <div
  135. :class="[
  136. 'NNPE-words',
  137. ]"
  138. >
  139. <span
  140. class="NNPE-chs"
  141. :class="[
  142. resArr.timeList[curSentIndex] &&
  143. resArr.timeList[curSentIndex] &&
  144. resArr.timeList[curSentIndex].e &&
  145. resArr.timeList[curSentIndex].tokens &&
  146. resArr.timeList[curSentIndex].tokens[pItem.wIndex]&&
  147. curTime >=
  148. resArr.timeList[curSentIndex].tokens[pItem.wIndex].s &&
  149. curTime <= resArr.timeList[curSentIndex].e
  150. ? 'wordActive'
  151. : '',
  152. pItem.tokens[9]===''?'marginRight':'',pItem.marginRight?'marginSingleRight':'',
  153. bgIndex == 1 ? 'word-green' : '',
  154. bgIndex == 1 && wordIndex == pItem.wIndex
  155. ? 'wordActive-blue'
  156. : bgIndex == 0 && wordIndex == pItem.wIndex?'wordActive':'',
  157. ]"
  158. :style="{fontSize:hzSize + 'px'}"
  159. >{{ pItem.tokens[2] }}</span
  160. >
  161. <span
  162. class="NNPE-chs NNPE-chs-both"
  163. v-if="item[pIndex + 1] &&
  164. item[pIndex + 1].tokens[2] &&
  165. enFhList.indexOf(item[pIndex + 1].tokens[2]) > -1"
  166. :class="[
  167. resArr.timeList[curSentIndex] &&
  168. resArr.timeList[curSentIndex] &&
  169. resArr.timeList[curSentIndex].tokens[pItem.wIndex]&&
  170. curTime >=
  171. resArr.timeList[curSentIndex].tokens[pItem.wIndex].s &&
  172. curTime <= resArr.timeList[curSentIndex].e
  173. ? 'wordActive'
  174. : '',
  175. item[pIndex + 1].tokens[8]===''?'marginLeft':'',item[pIndex + 1].marginRight?'marginSingleRight':'',
  176. bgIndex == 1 ? 'word-green' : '',
  177. bgIndex == 1 && wordIndex == pItem.wIndex
  178. ? 'wordActive-blue'
  179. : '',
  180. ]"
  181. :style="{fontSize:hzSize + 'px'}"
  182. >{{ item[pIndex + 1].tokens[2] }}</span
  183. >
  184. </div>
  185. </template>
  186. </div>
  187. </div>
  188. <div style="clear: both; overflow: hidden"></div>
  189. </div>
  190. </div>
  191. <div
  192. class="voicefull-bottom"
  193. @mouseover="setBottomShow(true)"
  194. @mouseleave="setBottomShow(false)"
  195. >
  196. <div
  197. :class="[
  198. isBottomShow ? 'voicefull-bottom-show' : 'voicefull-bottom-hidden',
  199. ]"
  200. >
  201. <div
  202. :class="[
  203. 'bottom-left',
  204. ]"
  205. >
  206. <Soundrecorddiff
  207. ref="Soundrecorddiff"
  208. @handleWav="handleWav"
  209. @getWavblob="getWavblob"
  210. @handleParentPlay="handleParentPlay"
  211. @sentPause="sentPause"
  212. @getRerordStatus="getRerordStatus"
  213. @getMicrophoneStatus="getMicrophoneStatus"
  214. @getPlayStatus="getPlayStatus"
  215. :bgIndex="bgIndex"
  216. :answerRecordList="
  217. historySentRecordList
  218. "
  219. :tmIndex="curSentIndex"
  220. :key="'Soundrecorddiff' + curSentIndex"
  221. />
  222. </div>
  223. <div
  224. :class="['compare-box', bgIndex == 1 ? 'compare-box-white' : '']"
  225. v-if="isShowCompare"
  226. >
  227. <Audio-compare
  228. :bgIndex="bgIndex"
  229. type="full"
  230. :themeColor="''"
  231. :index="curSentIndex"
  232. :sentIndex="curSentIndex"
  233. :url="curQue.art_sound_url"
  234. :bg="bg"
  235. :ed="ed"
  236. :wavblob="wavblob"
  237. :getCurTime="getCurCompareTime"
  238. :sentPause="sentPause"
  239. :isRecord="isRecord"
  240. :handleChangeStopAudio="handleChangeStopAudio"
  241. :getPlayStatus="getPlayStatus"
  242. :key="'mp3Compare' + curSentIndex"
  243. />
  244. </div>
  245. <div
  246. :class="[
  247. 'page-count',
  248. bgIndex == 0 ? 'page-count-white' : 'page-count-green',
  249. ]"
  250. >
  251. {{ curSentIndex + 1 }}/{{ this.resArr.wordsList.length }}
  252. </div>
  253. </div>
  254. </div>
  255. <el-dialog
  256. :visible.sync="isShow"
  257. :show-close="false"
  258. :close-on-click-modal="false"
  259. width="570px"
  260. class="login-dialog"
  261. :modal="false"
  262. v-if="isShow">
  263. <WordCard @closeWord="changeWordCard" :dataObj="showObj" @changeLike="changeLike" :likePhrase="likeWord"/>
  264. </el-dialog>
  265. <div class="word-play-audio" v-if="isWordPlay">
  266. <AudioLineSentence
  267. :mp3="mp3"
  268. :getCurTime="getCurWordTime"
  269. ref="audioLineWord"
  270. :audioId="'artPraAudioId' + curSentIndex + wordIndex"
  271. :stopAudio="stopAudio"
  272. :width="120"
  273. :hideSlider="false"
  274. :bg="wordbg"
  275. :ed="worded"
  276. :maxTime="wordMaxTime"
  277. :bgIndex="bgIndex"
  278. :isRepeat="isRepeat"
  279. :wordPlay="true"
  280. @changePlayStatus="changePlayStatus"
  281. />
  282. </div>
  283. </div>
  284. </template>
  285. <script>
  286. import AudioLineSentence from "../../../components/common/AudioLineSentence.vue";
  287. import Soundrecorddiff from "../../../components/common/Soundrecorddiff.vue";
  288. import AudioCompare from "../../../components/common/AudioCompare.vue";
  289. import WordCard from "../../personalCenter/components/WordCard.vue"
  290. import { getLogin } from "@/api/ajax";
  291. export default {
  292. components: {
  293. AudioLineSentence,
  294. Soundrecorddiff,
  295. AudioCompare,
  296. WordCard,
  297. },
  298. props: [
  299. "sentIndex",
  300. "mp3",
  301. "curQue",
  302. "likeSentencelist",
  303. "likeWord"
  304. ],
  305. data() {
  306. return {
  307. pySize: 32,
  308. hzSize: 48,
  309. enSize: 24,
  310. bgIndex: 1,
  311. maxTime: 0,
  312. item: null,
  313. bg: 0,
  314. ed: 0,
  315. isRepeat: false,
  316. curTime: 0,
  317. wavblob: null,
  318. stopAudio: false,
  319. isRecord: false,
  320. isShowCompare: false,
  321. isShowRight: false,
  322. isShowLeft: false,
  323. curSentIndex: 0,
  324. oldHz: "",
  325. hz: "",
  326. clientY: 0,
  327. top: 0,
  328. left: 0,
  329. newWordList: [],
  330. pinyin: "",
  331. wordIndex: -1,
  332. isShow: false,
  333. wordbg: 0,
  334. worded: 0,
  335. wordMaxTime: 0,
  336. isWordPlay: false,
  337. curWordTime: 0,
  338. isPlaying: false,
  339. isAuto: false,
  340. key: "isRepeat",
  341. isKeyboard: true,
  342. isTopShow: false,
  343. isBottomShow: false,
  344. isRecording: false,
  345. recordPlaying: false,
  346. isCollArr: [],
  347. enwords: "",
  348. screenHeight: 0,
  349. resArr: [],
  350. historySentRecordList: [], // 单句历史录音list
  351. enFhList: [
  352. ",",
  353. ".",
  354. ";",
  355. "?",
  356. "!",
  357. ":",
  358. ">",
  359. "<",
  360. "'",
  361. "’",
  362. "n't",
  363. "n’t",
  364. "n’ts",
  365. "n‘t",
  366. "'t",
  367. "’t",
  368. "‘t",
  369. "'s",
  370. "’s",
  371. "‘s",
  372. "'m",
  373. "’m",
  374. "‘m",
  375. "'re",
  376. "’re",
  377. "‘re",
  378. "'d",
  379. "’d",
  380. "‘d",
  381. "'ve",
  382. "’ve",
  383. "‘ve",
  384. ")",
  385. "'ll",
  386. "’ll",
  387. "‘ll",
  388. "”",
  389. ],
  390. setFontSizeFlag: false,
  391. showObj:null,
  392. wordLit:[],
  393. sentenceList:[],
  394. left:0,
  395. top:0
  396. };
  397. },
  398. computed: {
  399. // isPlaying: function () {
  400. // let playing = false;
  401. // if (this.$refs.audioLineSent) {
  402. // playing = this.$refs.audioLineSent.audio.isPlaying;
  403. // }
  404. // console.log(playing);
  405. // return playing;
  406. // },
  407. },
  408. watch: {
  409. isRecording: {
  410. handler: function (newVal, oldVal) {
  411. if (newVal) {
  412. this.isBottomShow = newVal;
  413. }
  414. },
  415. deep: true,
  416. },
  417. recordPlaying: {
  418. handler: function (newVal, oldVal) {
  419. if (newVal) {
  420. this.isBottomShow = newVal;
  421. }
  422. },
  423. deep: true,
  424. },
  425. sentIndex: {
  426. handler: function (newVal, oldVal) {
  427. this.curSentIndex = newVal;
  428. this.getSentence();
  429. },
  430. deep: true,
  431. },
  432. hz: {
  433. handler: function (val, oldVal) {
  434. let _this = this;
  435. if (val) {
  436. _this.handleNewWords(val);
  437. }
  438. },
  439. // 深度观察监听
  440. deep: true,
  441. },
  442. isShow: {
  443. handler: function (val, oldVal) {
  444. let _this = this;
  445. if (val) {
  446. setTimeout(() => {
  447. _this.cardHeight = _this.$refs.wordcard.offsetHeight;
  448. if (_this.screenHeight - _this.clientY > _this.cardHeight) {
  449. _this.top = _this.clientY + 20;
  450. } else {
  451. _this.top = _this.clientY - _this.cardHeight - 30;
  452. }
  453. }, 50);
  454. }
  455. },
  456. // 深度观察监听
  457. deep: true,
  458. },
  459. },
  460. //方法集合
  461. methods: {
  462. setTopShow(bool) {
  463. this.isTopShow = bool;
  464. },
  465. setBottomShow(bool) {
  466. if (!this.recordPlaying && !this.isRecording) {
  467. this.isBottomShow = bool;
  468. }
  469. },
  470. getPlayStatus(bool) {
  471. this.recordPlaying = bool;
  472. },
  473. setFontSize(type) {
  474. let _this = this;
  475. if (type == "-") {
  476. if (_this.hzSize >= 34) {
  477. this.hzSize = this.hzSize - 4;
  478. }
  479. }
  480. if (type == "+") {
  481. if (_this.hzSize <= 76) {
  482. this.hzSize = this.hzSize + 4;
  483. }
  484. }
  485. _this.pySize = parseInt(_this.hzSize / 1.5);
  486. },
  487. playChange(bool) {
  488. this.isPlaying = bool;
  489. },
  490. handleColl() {
  491. let _this = this;
  492. if (_this.isCollArr[_this.curSentIndex]) {
  493. _this.cancleColl();
  494. } else {
  495. _this.addColl();
  496. }
  497. },
  498. //添加收藏
  499. addColl() {
  500. let MethodName = "/ShopServer/Client/CollectManager/AddCollect_Sentence";
  501. let data = {
  502. sentence_id: this.curQue.art_corpus_data.sentList[this.curSentIndex].id,
  503. audio_file_id: this.curQue.art_sound_srt_data?this.curQue.art_sound_srt_data.mp3:'',
  504. audio_begin_time: this.curQue.art_sound_srt_data&&this.curQue.art_sound_srt_data.sents?this.curQue.art_sound_srt_data.sents[this.curSentIndex].s:null,
  505. audio_end_time: this.curQue.art_sound_srt_data&&this.curQue.art_sound_srt_data.sents?this.curQue.art_sound_srt_data.sents[this.curSentIndex].e:null
  506. };
  507. getLogin(MethodName, data).then((res) => {
  508. if(res.status===1){
  509. this.$set(this.isCollArr, this.curSentIndex, true);
  510. this.$message.success("收藏成功!");
  511. }
  512. });
  513. },
  514. //取消收藏
  515. cancleColl() {
  516. let MethodName = "/ShopServer/Client/CollectManager/CancelCollect_Sentence";
  517. let data = {
  518. sentence_id: this.curQue.art_corpus_data.sentList[this.curSentIndex].id
  519. };
  520. getLogin(MethodName, data).then((res) => {
  521. if(res.status===1){
  522. this.$set(this.isCollArr, this.curSentIndex, false);
  523. this.$message.success("取消成功!");
  524. }
  525. });
  526. },
  527. //检查收藏状态
  528. checkCollStatus() {
  529. let collFlag = this.likeSentencelist&&this.likeSentencelist.length>0&&this.likeSentencelist.indexOf(this.curQue.art_corpus_data.sentList[this.curSentIndex].id)>-1 ? true : false;
  530. this.$set(this.isCollArr, this.curSentIndex, collFlag);
  531. },
  532. showPrevNext(bool, key) {
  533. this[key] = bool;
  534. },
  535. prevSentence() {
  536. let _this = this;
  537. if (_this.curSentIndex == 0) {
  538. _this.$message.warning("已经是第一个句子了");
  539. return;
  540. }
  541. _this.curSentIndex = _this.curSentIndex - 1;
  542. _this.getSentence();
  543. if (_this.isAuto) {
  544. _this.curTime = _this.bg;
  545. _this.$refs.audioLineSent.onTimeupdateTime(_this.bg / 1000);
  546. }
  547. },
  548. nextSentence() {
  549. if (this.curSentIndex == this.resArr.wordsList.length - 1) {
  550. this.$message.warning("已经是最后一个句子了");
  551. return;
  552. }
  553. this.curSentIndex = this.curSentIndex + 1;
  554. this.getSentence();
  555. },
  556. rollSentence() {
  557. if (this.curSentIndex == this.resArr.wordsList.length - 1) {
  558. this.curSentIndex = 0;
  559. } else {
  560. this.curSentIndex = this.curSentIndex + 1;
  561. }
  562. this.getSentence();
  563. },
  564. changeStatus(key) {
  565. this[key] = !this[key];
  566. },
  567. changePinyin() {
  568. this.$emit("changePinyin");
  569. },
  570. changeEN() {
  571. this.$emit("changeEN");
  572. },
  573. setStatus() {
  574. let _this = this;
  575. if (_this.key == "isRepeat") {
  576. if (_this.isRepeat) {
  577. _this.isRepeat = false;
  578. _this.isAuto = true;
  579. _this.key = "isAuto";
  580. } else {
  581. _this.isRepeat = true;
  582. _this.key = "isRepeat";
  583. }
  584. } else if (_this.key == "isAuto") {
  585. if (_this.isAuto) {
  586. _this.isRepeat = false;
  587. _this.isAuto = false;
  588. _this.key = "isRepeat";
  589. }
  590. }
  591. },
  592. getRerordStatus(bool) {
  593. this.isShowCompare = bool;
  594. },
  595. getMicrophoneStatus(bool) {
  596. this.isRecording = bool;
  597. },
  598. getWavblob(wavblob,wav) {
  599. this.wavblob = wav;
  600. if(wav){
  601. this.addRecord(wav)
  602. }
  603. },
  604. addRecord(wav){
  605. let MethodName = "/PaperServer/Client/UserSentRec/AddUserSentRec";
  606. let data = {
  607. sent_id: this.curQue.art_corpus_data.sentList[this.curSentIndex].id,
  608. rec_sound_data: wav
  609. }
  610. getLogin(MethodName, data)
  611. .then((res) => {
  612. if(res.status===1){
  613. this.getAllRecordList()
  614. }
  615. })
  616. },
  617. sentPause(isRecord) {
  618. this.isRecord = isRecord;
  619. },
  620. getCurTime(curTime) {
  621. let _this = this;
  622. if (_this.isRepeat) {
  623. let time = curTime * 1000;
  624. if (time > _this.ed || time < _this.bg) {
  625. _this.curTime = _this.bg;
  626. this.$refs.audioLineSent.onTimeupdateTime(_this.bg / 1000);
  627. } else {
  628. _this.curTime = curTime * 1000;
  629. }
  630. } else if (_this.isAuto) {
  631. let time = curTime * 1000;
  632. if (time > _this.ed) {
  633. _this.rollSentence();
  634. _this.curTime = _this.bg;
  635. _this.$refs.audioLineSent.onTimeupdateTime(_this.bg / 1000);
  636. } else {
  637. _this.curTime = curTime * 1000;
  638. }
  639. } else {
  640. _this.curTime = curTime * 1000;
  641. }
  642. },
  643. getCurCompareTime(curTime) {
  644. let _this = this;
  645. _this.curTime = curTime * 1000;
  646. },
  647. getCurWordTime(curTime) {
  648. let _this = this;
  649. _this.curWordTime = curTime * 1000;
  650. },
  651. changeBg(bgIndex) {
  652. this.bgIndex = bgIndex;
  653. },
  654. getAllRecordList(){
  655. let MethodName = "/PaperServer/Client/UserSentRec/RecListInUserSent";
  656. let data = {
  657. sent_id: this.curQue.art_corpus_data.sentList[this.curSentIndex].id,
  658. got_rec_data_flag: false
  659. }
  660. getLogin(MethodName, data)
  661. .then((res) => {
  662. if(res.status===1){
  663. this.historySentRecordList = res.data.all
  664. }
  665. })
  666. },
  667. getSentence() {
  668. let _this = this;
  669. _this.getAllRecordList()
  670. _this.isShowCompare = _this.historySentRecordList.length > 0;
  671. _this.pauseAudio();
  672. _this.isPlaying = false;
  673. let item = JSON.parse(JSON.stringify(_this.resArr.wordsList[_this.curSentIndex]));
  674. _this.item = item
  675. _this.resArr.wordsList.forEach((item) => {
  676. this.isCollArr.push(false);
  677. });
  678. _this.bg = _this.resArr.timeList[_this.curSentIndex].s;
  679. _this.ed = _this.resArr.timeList[_this.curSentIndex].e;
  680. let maxTime = (_this.ed - _this.bg) / 1000;
  681. if (maxTime < 1) {
  682. _this.maxTime = 1;
  683. } else {
  684. _this.maxTime = maxTime;
  685. }
  686. _this.checkCollStatus();
  687. },
  688. pauseAudio() {
  689. let audio = document.getElementsByTagName("audio");
  690. if(audio&&audio.length>0&&window.location.href.indexOf('GCLS-Learn')==-1){
  691. audio.forEach((item) => {
  692. item.pause();
  693. });
  694. }
  695. },
  696. exitFullScreen() {
  697. this.pauseAudio();
  698. this.$emit("exitFullscreen");
  699. },
  700. changeFullScreen() {
  701. this.pauseAudio();
  702. this.$emit("changeIsFull");
  703. },
  704. handleWav(list, tmIndex) {
  705. tmIndex = tmIndex ? tmIndex : 0;
  706. // this.$emit("handleWav", list, tmIndex);
  707. },
  708. // 录音时暂停音频播放
  709. handleParentPlay() {
  710. this.stopAudio = true;
  711. },
  712. // 音频播放时改变布尔值
  713. handleChangeStopAudio() {
  714. this.stopAudio = false;
  715. },
  716. //播放音频
  717. playWord(item,index) {
  718. let _this = this;
  719. _this.pauseAudio();
  720. _this.isWordPlay = false;
  721. _this.wordIndex = item.wIndex;
  722. setTimeout(() => {
  723. let leg = _this.resArr.timeList[_this.curSentIndex].tokens.length;
  724. _this.wordbg = _this.resArr.timeList[_this.curSentIndex].tokens[index].s;
  725. _this.worded = _this.resArr.timeList[_this.curSentIndex].tokens[index].e;
  726. let wordMaxTime = (_this.worded - _this.wordbg) / 1000;
  727. if (wordMaxTime < 1) {
  728. _this.wordMaxTime = 1;
  729. } else {
  730. _this.wordMaxTime = wordMaxTime;
  731. }
  732. _this.isWordPlay = true;
  733. }, 50);
  734. },
  735. changePlayStatus() {
  736. this.isWordPlay = false;
  737. this.wordIndex = -1;
  738. },
  739. showWordDetail(e, item) {
  740. let _this = this;
  741. if (_this.enFhList.indexOf(item.tokens[2]) > -1) {
  742. return;
  743. }
  744. if (_this.oldHz != item.tokens[2]) {
  745. this.isShow = false;
  746. setTimeout(() => {
  747. _this.hz = item.tokens[2];
  748. _this.wordIndex = item.wIndex;
  749. if(item.type==='newWord'){
  750. this.wordLit.forEach(itemi=>{
  751. if(item.word_id===itemi.id){
  752. let obj = {
  753. src: itemi.ph_file_url?itemi.ph_file_url:'',
  754. word: itemi.word_name,
  755. symbol: itemi.word_explain.ph?itemi.word_explain.ph:'',
  756. paraList: itemi.word_explain.word_para_list,
  757. type: itemi.word_explain.vl_level?itemi.word_explain.vl_level:'',
  758. typeCn: itemi.word_explain.vl_level_name?itemi.word_explain.vl_level_name:'',
  759. rate: itemi.word_explain.star?itemi.word_explain.star:null,
  760. originalObj: itemi,
  761. hasVoice: itemi.word_explain.ph_mp3_id||itemi.word_explain.ph_file_url?true:false,
  762. id: itemi.id,
  763. collect: this.likeWord.indexOf(itemi.word_name)>-1?true:false,
  764. isNew: true
  765. }
  766. this.showObj = obj
  767. }
  768. })
  769. this.showWordFlag = true
  770. }else{
  771. let obj = {
  772. word: item.tokens[2],
  773. isNew: false
  774. }
  775. this.showObj = obj
  776. this.showWordFlag = true
  777. }
  778. console.log(this.showObj)
  779. }, 50);
  780. }
  781. _this.clientY = e.clientY;
  782. let left = e.clientX;
  783. let width = 0;
  784. // if (item.chs.length == 1 || item.chs.length == 2) {
  785. // width = 304;
  786. // } else if (item.chs.length == 3 || item.chs.length == 4) {
  787. // width = 432;
  788. // } else if (item.chs.length > 3) {
  789. // width = 560;
  790. // }
  791. if (left - this.bodyLeft > this.contentWidth / 2) {
  792. _this.left = left - width + 10;
  793. } else {
  794. _this.left = left - width / 2;
  795. }
  796. },
  797. changeWordCard(isShow) {
  798. let _this = this;
  799. _this.isShow = isShow;
  800. _this.oldHz = "";
  801. _this.hz = "";
  802. _this.wordIndex = -1;
  803. },
  804. // 处理分词数据
  805. handleNewWords(val) {
  806. let _this = this;
  807. _this.isShow = true;
  808. _this.word = null;
  809. // if (_this.newWordList.indexOf(val) > -1) {
  810. // for (let i = 0; i < this.NNPENewWordList.length; i++) {
  811. // let pItem = this.NNPENewWordList[i];
  812. // for (let j = 0; j < pItem.length; j++) {
  813. // let item = pItem[j];
  814. // if (item.new_word.trim() == val.trim()) {
  815. // let wordlist = val.split("");
  816. // this.word = { list: wordlist, detail: item };
  817. // break;
  818. // }
  819. // }
  820. // }
  821. // } else {
  822. // let wordlist = val.split("");
  823. // let option = {
  824. // definition_list: [],
  825. // mp3_list: [],
  826. // new_word: val,
  827. // pinyin: _this.pinyin,
  828. // };
  829. // _this.word = { list: wordlist, detail: option };
  830. // }
  831. _this.oldHz = val;
  832. },
  833. handleNewword() {
  834. // let NewWordList = [];
  835. // this.NNPENewWordList.forEach((item) => {
  836. // item.forEach((wItem) => {
  837. // NewWordList.push(wItem.new_word);
  838. // });
  839. // });
  840. // this.newWordList = JSON.parse(JSON.stringify(NewWordList));
  841. },
  842. changeLike(){
  843. },
  844. getScreenHeight() {
  845. this.screenHeight = window.innerHeight;
  846. },
  847. handleData() {
  848. let resArr = {
  849. wordsList: [],
  850. timeList: [],
  851. };
  852. let articleInfo = JSON.parse(JSON.stringify(this.curQue));
  853. this.sentenceList = articleInfo.art_corpus_data?articleInfo.art_corpus_data.sentList:[]
  854. this.wordLit = articleInfo.art_voc_data?articleInfo.art_voc_data:[]
  855. this.wordLit.forEach(item=>{
  856. item.type='newWord'
  857. item.exp_title = item.word_name
  858. let paraStr = ''
  859. if(item.word_explain&&item.word_explain.word_para_list){
  860. item.word_explain.word_para_list.forEach(items=>{
  861. paraStr += items.para
  862. })
  863. }
  864. item.exp_content = paraStr
  865. item.collect = this.likeWord.indexOf(item.word_name)>-1?true:false
  866. })
  867. articleInfo.art_corpus_data.sentList.forEach((item,index) => {
  868. let wordlist = []
  869. item.tokens.forEach((items,indexs)=>{
  870. let type=''
  871. let word_id = ''
  872. for(let i=0;i<this.wordLit.length;i++){
  873. this.wordLit[i].bind_sent_data.bind_sents.forEach(items=>{
  874. if(items.sent_id===item.id&&items.sel_token_idxes.indexOf(indexs)>-1){
  875. type='newWord'
  876. word_id = this.wordLit[i].id
  877. }
  878. })
  879. }
  880. let obj = {
  881. sent_id:item.id,
  882. sno: item.sno-1,
  883. pno: item.pno,
  884. text: item.text,
  885. tokens: items,
  886. wIndex: indexs,
  887. isShow: this.enFhList.indexOf(items[2])==-1,
  888. marginRight: indexs===item.tokens.length-1,
  889. type:type,
  890. word_id:word_id
  891. }
  892. wordlist.push(obj)
  893. })
  894. resArr.wordsList.push(wordlist)
  895. resArr.timeList.push(articleInfo.art_sound_srt_data.sents[index])
  896. });
  897. this.resArr = resArr;
  898. },
  899. },
  900. //生命周期 - 创建完成(可以访问当前this实例)
  901. created() {
  902. this.handleData()
  903. },
  904. //生命周期 - 挂载完成(可以访问DOM元素)
  905. mounted() {
  906. let _this = this;
  907. $(window).resize(() => {
  908. _this.getScreenHeight();
  909. });
  910. _this.getScreenHeight();
  911. document.addEventListener("keyup", function (e) {
  912. if (_this.isKeyboard) {
  913. if (e.keyCode == 32) {
  914. //空格
  915. _this.$nextTick(() => {
  916. if (_this.$refs.audioLineSent) {
  917. _this.$refs.audioLineSent.PlayAudio();
  918. }
  919. });
  920. } else if (e.keyCode == 38) {
  921. _this.prevSentence();
  922. } else if (e.keyCode == 40) {
  923. _this.nextSentence();
  924. } else if (e.keyCode == 13) {
  925. _this.$nextTick(() => {
  926. _this.$refs.Soundrecorddiff.microphone();
  927. });
  928. }
  929. }
  930. });
  931. if (_this.NNPENewWordList) {
  932. _this.handleNewword();
  933. }
  934. _this.curSentIndex = _this.sentIndex;
  935. _this.getSentence();
  936. document.addEventListener("fullscreenchange", () => {
  937. let isFullscreen =
  938. document.fullscreenElement ||
  939. document.mozFullScreenElement ||
  940. document.webkitFullscreenElement ||
  941. document.fullScreen ||
  942. document.mozFullScreen ||
  943. document.webkitIsFullScreen;
  944. if (!isFullscreen) {
  945. _this.changeFullScreen();
  946. }
  947. });
  948. document.addEventListener("mozfullscreenchange", () => {
  949. let isFullscreen =
  950. document.fullscreenElement ||
  951. document.mozFullScreenElement ||
  952. document.webkitFullscreenElement ||
  953. document.fullScreen ||
  954. document.mozFullScreen ||
  955. document.webkitIsFullScreen;
  956. if (!isFullscreen) {
  957. _this.changeFullScreen();
  958. }
  959. });
  960. document.addEventListener("webkitfullscreenchange", () => {
  961. let isFullscreen =
  962. document.fullscreenElement ||
  963. document.mozFullScreenElement ||
  964. document.webkitFullscreenElement ||
  965. document.fullScreen ||
  966. document.mozFullScreen ||
  967. document.webkitIsFullScreen;
  968. if (!isFullscreen) {
  969. _this.changeFullScreen();
  970. }
  971. });
  972. document.addEventListener("msfullscreenchange", () => {
  973. let isFullscreen =
  974. document.fullscreenElement ||
  975. document.mozFullScreenElement ||
  976. document.webkitFullscreenElement ||
  977. document.fullScreen ||
  978. document.mozFullScreen ||
  979. document.webkitIsFullScreen;
  980. if (!isFullscreen) {
  981. _this.changeFullScreen();
  982. }
  983. });
  984. },
  985. beforeCreate() {}, //生命周期 - 创建之前
  986. beforeMount() {}, //生命周期 - 挂载之前
  987. beforeUpdate() {}, //生命周期 - 更新之前
  988. updated() {}, //生命周期 - 更新之后
  989. beforeDestroy() {}, //生命周期 - 销毁之前
  990. destroyed() {}, //生命周期 - 销毁完成
  991. activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
  992. };
  993. </script>
  994. <style lang='scss' scoped>
  995. //@import url(); 引入公共css类
  996. .voicefull {
  997. width: 100%;
  998. height: 100vh;
  999. overflow: hidden;
  1000. display: flex;
  1001. flex-direction: column;
  1002. .NNPE-wordDetail {
  1003. position: fixed;
  1004. z-index: 9999;
  1005. top: 50%;
  1006. margin-top: -196px;
  1007. }
  1008. &.bg1 {
  1009. background: #fff;
  1010. }
  1011. &.bg2 {
  1012. background: linear-gradient(180deg, #274533 0%, #13392E 100%);
  1013. }
  1014. &-top {
  1015. height: 100%;
  1016. width: 40px;
  1017. position: fixed;
  1018. top: 0;
  1019. right: 27px;
  1020. box-sizing: border-box;
  1021. padding: 0;
  1022. .voicefull-top-hidden {
  1023. width: 100%;
  1024. height: 310px;
  1025. visibility: hidden;
  1026. margin-top: -155px;
  1027. top: 50%;
  1028. position: absolute;
  1029. >div{
  1030. margin: 8px 0;
  1031. }
  1032. }
  1033. .voicefull-top-show {
  1034. width: 100%;
  1035. height: 310px;
  1036. visibility: visible;
  1037. margin-top: -155px;
  1038. position: absolute;
  1039. top: 50%;
  1040. >div{
  1041. margin: 8px 0;
  1042. }
  1043. }
  1044. .top-left {
  1045. // display: flex;
  1046. // justify-content: flex-start;
  1047. align-items: center;
  1048. }
  1049. .select-bg {
  1050. width: 40px;
  1051. height: 80px;
  1052. border: 1px solid rgba(0, 0, 0, 0.1);
  1053. border-radius: 40px;
  1054. // display: flex;
  1055. // justify-content: center;
  1056. // align-items: center;
  1057. box-sizing: border-box;
  1058. text-align: center;
  1059. &.select-bg-blue {
  1060. background: #0E2B23;
  1061. border: 1px solid rgba(0, 0, 0, 0.1);
  1062. }
  1063. > div {
  1064. width: 28px;
  1065. height: 28px;
  1066. border-radius: 100%;
  1067. display: flex;
  1068. justify-content: center;
  1069. align-items: center;
  1070. margin: 8px 5px;
  1071. &.bg-white-box {
  1072. background: 0 0;
  1073. margin-right: 4px;
  1074. &.active {
  1075. background: #3459D2;
  1076. }
  1077. }
  1078. &.bg-green-box {
  1079. background: #fff;
  1080. &.active {
  1081. background: #fff;
  1082. }
  1083. }
  1084. > span {
  1085. width: 24px;
  1086. height: 24px;
  1087. border-radius: 100%;
  1088. box-sizing: border-box;
  1089. cursor: pointer;
  1090. &.bg-white {
  1091. background: #fff;
  1092. }
  1093. &.bg-green {
  1094. background: linear-gradient(180deg, #274533 0%, #13392E 100%);
  1095. }
  1096. }
  1097. }
  1098. }
  1099. .el-icon-close{
  1100. line-height: 24px;
  1101. font-weight: bold;
  1102. }
  1103. .svg-icon{
  1104. width: 40px;
  1105. height: 40px;
  1106. padding: 12px;
  1107. }
  1108. .set-fontSize {
  1109. position: relative;
  1110. border-radius: 40px;
  1111. cursor: pointer;
  1112. border: 1px solid rgba(0, 0, 0, 0.1);
  1113. &-green {
  1114. background: #0E2B23;
  1115. border: 1px solid rgba(0, 0, 0, 0.1);
  1116. color: #fff;
  1117. }
  1118. .font-size-box{
  1119. position: absolute;
  1120. top: 0;
  1121. left: -160px;
  1122. }
  1123. }
  1124. // .top-middle {
  1125. .audio-box {
  1126. width: 56px;
  1127. height: 56px;
  1128. background: #ffffff;
  1129. border: 1px solid rgba(0, 0, 0, 0.1);
  1130. border-radius: 40px;
  1131. display: flex;
  1132. justify-content: center;
  1133. align-items: center;
  1134. &-green {
  1135. background: rgba(255, 255, 255, 0.1);
  1136. border: 1px solid rgba(0, 0, 0, 0.1);
  1137. }
  1138. }
  1139. // }
  1140. }
  1141. .op-btn {
  1142. width: 40px;
  1143. height: 40px;
  1144. // padding: 12px;
  1145. // font-size: 16px;
  1146. border-radius: 100%;
  1147. display: flex;
  1148. justify-content: center;
  1149. align-items: center;
  1150. cursor: pointer;
  1151. background: #ffffff;
  1152. border: 1px solid rgba(0, 0, 0, 0.1);
  1153. box-sizing: border-box;
  1154. &-green {
  1155. background: rgba(255, 255, 255, 0.1);
  1156. border: 1px solid rgba(0, 0, 0, 0.1);
  1157. color: #fff;
  1158. }
  1159. &.close-btn {
  1160. position: fixed;
  1161. top: 20px;
  1162. right: 27px;
  1163. }
  1164. > span {
  1165. &.close-icon {
  1166. // background: url("../../../assets/icon/cross-24-normal-black.png")
  1167. // no-repeat left top;
  1168. // background-size: 100% 100%;
  1169. // &-white {
  1170. // background: url("../../../assets/icon/cross-24-normal-white.png")
  1171. // no-repeat left top;
  1172. // background-size: 100% 100%;
  1173. // }
  1174. }
  1175. }
  1176. }
  1177. .repeat-icon {
  1178. &.disabled {
  1179. color: #929CA8;
  1180. }
  1181. &-yellow {
  1182. color: #fff;
  1183. }
  1184. &.auto-icon {
  1185. // color: #fff;
  1186. &-yellow {
  1187. }
  1188. }
  1189. }
  1190. .coll-icon {
  1191. &-yellow {
  1192. color: #F2555A;
  1193. &.disabled {
  1194. color: #000;
  1195. }
  1196. }
  1197. &-green{
  1198. color: #F2555A;
  1199. &.disabled {
  1200. color: #fff;
  1201. }
  1202. }
  1203. }
  1204. &-content {
  1205. flex: 1;
  1206. width: 100%;
  1207. box-sizing: border-box;
  1208. display: flex;
  1209. align-items: center;
  1210. .vc-main {
  1211. width: fit-content;
  1212. margin: 0 auto;
  1213. padding: 0 67px;
  1214. }
  1215. .NNPE-words {
  1216. float: left;
  1217. user-select: none;
  1218. -webkit-user-select: none;
  1219. -moz-user-select: none;
  1220. -ms-user-select: none;
  1221. &-box {
  1222. float: left;
  1223. > span {
  1224. display: block;
  1225. &.NNPE-chs {
  1226. font-family: "FZJCGFKTK";
  1227. font-size: 48px;
  1228. line-height: 1.17;
  1229. color: rgba(0, 0, 0, 0.85);
  1230. &.bottom {
  1231. padding-bottom: 16px;
  1232. }
  1233. .font-white {
  1234. color: #fff;
  1235. }
  1236. .active {
  1237. color: #de4444;
  1238. &-yellow {
  1239. color: #ffc600;
  1240. }
  1241. }
  1242. }
  1243. // &.padding {
  1244. // padding-right: 6px;
  1245. // }
  1246. }
  1247. }
  1248. &.textLeft {
  1249. text-align: left;
  1250. }
  1251. &.textCenter {
  1252. text-align: center;
  1253. }
  1254. &.textRight {
  1255. text-align: right;
  1256. }
  1257. > span {
  1258. display: block;
  1259. &.NNPE-chs {
  1260. font-family: "FZJCGFKTK";
  1261. font-size: 48px;
  1262. line-height: 1.17;
  1263. color: rgba(0, 0, 0, 0.85);
  1264. &.bottom {
  1265. padding-bottom: 16px;
  1266. }
  1267. .font-white {
  1268. color: #fff;
  1269. }
  1270. .active {
  1271. color: #de4444;
  1272. &-yellow {
  1273. color: #ffc600;
  1274. }
  1275. }
  1276. .wordActive {
  1277. color: #de4444;
  1278. }
  1279. .wordActive-blue {
  1280. color: #ffc600;
  1281. }
  1282. }
  1283. &.padding {
  1284. padding-left: 3px;
  1285. padding-right: 3px;
  1286. }
  1287. }
  1288. }
  1289. .nnpe-sentence-box{
  1290. float: left;
  1291. }
  1292. .NNPE-words {
  1293. float: left;
  1294. padding: 0;
  1295. user-select: none;
  1296. -webkit-user-select: none;
  1297. -moz-user-select: none;
  1298. -ms-user-select: none;
  1299. &.noPadding{
  1300. padding:0;
  1301. }
  1302. &.sentActive {
  1303. background: rgba(24, 144, 255, 0.1);
  1304. }
  1305. &.overActive {
  1306. background: rgba(0, 0, 0, 0.06);
  1307. }
  1308. &.textLeft {
  1309. text-align: left;
  1310. }
  1311. &.textCenter {
  1312. text-align: center;
  1313. }
  1314. > span {
  1315. float: left;
  1316. cursor: pointer;
  1317. &.NNPE-chs {
  1318. // font-size: 24px;
  1319. font-family: 'Smartisan';
  1320. line-height: 150%;
  1321. color: #000000;
  1322. padding: 0 5px;
  1323. font-weight: 700;
  1324. &.wordActive {
  1325. color: #175DFF;
  1326. }
  1327. &.marginRight{
  1328. padding-right: 0;
  1329. }
  1330. &.marginLeft{
  1331. padding-left: 0;
  1332. }
  1333. &.marginSingleRight{
  1334. padding-right: 3px;
  1335. }
  1336. &.word-green{
  1337. color: #F7F8FA;
  1338. &.wordActive {
  1339. color: #FFCB47;
  1340. }
  1341. }
  1342. &.wordActive-blue {
  1343. color: #ffc600;
  1344. }
  1345. }
  1346. &.padding {
  1347. padding: 0 3px;
  1348. cursor: pointer;
  1349. }
  1350. }
  1351. }
  1352. }
  1353. &-bottom {
  1354. height: 136px;
  1355. width: 100%;
  1356. box-sizing: border-box;
  1357. display: flex;
  1358. justify-content: space-between;
  1359. align-items: center;
  1360. padding-right: 40px;
  1361. .voicefull-bottom-show {
  1362. height: 136px;
  1363. width: 100%;
  1364. display: flex;
  1365. justify-content: space-between;
  1366. align-items: center;
  1367. visibility: visible;
  1368. }
  1369. .voicefull-bottom-hidden {
  1370. height: 136px;
  1371. width: 100%;
  1372. display: flex;
  1373. justify-content: space-between;
  1374. align-items: center;
  1375. // visibility: hidden;
  1376. }
  1377. .bottom-left {
  1378. display: flex;
  1379. justify-content: flex-start;
  1380. align-items: center;
  1381. &-margin {
  1382. margin-left: 40px;
  1383. }
  1384. .compare-box {
  1385. height: 56px;
  1386. padding: 16px 16px;
  1387. box-sizing: border-box;
  1388. border: 1px solid rgba(0, 0, 0, 0.1);
  1389. border-radius: 0 40px 40px 0;
  1390. border-left: 0px solid rgba(0, 0, 0, 0.1);
  1391. &-white {
  1392. background: rgba(255, 255, 255, 0.1);
  1393. border: 1px solid rgba(0, 0, 0, 0.1);
  1394. border-left: 0;
  1395. }
  1396. &-answer {
  1397. border-radius: 40px;
  1398. }
  1399. }
  1400. }
  1401. .page-count {
  1402. padding: 8px;
  1403. font-size: 16px;
  1404. line-height: 24px;
  1405. font-family: "robot";
  1406. color: #000000;
  1407. min-width: 60px;
  1408. box-sizing: border-box;
  1409. border-radius: 8px;
  1410. background: #fff;
  1411. text-align: center;
  1412. &-green {
  1413. color: #ffffff;
  1414. background: rgba(255, 255, 255, 0.2);
  1415. }
  1416. }
  1417. }
  1418. }
  1419. .word-play-audio {
  1420. position: absolute;
  1421. left: -1000px;
  1422. }
  1423. </style>
  1424. <style lang="scss">
  1425. .font-size-box{
  1426. width: 144px;
  1427. .el-input-number{
  1428. width: 100%;
  1429. }
  1430. .el-input-number__decrease{
  1431. border-radius: 40px 0 0 40px;
  1432. border-right-color: #DDD;
  1433. }
  1434. .el-input-number__increase{
  1435. border-radius: 0 40px 40px 0;
  1436. border-left-color: #DDD;
  1437. }
  1438. .el-input__inner{
  1439. border-radius: 40px;
  1440. border-color: #DDD;
  1441. background: #fff;
  1442. color: #000;
  1443. font-weight: 700;
  1444. }
  1445. .el-input-number__decrease, .el-input-number__increase{
  1446. background: #fff;
  1447. color: #000;
  1448. font-weight: 700;
  1449. }
  1450. &-green{
  1451. .el-input-number__decrease{
  1452. border-right-color: #235446;
  1453. }
  1454. .el-input-number__increase{
  1455. border-left-color: #235446;
  1456. }
  1457. .el-input__inner{
  1458. border-color: #265A4B;
  1459. background: #13392E;
  1460. color: #fff;
  1461. }
  1462. .el-input-number__decrease, .el-input-number__increase{
  1463. background: #265A4B;
  1464. color: #fff;
  1465. }
  1466. }
  1467. }
  1468. </style>