PhraseModelChs.vue 51 KB

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