Result.vue 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450
  1. <template>
  2. <div class="result" v-loading="loading">
  3. <Header
  4. :projectShow="true"
  5. :seekShow="true"
  6. :seekOption="false"
  7. :seekOptions="true"
  8. @changehzdata="changehzdata"
  9. />
  10. <div class="main">
  11. <div class="hanzi_list">
  12. <div class="top_jf">
  13. <div class="j_f">
  14. <div :class="[JFIndex == 0 ? 'sele' : '']" @click="jfEvent(0)">
  15. </div>
  16. <div :class="[JFIndex == 1 ? 'sele' : '']" @click="jfEvent(1)">
  17. </div>
  18. </div>
  19. </div>
  20. <div
  21. class="list_one_box"
  22. :style="{
  23. overflowY: unfold ? 'scroll' : 'hidden',
  24. }"
  25. >
  26. <div
  27. class="list_one"
  28. v-for="(item, index) in ShowHzData"
  29. :key="'index' + index"
  30. >
  31. <Strockplayredline
  32. v-if="item.hzDetail.hz_json"
  33. :Book_text="JFIndex == 0 ? item.con : item.fanti"
  34. :playStorkes="true"
  35. :curItem="item.hzDetail"
  36. :targetDiv="'bwcHanziIntp' + index + item.con"
  37. :isHighlight="false"
  38. :judgeAnswer="2"
  39. />
  40. <div class="Highlight" v-if="item.hzDetail.hz_json">
  41. <div class="play_audio">
  42. <img src="../../assets/teacherdev/speaker-one.png" alt="" />
  43. <span>{{ item.pinyin }}</span>
  44. </div>
  45. <div
  46. v-for="(items, indexs) in item.hzDetail.hz_json.medians.length"
  47. :key="'row' + indexs"
  48. class="row"
  49. >
  50. <StrockplayredlineCorpus
  51. :Book_text="JFIndex == 0 ? item.con : item.fanti"
  52. :playStorkes="false"
  53. :curItem="item.hzDetail"
  54. :targetDiv="'bwcHanziIntp_height' + index + item.con + indexs"
  55. :targetDivGray="
  56. 'bwcHanziIntp_height_Grey' + index + item.con + indexs
  57. "
  58. :isHighlight="true"
  59. :judgeAnswer="indexs + 1"
  60. :BoxbgType="0"
  61. strokeColorgray="#aaaaaa"
  62. strokeColor="#000000"
  63. />
  64. <div class="number">{{ indexs + 1 }}</div>
  65. </div>
  66. </div>
  67. </div>
  68. </div>
  69. <div class="shouqi" v-if="hzData.length > 2">
  70. <span @click="updownHz">
  71. <template v-if="unfold">
  72. <img src="../../assets/teacherdev/up.png" alt="" />
  73. 收起
  74. </template>
  75. <template v-else>
  76. <img src="../../assets/teacherdev/down.png" alt="" />
  77. 展开
  78. </template>
  79. </span>
  80. </div>
  81. </div>
  82. <div class="txt_imgtable">
  83. <div class="left">
  84. <div class="top">
  85. <div>
  86. <div class="pattern">
  87. <div
  88. :class="[patternIndex == 0 ? 'sele' : '']"
  89. @click="cutPattern(0)"
  90. >
  91. 引语模式
  92. </div>
  93. <div
  94. :class="[patternIndex == 1 ? 'sele' : '']"
  95. @click="cutPattern(1)"
  96. >
  97. KWIC模式
  98. </div>
  99. </div>
  100. <template v-if="patternIndex == 1">
  101. <div class="KWIC_sort">
  102. <span
  103. :class="['sort', KWIC_sortIndex == 0 ? 'sele' : '']"
  104. @click="KWICsortEvent(0, 'sentence_list_sort_left')"
  105. >
  106. <img
  107. src="../../assets/teacherdev/analys-right.png"
  108. alt=""
  109. />
  110. </span>
  111. <span
  112. :class="['sort', KWIC_sortIndex == 1 ? 'sele' : '']"
  113. @click="KWICsortEvent(1, 'sentence_list_sort_mid')"
  114. >
  115. <img
  116. src="../../assets/teacherdev/analys-center.png"
  117. alt=""
  118. />
  119. </span>
  120. <span
  121. :class="['sort', KWIC_sortIndex == 2 ? 'sele' : '']"
  122. @click="KWICsortEvent(2, 'sentence_list_sort_right')"
  123. >
  124. <img src="../../assets/teacherdev/analys-left.png" alt="" />
  125. </span>
  126. </div>
  127. </template>
  128. <template v-if="patternIndex == 0">
  129. <div class="lang_sort" @click="sortEvent">
  130. 长度
  131. <img
  132. v-if="sort == 'down'"
  133. src="../../assets/teacherdev/ylk-sort-down.png"
  134. alt=""
  135. />
  136. <img
  137. v-else
  138. src="../../assets/teacherdev/ylk-sort-up.png"
  139. alt=""
  140. />
  141. </div>
  142. </template>
  143. <div class="refresh">
  144. <img src="../../assets/teacherdev/refresh.png" alt="" />
  145. </div>
  146. <template v-if="patternIndex == 0">
  147. <el-switch
  148. v-model="pinyinShow"
  149. active-text="拼音"
  150. active-color="#424242"
  151. style="margin-left: 24px"
  152. >
  153. </el-switch>
  154. <el-switch
  155. v-model="shiyiShow"
  156. active-text="释义"
  157. active-color="#424242"
  158. style="margin-left: 16px"
  159. >
  160. </el-switch>
  161. </template>
  162. </div>
  163. <div class="size">
  164. <span :class="[sizeIndex == 0 ? 'sele' : '']" @click="cutSize(0)"
  165. >大</span
  166. >
  167. <span :class="[sizeIndex == 1 ? 'sele' : '']" @click="cutSize(1)"
  168. >中</span
  169. >
  170. <span :class="[sizeIndex == 2 ? 'sele' : '']" @click="cutSize(2)"
  171. >小</span
  172. >
  173. </div>
  174. </div>
  175. <div class="main">
  176. <div class="list">
  177. <template v-if="patternIndex == 0">
  178. <div
  179. v-for="(item, i) in showData"
  180. :key="i + 'sentence'"
  181. class="one"
  182. >
  183. <div class="top">
  184. <div
  185. class="number"
  186. :style="{
  187. marginBottom: sizeIndex == 2 ? '0' : '5px',
  188. }"
  189. >
  190. {{ item.number }}.
  191. </div>
  192. <img
  193. :style="{
  194. marginBottom: sizeIndex == 2 ? '0' : '5px',
  195. }"
  196. src="../../assets/teacherdev/speaker-one.png"
  197. alt=""
  198. />
  199. <div class="words">
  200. <div
  201. v-for="(items, indexs) in item.wordsList"
  202. :key="indexs + 'con'"
  203. >
  204. <div
  205. class="pinyin"
  206. :style="{
  207. fontSize: pinyinSize + 'px',
  208. }"
  209. >
  210. {{ items.pinyin }}
  211. </div>
  212. <div
  213. class="con"
  214. :style="{
  215. fontSize: conSize + 'px',
  216. }"
  217. v-html="items.con"
  218. ></div>
  219. </div>
  220. <div
  221. class="shiyi"
  222. :style="{
  223. marginBottom: sizeIndex == 2 ? '0' : '5px',
  224. }"
  225. >
  226. ({{ item.shiyi }})
  227. </div>
  228. </div>
  229. </div>
  230. <div class="bottom">{{ item.laiyuan }}</div>
  231. </div>
  232. </template>
  233. <template v-else>
  234. <div
  235. v-for="(item, index) in KWICData"
  236. :key="'kwic' + index"
  237. class="kwic_one"
  238. >
  239. <div class="number">{{ item.number }}</div>
  240. <el-tooltip effect="dark" placement="bottom">
  241. <div slot="content">
  242. {{ item.laiyuan }}
  243. </div>
  244. <div class="laiyuan">
  245. {{ item.laiyuan }}
  246. </div>
  247. </el-tooltip>
  248. <div
  249. class="word"
  250. :style="{
  251. fontSize: conSize + 'px',
  252. }"
  253. >
  254. <div v-for="(txt, indexs) in item.resArr" :key="indexs">
  255. <span
  256. v-for="(txts, indexs) in txt"
  257. v-html="txts"
  258. :key="indexs"
  259. ></span>
  260. </div>
  261. </div>
  262. </div>
  263. </template>
  264. </div>
  265. <div class="page">
  266. <span class="text"> 共 196 条 命中 213 次 </span>
  267. <el-pagination
  268. background
  269. @current-change="handleCurrentChange"
  270. :current-page.sync="page"
  271. layout="prev, pager, next"
  272. :total="1000"
  273. :pager-count="6"
  274. >
  275. </el-pagination>
  276. </div>
  277. </div>
  278. </div>
  279. <div class="right">
  280. <div class="top">
  281. <div>
  282. <div
  283. :class="[rightTopIndex == 0 ? 'sele' : '']"
  284. @click="cutsyly(0)"
  285. >
  286. 释义
  287. </div>
  288. <div
  289. :class="[rightTopIndex == 1 ? 'sele' : '']"
  290. @click="cutsyly(1)"
  291. >
  292. 来源
  293. </div>
  294. </div>
  295. </div>
  296. <div id="shanxing_main" style="height: 398px"></div>
  297. <div class="list">
  298. <div
  299. v-for="(item, i) in rightList"
  300. :key="i + 'right'"
  301. class="one"
  302. :style="{
  303. borderBottom:
  304. i == rightList.length - 1 ? 'none' : '1px solid #eeeeee',
  305. }"
  306. >
  307. <div>
  308. <span></span>
  309. <span>{{ item.name }}</span>
  310. </div>
  311. <div>
  312. <span>{{ item.value }}</span>
  313. </div>
  314. <div>
  315. <span>{{ item.ratio * 100 }}%</span>
  316. </div>
  317. </div>
  318. <div class="one all">
  319. <div>
  320. <span></span>
  321. <span>合计</span>
  322. </div>
  323. <div>
  324. <span>{{ allNumber }}</span>
  325. </div>
  326. <div>
  327. <span>100%</span>
  328. </div>
  329. </div>
  330. </div>
  331. </div>
  332. </div>
  333. </div>
  334. </div>
  335. </template>
  336. <script>
  337. //这里可以导入其它文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
  338. //例如:import 《组件名称》from ‘《组件路径》';
  339. import Header from "@/components/Header";
  340. import { getLogin } from "@/api/api";
  341. import Strockplayredline from "@/components/corpus/Strockplayredline";
  342. import StrockplayredlineCorpus from "@/components/corpus/StrockplayredlineCorpus";
  343. import "@/utils/pinyin_dict_withtone";
  344. import "@/utils/pinyinUtil";
  345. const OpenCC = require("opencc-js");
  346. const converter = OpenCC.Converter({ from: "cn", to: "tw" });
  347. import * as echarts from "echarts";
  348. export default {
  349. //import引入的组件需要注入到对象中才能使用
  350. components: {
  351. Header,
  352. Strockplayredline,
  353. StrockplayredlineCorpus,
  354. },
  355. props: {},
  356. data() {
  357. //这里存放数据
  358. return {
  359. page: 1,
  360. shiyiShow: false,
  361. pinyinShow: false,
  362. JFIndex: 0,
  363. hzData: [],
  364. ShowHzData: [],
  365. loading: true,
  366. lang: null,
  367. unfold: true,
  368. patternIndex: 0,
  369. rightTopIndex: 0,
  370. sizeIndex: 1,
  371. sort: "down",
  372. rightList: [
  373. {
  374. name: "good",
  375. value: "4",
  376. ratio: "0.4",
  377. },
  378. {
  379. name: "OK",
  380. value: "3",
  381. ratio: "0.3",
  382. },
  383. {
  384. name: "nice",
  385. value: "2",
  386. ratio: "0.2",
  387. },
  388. {
  389. name: "yes",
  390. value: "1",
  391. ratio: "0.1",
  392. },
  393. ],
  394. KWIC_sortIndex: 0,
  395. allNumber: 0,
  396. showData: [
  397. {
  398. number: 1,
  399. mp3: "",
  400. wordsList: [
  401. {
  402. pinyin: "dà",
  403. con: "大",
  404. },
  405. {
  406. pinyin: "wéi",
  407. con: "为",
  408. },
  409. {
  410. pinyin: "hǎo",
  411. con: "好",
  412. },
  413. {
  414. pinyin: "ma",
  415. con: "吗",
  416. },
  417. {
  418. pinyin: "",
  419. con: "?",
  420. },
  421. ],
  422. shiyi: "good, ok",
  423. laiyuan: "《轻松学中文1》 Unit 1 课文一 P16",
  424. },
  425. {
  426. number: 2,
  427. mp3: "",
  428. wordsList: [
  429. {
  430. pinyin: "wǒ",
  431. con: "我",
  432. },
  433. {
  434. pinyin: "hěn",
  435. con: "很",
  436. },
  437. {
  438. pinyin: "hǎo",
  439. con: "好",
  440. },
  441. {
  442. pinyin: "",
  443. con: "。",
  444. },
  445. ],
  446. shiyi: "good, ok",
  447. laiyuan: "《轻松学中文1》 Unit 1 课文一 P16",
  448. },
  449. {
  450. number: 3,
  451. mp3: "",
  452. wordsList: [
  453. {
  454. pinyin: "jīn",
  455. con: "今",
  456. },
  457. {
  458. pinyin: "tiān",
  459. con: "天",
  460. },
  461. {
  462. pinyin: "yī",
  463. con: "一",
  464. },
  465. {
  466. pinyin: "qǐ",
  467. con: "起",
  468. },
  469. {
  470. pinyin: "qù",
  471. con: "去",
  472. },
  473. {
  474. pinyin: "kàn",
  475. con: "看",
  476. },
  477. {
  478. pinyin: "diàn",
  479. con: "电",
  480. },
  481. {
  482. pinyin: "yǐng",
  483. con: "影",
  484. },
  485. {
  486. pinyin: "hǎo",
  487. con: "好",
  488. },
  489. {
  490. pinyin: "ma",
  491. con: "吗",
  492. },
  493. {
  494. pinyin: "",
  495. con: "?",
  496. },
  497. ],
  498. shiyi: "good, ok",
  499. laiyuan: "《轻松学中文1》 Unit 1 课文一 P16",
  500. },
  501. {
  502. number: 4,
  503. mp3: "",
  504. wordsList: [
  505. {
  506. pinyin: "zhè",
  507. con: "这",
  508. },
  509. {
  510. pinyin: "lǐ",
  511. con: "里",
  512. },
  513. {
  514. pinyin: "yǐ",
  515. con: "已",
  516. },
  517. {
  518. pinyin: "jīng",
  519. con: "经",
  520. },
  521. {
  522. pinyin: "hěn",
  523. con: "很",
  524. },
  525. {
  526. pinyin: "jiǔ",
  527. con: "久",
  528. },
  529. {
  530. pinyin: "hěn",
  531. con: "很",
  532. },
  533. {
  534. pinyin: "jiǔ",
  535. con: "久",
  536. },
  537. {
  538. pinyin: "hěn",
  539. con: "很",
  540. },
  541. {
  542. pinyin: "jiǔ",
  543. con: "久",
  544. },
  545. {
  546. pinyin: "měi",
  547. con: "没",
  548. },
  549. {
  550. pinyin: "yǒu",
  551. con: "有",
  552. },
  553. {
  554. pinyin: "guò",
  555. con: "过",
  556. },
  557. {
  558. pinyin: "zhè",
  559. con: "这",
  560. },
  561. {
  562. pinyin: "me",
  563. con: "么",
  564. },
  565. {
  566. pinyin: "hǎo",
  567. con: "好",
  568. },
  569. {
  570. pinyin: "de",
  571. con: "的",
  572. },
  573. {
  574. pinyin: "tiān",
  575. con: "天",
  576. },
  577. {
  578. pinyin: "qì",
  579. con: "气",
  580. },
  581. {
  582. pinyin: "le",
  583. con: "了",
  584. },
  585. {
  586. pinyin: "",
  587. con: "。",
  588. },
  589. ],
  590. shiyi: "good, ok",
  591. laiyuan: "《轻松学中文1》 Unit 1 课文一 P16",
  592. },
  593. {
  594. number: 5,
  595. mp3: "",
  596. wordsList: [
  597. {
  598. pinyin: "jīn",
  599. con: "今",
  600. },
  601. {
  602. pinyin: "tiān",
  603. con: "天",
  604. },
  605. {
  606. pinyin: "yī",
  607. con: "一",
  608. },
  609. {
  610. pinyin: "qǐ",
  611. con: "起",
  612. },
  613. {
  614. pinyin: "qù",
  615. con: "去",
  616. },
  617. {
  618. pinyin: "kàn",
  619. con: "看",
  620. },
  621. {
  622. pinyin: "diàn",
  623. con: "电",
  624. },
  625. {
  626. pinyin: "yǐng",
  627. con: "影",
  628. },
  629. {
  630. pinyin: "hǎo",
  631. con: "好",
  632. },
  633. {
  634. pinyin: "ma",
  635. con: "吗",
  636. },
  637. {
  638. pinyin: "jīn",
  639. con: "今",
  640. },
  641. {
  642. pinyin: "tiān",
  643. con: "天",
  644. },
  645. {
  646. pinyin: "yī",
  647. con: "一",
  648. },
  649. {
  650. pinyin: "qǐ",
  651. con: "起",
  652. },
  653. {
  654. pinyin: "qù",
  655. con: "去",
  656. },
  657. {
  658. pinyin: "kàn",
  659. con: "看",
  660. },
  661. {
  662. pinyin: "diàn",
  663. con: "电",
  664. },
  665. {
  666. pinyin: "yǐng",
  667. con: "影",
  668. },
  669. {
  670. pinyin: "hǎo",
  671. con: "好",
  672. },
  673. {
  674. pinyin: "ma",
  675. con: "吗",
  676. },
  677. {
  678. pinyin: "jīn",
  679. con: "今",
  680. },
  681. {
  682. pinyin: "tiān",
  683. con: "天",
  684. },
  685. {
  686. pinyin: "yī",
  687. con: "一",
  688. },
  689. {
  690. pinyin: "qǐ",
  691. con: "起",
  692. },
  693. {
  694. pinyin: "qù",
  695. con: "去",
  696. },
  697. {
  698. pinyin: "kàn",
  699. con: "看",
  700. },
  701. {
  702. pinyin: "diàn",
  703. con: "电",
  704. },
  705. {
  706. pinyin: "yǐng",
  707. con: "影",
  708. },
  709. {
  710. pinyin: "hǎo",
  711. con: "好",
  712. },
  713. {
  714. pinyin: "ma",
  715. con: "吗",
  716. },
  717. {
  718. pinyin: "",
  719. con: "?",
  720. },
  721. ],
  722. shiyi: "good, ok",
  723. laiyuan: "《轻松学中文1》 Unit 1 课文一 P16",
  724. },
  725. ],
  726. KWICData: [
  727. {
  728. number: 1,
  729. laiyuan: "轻松学中文1大撒大撒大苏打撒旦阿斯顿阿斯顿安生安生",
  730. resArr: [
  731. ["你"],
  732. [
  733. "<span style='color:red;background:#FFEFEF;padding:2px'>好</span>",
  734. ],
  735. ["吗"],
  736. ],
  737. },
  738. ],
  739. conSize: 20,
  740. pinyinSize: 12,
  741. };
  742. },
  743. //计算属性 类似于data概念
  744. computed: {},
  745. //监控data中数据变化
  746. watch: {},
  747. //方法集合
  748. methods: {
  749. handleCurrentChange(val) {
  750. this.page = val;
  751. },
  752. // KWIC排序
  753. KWICsortEvent(index, type) {
  754. this.KWIC_sortIndex = index;
  755. },
  756. // 排序
  757. sortEvent() {
  758. if (this.sort == "down") {
  759. this.sort = "up";
  760. } else {
  761. this.sort = "down";
  762. }
  763. },
  764. // 修改大小
  765. cutSize(index) {
  766. this.sizeIndex = index;
  767. if (index == 0) {
  768. //大
  769. if (this.patternIndex == 0) {
  770. this.conSize = 24;
  771. this.pinyinSize = 12;
  772. } else {
  773. this.conSize = 20;
  774. }
  775. } else if (index == 1) {
  776. //中
  777. if (this.patternIndex == 0) {
  778. this.conSize = 20;
  779. this.pinyinSize = 12;
  780. } else {
  781. this.conSize = 17;
  782. }
  783. } else {
  784. //小
  785. if (this.patternIndex == 0) {
  786. this.conSize = 16;
  787. this.pinyinSize = 10;
  788. } else {
  789. this.conSize = 15;
  790. }
  791. }
  792. },
  793. // 切换模式
  794. cutPattern(index) {
  795. this.patternIndex = index;
  796. },
  797. // 切换释义来源
  798. cutsyly(index) {
  799. this.rightTopIndex = index;
  800. },
  801. updownHz() {
  802. this.unfold = !this.unfold;
  803. if (this.unfold) {
  804. this.ShowHzData = JSON.parse(JSON.stringify(this.hzData));
  805. } else {
  806. this.ShowHzData.splice(2);
  807. }
  808. },
  809. jfEvent(index) {
  810. this.JFIndex = index;
  811. if (index == 0) {
  812. //简体
  813. this.gethzJSON();
  814. } else {
  815. //繁体
  816. this.hzData.forEach((item) => {
  817. let a = converter(item.con);
  818. item.fanti = a;
  819. });
  820. this.gethzJSON();
  821. }
  822. },
  823. // 获取汉字josn
  824. gethzJSON() {
  825. this.loading = true;
  826. let MethodName = "hz_resource_manager-GetHZStrokesContent";
  827. this.hzData.forEach((item, i) => {
  828. let data = {
  829. hz: this.JFIndex == 0 ? item.con : item.fanti,
  830. };
  831. item.hzDetail = {
  832. hz_json: null,
  833. };
  834. this.$forceUpdate();
  835. getLogin(MethodName, data)
  836. .then((res) => {
  837. this.$set(item.hzDetail, "hz_json", res);
  838. this.$forceUpdate();
  839. this.ShowHzData = JSON.parse(JSON.stringify(this.hzData));
  840. if (i == this.hzData.length - 1) {
  841. this.loading = false;
  842. }
  843. })
  844. .catch(() => {
  845. this.loading = false;
  846. });
  847. });
  848. },
  849. getrightListdata() {
  850. this.inityuan();
  851. },
  852. inityuan() {
  853. var chartDom = document.getElementById("shanxing_main");
  854. var myChart = echarts.init(chartDom);
  855. var option;
  856. this.allNumber = 0;
  857. let newdata = JSON.parse(JSON.stringify(this.rightList));
  858. newdata.forEach((item) => {
  859. this.allNumber += item.value * 1;
  860. let percent = item.ratio * 100;
  861. if (percent % 1 == 0) {
  862. item.name = item.name + " " + percent + "%";
  863. } else {
  864. item.name = item.name + " " + percent.toFixed(2) + "%";
  865. }
  866. });
  867. option = {
  868. series: [
  869. {
  870. name: "Access From",
  871. type: "pie",
  872. // radius: ["50%", "50%"],
  873. data: newdata,
  874. itemStyle: {
  875. // borderColor: "#fff",
  876. // borderWidth: 2,
  877. },
  878. top: 50,
  879. emphasis: {
  880. itemStyle: {
  881. shadowBlur: 10,
  882. shadowOffsetX: 0,
  883. shadowColor: "rgba(0, 0, 0, 0.5)",
  884. },
  885. },
  886. },
  887. ],
  888. xAxis: {
  889. show: false, //不显示坐标轴线、坐标轴刻度线和坐标轴上的文字
  890. axisTick: {
  891. show: false, //不显示坐标轴刻度线
  892. },
  893. axisLine: {
  894. show: false, //不显示坐标轴线
  895. },
  896. axisLabel: {
  897. show: false, //不显示坐标轴上的文字
  898. },
  899. },
  900. };
  901. option && myChart.setOption(option);
  902. },
  903. changehzdata() {
  904. this.hzData = [];
  905. let arr = this.$route.query.keyword.split("");
  906. arr.forEach((item) => {
  907. if (!/^[\u4e00-\u9fa5]/.test(item)) {
  908. return;
  909. }
  910. let result = pinyinUtil.getPinyin(item);
  911. let obj = {
  912. con: item,
  913. pinyin: result,
  914. hzDetail: {
  915. hz_json: null,
  916. },
  917. };
  918. this.hzData.push(obj);
  919. this.ShowHzData = JSON.parse(JSON.stringify(this.hzData));
  920. });
  921. this.gethzJSON();
  922. },
  923. },
  924. //生命周期 - 创建完成(可以访问当前this实例)
  925. created() {
  926. if (this.$route.query.keyword) {
  927. this.changehzdata();
  928. }
  929. },
  930. //生命周期 - 挂载完成(可以访问DOM元素)
  931. mounted() {
  932. this.getrightListdata();
  933. },
  934. //生命周期-创建之前
  935. beforeCreated() {},
  936. //生命周期-挂载之前
  937. beforeMount() {},
  938. //生命周期-更新之前
  939. beforUpdate() {},
  940. //生命周期-更新之后
  941. updated() {},
  942. //生命周期-销毁之前
  943. beforeDestory() {},
  944. //生命周期-销毁完成
  945. destoryed() {},
  946. //如果页面有keep-alive缓存功能,这个函数会触发
  947. activated() {},
  948. };
  949. </script>
  950. <style lang="scss" scoped>
  951. /* @import url(); 引入css类 */
  952. .result {
  953. min-height: 100%;
  954. > .main {
  955. min-height: 100%;
  956. background: #f2f2f2;
  957. padding-top: 33px;
  958. padding-bottom: 66px;
  959. }
  960. .hanzi_list {
  961. width: 1200px;
  962. margin: 0 auto;
  963. background: #ffffff;
  964. border-radius: 8px;
  965. padding: 40px 13px;
  966. position: relative;
  967. box-sizing: border-box;
  968. .top_jf {
  969. width: 128px;
  970. }
  971. .j_f {
  972. display: flex;
  973. width: 60px;
  974. height: 24px;
  975. margin-bottom: 16px;
  976. margin-left: 33px;
  977. > :nth-child(1) {
  978. border-top-left-radius: 2px;
  979. border-bottom-left-radius: 2px;
  980. border-right: none;
  981. }
  982. > :nth-child(2) {
  983. border-top-right-radius: 2px;
  984. border-bottom-right-radius: 2px;
  985. border-left: none;
  986. }
  987. div {
  988. width: 30px;
  989. height: 24px;
  990. font-weight: 400;
  991. font-size: 14px;
  992. line-height: 24px;
  993. text-align: center;
  994. color: #de4444;
  995. cursor: pointer;
  996. border: 2px solid #de4444;
  997. }
  998. .sele {
  999. color: #ffffff;
  1000. background: #de4444;
  1001. }
  1002. }
  1003. .list_one_box {
  1004. max-height: 750px;
  1005. padding: 0 27px;
  1006. &::-webkit-scrollbar-track-piece {
  1007. background: #fff;
  1008. }
  1009. &::-webkit-scrollbar {
  1010. width: 4px;
  1011. }
  1012. &::-webkit-scrollbar-thumb {
  1013. background: #d9d9d9;
  1014. border-radius: 20px;
  1015. }
  1016. }
  1017. .list_one {
  1018. margin-bottom: 20px;
  1019. display: flex;
  1020. align-items: flex-start;
  1021. .Highlight {
  1022. flex: 1;
  1023. margin-left: 22px;
  1024. display: flex;
  1025. flex-wrap: wrap;
  1026. .play_audio {
  1027. width: 100%;
  1028. display: flex;
  1029. align-items: center;
  1030. margin-bottom: 13px;
  1031. img {
  1032. width: 16px;
  1033. height: 16px;
  1034. cursor: pointer;
  1035. }
  1036. span {
  1037. font-family: "GB-PINYINOK-B";
  1038. font-weight: 400;
  1039. font-size: 12px;
  1040. margin-left: 5px;
  1041. color: #000000;
  1042. }
  1043. }
  1044. }
  1045. .row {
  1046. margin-right: 8px;
  1047. margin-bottom: 8px;
  1048. .number {
  1049. margin-top: 9px;
  1050. width: 64px;
  1051. height: 20px;
  1052. background: #e9e9e9;
  1053. border-radius: 22px;
  1054. text-align: center;
  1055. line-height: 20px;
  1056. }
  1057. }
  1058. }
  1059. .shouqi {
  1060. margin-top: 21;
  1061. display: flex;
  1062. justify-content: flex-end;
  1063. position: absolute;
  1064. right: 26px;
  1065. bottom: 13px;
  1066. span {
  1067. cursor: pointer;
  1068. display: flex;
  1069. align-items: center;
  1070. font-size: 16px;
  1071. line-height: 24px;
  1072. font-weight: 400;
  1073. color: rgba(0, 0, 0, 0.5);
  1074. }
  1075. img {
  1076. width: 24px;
  1077. height: 24px;
  1078. margin-right: 4px;
  1079. }
  1080. }
  1081. }
  1082. .txt_imgtable {
  1083. width: 1200px;
  1084. margin: 0 auto;
  1085. margin-top: 8px;
  1086. display: flex;
  1087. .left {
  1088. width: 562px;
  1089. background: #ffffff;
  1090. border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  1091. border-radius: 8px;
  1092. margin-right: 8px;
  1093. padding-bottom: 58px;
  1094. position: relative;
  1095. > .top {
  1096. border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  1097. height: 44px;
  1098. display: flex;
  1099. align-items: center;
  1100. justify-content: space-between;
  1101. font-weight: 400;
  1102. font-size: 12px;
  1103. color: #000000;
  1104. > div {
  1105. display: flex;
  1106. align-items: center;
  1107. }
  1108. .KWIC_sort {
  1109. margin-left: 24px;
  1110. display: flex;
  1111. span {
  1112. display: inline-block;
  1113. width: 28px;
  1114. height: 28px;
  1115. background: #ffffff;
  1116. border-radius: 4px;
  1117. display: flex;
  1118. justify-content: center;
  1119. align-items: center;
  1120. cursor: pointer;
  1121. }
  1122. .sele {
  1123. background: #f0f0f0;
  1124. }
  1125. .sort {
  1126. img {
  1127. width: 14px;
  1128. height: 12px;
  1129. }
  1130. }
  1131. .down {
  1132. img {
  1133. width: 16px;
  1134. height: 16px;
  1135. }
  1136. }
  1137. }
  1138. .pattern {
  1139. margin-left: 16px;
  1140. width: 144px;
  1141. height: 28px;
  1142. background: #eeeeee;
  1143. border-radius: 4px;
  1144. display: flex;
  1145. justify-content: center;
  1146. align-items: center;
  1147. > div {
  1148. width: 68px;
  1149. height: 24px;
  1150. text-align: center;
  1151. line-height: 24px;
  1152. color: #888888;
  1153. cursor: pointer;
  1154. font-weight: 400;
  1155. font-size: 12px;
  1156. border-radius: 2px;
  1157. }
  1158. .sele {
  1159. background: #ffffff;
  1160. box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.08);
  1161. color: #000000;
  1162. }
  1163. }
  1164. .lang_sort {
  1165. width: 54px;
  1166. height: 28px;
  1167. background: #eeeeee;
  1168. border-radius: 4px;
  1169. margin-left: 24px;
  1170. display: flex;
  1171. justify-content: center;
  1172. align-items: center;
  1173. cursor: pointer;
  1174. img {
  1175. width: 16px;
  1176. height: 16px;
  1177. margin-left: 2px;
  1178. }
  1179. }
  1180. .refresh {
  1181. width: 28px;
  1182. height: 28px;
  1183. background: #eeeeee;
  1184. border-radius: 4px;
  1185. display: flex;
  1186. justify-content: center;
  1187. align-items: center;
  1188. margin-left: 8px;
  1189. cursor: pointer;
  1190. img {
  1191. width: 16px;
  1192. height: 16px;
  1193. }
  1194. }
  1195. .size {
  1196. margin-right: 12px;
  1197. span {
  1198. font-size: 14px;
  1199. padding: 4px;
  1200. cursor: pointer;
  1201. }
  1202. .sele {
  1203. background: #e6e6e6;
  1204. border-radius: 4px;
  1205. }
  1206. }
  1207. }
  1208. .main {
  1209. // height: 95%;
  1210. .list {
  1211. margin-top: 16px;
  1212. .one {
  1213. padding: 0 16px;
  1214. margin-bottom: 8px;
  1215. .top {
  1216. display: flex;
  1217. align-items: flex-end;
  1218. flex-flow: wrap;
  1219. .number {
  1220. width: 22px;
  1221. font-weight: 400;
  1222. font-size: 14px;
  1223. text-align: right;
  1224. color: rgba(0, 0, 0, 0.3);
  1225. margin-right: 8px;
  1226. }
  1227. img {
  1228. width: 16px;
  1229. height: 16px;
  1230. cursor: pointer;
  1231. margin-right: 8px;
  1232. }
  1233. .words {
  1234. display: flex;
  1235. align-items: flex-end;
  1236. > div {
  1237. .pinyin {
  1238. font-family: "GB-PINYINOK-B";
  1239. font-weight: 500;
  1240. font-size: 12px;
  1241. color: rgba(0, 0, 0, 0.5);
  1242. text-align: center;
  1243. }
  1244. .con {
  1245. font-family: "FZJCGFKTK";
  1246. font-weight: 400;
  1247. font-size: 20px;
  1248. color: #000000;
  1249. text-align: center;
  1250. }
  1251. }
  1252. }
  1253. .shiyi {
  1254. font-weight: 400;
  1255. font-size: 12px;
  1256. color: #48a3e6;
  1257. }
  1258. }
  1259. .bottom {
  1260. font-weight: 400;
  1261. font-size: 12px;
  1262. line-height: 150%;
  1263. color: rgba(0, 0, 0, 0.3);
  1264. text-align: right;
  1265. }
  1266. }
  1267. .kwic_one {
  1268. padding: 0 16px;
  1269. display: flex;
  1270. align-items: center;
  1271. > :nth-child(1) {
  1272. width: 16px;
  1273. margin-right: 16px;
  1274. justify-content: flex-end;
  1275. }
  1276. .laiyuan {
  1277. width: 117px;
  1278. white-space: nowrap;
  1279. overflow: hidden;
  1280. text-overflow: ellipsis;
  1281. font-weight: 400;
  1282. font-size: 14px;
  1283. line-height: 22px;
  1284. color: rgba(0, 0, 0, 0.65);
  1285. }
  1286. .word {
  1287. font-family: "FZJCGFKTK";
  1288. width: 361px;
  1289. height: 22px;
  1290. margin-left: 16px;
  1291. font-weight: 400;
  1292. font-size: 14px;
  1293. line-height: 22px;
  1294. color: #000000;
  1295. opacity: 1;
  1296. display: flex;
  1297. justify-content: center;
  1298. overflow: hidden;
  1299. white-space: nowrap;
  1300. > :nth-child(1) {
  1301. // direction: rtl;
  1302. // unicode-bidi: plaintext;
  1303. // text-align: right;
  1304. display: flex;
  1305. justify-content: end;
  1306. width: 172px;
  1307. white-space: nowrap;
  1308. overflow: hidden;
  1309. }
  1310. > :nth-child(3) {
  1311. direction: ltr;
  1312. unicode-bidi: plaintext;
  1313. text-align: left;
  1314. width: 172px;
  1315. white-space: nowrap;
  1316. overflow: hidden;
  1317. }
  1318. }
  1319. }
  1320. }
  1321. .page {
  1322. padding: 0 10px 0 12px;
  1323. width: 562px;
  1324. position: absolute;
  1325. bottom: 16px;
  1326. display: flex;
  1327. justify-content: space-between;
  1328. box-sizing: border-box;
  1329. .text {
  1330. font-weight: 400;
  1331. font-size: 14px;
  1332. line-height: 22px;
  1333. display: flex;
  1334. align-items: center;
  1335. text-align: center;
  1336. color: rgba(0, 0, 0, 0.6);
  1337. margin-right: 16px;
  1338. }
  1339. }
  1340. }
  1341. }
  1342. .right {
  1343. width: 630px;
  1344. background: #ffffff;
  1345. border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  1346. border-radius: 8px;
  1347. padding-bottom: 39px;
  1348. .top {
  1349. border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  1350. height: 44px;
  1351. display: flex;
  1352. align-items: center;
  1353. > div {
  1354. margin-left: 16px;
  1355. width: 84px;
  1356. height: 28px;
  1357. background: #eeeeee;
  1358. border-radius: 4px;
  1359. display: flex;
  1360. justify-content: center;
  1361. align-items: center;
  1362. > div {
  1363. border-radius: 2px;
  1364. width: 40px;
  1365. height: 24px;
  1366. text-align: center;
  1367. line-height: 24px;
  1368. color: #888888;
  1369. cursor: pointer;
  1370. font-weight: 400;
  1371. font-size: 12px;
  1372. }
  1373. .sele {
  1374. background: #ffffff;
  1375. box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.08);
  1376. color: #000000;
  1377. }
  1378. }
  1379. }
  1380. .list {
  1381. width: 598px;
  1382. margin: 0 auto;
  1383. .one {
  1384. display: flex;
  1385. justify-content: space-between;
  1386. border-bottom: 1px solid #eeeeee;
  1387. padding: 12px;
  1388. font-weight: 400;
  1389. font-size: 14px;
  1390. line-height: 22px;
  1391. color: #333333;
  1392. cursor: pointer;
  1393. > :nth-child(1) {
  1394. text-align: left;
  1395. }
  1396. > div {
  1397. width: 186px;
  1398. text-align: right;
  1399. }
  1400. }
  1401. .all {
  1402. font-weight: 600;
  1403. font-size: 14px;
  1404. line-height: 22px;
  1405. color: #333333;
  1406. border-bottom: none;
  1407. }
  1408. }
  1409. }
  1410. }
  1411. }
  1412. </style>
  1413. <style lang="scss">
  1414. .result {
  1415. .el-switch__core {
  1416. width: 26px !important;
  1417. height: 16px;
  1418. }
  1419. .el-switch__core:after {
  1420. width: 8px;
  1421. height: 8px;
  1422. top: 2px;
  1423. }
  1424. .el-switch.is-checked .el-switch__core::after {
  1425. margin-left: -10px;
  1426. }
  1427. .el-switch__label.is-active {
  1428. color: #000000;
  1429. }
  1430. .page {
  1431. .el-pagination.is-background .el-pager li:not(.disabled).active {
  1432. background-color: #0052d9;
  1433. }
  1434. .el-pager li {
  1435. background: #ffffff;
  1436. border: 1px solid #dcdcdc;
  1437. border-radius: 3px;
  1438. }
  1439. }
  1440. }
  1441. </style>