Practicechs.vue 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376
  1. <!-- -->
  2. <template>
  3. <div class="NNPE-ArticleView" v-if="curQue">
  4. <!-- <a class="ArticleView-full" @click="fullScreen">黑板模式</a> -->
  5. <div
  6. class="aduioLine-box aduioLine-practice-npc"
  7. v-if="
  8. ((curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url) ||
  9. config.isHasPY ||
  10. config.isHasEN) &&
  11. curQue.property.mp3_position === 'top'
  12. "
  13. >
  14. <div class="aduioLine-content">
  15. <template v-if="curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url">
  16. <AudioLine
  17. audioId="diaPraAudio"
  18. :mp3="curQue.mp3_list[0].url"
  19. :getCurTime="getCurTime"
  20. ref="audioLine"
  21. :stopAudio="stopAudio"
  22. :width="colLength == 2 ? 175 : isPhone ? 200 : 750"
  23. :isRepeat="isRepeat"
  24. :mp3Source="curQue.mp3_list[0].source"
  25. :ed="ed"
  26. type="audioLine"
  27. @handleChangeStopAudio="handleChangeStopAudio"
  28. @emptyEd="emptyEd"
  29. :attrib="attrib"
  30. />
  31. </template>
  32. </div>
  33. <div class="aduioLine-right">
  34. <!-- <span :class="['Repeat-16', isRepeat ? '' : 'disabled']" @click="changeRepeat"></span> -->
  35. <SvgIcon
  36. v-if="config.isHasPY"
  37. icon-class="repeat-1"
  38. size="16"
  39. :class="['Repeat-16', isRepeat ? '' : 'disabled']"
  40. :style="{ color: isRepeat ? (attrib ? attrib.topic_color : '') : '#DCDFE6', cursor: 'pointer' }"
  41. @click="changeRepeat"
  42. />
  43. <!-- <span
  44. :class="['pinyin-16', config.isShowPY ? '' : 'disabled']"
  45. @click="changePinyin"
  46. v-if="config.isHasPY"
  47. ></span>
  48. <span :class="['EN-16', config.isShowEN ? '' : 'disabled']" @click="changeEN" v-if="config.isHasEN"></span> -->
  49. <SvgIcon
  50. v-if="config.isHasPY"
  51. icon-class="pin-btn"
  52. size="16"
  53. :class="['pinyin-16', config.isShowPY ? '' : 'disabled']"
  54. :style="{ color: config.isShowPY ? (attrib ? attrib.topic_color : '') : '#DCDFE6' }"
  55. @click="changePinyin"
  56. />
  57. <!-- <span :class="['EN-16', config.isShowEN ? '' : 'disabled']" @click="changeEN" v-if="config.isHasEN"></span> -->
  58. <SvgIcon
  59. v-if="config.isHasEN"
  60. icon-class="en-btn"
  61. size="16"
  62. :class="['EN-16', config.isShowEN ? '' : 'disabled']"
  63. :style="{ color: config.isShowEN ? (attrib ? attrib.topic_color : '') : '#DCDFE6' }"
  64. @click="changeEN"
  65. />
  66. </div>
  67. </div>
  68. <template v-if="resObj">
  69. <p class="notice" v-if="curQue.notice" style="padding-top: 24px">
  70. {{ curQue.notice }}
  71. </p>
  72. <div class="NPC-sentences-list">
  73. <div
  74. :class="['NNPE-detail-box', sentIndex == index ? 'active' : '']"
  75. v-for="(item, index) in resObj.sentList"
  76. :key="'detail' + index"
  77. >
  78. <div
  79. class="NNPE-detail"
  80. @click="
  81. handleChangeTime(
  82. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].bg,
  83. index,
  84. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].ed,
  85. )
  86. "
  87. >
  88. <template v-if="item.sentArr[0].sentIndex == 0">
  89. <RoleChs
  90. :curRole="item.roleDetail"
  91. :color="
  92. (curQue.wordTime &&
  93. curQue.wordTime[index] &&
  94. curTime >= curQue.wordTime[index].bg &&
  95. curTime <= curQue.wordTime[index].ed) ||
  96. sentIndex == index
  97. ? 'rgba(0,0,0,0.85)'
  98. : 'rgba(0,0,0,0.45)'
  99. "
  100. :type="curQue.property.role_img_type"
  101. />
  102. </template>
  103. <div v-else style="width: 36px; height: 36px"></div>
  104. <div class="sentence-box">
  105. <template v-if="item.sentArr[0].sentIndex == 0">
  106. <!-- <div class="roleDetail" v-if="item.roleDetail.detail && item.roleDetail.detail.wordsList.length > 0">
  107. <span
  108. :class="[
  109. 'pinyin',
  110. (curQue.wordTime &&
  111. curQue.wordTime[index] &&
  112. curTime >= curQue.wordTime[index].bg &&
  113. curTime <= curQue.wordTime[index].ed) ||
  114. sentIndex == index
  115. ? 'color85'
  116. : 'color45',
  117. ]"
  118. >{{ item.roleDetail.detail.wordsList | handlePinyin }}</span
  119. >
  120. <span
  121. :class="[
  122. 'chs',
  123. (curQue.wordTime &&
  124. curQue.wordTime[index] &&
  125. curTime >= curQue.wordTime[index].bg &&
  126. curTime <= curQue.wordTime[index].ed) ||
  127. sentIndex == index
  128. ? 'color85'
  129. : 'color45',
  130. ]"
  131. >{{ item.roleDetail.detail.wordsList | handleChs }}</span
  132. >
  133. </div> -->
  134. <div class="roleDetail" v-if="item.roleDetail.fullName || item.roleDetail.fullPinyin">
  135. <span
  136. :class="[
  137. 'chs',
  138. (curQue.wordTime &&
  139. curQue.wordTime[index] &&
  140. curTime >= curQue.wordTime[index].bg &&
  141. curTime <= curQue.wordTime[index].ed) ||
  142. sentIndex == index
  143. ? 'color85'
  144. : 'color45',
  145. ]"
  146. >{{ item.roleDetail.fullName }}</span
  147. >
  148. <span
  149. :class="[
  150. 'pinyin',
  151. (curQue.wordTime &&
  152. curQue.wordTime[index] &&
  153. curTime >= curQue.wordTime[index].bg &&
  154. curTime <= curQue.wordTime[index].ed) ||
  155. sentIndex == index
  156. ? 'color85'
  157. : 'color45',
  158. ]"
  159. >{{ item.roleDetail.fullPinyin }}</span
  160. >
  161. </div>
  162. </template>
  163. <div class="sentence-box-inner" :style="{ background: item.roleDetail.color.bg }">
  164. <div
  165. v-if="item.enwords && config.isShowEN && curQue.enPosition && curQue.enPosition == 'top'"
  166. :class="['enwords', sentIndex == index ? 'wordBlank' : '']"
  167. >
  168. {{ item.enwords }}
  169. </div>
  170. <div style="overflow: hidden; clear: both"></div>
  171. <div class="NNPE-words-box">
  172. <div
  173. class="NNPE-words"
  174. v-for="(pItem, pIndex) in item.sentArr"
  175. :key="'wordsList' + pIndex"
  176. :class="[
  177. pItem.chs != '“' && pItem.wordIndex == 0 ? 'textLeft' : 'textCenter',
  178. pItem.chs == '“' ? 'textRight' : '',
  179. ]"
  180. >
  181. <template v-if="!pItem.width">
  182. <template v-if="pItem.isShow">
  183. <template
  184. v-if="
  185. (item.sentArr[pIndex + 1] &&
  186. item.sentArr[pIndex + 1].chs &&
  187. chsFhList.indexOf(item.sentArr[pIndex + 1].chs) > -1) ||
  188. (item.sentArr[pIndex + 1] &&
  189. item.sentArr[pIndex + 1].chs &&
  190. item.sentArr[pIndex + 1].chs == '#')
  191. "
  192. >
  193. <span class="NNPE-words-box">
  194. <template v-if="curQue.property.pinyin_position == 'top'">
  195. <span
  196. v-if="config.isShowPY && item.dhaspinyin"
  197. class="NNPE-pinyin"
  198. :class="[
  199. pItem.className ? pItem.className : '',
  200. sentIndex == index ? 'wordBlank' : '',
  201. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  202. ]"
  203. >{{ pItem.pinyin }}</span
  204. >
  205. </template>
  206. <span
  207. class="NNPE-chs"
  208. :class="[
  209. pItem.padding && config.isShowPY && item.dhaspinyin ? 'padding' : '',
  210. sentIndex == index ? 'wordBlank' : '',
  211. ]"
  212. >
  213. <template>
  214. <span
  215. v-for="(wItem, wIndex) in pItem.leg"
  216. :key="'ci' + wIndex + pIndex + index"
  217. :class="[
  218. isPlaying &&
  219. pItem.timeList &&
  220. pItem.timeList[wIndex] &&
  221. curTime >= pItem.timeList[wIndex].wordBg &&
  222. curQue.wordTime &&
  223. curQue.wordTime[index] &&
  224. curTime <= curQue.wordTime[index].ed
  225. ? 'active'
  226. : '',
  227. sentIndex == index ? 'wordBlank' : '',
  228. ]"
  229. :style="{
  230. fontFamily: pItem.config.fontFamily,
  231. height: '28px',
  232. display: 'inline-block',
  233. }"
  234. >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs[wIndex] : '' }}</span
  235. >
  236. </template>
  237. </span>
  238. <template v-if="curQue.property.pinyin_position == 'bottom'">
  239. <span
  240. v-if="config.isShowPY && item.dhaspinyin"
  241. class="NNPE-pinyin"
  242. :class="[
  243. pItem.className ? pItem.className : '',
  244. sentIndex == index ? 'wordBlank' : '',
  245. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  246. ]"
  247. >{{ pItem.pinyin }}</span
  248. >
  249. </template>
  250. </span>
  251. <span class="NNPE-words-box">
  252. <template v-if="curQue.property.pinyin_position == 'top'">
  253. <span
  254. v-if="config.isShowPY && item.dhaspinyin"
  255. :class="[
  256. 'NNPE-pinyin',
  257. sentIndex == index ? 'wordBlank' : '',
  258. noFont.indexOf(item.sentArr[pIndex + 1].pinyin) > -1 ? 'noFont' : '',
  259. ]"
  260. style="text-align: left"
  261. >{{ item.sentArr[pIndex + 1].pinyin }}</span
  262. >
  263. </template>
  264. <span class="NNPE-chs" style="text-align: left">
  265. <span
  266. :class="[
  267. isPlaying &&
  268. pItem.timeList[pItem.leg - 1] &&
  269. curTime >= pItem.timeList[pItem.leg - 1].wordBg &&
  270. curQue.wordTime &&
  271. curQue.wordTime[index] &&
  272. curTime <= curQue.wordTime[index].ed
  273. ? 'active'
  274. : '',
  275. sentIndex == index ? 'wordBlank' : '',
  276. ]"
  277. :style="{
  278. fontFamily: item.sentArr[pIndex + 1].config.fontFamily,
  279. height: '28px',
  280. display: 'inline-block',
  281. }"
  282. >
  283. {{
  284. NumberList.indexOf(item.sentArr[pIndex + 1].pinyin) == -1
  285. ? item.sentArr[pIndex + 1].chs
  286. : ''
  287. }}</span
  288. >
  289. </span>
  290. <template v-if="curQue.property.pinyin_position == 'bottom'">
  291. <span
  292. v-if="config.isShowPY && item.dhaspinyin"
  293. :class="[
  294. 'NNPE-pinyin',
  295. sentIndex == index ? 'wordBlank' : '',
  296. noFont.indexOf(item.sentArr[pIndex + 1].pinyin) > -1 ? 'noFont' : '',
  297. ]"
  298. style="text-align: left"
  299. >{{ item.sentArr[pIndex + 1].pinyin }}</span
  300. >
  301. </template>
  302. </span>
  303. <span
  304. class="NNPE-words-box"
  305. v-if="
  306. item.sentArr[pIndex + 2] &&
  307. item.sentArr[pIndex + 2].chs &&
  308. chsFhList.indexOf(item.sentArr[pIndex + 2].chs) > -1
  309. "
  310. >
  311. <template v-if="curQue.property.pinyin_position == 'top'">
  312. <span
  313. v-if="config.isShowPY && item.dhaspinyin"
  314. :class="[
  315. 'NNPE-pinyin',
  316. sentIndex == index ? 'wordBlank' : '',
  317. noFont.indexOf(item.sentArr[pIndex + 2].pinyin) > -1 ? 'noFont' : '',
  318. ]"
  319. style="text-align: left"
  320. >{{ item.sentArr[pIndex + 2].pinyin }}</span
  321. >
  322. </template>
  323. <span class="NNPE-chs" style="text-align: left">
  324. <span
  325. :class="[
  326. isPlaying &&
  327. pItem.timeList[pItem.leg - 1] &&
  328. curTime >= pItem.timeList[pItem.leg - 1].wordBg &&
  329. curQue.wordTime &&
  330. curQue.wordTime[index] &&
  331. curTime <= curQue.wordTime[index].ed
  332. ? 'active'
  333. : '',
  334. sentIndex == index ? 'wordBlank' : '',
  335. ]"
  336. :style="{
  337. fontFamily: item.sentArr[pIndex + 2].config.fontFamily,
  338. height: '28px',
  339. display: 'inline-block',
  340. }"
  341. >
  342. {{
  343. NumberList.indexOf(item.sentArr[pIndex + 2].pinyin) == -1
  344. ? item.sentArr[pIndex + 2].chs
  345. : ''
  346. }}</span
  347. >
  348. </span>
  349. <template v-if="curQue.property.pinyin_position == 'bottom'">
  350. <span
  351. v-if="config.isShowPY && item.dhaspinyin"
  352. :class="[
  353. 'NNPE-pinyin',
  354. sentIndex == index ? 'wordBlank' : '',
  355. noFont.indexOf(item.sentArr[pIndex + 2].pinyin) > -1 ? 'noFont' : '',
  356. ]"
  357. style="text-align: left"
  358. >{{ item.sentArr[pIndex + 2].pinyin }}</span
  359. >
  360. </template>
  361. </span>
  362. </template>
  363. <template v-else>
  364. <template v-if="curQue.property.pinyin_position == 'top'">
  365. <template v-if="NumberList.indexOf(pItem.pinyin) < 0">
  366. <span
  367. v-if="config.isShowPY && item.dhaspinyin"
  368. class="NNPE-pinyin"
  369. :class="[
  370. pItem.chs != '“' && pItem.padding ? 'padding' : '',
  371. pItem.className ? pItem.className : '',
  372. sentIndex == index ? 'wordBlank' : '',
  373. noFont.indexOf(item.pinyin) > -1 ? 'noFont' : '',
  374. ]"
  375. >{{ pItem.pinyin }}</span
  376. >
  377. </template>
  378. </template>
  379. <span
  380. v-if="pItem.chs != '#'"
  381. class="NNPE-chs"
  382. :class="[
  383. pItem.chs != '“' && pItem.padding && config.isShowPY && item.dhaspinyin ? 'padding' : '',
  384. sentIndex == index ? 'wordBlank' : '',
  385. ]"
  386. >
  387. <template>
  388. <span
  389. v-for="(wItem, wIndex) in pItem.leg"
  390. :key="'ci' + wIndex + pIndex + index"
  391. :class="[
  392. isPlaying &&
  393. pItem.timeList &&
  394. pItem.timeList[wIndex] &&
  395. curTime >= pItem.timeList[wIndex].wordBg &&
  396. curQue.wordTime &&
  397. curQue.wordTime[index] &&
  398. curTime <= curQue.wordTime[index].ed
  399. ? 'active'
  400. : '',
  401. ]"
  402. :style="{
  403. fontFamily: pItem.config.fontFamily,
  404. height: '28px',
  405. display: 'inline-block',
  406. }"
  407. >{{ pItem.chs[wIndex] }}</span
  408. >
  409. </template>
  410. </span>
  411. <template v-if="curQue.property.pinyin_position == 'bottom'">
  412. <template v-if="NumberList.indexOf(pItem.pinyin) < 0">
  413. <span
  414. v-if="config.isShowPY && item.dhaspinyin"
  415. class="NNPE-pinyin"
  416. :class="[
  417. pItem.chs != '“' && pItem.padding ? 'padding' : '',
  418. pItem.className ? pItem.className : '',
  419. sentIndex == index ? 'wordBlank' : '',
  420. ]"
  421. >{{ pItem.pinyin }}</span
  422. >
  423. </template>
  424. </template>
  425. </template>
  426. </template>
  427. </template>
  428. <template v-else>
  429. <span
  430. :style="{
  431. height: pItem.height + 'px',
  432. width: pItem.width + 'px',
  433. }"
  434. ></span>
  435. </template>
  436. </div>
  437. </div>
  438. <div style="overflow: hidden; clear: both"></div>
  439. <div
  440. v-if="
  441. item.enwords &&
  442. config.isShowEN &&
  443. (!curQue.enPosition || (curQue.enPosition && curQue.enPosition == 'bottom'))
  444. "
  445. :class="['enwords', sentIndex == index ? 'wordBlank' : '']"
  446. >
  447. {{ item.enwords }}
  448. </div>
  449. <div
  450. class="multilingual-para"
  451. :class="[item.isTitle ? 'multilingual-para-center' : '']"
  452. v-if="curQue.property.multilingual_position === 'para'"
  453. >
  454. {{
  455. multilingualTextList[multilingual] && multilingualTextList[multilingual][index]
  456. ? multilingualTextList[multilingual][index]
  457. : ''
  458. }}
  459. </div>
  460. </div>
  461. </div>
  462. </div>
  463. <div v-show="sentIndex == index" class="Soundrecord-content">
  464. <div class="Soundrecord-content-inner">
  465. <Soundrecord
  466. type="promax"
  467. class="luyin-box"
  468. @getWavblob="getWavblob"
  469. @handleParentPlay="handleParentPlay"
  470. @sentPause="sentPause"
  471. :TaskModel="TaskModel"
  472. :answerRecordList="
  473. curQue.Bookanswer.practiceModel[index] && curQue.Bookanswer.practiceModel[index].recordList
  474. "
  475. :tmIndex="index"
  476. @handleWav="handleWav"
  477. :sentIndex="sentIndex"
  478. :attrib="attrib"
  479. v-if="refresh"
  480. />
  481. <div class="compare-box" v-if="curQue.mp3_list && curQue.mp3_list.length > 0">
  482. <Audio-compare
  483. :themeColor="attrib ? attrib.topic_color : '#e35454'"
  484. :index="index"
  485. :sentIndex="sentIndex"
  486. :url="curQue.mp3_list[0].id"
  487. :bg="curQue.wordTime[index].bg"
  488. :ed="curQue.wordTime[index].ed"
  489. :wavblob="wavblob"
  490. :getCurTime="getCurTime"
  491. :sentPause="sentPause"
  492. :isRecord="isRecord"
  493. :handleChangeStopAudio="handleChangeStopAudio"
  494. :getPlayStatus="getPlayStatus"
  495. :attrib="attrib"
  496. />
  497. </div>
  498. </div>
  499. <span class="full-screen-icon" @click="fullScreen">
  500. <svg-icon
  501. icon-class="icon-full"
  502. size="24"
  503. :style="{
  504. color: attrib && attrib.topic_color ? attrib.topic_color : '',
  505. }"
  506. />
  507. </span>
  508. </div>
  509. </div>
  510. <!-- <div class="multilingual" v-for="(items, indexs) in multilingualTextList" :key="indexs">
  511. {{ items }}
  512. </div> -->
  513. </div>
  514. </template>
  515. <template v-for="(items, indexs) in curQue.detail">
  516. <div
  517. class="multilingual"
  518. :key="indexs"
  519. v-if="curQue.property.multilingual_position === 'all' && items.multilingualTextList[multilingual]"
  520. >
  521. <div class="multilingual-para" :class="[items.isTitle ? 'multilingual-para-center' : '']">
  522. {{
  523. items.multilingualTextList && items.multilingualTextList[multilingual]
  524. ? items.multilingualTextList[multilingual].join(' ')
  525. : ''
  526. }}
  527. </div>
  528. </div>
  529. </template>
  530. <div
  531. class="aduioLine-box aduioLine-practice-npc aduioLine-box-bottom"
  532. v-if="
  533. ((curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url) ||
  534. config.isHasPY ||
  535. config.isHasEN) &&
  536. curQue.property.mp3_position === 'bottom'
  537. "
  538. >
  539. <div class="aduioLine-content">
  540. <template v-if="curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url">
  541. <AudioLine
  542. audioId="diaPraAudio"
  543. :mp3="curQue.mp3_list[0].url"
  544. :getCurTime="getCurTime"
  545. ref="audioLine"
  546. :stopAudio="stopAudio"
  547. :width="colLength == 2 ? 175 : isPhone ? 200 : 750"
  548. :isRepeat="isRepeat"
  549. :mp3Source="curQue.mp3_list[0].source"
  550. :ed="ed"
  551. type="audioLine"
  552. @handleChangeStopAudio="handleChangeStopAudio"
  553. @emptyEd="emptyEd"
  554. :attrib="attrib"
  555. />
  556. </template>
  557. </div>
  558. <div class="aduioLine-right">
  559. <SvgIcon
  560. v-if="config.isHasPY"
  561. icon-class="repeat-1"
  562. size="16"
  563. :class="['Repeat-16', isRepeat ? '' : 'disabled']"
  564. :style="{ color: isRepeat ? (attrib ? attrib.topic_color : '') : '#DCDFE6', cursor: 'pointer' }"
  565. @click="changeRepeat"
  566. />
  567. <!-- <span
  568. :class="['pinyin-16', config.isShowPY ? '' : 'disabled']"
  569. @click="changePinyin"
  570. v-if="config.isHasPY"
  571. ></span>
  572. <span :class="['EN-16', config.isShowEN ? '' : 'disabled']" @click="changeEN" v-if="config.isHasEN"></span> -->
  573. <SvgIcon
  574. v-if="config.isHasPY"
  575. icon-class="pin-btn"
  576. size="16"
  577. :class="['pinyin-16', config.isShowPY ? '' : 'disabled']"
  578. :style="{ color: config.isShowPY ? (attrib ? attrib.topic_color : '') : '#DCDFE6' }"
  579. @click="changePinyin"
  580. />
  581. <!-- <span :class="['EN-16', config.isShowEN ? '' : 'disabled']" @click="changeEN" v-if="config.isHasEN"></span> -->
  582. <SvgIcon
  583. v-if="config.isHasEN"
  584. icon-class="en-btn"
  585. size="16"
  586. :class="['EN-16', config.isShowEN ? '' : 'disabled']"
  587. :style="{ color: config.isShowEN ? (attrib ? attrib.topic_color : '') : '#DCDFE6' }"
  588. @click="changeEN"
  589. />
  590. </div>
  591. </div>
  592. <div class="voice-full-screen" :id="'screen-' + mathNum">
  593. <Voicefullscreen
  594. v-if="isFull && resObj"
  595. :themeColor="attrib ? attrib.topic_color : '#e35454'"
  596. :curQue="curQue"
  597. :sentList="resObj.sentList"
  598. :sentIndex="sentIndex"
  599. :mp3="curQue.mp3_list && curQue.mp3_list[0] ? curQue.mp3_list[0].id : ''"
  600. :noFont="noFont"
  601. :NNPENewWordList="NNPENewWordList"
  602. :currentTreeID="currentTreeID"
  603. :isFull="isFull"
  604. :config="config"
  605. :TaskModel="TaskModel"
  606. @handleWav="handleWav"
  607. @changePinyin="changePinyin"
  608. @changeEN="changeEN"
  609. @exitFullscreen="exitFullscreen"
  610. @changeIsFull="changeIsFull"
  611. :NpcNewWordMp3="NpcNewWordMp3"
  612. :attrib="attrib"
  613. />
  614. </div>
  615. </div>
  616. </template>
  617. <script>
  618. import { timeStrToSen } from '@/utils/transform';
  619. import AudioLine from '../voice_matrix/components/AudioLine.vue';
  620. import Soundrecord from '../../common/SoundRecord.vue'; // 录音模板
  621. import RoleChs from './RoleChs.vue';
  622. import AudioCompare from '../article/components/AudioCompare.vue';
  623. import Voicefullscreen from '../article/Voicefullscreen.vue';
  624. export default {
  625. name: 'ArticleView',
  626. props: [
  627. 'curQue',
  628. 'colorBox',
  629. 'noFont',
  630. 'attrib',
  631. 'config',
  632. 'NNPENewWordList',
  633. 'currentTreeID',
  634. 'TaskModel',
  635. 'colLength',
  636. 'NpcNewWordMp3',
  637. 'isPhone',
  638. 'multilingual',
  639. ],
  640. components: {
  641. AudioLine,
  642. Soundrecord,
  643. RoleChs,
  644. AudioCompare,
  645. Voicefullscreen,
  646. },
  647. filters: {
  648. handlePinyin(wordsList) {
  649. let str = '';
  650. wordsList.forEach((item, index) => {
  651. if (index < wordsList.length - 1) {
  652. str += item.pinyin + ' ';
  653. } else {
  654. str += item.pinyin;
  655. }
  656. });
  657. return str;
  658. },
  659. handleChs(wordsList) {
  660. let str = '';
  661. wordsList.forEach((item, index) => {
  662. if (index < wordsList.length - 1) {
  663. str += item.chs + ' ';
  664. } else {
  665. str += item.chs;
  666. }
  667. });
  668. return str;
  669. },
  670. },
  671. data() {
  672. return {
  673. wavblob: null,
  674. resObj: null,
  675. curTime: 0, //单位s
  676. chsFhList: [',', '。', '”', ':', '》', '?', '!', ';', '、'],
  677. enFhList: [',', '.', ';', '?', '!', ':', '>', '<'],
  678. NumberList: ['①', '②', '③', '④', '⑤', '⑥', '⑦', '⑧', '⑨', '⑩', '⑪', '⑫', '⑬', '⑭', '⑮', '⑯', '⑰', '⑱', '⑲', '⑳'],
  679. stopAudio: false,
  680. sentIndex: 0,
  681. isRepeat: false,
  682. currSent: null, //当前句子的时间
  683. isRecord: false,
  684. isFull: false,
  685. mathNum: Math.random().toString(36).substr(2),
  686. ed: undefined,
  687. refresh: true,
  688. highWords: null,
  689. highWordsArr: [],
  690. highIndex: 0,
  691. newWordList: [],
  692. multilingualTextList: {},
  693. };
  694. },
  695. computed: {
  696. isPlaying: function () {
  697. let playing = false;
  698. if (this.$refs.audioLine) {
  699. playing = this.$refs.audioLine.audio.isPlaying;
  700. }
  701. return playing;
  702. },
  703. },
  704. watch: {
  705. sentIndex: {
  706. handler: function (newVal, oldVal) {
  707. let _this = this;
  708. if (newVal != oldVal) {
  709. let Bookanswer = _this.curQue.Bookanswer;
  710. if (
  711. Bookanswer &&
  712. Bookanswer.practiceModel &&
  713. Bookanswer.practiceModel[newVal] &&
  714. Bookanswer.practiceModel[newVal].recordList &&
  715. Bookanswer.practiceModel[newVal].recordList.length > 0
  716. ) {
  717. _this.wavblob = Bookanswer.practiceModel[newVal].recordList[0].wavData;
  718. } else {
  719. _this.wavblob = '';
  720. }
  721. }
  722. },
  723. deep: true,
  724. },
  725. isFull: {
  726. handler: function (newVal, oldVal) {
  727. let _this = this;
  728. _this.refresh = false;
  729. if (!newVal) {
  730. _this.$nextTick(() => {
  731. // 重新渲染组件
  732. _this.refresh = true;
  733. });
  734. }
  735. },
  736. deep: true,
  737. },
  738. },
  739. //方法集合
  740. methods: {
  741. getPlayStatus(val) {
  742. //this.isPlaying = val;
  743. },
  744. pauseAudio() {
  745. let audio = document.getElementsByTagName('audio');
  746. if (audio && audio.length > 0 && window.location.href.indexOf('GCLS-Learn') == -1) {
  747. audio.forEach((item) => {
  748. item.pause();
  749. });
  750. }
  751. },
  752. pauseVideo() {
  753. let video = document.getElementsByTagName('video');
  754. if (video && video.length > 0 && window.location.href.indexOf('GCLS-Learn') == -1) {
  755. video.forEach((item) => {
  756. item.pause();
  757. });
  758. }
  759. },
  760. //语音全屏
  761. fullScreen(type) {
  762. this.pauseAudio();
  763. this.pauseVideo();
  764. this.isFull = true;
  765. this.goFullscreen();
  766. },
  767. goFullscreen() {
  768. let id = 'screen-' + this.mathNum;
  769. var element = document.getElementById(id);
  770. if (element.requestFullscreen) {
  771. element.requestFullscreen();
  772. } else if (element.msRequestFullscreen) {
  773. element.msRequestFullscreen();
  774. } else if (element.mozRequestFullScreen) {
  775. element.mozRequestFullScreen();
  776. } else if (element.webkitRequestFullscreen) {
  777. element.webkitRequestFullscreen();
  778. }
  779. },
  780. exitFullscreen() {
  781. this.isFull = false;
  782. if (document.exitFullscreen) {
  783. document.exitFullscreen();
  784. } else if (document.msExitFullscreen) {
  785. document.msExitFullscreen();
  786. } else if (document.mozCancelFullScreen) {
  787. document.mozCancelFullScreen();
  788. } else if (document.webkitExitFullscreen) {
  789. document.webkitExitFullscreen();
  790. }
  791. },
  792. changeIsFull() {
  793. this.isFull = false;
  794. },
  795. getWavblob(wavblob) {
  796. this.wavblob = wavblob;
  797. },
  798. sentPause(isRecord) {
  799. this.isRecord = isRecord;
  800. },
  801. getCurTime(curTime) {
  802. let _this = this;
  803. if (_this.isRepeat) {
  804. let time = curTime * 1000;
  805. if (time >= _this.currSent.ed || time <= _this.currSent.bg) {
  806. _this.curTime = _this.currSent.bg;
  807. this.$refs.audioLine.onTimeupdateTime(_this.currSent.bg / 1000, true);
  808. } else {
  809. _this.curTime = curTime * 1000;
  810. }
  811. } else {
  812. _this.curTime = curTime * 1000;
  813. _this.getSentIndex(_this.curTime);
  814. }
  815. },
  816. getSentIndex(curTime) {
  817. for (let i = 0; i < this.curQue.wordTime.length; i++) {
  818. let bg = this.curQue.wordTime[i].bg;
  819. let ed = this.curQue.wordTime[i].ed;
  820. if (curTime >= bg && curTime <= ed) {
  821. this.sentIndex = i;
  822. break;
  823. }
  824. }
  825. },
  826. handleData() {
  827. this.curQue.multilingual.forEach((item) => {
  828. let trans_arr = item.translation.split('\n');
  829. this.$set(this.multilingualTextList, item.type, trans_arr);
  830. });
  831. let resArr = [],
  832. sentArrTotal = [];
  833. let curQue = JSON.parse(JSON.stringify(this.curQue));
  834. let wordTimeList = curQue.wordTime;
  835. let dhaspinyin = false; // 每段是否有拼音
  836. curQue.detail.forEach((dItem, dIndex) => {
  837. dhaspinyin = false;
  838. let roleDetail = this.getRole(dItem);
  839. dItem.wordsList.forEach((sItem, sIndex) => {
  840. let sentArr = [];
  841. let sentence = dItem.sentences[sIndex];
  842. sItem.forEach((wItem, wIndex) => {
  843. let startIndex = wIndex == 0 ? 0 : sentArr[wIndex - 1].startIndex + sentArr[wIndex - 1].chs.length;
  844. let endIndex = wIndex == 0 ? wItem.chs.length : sentArr[wIndex - 1].endIndex + wItem.chs.length;
  845. // this.judgePad(sItem, wItem, wIndex);
  846. this.mergeWordSymbol(wItem);
  847. let words = '';
  848. if (this.newWordList.length > 0) {
  849. if (!this.highWords) {
  850. this.findLightWord(wItem, wIndex, sentence, sItem);
  851. words = this.highWords ? this.highWords.words : '';
  852. } else {
  853. if (wIndex > this.highWords.endIndex - 1) {
  854. this.highWords = null;
  855. this.findLightWord(wItem, wIndex, sentence, sItem);
  856. words = this.highWords ? this.highWords.words : '';
  857. } else {
  858. words = this.highWords ? this.highWords.words : '';
  859. }
  860. }
  861. }
  862. let obj = {
  863. paraIndex: dIndex, //段落索引
  864. sentIndex: sIndex, //在段落中句子索引
  865. wordIndex: wIndex, //单词的索引
  866. pinyin:
  867. curQue.pinyin_type === 'pinyin'
  868. ? curQue.property.is_first_sentence_first_hz_pinyin_first_char_upper_case === 'true' && wIndex === 0
  869. ? wItem.pinyin_up
  870. : wItem.pinyin
  871. : wItem.pinyin_tone,
  872. chs: wItem.chs,
  873. padding: true,
  874. className: wItem.className,
  875. isShow: wItem.isShow,
  876. startIndex: startIndex,
  877. endIndex: endIndex,
  878. leg: wItem.chs.length,
  879. timeList: [],
  880. words: words,
  881. config: {
  882. fontFamily: wItem.fontFamily,
  883. },
  884. };
  885. sentArr.push(obj);
  886. if (wItem.pinyin) dhaspinyin = true;
  887. });
  888. let objs = {
  889. roleDetail: roleDetail,
  890. sentArr: sentArr,
  891. enwords: dItem.sentencesEn && dItem.sentencesEn[sIndex] && dItem.sentencesEn[sIndex].replace(/\'/g, '’'),
  892. dhaspinyin: dhaspinyin,
  893. };
  894. sentArrTotal.push(sentArr);
  895. resArr.push(objs);
  896. });
  897. });
  898. if (wordTimeList && wordTimeList.length > 0) {
  899. this.mergeWordTime(sentArrTotal, wordTimeList);
  900. }
  901. this.resObj = { sentList: resArr };
  902. },
  903. //获取角色
  904. getRole(dItem) {
  905. let roleIndex = dItem.roleIndex;
  906. let resObj = null;
  907. let roleList = JSON.parse(JSON.stringify(this.curQue.property.role_list));
  908. for (let i = 0; i < roleList.length; i++) {
  909. let item = roleList[i];
  910. if (item.id == roleIndex) {
  911. resObj = item;
  912. // resObj.color = this.colorBox[i];
  913. break;
  914. }
  915. }
  916. return resObj;
  917. },
  918. mergeWordTime(resArr, wordTimeList) {
  919. resArr.forEach((item, index) => {
  920. let wordsResultList = wordTimeList[index].wordsResultList;
  921. item.forEach((wItem) => {
  922. let startIndex = wItem.startIndex;
  923. let endIndex = wItem.endIndex;
  924. wItem.timeList = wordsResultList.slice(startIndex, endIndex);
  925. });
  926. });
  927. },
  928. //词和标点合一起
  929. mergeWordSymbol(wItem) {
  930. if (this.chsFhList.indexOf(wItem.chs) > -1 || this.NumberList.indexOf(wItem.pinyin) > -1) {
  931. wItem.isShow = false;
  932. } else {
  933. wItem.isShow = true;
  934. }
  935. },
  936. findLightWord(wItem, startIndex, sentence, sItem) {
  937. let words = '',
  938. endIndex = 0;
  939. this.newWordList.forEach((item) => {
  940. if (item.length == 1) {
  941. if (item == wItem.chs && !wItem.banLight) {
  942. words = wItem.chs;
  943. endIndex = startIndex + 1;
  944. }
  945. } else {
  946. if (item[0] == wItem.chs && sentence.indexOf(item) > -1) {
  947. let index = null;
  948. let chsStr = '';
  949. for (let i = startIndex; i < sItem.length + 1; i++) {
  950. index = i;
  951. if (chsStr.length == item.length) {
  952. break;
  953. } else {
  954. chsStr += sItem[i] ? sItem[i].chs : '';
  955. }
  956. }
  957. if (chsStr == item && !wItem.banLight) {
  958. words = item;
  959. endIndex = index;
  960. }
  961. } else if (wItem.new_word && wItem.new_word == item && !wItem.banLight) {
  962. words = item;
  963. endIndex = startIndex + 1;
  964. }
  965. }
  966. });
  967. if (words) {
  968. this.highWords = { words: words, endIndex: endIndex };
  969. } else {
  970. this.highWords = null;
  971. }
  972. },
  973. //判断是否有padding
  974. judgePad(sItem, wItem, curIndex) {
  975. let leg = sItem.length;
  976. if (curIndex < leg - 1) {
  977. let nextIndex = curIndex + 1;
  978. let chs = sItem[nextIndex].chs;
  979. if (this.chsFhList.indexOf(chs) > -1 || this.chsFhList.indexOf(wItem.chs) > -1) {
  980. wItem.padding = false;
  981. } else {
  982. wItem.padding = true;
  983. }
  984. if (this.enFhList.indexOf(wItem.pinyin) > -1) {
  985. wItem.className = 'textLeft';
  986. }
  987. }
  988. },
  989. //转化时间
  990. handleTimeList(list) {
  991. let listRes = [];
  992. list.forEach((item) => {
  993. let res = timeStrToSen(item);
  994. listRes.push(res);
  995. });
  996. return listRes;
  997. },
  998. //计算总时间
  999. countWordTime(sentArr) {
  1000. let total = 0;
  1001. sentArr.forEach((item) => {
  1002. total += item.endTime;
  1003. });
  1004. return total;
  1005. },
  1006. //点击播放某个句子
  1007. handleChangeTime(time, index, ed) {
  1008. let _this = this;
  1009. if (_this.isRepeat) {
  1010. _this.currSent = _this.curQue.wordTime[index];
  1011. }
  1012. _this.sentIndex = index;
  1013. _this.ed = ed;
  1014. if (time) {
  1015. _this.curTime = time;
  1016. _this.$refs.audioLine.onTimeupdateTime(time / 1000, true);
  1017. }
  1018. },
  1019. emptyEd() {
  1020. this.ed = undefined;
  1021. },
  1022. handleWav(list, tmIndex) {
  1023. tmIndex = tmIndex ? tmIndex : 0;
  1024. this.curQue.Bookanswer.practiceModel[tmIndex] = {
  1025. recordList: [],
  1026. };
  1027. this.$set(this.curQue.Bookanswer.practiceModel[tmIndex], 'recordList', list);
  1028. },
  1029. // 录音时暂停音频播放
  1030. handleParentPlay() {
  1031. this.stopAudio = true;
  1032. },
  1033. // 音频播放时改变布尔值
  1034. handleChangeStopAudio() {
  1035. this.stopAudio = false;
  1036. },
  1037. //拼音的显示和隐藏
  1038. changePinyin() {
  1039. if (this.config.isHasPY) {
  1040. this.$emit('changeConfig', 'isShowPY');
  1041. }
  1042. },
  1043. // 英文的显示和隐藏
  1044. changeEN() {
  1045. if (this.config.isHasEN) {
  1046. this.$emit('changeConfig', 'isShowEN');
  1047. }
  1048. },
  1049. // 单句是否重复播放
  1050. changeRepeat() {
  1051. let _this = this;
  1052. _this.isRepeat = !_this.isRepeat;
  1053. this.currSent = _this.curQue.wordTime[_this.sentIndex];
  1054. },
  1055. handleNewword() {
  1056. let NewWordList = [];
  1057. this.NNPENewWordList.forEach((wItem) => {
  1058. // item.forEach((wItem) => {
  1059. if (wItem.new_word) {
  1060. NewWordList.push(wItem.new_word);
  1061. } else if (wItem.detail && wItem.detail.sentence) {
  1062. NewWordList.push(wItem.detail.sentence);
  1063. }
  1064. // });
  1065. });
  1066. this.newWordList = JSON.parse(JSON.stringify(NewWordList));
  1067. },
  1068. },
  1069. //生命周期 - 创建完成(可以访问当前this实例)
  1070. created() {},
  1071. //生命周期 - 挂载完成(可以访问DOM元素)
  1072. mounted() {
  1073. if (this.curQue) {
  1074. this.handleData();
  1075. }
  1076. },
  1077. beforeCreate() {}, //生命周期 - 创建之前
  1078. beforeMount() {}, //生命周期 - 挂载之前
  1079. beforeUpdate() {}, //生命周期 - 更新之前
  1080. updated() {}, //生命周期 - 更新之后
  1081. beforeDestroy() {}, //生命周期 - 销毁之前
  1082. destroyed() {}, //生命周期 - 销毁完成
  1083. activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
  1084. };
  1085. </script>
  1086. <style lang="scss" scoped>
  1087. //@import url(); 引入公共css类
  1088. .NNPE-ArticleView {
  1089. position: relative;
  1090. width: 100%;
  1091. .ArticleView-full {
  1092. position: absolute;
  1093. top: -44px;
  1094. left: 0;
  1095. z-index: 99999;
  1096. padding-left: 24px;
  1097. font-size: 14px;
  1098. font-weight: bold;
  1099. line-height: 24px;
  1100. color: #000;
  1101. background: url('@/assets/full-screen-red.png') left center no-repeat;
  1102. background-size: 16px 16px;
  1103. }
  1104. .NPC-sentences-list {
  1105. padding: 0 0 24px;
  1106. }
  1107. .multilingual {
  1108. padding: 6px 24px 12px;
  1109. word-break: break-word;
  1110. }
  1111. .aduioLine-content {
  1112. flex: 1;
  1113. }
  1114. .aduioLine-practice-npc {
  1115. display: flex;
  1116. align-items: center;
  1117. justify-content: flex-start;
  1118. .aduioLine-right {
  1119. box-sizing: border-box;
  1120. display: flex;
  1121. align-items: center;
  1122. justify-content: space-between;
  1123. width: 92px;
  1124. height: 40px;
  1125. padding: 0 12px;
  1126. border-left: 1px solid rgba(0, 0, 0, 10%);
  1127. > span {
  1128. width: 16px;
  1129. height: 16px;
  1130. cursor: pointer;
  1131. }
  1132. }
  1133. }
  1134. .NNPE-detail-box {
  1135. &.active {
  1136. background: rgba(0, 0, 0, 6%);
  1137. }
  1138. }
  1139. .enwords {
  1140. padding-left: 3px;
  1141. font-family: 'Helvetica';
  1142. font-size: 14px;
  1143. font-weight: normal;
  1144. line-height: 22px;
  1145. color: rgba(0, 0, 0, 45%);
  1146. word-break: break-word;
  1147. &.wordBlank {
  1148. color: rgba(0, 0, 0, 85%);
  1149. }
  1150. }
  1151. .NNPE-detail {
  1152. box-sizing: border-box;
  1153. display: flex;
  1154. align-items: flex-start;
  1155. justify-content: flex-start;
  1156. width: 100%;
  1157. padding: 8px 24px;
  1158. overflow: hidden;
  1159. clear: both;
  1160. color: rgba(0, 0, 0, 45%);
  1161. .sentence-box {
  1162. padding-left: 8px;
  1163. overflow: hidden;
  1164. clear: both;
  1165. &-inner {
  1166. box-sizing: border-box;
  1167. float: left;
  1168. padding: 8px 12px;
  1169. border: 1px solid rgba(0, 0, 0, 10%);
  1170. border-radius: 8px;
  1171. }
  1172. .roleDetail {
  1173. display: flex;
  1174. align-items: center;
  1175. justify-content: flex-start;
  1176. height: 36px;
  1177. .pinyin {
  1178. margin-left: 4px;
  1179. font-family: 'League';
  1180. font-size: 14px;
  1181. line-height: 22px;
  1182. color: rgba(0, 0, 0, 85%);
  1183. &.noFont {
  1184. font-family: initial;
  1185. }
  1186. }
  1187. .chs {
  1188. font-family: '楷体';
  1189. font-size: 16px;
  1190. line-height: 24px;
  1191. color: rgba(0, 0, 0, 85%);
  1192. }
  1193. .color85 {
  1194. color: rgba(0, 0, 0, 85%);
  1195. }
  1196. .color45 {
  1197. color: rgba(0, 0, 0, 45%);
  1198. }
  1199. }
  1200. }
  1201. .NNPE-words {
  1202. float: left;
  1203. &-box {
  1204. float: left;
  1205. > span {
  1206. display: block;
  1207. &.NNPE-pinyin {
  1208. height: 20px;
  1209. font-family: 'League';
  1210. font-size: 14px;
  1211. font-weight: normal;
  1212. line-height: 20px;
  1213. &.noFont {
  1214. font-family: initial;
  1215. }
  1216. &.textLeft {
  1217. text-align: left;
  1218. }
  1219. &.wordBlank {
  1220. color: rgba(0, 0, 0, 85%);
  1221. }
  1222. }
  1223. &.NNPE-chs {
  1224. font-family: '楷体';
  1225. font-size: 20px;
  1226. line-height: 28px;
  1227. .active {
  1228. color: #de4444;
  1229. }
  1230. &.wordBlank {
  1231. color: rgba(0, 0, 0, 85%);
  1232. }
  1233. }
  1234. // &.padding {
  1235. // padding-right: 6px;
  1236. // }
  1237. }
  1238. }
  1239. &.textLeft {
  1240. text-align: left;
  1241. }
  1242. &.textCenter {
  1243. text-align: center;
  1244. }
  1245. &.textRight {
  1246. text-align: right;
  1247. }
  1248. > span {
  1249. display: block;
  1250. &.NNPE-pinyin {
  1251. height: 20px;
  1252. font-family: 'League';
  1253. font-size: 14px;
  1254. font-weight: normal;
  1255. line-height: 20px;
  1256. &.noFont {
  1257. font-family: initial;
  1258. }
  1259. &.textLeft {
  1260. text-align: left;
  1261. }
  1262. &.wordBlank {
  1263. color: rgba(0, 0, 0, 85%);
  1264. }
  1265. }
  1266. &.NNPE-chs {
  1267. font-family: '楷体';
  1268. font-size: 20px;
  1269. line-height: 28px;
  1270. .active {
  1271. color: #de4444;
  1272. }
  1273. &.wordBlank {
  1274. color: rgba(0, 0, 0, 85%);
  1275. }
  1276. }
  1277. &.padding {
  1278. padding: 0 3px;
  1279. }
  1280. }
  1281. }
  1282. }
  1283. .Soundrecord-content {
  1284. display: flex;
  1285. align-items: center;
  1286. justify-content: space-between;
  1287. padding: 0 10px 8px 68px;
  1288. &-inner {
  1289. display: flex;
  1290. align-items: center;
  1291. justify-content: flex-start;
  1292. width: 304px;
  1293. padding: 4px 12px;
  1294. background: #fff;
  1295. border: 1px solid rgba(0, 0, 0, 10%);
  1296. border-radius: 8px;
  1297. .luyin-box {
  1298. width: 280px;
  1299. }
  1300. .compare-box {
  1301. display: flex;
  1302. align-items: center;
  1303. justify-content: center;
  1304. height: 32px;
  1305. }
  1306. }
  1307. .full-screen-icon {
  1308. width: 24px;
  1309. height: 24px;
  1310. cursor: pointer;
  1311. // background: url('@/assets/full-screen-red.png') no-repeat left top;
  1312. // background-size: 100% 100%;
  1313. }
  1314. }
  1315. .voice-full-screen {
  1316. // position: fixed;
  1317. // top: 0;
  1318. // left: 0;
  1319. // z-index: 9999;
  1320. }
  1321. }
  1322. </style>