index.vue 96 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741
  1. <template>
  2. <div v-loading="loading" class="textanalysis_index">
  3. <!-- <div class="wheader"> -->
  4. <HeaderPage v-if="!userID" />
  5. <!-- </div> -->
  6. <div class="main">
  7. <div>
  8. <div v-loading="LeftLoading" class="left">
  9. <a v-if="!userID" class="go-back" @click="goBack">
  10. <i class="el-icon-arrow-left"></i>
  11. 返回
  12. </a>
  13. <div class="search">
  14. <div class="select-result" @click="showSearchColorList">
  15. <span class="selectBg" :style="{ background: colorValue }"></span>
  16. <i class="tri"></i>
  17. </div>
  18. <input
  19. v-model="searchVal"
  20. class="searchVal"
  21. :style="{ color: colorValue }"
  22. @keyup.enter="onSearch"
  23. @blur="searchVal = searchVal.trim()"
  24. @keydown="searchValChange"
  25. />
  26. <i class="search-icon" style="cursor: pointer" @click="onSearch"></i>
  27. <ul v-if="isSCL" class="searchColorList">
  28. <li
  29. v-for="(item, index) in searchColorList"
  30. :key="'search' + index"
  31. @click="selectSearchColor(item, index)"
  32. >
  33. <span class="searchColor" :style="{ background: item }"></span>
  34. </li>
  35. <li class="close" @click="closeSearchColor">关闭</li>
  36. </ul>
  37. </div>
  38. <div class="result-left-numberclose">
  39. <span>
  40. <span v-if="searchWordShow" style="font-size: 14px; line-height: 22px; color: #333">
  41. {{ SearchwordNumber }}次匹配
  42. </span>
  43. </span>
  44. <div>
  45. <span v-if="searchVal.trim() && !userID" class="resule-right-btn" @click="jumpSeekPage">
  46. 在教材语料库中查看
  47. </span>
  48. <span class="resule-right-btn" @click="clearSelected('all')">清除标记</span>
  49. </div>
  50. </div>
  51. <div class="top_nav">
  52. <div :class="[leftNavIndex == 0 ? 'sele' : '']" @click="cutNav(0)">音节</div>
  53. <div :class="[leftNavIndex == 1 ? 'sele' : '']" @click="cutNav(1)">汉字</div>
  54. <div :class="[leftNavIndex == 2 ? 'sele' : '']" @click="cutNav(2)">词汇</div>
  55. </div>
  56. <div class="left_list">
  57. <div class="left_list_nav">
  58. <div class="left">
  59. <span :class="[headerText == 'wordCount' ? 'sele' : '']" @click="cutHeaderText('wordCount')">词头</span>
  60. <span :class="[headerText == 'textCount' ? 'sele' : '']" @click="cutHeaderText('textCount')">文本</span>
  61. </div>
  62. <div class="right">
  63. <span style="margin-right: 16px">
  64. <el-switch
  65. v-model="xifen"
  66. active-color="#735CFF"
  67. :width="26"
  68. style="margin-right: 10px"
  69. active-text="细分"
  70. @change="changexifen"
  71. />
  72. </span>
  73. <span @click="downloadLeft">
  74. <img src="../../assets/teacherdev/dowload-text.png" alt="" />
  75. 下载</span
  76. >
  77. </div>
  78. </div>
  79. <div class="left_list_main">
  80. <div
  81. v-for="(item, index) in leftList"
  82. :key="'one' + index"
  83. :class="[seleLevelMapList.indexOf(item.id) != -1 ? 'sele' : '']"
  84. @click="levelMapListEvent(item)"
  85. >
  86. <div class="leftType">
  87. <span
  88. class="color"
  89. :style="{
  90. background: item.id && levelMap[item.id] ? levelMap[item.id].color : '',
  91. }"
  92. ></span>
  93. <span class="type">{{ item.name }}</span>
  94. </div>
  95. <div class="rightCount">
  96. <span class="count">{{ item.count }}</span>
  97. <span class="precent">{{ item.ratio }}%</span>
  98. </div>
  99. </div>
  100. <div class="heji" @click="allListEvent">
  101. <div class="leftType">
  102. <span class="color"></span>
  103. <span class="type">合计</span>
  104. </div>
  105. <div class="rightCount">
  106. <span class="count">{{ allValue }}</span>
  107. <span class="precent">100.00%</span>
  108. </div>
  109. </div>
  110. </div>
  111. </div>
  112. <div id="echarts" class="tubiao">
  113. <div id="main_echarts" class="main_echarts"></div>
  114. <div class="cut_download">
  115. <span
  116. :class="[chartIndex == 0 ? 'sele' : '']"
  117. @click="createEcharts('main_echarts', '柱状图', leftList, 0)"
  118. >
  119. <img src="../../assets/teacherdev/duotone-chart1.png" alt="" />
  120. </span>
  121. <span
  122. :class="[chartIndex == 1 ? 'sele' : '']"
  123. @click="createEcharts('main_echarts', '雷达图', leftList, 1)"
  124. >
  125. <img src="../../assets/teacherdev/duotone-chart2.png" alt="" />
  126. </span>
  127. <span
  128. :class="[chartIndex == 2 ? 'sele' : '']"
  129. @click="createEcharts('main_echarts', '折线图', leftList, 2)"
  130. >
  131. <img src="../../assets/teacherdev/duotone-chart3.png" alt="" />
  132. </span>
  133. <span
  134. :class="[chartIndex == 3 ? 'sele' : '']"
  135. @click="createEcharts('main_echarts', '饼状图', leftList, 3)"
  136. >
  137. <img src="../../assets/teacherdev/duotone-chart4.png" alt="" />
  138. </span>
  139. <span class="download" @click="downLoadEcharts">
  140. <img src="../../assets/teacherdev/dowload-text.png" alt="" />
  141. 下载
  142. </span>
  143. </div>
  144. </div>
  145. </div>
  146. <div class="right">
  147. <div class="word_back">
  148. <div class="word">
  149. <span class="title">主题词:</span>
  150. <span v-for="(item, i) in subjectWords" :key="i + 'word'">{{ item }}</span>
  151. </div>
  152. <div v-if="$route.query.type != '文本分析'" class="back">返回课文</div>
  153. </div>
  154. <div class="btn_set">
  155. <div class="btn">
  156. <div class="btn_dv" style="margin-right: 12px" @click="ciyunEvent">
  157. <img src="../../assets/teacherdev/icon-ciyun.png" alt="" />
  158. 词云
  159. </div>
  160. <div class="btn_dv" style="margin-right: 12px" @click="gowordTable">
  161. <img src="../../assets/teacherdev/icon-cibiao.png" alt="" />
  162. 词表
  163. </div>
  164. <div class="btn_dv" style="margin-right: 12px" @click="downArticle">
  165. <img src="../../assets/teacherdev/icon-down.png" alt="" />
  166. 下载
  167. </div>
  168. <div class="btn_dv" style="margin-right: 12px" @click="checkArticle">
  169. <img src="../../assets/teacherdev/pencil-ruler-line.png" alt="" />
  170. 校对
  171. </div>
  172. <div class="daxiao">
  173. <span @click="handleFontsize('-')">
  174. <template v-if="wordFontsize > 12">
  175. <img src="../../assets/teacherdev/minus-icon.png" />
  176. </template>
  177. <template v-else>
  178. <img src="../../assets/teacherdev/minus-icon-white-disabled.png" />
  179. </template>
  180. </span>
  181. <img src="../../assets/teacherdev/dxAA.png" class="dxAA" />
  182. <span @click="handleFontsize('+')">
  183. <template v-if="wordFontsize < 24">
  184. <img src="../../assets/teacherdev/add-icon.png" />
  185. </template>
  186. <template v-else>
  187. <img src="../../assets/teacherdev/add-icon-white-disabled.png" />
  188. </template>
  189. </span>
  190. </div>
  191. </div>
  192. <div class="set">
  193. <el-switch
  194. v-model="pinyinShow"
  195. active-color="#735CFF"
  196. style="margin-right: 12px"
  197. :width="26"
  198. inactive-text="拼音"
  199. />
  200. <el-switch
  201. v-if="pinyinShow"
  202. v-model="pinyinBottom"
  203. active-color="#735CFF"
  204. :width="26"
  205. inactive-text="拼音在下"
  206. style="margin-right: 12px"
  207. @change="changePinyinPosition"
  208. />
  209. <el-switch
  210. v-model="fenci"
  211. active-color="#735CFF"
  212. :width="26"
  213. style="margin-right: 12px"
  214. inactive-text="分词"
  215. />
  216. <!-- <el-switch
  217. v-if="fenci"
  218. v-model="cixing"
  219. active-color="#735CFF"
  220. :width="26"
  221. style="margin-right: 12px"
  222. inactive-text="词性"
  223. /> -->
  224. </div>
  225. </div>
  226. <div class="right_main">
  227. <div style="display: flex">
  228. <div class="right_main_top">
  229. <el-tooltip
  230. class="item"
  231. effect="dark"
  232. content="采用TTR公式衡量文本丰富度,音节丰富度指不同音节数量与总数量的比值。"
  233. placement="bottom"
  234. >
  235. <div>
  236. <span
  237. >音节丰富度
  238. <span style="margin-left: 5px">
  239. {{ (difficulty.pinyinDifficulty * 1).toFixed(2) }}
  240. </span>
  241. </span>
  242. <span class="line">|</span>
  243. <span>{{ base.pinyinCount }} / {{ base.pinyinTextCount }}</span>
  244. </div></el-tooltip
  245. >
  246. <div class="twoline"></div>
  247. <el-tooltip
  248. class="item"
  249. effect="dark"
  250. content="采用TTR公式衡量文本丰富度,汉字丰富度指不同汉字数量与总数量的比值。"
  251. placement="bottom"
  252. >
  253. <div>
  254. <span
  255. >汉字丰富度
  256. <span style="margin-left: 5px">
  257. {{ (difficulty.wordDifficulty * 1).toFixed(2) }}
  258. </span>
  259. </span>
  260. <span class="line">|</span>
  261. <span>{{ base.wordCount }} / {{ base.wordTextCount }}</span>
  262. </div>
  263. </el-tooltip>
  264. <div class="twoline"></div>
  265. <el-tooltip
  266. class="item"
  267. effect="dark"
  268. content="采用TTR公式衡量文本丰富度,词汇丰富度指不同词汇数量与总数量的比值。"
  269. placement="bottom"
  270. >
  271. <div>
  272. <span
  273. >词汇丰富度
  274. <span style="margin-left: 5px">
  275. {{ (difficulty.vocabularyDifficulty * 1).toFixed(2) }}
  276. </span>
  277. </span>
  278. <span class="line">|</span>
  279. <span>{{ base.vocabularyCount }} / {{ base.vocabularyTextCount }}</span>
  280. </div>
  281. </el-tooltip>
  282. </div>
  283. <span class="edit-btn" @click="editArticle()"><i class="el-icon-edit"></i>修改文本</span>
  284. </div>
  285. <div ref="articel" class="articel">
  286. <div v-for="(items, index) in ArticelData" :key="index + 'paragraph'" class="paragraph">
  287. <!-- <span
  288. class="sentence"
  289. v-for="(items, indexs) in item"
  290. :key="indexs + 'sentence'"
  291. > -->
  292. <span
  293. v-for="(itemss, indexss) in items"
  294. :key="indexss + 'words'"
  295. class="words"
  296. :style="{
  297. margin: fenci ? `0 ${wordsMargin}px` : '',
  298. }"
  299. >
  300. <template v-if="fenci">
  301. <template v-if="itemss.pinyin_lt">
  302. <span class="word">
  303. <span class="text">
  304. <span
  305. v-if="pinyinShow && !pinyinBottom"
  306. :class="['pinyin']"
  307. :style="{
  308. fontSize: pinyinFontsize + 'px',
  309. lineHeight: pinyinLineHeight + 'px',
  310. }"
  311. >
  312. {{ itemss.pinyin_lt }}
  313. </span>
  314. <br v-if="pinyinShow" />
  315. <span :class="['word-box']">
  316. <template v-for="(word, indexsss) in itemss.text">
  317. <span
  318. v-if="word.isShow"
  319. :key="indexsss + 'word'"
  320. class="hanzi"
  321. :class="[/^[a-zA-Z0-9]/.test(word.word) ? '' : 'hanzi-fz']"
  322. :style="{
  323. fontFamily: /^[a-zA-Z0-9]/.test(word.word) ? '' : '楷体',
  324. fontSize: wordFontsize + 'px',
  325. lineHeight: wordLineHeight + 'px',
  326. background: word.color ? word.color : '',
  327. whiteSpace: 'pre',
  328. color: word.color
  329. ? '#000'
  330. : !xifen
  331. ? leftNavIndex == 0
  332. ? seleLevelMapList.indexOf(word.levels.P_G) != -1
  333. ? levelMap[word.levels.P_G].color
  334. : '#000'
  335. : leftNavIndex == 1
  336. ? seleLevelMapList.indexOf(word.levels.W_G) != -1
  337. ? levelMap[word.levels.W_G].color
  338. : '#000'
  339. : leftNavIndex == 2
  340. ? seleLevelMapList.indexOf(word.levels.C_G) != -1
  341. ? levelMap[word.levels.C_G].color
  342. : '#000'
  343. : '#000'
  344. : leftNavIndex == 0
  345. ? seleLevelMapList.indexOf(word.levels.P_L) != -1
  346. ? levelMap[word.levels.P_L].color
  347. : '#000'
  348. : leftNavIndex == 1
  349. ? seleLevelMapList.indexOf(word.levels.W_L) != -1
  350. ? levelMap[word.levels.W_L].color
  351. : '#000'
  352. : leftNavIndex == 2
  353. ? seleLevelMapList.indexOf(word.levels.C_L) != -1
  354. ? levelMap[word.levels.C_L].color
  355. : '#000'
  356. : '#000',
  357. }"
  358. >{{ word.word }}</span
  359. >
  360. </template>
  361. </span>
  362. <br v-if="pinyinShow" />
  363. <span
  364. v-if="pinyinShow && pinyinBottom"
  365. :class="['pinyin']"
  366. :style="{
  367. fontSize: pinyinFontsize + 'px',
  368. lineHeight: pinyinLineHeight + 'px',
  369. }"
  370. >
  371. {{ itemss.pinyin_lt }}
  372. </span>
  373. </span>
  374. <span class="texts">
  375. <template v-if="pinyinShow && !pinyinBottom">
  376. <span
  377. :class="['pinyin']"
  378. :style="{
  379. fontSize: pinyinFontsize + 'px',
  380. lineHeight: pinyinLineHeight + 'px',
  381. }"
  382. >
  383. <!-- {{ itemss.pinyinStr }} -->
  384. </span>
  385. </template>
  386. <br v-if="pinyinShow" />
  387. <span>
  388. <template v-for="(word, indexsss) in itemss.texts">
  389. <span
  390. :key="indexsss + 'word'"
  391. class="hanzi"
  392. :class="[/^[a-zA-Z0-9]/.test(word.word) ? '' : 'hanzi-fz']"
  393. :style="{
  394. fontFamily: /^[a-zA-Z0-9]/.test(word.word) ? '' : '楷体',
  395. fontSize: wordFontsize + 'px',
  396. lineHeight: wordLineHeight + 'px',
  397. background: word.color ? word.color : '',
  398. whiteSpace: 'pre',
  399. color: word.color
  400. ? '#000'
  401. : !xifen
  402. ? leftNavIndex == 0
  403. ? seleLevelMapList.indexOf(word.levels.P_G) != -1
  404. ? levelMap[word.levels.P_G].color
  405. : '#000'
  406. : leftNavIndex == 1
  407. ? seleLevelMapList.indexOf(word.levels.W_G) != -1
  408. ? levelMap[word.levels.W_G].color
  409. : '#000'
  410. : leftNavIndex == 2
  411. ? seleLevelMapList.indexOf(word.levels.C_G) != -1
  412. ? levelMap[word.levels.C_G].color
  413. : '#000'
  414. : '#000'
  415. : leftNavIndex == 0
  416. ? seleLevelMapList.indexOf(word.levels.P_L) != -1
  417. ? levelMap[word.levels.P_L].color
  418. : '#000'
  419. : leftNavIndex == 1
  420. ? seleLevelMapList.indexOf(word.levels.W_L) != -1
  421. ? levelMap[word.levels.W_L].color
  422. : '#000'
  423. : leftNavIndex == 2
  424. ? seleLevelMapList.indexOf(word.levels.C_L) != -1
  425. ? levelMap[word.levels.C_L].color
  426. : '#000'
  427. : '#000',
  428. }"
  429. >{{ word.word }}</span
  430. >
  431. </template>
  432. </span>
  433. <br v-if="pinyinShow" />
  434. <template v-if="pinyinShow && pinyinBottom">
  435. <span
  436. :class="['pinyin']"
  437. :style="{
  438. fontSize: pinyinFontsize + 'px',
  439. lineHeight: pinyinLineHeight + 'px',
  440. }"
  441. >
  442. <!-- {{ itemss.pinyinStr }} -->
  443. </span>
  444. </template>
  445. </span>
  446. </span>
  447. </template>
  448. <template v-else>
  449. <span :class="['word']">
  450. <!-- <template v-if="word.isShow"> -->
  451. <span class="text">
  452. <template v-if="pinyinShow && !pinyinBottom">
  453. <span
  454. :class="['pinyin']"
  455. :style="{
  456. fontSize: pinyinFontsize + 'px',
  457. lineHeight: pinyinLineHeight + 'px',
  458. }"
  459. >
  460. {{ itemss.pinyinStr }}
  461. </span>
  462. </template>
  463. <br v-if="pinyinShow" />
  464. <span>
  465. <template v-for="(word, indexsss) in itemss.text">
  466. <span
  467. v-if="word.isShow"
  468. :key="indexsss + 'word'"
  469. class="hanzi"
  470. :class="[/^[a-zA-Z0-9]/.test(word.word) ? '' : 'hanzi-fz']"
  471. :style="{
  472. fontFamily: /^[a-zA-Z0-9]/.test(word.word) ? '' : '楷体',
  473. fontSize: wordFontsize + 'px',
  474. lineHeight: wordLineHeight + 'px',
  475. background: word.color ? word.color : '',
  476. whiteSpace: 'pre',
  477. color: word.color
  478. ? '#000'
  479. : !xifen
  480. ? leftNavIndex == 0
  481. ? seleLevelMapList.indexOf(word.levels.P_G) != -1
  482. ? levelMap[word.levels.P_G].color
  483. : '#000'
  484. : leftNavIndex == 1
  485. ? seleLevelMapList.indexOf(word.levels.W_G) != -1
  486. ? levelMap[word.levels.W_G].color
  487. : '#000'
  488. : leftNavIndex == 2
  489. ? seleLevelMapList.indexOf(word.levels.C_G) != -1
  490. ? levelMap[word.levels.C_G].color
  491. : '#000'
  492. : '#000'
  493. : leftNavIndex == 0
  494. ? seleLevelMapList.indexOf(word.levels.P_L) != -1
  495. ? levelMap[word.levels.P_L].color
  496. : '#000'
  497. : leftNavIndex == 1
  498. ? seleLevelMapList.indexOf(word.levels.W_L) != -1
  499. ? levelMap[word.levels.W_L].color
  500. : '#000'
  501. : leftNavIndex == 2
  502. ? seleLevelMapList.indexOf(word.levels.C_L) != -1
  503. ? levelMap[word.levels.C_L].color
  504. : '#000'
  505. : '#000',
  506. }"
  507. >{{ word.word }}</span
  508. >
  509. </template>
  510. <span
  511. v-if="cixing"
  512. class="hanzi"
  513. :style="{
  514. fontSize: wordFontsize - 4 + 'px',
  515. lineHeight: wordLineHeight + 'px',
  516. }"
  517. >{{ '_' + itemss.pos }}</span
  518. >
  519. </span>
  520. <br v-if="pinyinShow" />
  521. <template v-if="pinyinShow && pinyinBottom">
  522. <span
  523. :class="['pinyin']"
  524. :style="{
  525. fontSize: pinyinFontsize + 'px',
  526. lineHeight: pinyinLineHeight + 'px',
  527. }"
  528. >
  529. {{ itemss.pinyinStr }}
  530. </span>
  531. </template>
  532. </span>
  533. <span class="texts">
  534. <template v-if="pinyinShow && !pinyinBottom">
  535. <span
  536. :class="['pinyin']"
  537. :style="{
  538. fontSize: pinyinFontsize + 'px',
  539. lineHeight: pinyinLineHeight + 'px',
  540. }"
  541. >
  542. <!-- {{ itemss.pinyinStr }} -->
  543. </span>
  544. </template>
  545. <br v-if="pinyinShow" />
  546. <span>
  547. <template v-for="(word, indexsss) in itemss.texts">
  548. <span
  549. :key="indexsss + 'word'"
  550. class="hanzi"
  551. :class="[/^[a-zA-Z0-9]/.test(word.word) ? '' : 'hanzi-fz']"
  552. :style="{
  553. fontFamily: /^[a-zA-Z0-9]/.test(word.word) ? '' : '楷体',
  554. fontSize: wordFontsize + 'px',
  555. lineHeight: wordLineHeight + 'px',
  556. background: word.color ? word.color : '',
  557. whiteSpace: 'pre',
  558. color: word.color
  559. ? '#000'
  560. : !xifen
  561. ? leftNavIndex == 0
  562. ? seleLevelMapList.indexOf(word.levels.P_G) != -1
  563. ? levelMap[word.levels.P_G].color
  564. : '#000'
  565. : leftNavIndex == 1
  566. ? seleLevelMapList.indexOf(word.levels.W_G) != -1
  567. ? levelMap[word.levels.W_G].color
  568. : '#000'
  569. : leftNavIndex == 2
  570. ? seleLevelMapList.indexOf(word.levels.C_G) != -1
  571. ? levelMap[word.levels.C_G].color
  572. : '#000'
  573. : '#000'
  574. : leftNavIndex == 0
  575. ? seleLevelMapList.indexOf(word.levels.P_L) != -1
  576. ? levelMap[word.levels.P_L].color
  577. : '#000'
  578. : leftNavIndex == 1
  579. ? seleLevelMapList.indexOf(word.levels.W_L) != -1
  580. ? levelMap[word.levels.W_L].color
  581. : '#000'
  582. : leftNavIndex == 2
  583. ? seleLevelMapList.indexOf(word.levels.C_L) != -1
  584. ? levelMap[word.levels.C_L].color
  585. : '#000'
  586. : '#000',
  587. }"
  588. >{{ word.word }}</span
  589. >
  590. </template>
  591. </span>
  592. <br v-if="pinyinShow" />
  593. <template v-if="pinyinShow && pinyinBottom">
  594. <span
  595. :class="['pinyin']"
  596. :style="{
  597. fontSize: pinyinFontsize + 'px',
  598. lineHeight: pinyinLineHeight + 'px',
  599. }"
  600. >
  601. <!-- {{ itemss.pinyinStr }} -->
  602. </span>
  603. </template>
  604. </span>
  605. <!-- </template> -->
  606. </span>
  607. </template>
  608. </template>
  609. <template v-else>
  610. <template v-if="itemss.pinyin_lt">
  611. <span
  612. class="word"
  613. :style="{ padding: `0 ${wordsMargin < 3 ? '1' : wordsMargin > 5 ? '2' : wordsMargin - 2}px` }"
  614. >
  615. <span class="text">
  616. <span
  617. v-if="pinyinShow && !pinyinBottom"
  618. :class="['pinyin']"
  619. :style="{
  620. fontSize: pinyinFontsize + 'px',
  621. lineHeight: pinyinLineHeight + 'px',
  622. }"
  623. >
  624. {{ itemss.pinyin_lt }}
  625. </span>
  626. <br v-if="pinyinShow" />
  627. <span class="word-box">
  628. <template v-for="(word, indexsss) in itemss.text">
  629. <span
  630. v-if="word.isShow"
  631. :key="indexsss + 'word'"
  632. class="hanzi"
  633. :class="[/^[a-zA-Z0-9]/.test(word.word) ? '' : 'hanzi-fz']"
  634. :style="{
  635. fontFamily: /^[a-zA-Z0-9]/.test(word.word) ? '' : '楷体',
  636. fontSize: wordFontsize + 'px',
  637. lineHeight: wordLineHeight + 'px',
  638. background: word.color ? word.color : '',
  639. whiteSpace: 'pre',
  640. color: word.color
  641. ? '#000'
  642. : !xifen
  643. ? leftNavIndex == 0
  644. ? seleLevelMapList.indexOf(word.levels.P_G) != -1
  645. ? levelMap[word.levels.P_G].color
  646. : '#000'
  647. : leftNavIndex == 1
  648. ? seleLevelMapList.indexOf(word.levels.W_G) != -1
  649. ? levelMap[word.levels.W_G].color
  650. : '#000'
  651. : leftNavIndex == 2
  652. ? seleLevelMapList.indexOf(word.levels.C_G) != -1
  653. ? levelMap[word.levels.C_G].color
  654. : '#000'
  655. : '#000'
  656. : leftNavIndex == 0
  657. ? seleLevelMapList.indexOf(word.levels.P_L) != -1
  658. ? levelMap[word.levels.P_L].color
  659. : '#000'
  660. : leftNavIndex == 1
  661. ? seleLevelMapList.indexOf(word.levels.W_L) != -1
  662. ? levelMap[word.levels.W_L].color
  663. : '#000'
  664. : leftNavIndex == 2
  665. ? seleLevelMapList.indexOf(word.levels.C_L) != -1
  666. ? levelMap[word.levels.C_L].color
  667. : '#000'
  668. : '#000',
  669. }"
  670. >{{ word.word }}</span
  671. >
  672. </template>
  673. </span>
  674. <br v-if="pinyinShow" />
  675. <span
  676. v-if="pinyinShow && pinyinBottom"
  677. :class="['pinyin']"
  678. :style="{
  679. fontSize: pinyinFontsize + 'px',
  680. lineHeight: pinyinLineHeight + 'px',
  681. }"
  682. >
  683. {{ itemss.pinyin_lt }}
  684. </span>
  685. </span>
  686. <span class="texts">
  687. <template v-if="pinyinShow && !pinyinBottom">
  688. <span
  689. :class="['pinyin']"
  690. :style="{
  691. fontSize: pinyinFontsize + 'px',
  692. lineHeight: pinyinLineHeight + 'px',
  693. }"
  694. >
  695. <!-- {{ itemss.pinyinStr }} -->
  696. </span>
  697. </template>
  698. <br v-if="pinyinShow" />
  699. <span>
  700. <template v-for="(word, indexsss) in itemss.texts">
  701. <span
  702. :key="indexsss + 'word'"
  703. class="hanzi"
  704. :class="[/^[a-zA-Z0-9]/.test(word.word) ? '' : 'hanzi-fz']"
  705. :style="{
  706. fontFamily: /^[a-zA-Z0-9]/.test(word.word) ? '' : '楷体',
  707. fontSize: wordFontsize + 'px',
  708. lineHeight: wordLineHeight + 'px',
  709. background: word.color ? word.color : '',
  710. whiteSpace: 'pre',
  711. color: word.color
  712. ? '#000'
  713. : !xifen
  714. ? leftNavIndex == 0
  715. ? seleLevelMapList.indexOf(word.levels.P_G) != -1
  716. ? levelMap[word.levels.P_G].color
  717. : '#000'
  718. : leftNavIndex == 1
  719. ? seleLevelMapList.indexOf(word.levels.W_G) != -1
  720. ? levelMap[word.levels.W_G].color
  721. : '#000'
  722. : leftNavIndex == 2
  723. ? seleLevelMapList.indexOf(word.levels.C_G) != -1
  724. ? levelMap[word.levels.C_G].color
  725. : '#000'
  726. : '#000'
  727. : leftNavIndex == 0
  728. ? seleLevelMapList.indexOf(word.levels.P_L) != -1
  729. ? levelMap[word.levels.P_L].color
  730. : '#000'
  731. : leftNavIndex == 1
  732. ? seleLevelMapList.indexOf(word.levels.W_L) != -1
  733. ? levelMap[word.levels.W_L].color
  734. : '#000'
  735. : leftNavIndex == 2
  736. ? seleLevelMapList.indexOf(word.levels.C_L) != -1
  737. ? levelMap[word.levels.C_L].color
  738. : '#000'
  739. : '#000',
  740. }"
  741. >{{ word.word }}</span
  742. >
  743. </template>
  744. </span>
  745. <br v-if="pinyinShow" />
  746. <template v-if="pinyinShow && pinyinBottom">
  747. <span
  748. :class="['pinyin']"
  749. :style="{
  750. fontSize: pinyinFontsize + 'px',
  751. lineHeight: pinyinLineHeight + 'px',
  752. }"
  753. >
  754. <!-- {{ itemss.pinyinStr }} -->
  755. </span>
  756. </template>
  757. </span>
  758. </span>
  759. </template>
  760. <template v-else>
  761. <span
  762. v-for="(word, indexsss) in itemss.text"
  763. :key="indexsss + 'word'"
  764. class="word"
  765. :style="{
  766. padding: word.isShow
  767. ? `0 ${wordsMargin < 3 ? '1' : wordsMargin > 5 ? '2' : wordsMargin - 2}px`
  768. : '',
  769. display: 'initial',
  770. }"
  771. >
  772. <template v-if="word.isShow">
  773. <span
  774. v-if="pinyinShow && !pinyinBottom"
  775. :class="['pinyin']"
  776. :style="{
  777. fontSize: pinyinFontsize + 'px',
  778. lineHeight: pinyinLineHeight + 'px',
  779. }"
  780. >
  781. {{ word.pinyin }}
  782. </span>
  783. <br v-if="pinyinShow" />
  784. <span
  785. class="hanzi"
  786. :class="[/^[a-zA-Z0-9]/.test(word.word) ? '' : 'hanzi-fz']"
  787. :style="{
  788. fontFamily: /^[a-zA-Z0-9]/.test(word.word) ? '' : '楷体',
  789. fontSize: wordFontsize + 'px',
  790. lineHeight: wordLineHeight + 'px',
  791. background: word.color ? word.color : '',
  792. whiteSpace: 'pre',
  793. color: word.color
  794. ? '#000'
  795. : !xifen
  796. ? leftNavIndex == 0
  797. ? seleLevelMapList.indexOf(word.levels.P_G) != -1
  798. ? levelMap[word.levels.P_G].color
  799. : '#000'
  800. : leftNavIndex == 1
  801. ? seleLevelMapList.indexOf(word.levels.W_G) != -1
  802. ? levelMap[word.levels.W_G].color
  803. : '#000'
  804. : leftNavIndex == 2
  805. ? seleLevelMapList.indexOf(word.levels.C_G) != -1
  806. ? levelMap[word.levels.C_G].color
  807. : '#000'
  808. : '#000'
  809. : leftNavIndex == 0
  810. ? seleLevelMapList.indexOf(word.levels.P_L) != -1
  811. ? levelMap[word.levels.P_L].color
  812. : '#000'
  813. : leftNavIndex == 1
  814. ? seleLevelMapList.indexOf(word.levels.W_L) != -1
  815. ? levelMap[word.levels.W_L].color
  816. : '#000'
  817. : leftNavIndex == 2
  818. ? seleLevelMapList.indexOf(word.levels.C_L) != -1
  819. ? levelMap[word.levels.C_L].color
  820. : '#000'
  821. : '#000',
  822. }"
  823. >{{ word.word }}</span
  824. >
  825. <br v-if="pinyinShow" />
  826. <span
  827. v-if="pinyinShow && pinyinBottom"
  828. :class="['pinyin']"
  829. :style="{
  830. fontSize: pinyinFontsize + 'px',
  831. lineHeight: pinyinLineHeight + 'px',
  832. }"
  833. >
  834. {{ word.pinyin }}
  835. </span>
  836. </template>
  837. </span>
  838. <span
  839. v-for="(word, indexsss) in itemss.texts"
  840. :key="indexsss + 'words'"
  841. class="word"
  842. :style="{ display: 'initial' }"
  843. >
  844. <span
  845. v-if="pinyinShow && !pinyinBottom"
  846. :class="['pinyin']"
  847. :style="{
  848. fontSize: pinyinFontsize + 'px',
  849. lineHeight: pinyinLineHeight + 'px',
  850. }"
  851. >
  852. {{ word.pinyin }}
  853. </span>
  854. <br v-if="pinyinShow" />
  855. <span
  856. class="hanzi"
  857. :class="[/^[a-zA-Z0-9]/.test(word.word) ? '' : 'hanzi-fz']"
  858. :style="{
  859. fontFamily: /^[a-zA-Z0-9]/.test(word.word) ? '' : '楷体',
  860. fontSize: wordFontsize + 'px',
  861. lineHeight: wordLineHeight + 'px',
  862. background: word.color ? word.color : '',
  863. whiteSpace: 'pre',
  864. color: word.color
  865. ? '#000'
  866. : !xifen
  867. ? leftNavIndex == 0
  868. ? seleLevelMapList.indexOf(word.levels.P_G) != -1
  869. ? levelMap[word.levels.P_G].color
  870. : '#000'
  871. : leftNavIndex == 1
  872. ? seleLevelMapList.indexOf(word.levels.W_G) != -1
  873. ? levelMap[word.levels.W_G].color
  874. : '#000'
  875. : leftNavIndex == 2
  876. ? seleLevelMapList.indexOf(word.levels.C_G) != -1
  877. ? levelMap[word.levels.C_G].color
  878. : '#000'
  879. : '#000'
  880. : leftNavIndex == 0
  881. ? seleLevelMapList.indexOf(word.levels.P_L) != -1
  882. ? levelMap[word.levels.P_L].color
  883. : '#000'
  884. : leftNavIndex == 1
  885. ? seleLevelMapList.indexOf(word.levels.W_L) != -1
  886. ? levelMap[word.levels.W_L].color
  887. : '#000'
  888. : leftNavIndex == 2
  889. ? seleLevelMapList.indexOf(word.levels.C_L) != -1
  890. ? levelMap[word.levels.C_L].color
  891. : '#000'
  892. : '#000',
  893. }"
  894. >{{ word.word }}</span
  895. >
  896. <br v-if="pinyinShow" />
  897. <span
  898. v-if="pinyinShow && pinyinBottom"
  899. :class="['pinyin']"
  900. :style="{
  901. fontSize: pinyinFontsize + 'px',
  902. lineHeight: pinyinLineHeight + 'px',
  903. }"
  904. >
  905. {{ word.pinyin }}
  906. </span>
  907. </span>
  908. </template>
  909. </template>
  910. </span>
  911. <!-- </span> -->
  912. </div>
  913. </div>
  914. </div>
  915. </div>
  916. </div>
  917. </div>
  918. <div id="echarts_none_0" style="display: none; width: 592px; height: 568px"></div>
  919. <div id="echarts_none_1" style="display: none; width: 592px; height: 568px"></div>
  920. <div id="echarts_none_2" style="display: none; width: 592px; height: 568px"></div>
  921. <div id="echarts_none_3" style="display: none; width: 592px; height: 568px"></div>
  922. <el-dialog
  923. :show-close="false"
  924. :visible.sync="editArticleFlag"
  925. width="800px"
  926. :before-close="handleClose"
  927. :modal="false"
  928. class="edit-dialog"
  929. >
  930. <el-input
  931. v-model="noPosContent"
  932. type="textarea"
  933. placeholder="请输入文本"
  934. :autosize="{ minRows: 9 }"
  935. :maxlength="3000"
  936. />
  937. <span slot="footer" class="dialog-footer">
  938. <span class="left">{{ noPosContent.length }}/{{ 3000 }}</span>
  939. <div>
  940. <el-button @click="handleClose">取 消</el-button>
  941. <el-button type="primary" :loading="loading" @click="saveWord(id)">确 定</el-button>
  942. </div>
  943. </span>
  944. </el-dialog>
  945. </div>
  946. </template>
  947. <script>
  948. import HeaderPage from '@/components/Header.vue';
  949. import * as echarts from 'echarts';
  950. import 'echarts/lib/chart/bar';
  951. import 'echarts/lib/component/legend';
  952. import 'echarts/lib/component/title';
  953. import { reparse, publicMethods, GetTextAnalyseRecordInfo } from '@/api/api';
  954. import { levelMap } from '../../common/data';
  955. import { json2excel } from '@/utils/setMethods';
  956. import FileSaver from 'file-saver';
  957. import htmlDocx from 'html-docx-js/dist/html-docx';
  958. import { markRaw } from 'vue';
  959. export default {
  960. components: {
  961. HeaderPage,
  962. },
  963. data() {
  964. return {
  965. ratioShow: false,
  966. chsFhList: [',', '。', '”', ':', '》', '《', '?', '!', ';', '、', '~'],
  967. loading: false,
  968. LeftLoading: false,
  969. wordFontsize: 20, // 汉字字号初始值
  970. pinyinFontsize: 12, // 拼音字号初始值
  971. wordLineHeight: 28,
  972. pinyinLineHeight: 12,
  973. wordsMargin: 3,
  974. fenci: false,
  975. pinyinShow: false,
  976. pinyinBottom: false, // 拼音在下
  977. leftNavIndex: 2,
  978. leftList: null,
  979. colorValue: '#FF3737',
  980. colorIndex: 0,
  981. searchVal: '',
  982. isSCL: false,
  983. searchColorList: [
  984. '#FF3737',
  985. '#875EDE',
  986. '#FF8000',
  987. '#FF55F3',
  988. '#CEB800',
  989. // "#CB1975",
  990. // "#00D8B4",
  991. // "#00CEFF",
  992. // "#3274FF",
  993. // "#00B60A",
  994. // 等级颜色
  995. '#B6D58A',
  996. '#66AE5B',
  997. '#35776B',
  998. '#73CDDE',
  999. '#4CA6EE',
  1000. '#3873CB',
  1001. '#9031AA',
  1002. '#CBCBCB',
  1003. '#888888',
  1004. ],
  1005. SearchwordNumber: 0,
  1006. searchWord: [],
  1007. searchWordShow: false,
  1008. type: '',
  1009. headerText: 'wordCount',
  1010. xifen: false,
  1011. myChart: null,
  1012. myChart_none: null,
  1013. currentTBdata: {},
  1014. currentcolorValue: [],
  1015. subjectWords: null,
  1016. partitionKey: null,
  1017. base: {},
  1018. levelMap,
  1019. allValue: 0,
  1020. allRatio: 0,
  1021. chartIndex: 0,
  1022. ArticelData: null,
  1023. seleLevelMapList: [],
  1024. difficulty: {},
  1025. textContent: [],
  1026. routerData: null,
  1027. id: null,
  1028. userID: this.$route.query.userID,
  1029. cixing: false, // 词性开关
  1030. editArticleFlag: false, // 修改文本
  1031. noPosContent: '',
  1032. cixing_ttr_list: [],
  1033. };
  1034. },
  1035. created() {
  1036. this.routerData = this.$route.query;
  1037. if (!this.routerData) return;
  1038. this.id = this.routerData.id;
  1039. this.getstatistics();
  1040. GetTextAnalyseRecordInfo({ id: this.routerData.id }).then(({ record }) => {
  1041. this.noPosContent = record.txt;
  1042. });
  1043. },
  1044. mounted() {
  1045. // 为了复制到富文本不丢失样式
  1046. this.$refs.articel.addEventListener('copy', (e) => {
  1047. // 获取用户的选区
  1048. let content = window.getSelection().getRangeAt(0).cloneContents();
  1049. let paragraphs = content.querySelectorAll('.paragraph'); // 获取选中的段落
  1050. let span = document.createElement('span');
  1051. if (paragraphs.length <= 0) {
  1052. // 单行情况下
  1053. span.classList = 'paragraph';
  1054. span.style = 'display: flex; flex-wrap: wrap; margin-bottom: 22px;font-weight: 500;';
  1055. } else {
  1056. // 多行情况下
  1057. paragraphs.forEach((item) => {
  1058. item.style = 'display: flex; flex-wrap: wrap; margin-bottom: 22px;font-weight: 500;';
  1059. });
  1060. span.classList = 'articel';
  1061. span.style = 'font-weight: 500;';
  1062. }
  1063. // 将 content 设到 span 中
  1064. span.appendChild(content);
  1065. // words
  1066. if (paragraphs.length <= 0) {
  1067. let words = span.querySelectorAll('.words');
  1068. words.forEach((item) => {
  1069. item.style.cssText += 'display: flex;';
  1070. });
  1071. } else {
  1072. paragraphs.forEach((item) => {
  1073. let words = item.querySelectorAll('.words');
  1074. words.forEach((items, i) => {
  1075. items.style.cssText += `display: flex;${i === 0 ? 'min-width: 22px;' : ''}`;
  1076. });
  1077. });
  1078. }
  1079. // word
  1080. let word = span.querySelectorAll('.word');
  1081. word.forEach((item) => {
  1082. item.style.cssText +=
  1083. item.style.display === 'initial' ? 'text-align: center;' : 'display: flex; text-align: center;';
  1084. });
  1085. // pinyin
  1086. let pinyin = span.querySelectorAll('.pinyin');
  1087. pinyin.forEach((item) => {
  1088. item.style.cssText +=
  1089. 'min-height: 12px; font-family: "League"; line-height: 12px; color: rgba(0, 0, 0, 50%); text-align: center;';
  1090. });
  1091. // hanzi
  1092. let hanzi = span.querySelectorAll('.hanzi');
  1093. hanzi.forEach((item) => {
  1094. item.style.cssText += 'line-height: 28px; color: #000; text-align: center;';
  1095. });
  1096. // hanzi_fz
  1097. let hanzi_fz = span.querySelectorAll('.hanzi-fz');
  1098. hanzi_fz.forEach((item) => {
  1099. item.style.cssText += 'font-family: "FZJCGFKTK";';
  1100. });
  1101. // 将 span 转为字符串,包含样式
  1102. let spanHtml = span.outerHTML;
  1103. spanHtml = spanHtml.replace(/<div/g, '<span').replace(/<\/div/g, '</span');
  1104. // 修改复制到剪贴板的数据
  1105. e.clipboardData.setData('text/html', spanHtml);
  1106. // 阻止默认的复制操作
  1107. e.preventDefault();
  1108. });
  1109. },
  1110. methods: {
  1111. // 词表
  1112. gowordTable() {
  1113. let data = JSON.parse(JSON.stringify(this.routerData));
  1114. data.leftNavIndex = this.leftNavIndex;
  1115. this.$router.push({
  1116. path: '/textanalysis/WordTable',
  1117. query: data,
  1118. });
  1119. },
  1120. // 取消搜索高亮
  1121. closeSearchhighlight() {
  1122. this.ArticelData.forEach((item) => {
  1123. // item.forEach((items) => {
  1124. item.forEach((itemss) => {
  1125. itemss.text.forEach((itemsss) => {
  1126. itemsss.color = null;
  1127. });
  1128. });
  1129. // });
  1130. });
  1131. },
  1132. // 取消等级高亮
  1133. closelevelMaphighlight() {
  1134. this.seleLevelMapList = [];
  1135. },
  1136. // 下载文章
  1137. downArticle() {
  1138. let html = '';
  1139. // let newhtml = '';
  1140. if (this.$('.articel').length > 0) {
  1141. html = this.$('.articel').html();
  1142. // this.$("br").remove();
  1143. // newhtml = this.$(".articel").html();
  1144. // this.$(".articel").html(html);
  1145. }
  1146. let richness =
  1147. `<div style="text-align:center;font-size: 五号;font-weight: 600;line-height: 22px;color: #a5a5a5;">` +
  1148. `音节丰富度 ${Number(this.difficulty.pinyinDifficulty).toFixed(2)} | ${this.base.pinyinCount}/${
  1149. this.base.pinyinTextCount
  1150. } ` +
  1151. `汉字丰富度 ${Number(this.difficulty.wordDifficulty).toFixed(2)} | ${this.base.wordCount}/${
  1152. this.base.wordTextCount
  1153. } ` +
  1154. `词汇丰富度 ${Number(this.difficulty.vocabularyDifficulty).toFixed(2)} | ${this.base.vocabularyCount}/${
  1155. this.base.vocabularyTextCount
  1156. }</div><br/>`;
  1157. let dv = document.createElement('div');
  1158. dv.id = 'html_dv';
  1159. dv.innerHTML = richness + html;
  1160. dv.style.display = 'none';
  1161. document.body.appendChild(dv);
  1162. let cxzcxz = this.$('#html_dv').html();
  1163. let style = `<style>
  1164. .sentence {
  1165. margin-bottom: 8px;
  1166. }
  1167. .pinyin {
  1168. color: rgba(255, 255, 255, 0.5);
  1169. text-align: center;
  1170. line-height: 12px;
  1171. font-family: "League";
  1172. }
  1173. .hanzi {
  1174. text-align: center;
  1175. line-height: 28px;
  1176. }
  1177. .hanzi-fz{
  1178. font-family: "楷体";
  1179. }
  1180. </style>`;
  1181. let content = `<!DOCTYPE html>
  1182. <html lang="en">
  1183. <head>
  1184. <meta charset="UTF-8">
  1185. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  1186. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  1187. ${style}
  1188. </head>
  1189. <body>
  1190. <div>
  1191. ${cxzcxz}
  1192. </div>
  1193. </body>
  1194. </html>`;
  1195. let converted = htmlDocx.asBlob(content);
  1196. FileSaver.saveAs(converted, '文章.docx');
  1197. document.body.removeChild(dv);
  1198. },
  1199. // 全部高亮
  1200. allListEvent() {
  1201. if (this.seleLevelMapList.length === this.leftList.length) {
  1202. this.seleLevelMapList = [];
  1203. } else {
  1204. this.seleLevelMapList = [];
  1205. this.leftList.forEach((item) => {
  1206. this.seleLevelMapList.push(item.id);
  1207. });
  1208. }
  1209. },
  1210. // 选择高亮等级
  1211. levelMapListEvent(item) {
  1212. // this.clearSelected("all");
  1213. let index = this.seleLevelMapList.indexOf(item.id);
  1214. if (index === -1) {
  1215. this.seleLevelMapList.push(item.id);
  1216. } else {
  1217. this.seleLevelMapList.splice(index, 1);
  1218. }
  1219. },
  1220. downloadLeft() {
  1221. let data = JSON.parse(JSON.stringify(this.leftList));
  1222. data.forEach((item) => {
  1223. item.ratio += '%';
  1224. });
  1225. let obj = {
  1226. name: '合计',
  1227. ratio: this.allRatio,
  1228. value: `${this.allValue}%`,
  1229. };
  1230. data.push(obj);
  1231. let excelDatas = [
  1232. {
  1233. tHeader: ['等级', '数量', '占比'],
  1234. filterVal: ['name', 'value', 'ratio'], // 表一的数据字段
  1235. tableDatas: data, // 表一的整体json数据
  1236. sheetName: 'sheet1', // 表一的sheet名字
  1237. },
  1238. ];
  1239. // 引入的函数
  1240. json2excel(excelDatas, '等级分布', true, 'xlsx');
  1241. },
  1242. downLoadEcharts() {
  1243. let chartsCanvas = document.getElementById(`echarts_none_${this.chartIndex}`).querySelectorAll('canvas')[0];
  1244. let picInfo = chartsCanvas.toDataURL({
  1245. type: 'png',
  1246. pixelRatio: 1, // 放大两倍下载。解决生成图片在移动端模糊问题
  1247. backgroundColor: '#fff',
  1248. excludeComponents: ['toolbox'], // 导出时忽略toolbox组件
  1249. }); // 获取到的是一串base64信息
  1250. const elink = document.createElement('a');
  1251. // 设置默认文件名,this.chartTitle为绘图时生成的标题
  1252. elink.download = '等级分布.png';
  1253. elink.style.display = 'none';
  1254. elink.href = picInfo;
  1255. document.body.appendChild(elink);
  1256. elink.click();
  1257. URL.revokeObjectURL(elink.href); // 释放URL 对象
  1258. document.body.removeChild(elink);
  1259. },
  1260. ciyunEvent() {
  1261. window.location.href = `${window.location.origin}/GCLS-TC/ciyun/ciyunindex.html?partitionKey=${this.id}&searchType=${this.leftNavIndex}&userID=${this.userID}`;
  1262. // window.open(
  1263. // `./ciyun/ciyunindex.html?partitionKey=${this.id}&searchType=${this.leftNavIndex}&userID=${this.userID}`,
  1264. // '_blank',
  1265. // );
  1266. },
  1267. // 处理字体大小
  1268. handleFontsize(symbol) {
  1269. if (symbol === '+') {
  1270. if (this.wordFontsize < 24) {
  1271. this.pinyinFontsize += 2;
  1272. this.wordFontsize += 2;
  1273. this.pinyinLineHeight += 2;
  1274. this.wordLineHeight += 2;
  1275. this.wordsMargin += 1;
  1276. }
  1277. } else if (symbol === '-') {
  1278. if (this.wordFontsize > 12) {
  1279. this.pinyinFontsize -= 2;
  1280. this.wordFontsize -= 2;
  1281. this.pinyinLineHeight -= 2;
  1282. this.wordLineHeight -= 2;
  1283. if (this.wordsMargin > 2) {
  1284. this.wordsMargin -= 1;
  1285. }
  1286. }
  1287. }
  1288. },
  1289. cutNav(index) {
  1290. this.leftNavIndex = index;
  1291. this.seleLevelMapList = [];
  1292. this.xifen = false;
  1293. this.getstatistics('left');
  1294. },
  1295. showSearchColorList() {
  1296. this.isSCL = !this.isSCL;
  1297. },
  1298. closeSearchColor() {
  1299. this.isSCL = false;
  1300. },
  1301. selectSearchColor(item, index) {
  1302. this.isSCL = false;
  1303. this.colorValue = item;
  1304. this.colorIndex = index;
  1305. },
  1306. searchValChange(e) {
  1307. if (this.searchVal.length === 1 && e.keyCode === 8) {
  1308. if (this.colorIndex === this.searchWord.length + 1 || this.searchWord.length === 0) {
  1309. return;
  1310. }
  1311. this.colorIndex = this.searchWord.length + 1;
  1312. this.colorValue = this.searchColorList[this.colorIndex];
  1313. }
  1314. },
  1315. onSearch() {
  1316. if (!this.searchVal) {
  1317. return;
  1318. }
  1319. this.searchWordShow = true;
  1320. this.closelevelMaphighlight();
  1321. let index = this.searchWord.indexOf(this.searchVal.toLowerCase());
  1322. if (index === -1) {
  1323. this.searchWord.push(this.searchVal.toLowerCase());
  1324. this.currentcolorValue.push(this.colorValue);
  1325. } else {
  1326. // this.currentcolorValue[index] = this.colorValue;
  1327. this.$set(this.currentcolorValue, index, this.colorValue);
  1328. }
  1329. this.type = '';
  1330. this.calculateSearchwordNumber();
  1331. // this.searchVal = "";
  1332. },
  1333. // 词表跳转高亮
  1334. async wordTablehighlight(data, color) {
  1335. this.searchWordShow = true;
  1336. this.colorValue = color;
  1337. this.searchColorList.forEach((item, i) => {
  1338. if (color === item) {
  1339. this.colorIndex = i;
  1340. }
  1341. });
  1342. this.searchVal = data[data.length - 1];
  1343. let arr = [];
  1344. await data.forEach((item) => {
  1345. this.calculateIndex(this.textContent, item).then((res) => {
  1346. arr.push(res);
  1347. });
  1348. });
  1349. this.SearchwordNumber = arr[arr.length - 1].length; // 高亮最后一次
  1350. // 匹配高亮
  1351. this.ArticelData.forEach((item) => {
  1352. item.forEach((items) => {
  1353. // items.forEach((itemss) => {
  1354. items.text.forEach((itemsss) => {
  1355. arr.forEach((searchItem) => {
  1356. searchItem.forEach((searchItems) => {
  1357. searchItems.forEach((searchItemss) => {
  1358. if (itemsss.index === searchItemss) {
  1359. itemsss.color = color;
  1360. }
  1361. });
  1362. });
  1363. });
  1364. });
  1365. // });
  1366. });
  1367. });
  1368. this.$forceUpdate();
  1369. },
  1370. // 计算匹配个数
  1371. async calculateSearchwordNumber() {
  1372. let arr = [];
  1373. await this.searchWord.forEach((item) => {
  1374. this.calculateIndex(this.textContent, item).then((res) => {
  1375. arr.push(res);
  1376. });
  1377. });
  1378. this.SearchwordNumber = 0;
  1379. // 高亮全部
  1380. // arr.forEach((item) => {
  1381. // this.SearchwordNumber += item.length;
  1382. // });
  1383. this.SearchwordNumber = arr[arr.length - 1].length; // 高亮最后一次
  1384. // 匹配高亮
  1385. this.ArticelData.forEach((item) => {
  1386. item.forEach((items) => {
  1387. // items.forEach((itemss) => {
  1388. items.text.forEach((itemsss) => {
  1389. arr.forEach((searchItem, i) => {
  1390. searchItem.forEach((searchItems) => {
  1391. searchItems.forEach((searchItemss) => {
  1392. if (itemsss.index === searchItemss) {
  1393. itemsss.color = this.currentcolorValue[i];
  1394. }
  1395. });
  1396. });
  1397. });
  1398. });
  1399. // });
  1400. });
  1401. });
  1402. },
  1403. replacepos(text, start, stop, replacetext) {
  1404. return text.substring(0, stop - 1) + replacetext + text.substring(stop + 1);
  1405. },
  1406. // 找出对应字符的索引
  1407. calculateIndex(txt, key) {
  1408. return new Promise((reslove) => {
  1409. // 去除标点]
  1410. const regex = /[\u4e00-\u9fa5]/g;
  1411. const flag = regex.test(key);
  1412. let keylength = flag ? key.length : key.split(' ').length;
  1413. let arr = [];
  1414. for (let i = 0; i < txt.length; i++) {
  1415. if (txt[i] === (flag ? key[0] : key)) {
  1416. arr.push(i);
  1417. }
  1418. }
  1419. let indexArr = [];
  1420. arr.forEach((item) => {
  1421. let arr = [];
  1422. for (let i = 0; i < keylength; i++) {
  1423. if (txt[item + i] === (flag ? key[i] : key)) {
  1424. arr.push(item + i);
  1425. } else {
  1426. arr = [];
  1427. }
  1428. }
  1429. if (arr.length > 0) {
  1430. indexArr.push(arr);
  1431. }
  1432. });
  1433. reslove(indexArr);
  1434. });
  1435. },
  1436. clearSelected(all) {
  1437. let _this = this;
  1438. _this.type = '';
  1439. _this.searchVal = '';
  1440. _this.searchWord = [];
  1441. _this.currentcolorValue = [];
  1442. _this.SearchwordNumber = 0;
  1443. if (all) {
  1444. this.seleLevelMapList = [];
  1445. _this.searchWordShow = false;
  1446. sessionStorage.setItem('tablehighlight', false);
  1447. }
  1448. this.colorIndex = 0;
  1449. this.colorValue = this.searchColorList[this.colorIndex];
  1450. this.closeSearchhighlight();
  1451. },
  1452. cutHeaderText(type) {
  1453. this.headerText = type;
  1454. this.seleLevelMapList = [];
  1455. this.getstatistics('left');
  1456. },
  1457. changexifen() {
  1458. this.seleLevelMapList = [];
  1459. this.getstatistics('left');
  1460. },
  1461. // 添加dom
  1462. addnode() {
  1463. return new Promise((reslove) => {
  1464. let fatherNode = document.getElementById('echarts');
  1465. let node = document.getElementById('main_echarts');
  1466. if (node) {
  1467. node.remove();
  1468. }
  1469. let newnode = document.createElement('div');
  1470. newnode.id = 'main_echarts';
  1471. newnode.style.width = '342px';
  1472. newnode.style.height = '310px';
  1473. newnode.style.margin = '0 auto';
  1474. let qianNode = document.getElementById('distributionOperation');
  1475. fatherNode.insertBefore(newnode, qianNode); // 添加的元素需要时通过createElement创建 不能使用字符串
  1476. reslove();
  1477. });
  1478. },
  1479. // 图表
  1480. async createEcharts(id, type, data, index) {
  1481. this.chartIndex = index;
  1482. this.myChart = null;
  1483. this.myChart_none = null;
  1484. let indicatorMax = 0;
  1485. let indicatorMaxRatio = 0;
  1486. // 先添加DOM再进行创建图表
  1487. await this.addnode().then(() => {
  1488. let newdata = JSON.parse(JSON.stringify(data));
  1489. // newdata.splice(data.length - 1, 1);
  1490. let name = [];
  1491. let valueStype = [];
  1492. let value = [];
  1493. let leidaList = [];
  1494. // 去除括号
  1495. newdata.forEach((item) => {
  1496. if (this.xifen) {
  1497. item.name = item.name.replace('(', '');
  1498. item.name = item.name.replace(')', '');
  1499. }
  1500. if (item.value > indicatorMax) {
  1501. indicatorMax = item.value;
  1502. }
  1503. if (item.ratio > indicatorMaxRatio) {
  1504. indicatorMaxRatio = item.ratio;
  1505. }
  1506. });
  1507. indicatorMax += 10;
  1508. if (indicatorMaxRatio < 50) {
  1509. indicatorMaxRatio = 50;
  1510. }
  1511. // 比例开关
  1512. if (index === '3') {
  1513. newdata.forEach((item) => {
  1514. item.value = item.ratio;
  1515. // item.name = item.name;
  1516. name.push(item.name);
  1517. valueStype.push({
  1518. value: item.ratio,
  1519. percent: `${item.ratio}%`,
  1520. });
  1521. value.push(item.ratio);
  1522. leidaList.push({
  1523. name: item.name,
  1524. max: indicatorMaxRatio,
  1525. });
  1526. });
  1527. } else {
  1528. newdata.forEach((item) => {
  1529. // item.value = item.value;
  1530. // item.name = item.name;
  1531. name.push(item.name);
  1532. valueStype.push({
  1533. value: item.value,
  1534. percent: `${item.ratio}%`,
  1535. });
  1536. value.push(item.value);
  1537. leidaList.push({
  1538. name: item.name,
  1539. max: indicatorMax,
  1540. });
  1541. });
  1542. }
  1543. let chartDom = document.getElementById(id);
  1544. this.myChart = markRaw(echarts.init(chartDom));
  1545. let chartDom_none = document.getElementById(`echarts_none_${index}`);
  1546. this.myChart_none = markRaw(echarts.init(chartDom_none));
  1547. let option = null;
  1548. let color1 = ['#35776B', '#3873CB', '#9031AA', '#EA1F1F', '#CBCBCB', '#888888'];
  1549. let color2 = [
  1550. '#B6D58A',
  1551. '#66AE5B',
  1552. '#35776B',
  1553. '#73CDDE',
  1554. '#4CA6EE',
  1555. '#3873CB',
  1556. '#9031AA',
  1557. '#EA1F1F',
  1558. '#CBCBCB',
  1559. '#888888',
  1560. ];
  1561. if (type === '饼状图') {
  1562. newdata.forEach((item) => {
  1563. item.name = `${item.name + item.ratio}%`;
  1564. });
  1565. option = {
  1566. color: this.xifen ? color2 : color1,
  1567. tooltip: {
  1568. trigger: 'item',
  1569. },
  1570. xAxis: {
  1571. show: false, // 不显示坐标轴线、坐标轴刻度线和坐标轴上的文字
  1572. axisTick: {
  1573. show: false, // 不显示坐标轴刻度线
  1574. },
  1575. axisLine: {
  1576. show: false, // 不显示坐标轴线
  1577. },
  1578. axisLabel: {
  1579. show: false, // 不显示坐标轴上的文字
  1580. },
  1581. },
  1582. series: [
  1583. {
  1584. name: 'Access From',
  1585. type: 'pie',
  1586. // radius: ["40%", "70%"],
  1587. radius: ['10%', '75%'],
  1588. data: newdata,
  1589. label: {
  1590. fontSize: 12,
  1591. position: 'inner',
  1592. color: '#fff',
  1593. },
  1594. itemStyle: {
  1595. borderColor: '#f5f5f5',
  1596. borderWidth: 2,
  1597. },
  1598. },
  1599. ],
  1600. grid: {
  1601. top: 'middle',
  1602. },
  1603. };
  1604. } else if (type === '柱状图') {
  1605. let that = this;
  1606. option = {
  1607. tooltip: {
  1608. trigger: 'axis',
  1609. axisPointer: {
  1610. type: 'shadow',
  1611. },
  1612. formatter(params) {
  1613. if (that.ratioShow) {
  1614. return `${params[0].name} ${params[0].value}%`;
  1615. }
  1616. return `${params[0].name} ${params[0].value}`;
  1617. },
  1618. },
  1619. xAxis: {
  1620. type: 'category',
  1621. data: name,
  1622. axisLabel: {
  1623. alignWithLabel: true,
  1624. // interval: 0, // 设置数据间隔
  1625. // rotate: -90, // 标题倾斜
  1626. formatter(value) {
  1627. let str = value.split('');
  1628. return str.join('\n');
  1629. },
  1630. },
  1631. },
  1632. yAxis: {
  1633. type: 'value',
  1634. axisLabel: {
  1635. formatter: that.ratioShow ? '{value}%' : '{value}',
  1636. },
  1637. },
  1638. grid: {
  1639. top: 20,
  1640. left: 20,
  1641. right: 20,
  1642. bottom: 20,
  1643. containLabel: true,
  1644. },
  1645. series: [
  1646. {
  1647. name: '',
  1648. data: valueStype,
  1649. type: 'bar',
  1650. itemStyle: {
  1651. color(params) {
  1652. let color = that.xifen ? color2 : color1;
  1653. return color[params.dataIndex];
  1654. },
  1655. },
  1656. },
  1657. ],
  1658. };
  1659. } else if (type === '折线图') {
  1660. let that = this;
  1661. option = {
  1662. tooltip: {
  1663. trigger: 'axis',
  1664. formatter(params) {
  1665. if (that.ratioShow) {
  1666. return `${params[0].name} ${params[0].value}%`;
  1667. }
  1668. return `${params[0].name} ${params[0].value}`;
  1669. },
  1670. },
  1671. xAxis: {
  1672. type: 'category',
  1673. data: name,
  1674. axisLabel: {
  1675. // interval: 0, // 设置数据间隔
  1676. // rotate: -90, // 标题倾斜
  1677. formatter(value) {
  1678. let str = value.split('');
  1679. return str.join('\n');
  1680. },
  1681. // margin: 5, //刻度标签与轴线之间的距离
  1682. // textStyle: {
  1683. // fontSize: 9, //横轴字体大小
  1684. // color: "#000000",//颜色
  1685. // },
  1686. },
  1687. },
  1688. color: '#5470c6',
  1689. yAxis: {
  1690. type: 'value',
  1691. axisLabel: {
  1692. formatter: this.ratioShow ? '{value}%' : '{value}',
  1693. },
  1694. },
  1695. grid: {
  1696. top: 20,
  1697. left: 20,
  1698. right: 20,
  1699. bottom: 20,
  1700. containLabel: true,
  1701. },
  1702. series: [
  1703. {
  1704. data: value,
  1705. type: 'line',
  1706. },
  1707. ],
  1708. };
  1709. } else if (type === '雷达图') {
  1710. let that = this;
  1711. const buildSeries = (data) => {
  1712. const helper = data.map((item, index) => {
  1713. const arr = new Array(data.length);
  1714. arr.splice(index, 1, item);
  1715. return arr;
  1716. });
  1717. return [data, ...helper].map((item, index) => {
  1718. return {
  1719. type: 'radar',
  1720. symbol: index === 0 ? 'circle' : 'none',
  1721. symbolSize: 6,
  1722. lineStyle: {
  1723. color: index === 0 ? '#5470C6' : 'transparent',
  1724. },
  1725. areaStyle: {
  1726. color: index === 0 ? '#5470C6' : 'transparent',
  1727. opacity: 0.5,
  1728. },
  1729. tooltip: {
  1730. show: index !== 0,
  1731. formatter() {
  1732. that.leiDaDataIndex = index - 1;
  1733. if (that.ratioShow) {
  1734. return `${leidaList[index - 1].name}:${value[index - 1]}%`;
  1735. }
  1736. return `${leidaList[index - 1].name}:${value[index - 1]}`;
  1737. },
  1738. },
  1739. z: index === 0 ? 1 : 2,
  1740. data: [item],
  1741. };
  1742. });
  1743. };
  1744. option = {
  1745. tooltip: {},
  1746. radar: {
  1747. indicator: leidaList,
  1748. radius: '70%',
  1749. axisName: {
  1750. color: '#4c4c4c',
  1751. },
  1752. },
  1753. series: buildSeries(value),
  1754. };
  1755. }
  1756. option && this.myChart.setOption(option);
  1757. if (type === '饼状图') {
  1758. this.myChart_none.setOption({
  1759. color: this.xifen ? color2 : color1,
  1760. xAxis: {
  1761. show: false, // 不显示坐标轴线、坐标轴刻度线和坐标轴上的文字
  1762. axisTick: {
  1763. show: false, // 不显示坐标轴刻度线
  1764. },
  1765. axisLine: {
  1766. show: false, // 不显示坐标轴线
  1767. },
  1768. axisLabel: {
  1769. show: false, // 不显示坐标轴上的文字
  1770. },
  1771. },
  1772. series: [
  1773. {
  1774. name: 'Access From',
  1775. type: 'pie',
  1776. radius: ['10%', '75%'],
  1777. data: newdata,
  1778. itemStyle: {
  1779. borderColor: '#fff',
  1780. borderWidth: 2,
  1781. },
  1782. label: {
  1783. fontSize: 12,
  1784. position: 'inner',
  1785. },
  1786. emphasis: {
  1787. itemStyle: {
  1788. shadowBlur: 10,
  1789. shadowOffsetX: 0,
  1790. shadowColor: 'rgba(0, 0, 0, 0.5)',
  1791. fontSize: 12,
  1792. },
  1793. },
  1794. },
  1795. ],
  1796. });
  1797. } else {
  1798. option && this.myChart_none && this.myChart_none.setOption(option);
  1799. }
  1800. let that = this;
  1801. // 默认展示第一个
  1802. for (let key in that.leftList[0]) {
  1803. that.currentTBdata[key] = that.leftList[index][key];
  1804. }
  1805. this.myChart.on('click', (params) => {
  1806. let index = null;
  1807. if (type === '雷达图') {
  1808. index = that.leiDaDataIndex;
  1809. } else {
  1810. index = params.dataIndex;
  1811. }
  1812. for (let key in that.leftList[index]) {
  1813. that.currentTBdata[key] = that.leftList[index][key];
  1814. }
  1815. that.$forceUpdate();
  1816. // that.$router.push({
  1817. // path: "/errorstatistics",
  1818. // query: {
  1819. // errorTypeId: that.leftdata[index].errorTypeId,
  1820. // rangeId: that.scoreRangeId,
  1821. // },
  1822. // });
  1823. });
  1824. });
  1825. },
  1826. // 获取图标统计信息
  1827. getstatistics(type) {
  1828. if (type) {
  1829. this.LeftLoading = true;
  1830. } else {
  1831. this.loading = true;
  1832. }
  1833. let base = null;
  1834. publicMethods('/TeachingServer/TextAnalyser/StatLevelDist', {
  1835. analyse_record_id: this.id,
  1836. type: this.leftNavIndex,
  1837. level_type: this.xifen ? 1 : 0,
  1838. count_type: this.headerText === 'wordCount' ? 0 : 1,
  1839. })
  1840. // if (this.leftNavIndex === 0) {
  1841. // base = this.headerText === 'wordCount' ? this.base.pinyinCount : this.base.pinyinTextCount;
  1842. // } else if (this.leftNavIndex === 1) {
  1843. // base = this.headerText === 'wordCount' ? this.base.wordCount : this.base.wordTextCount;
  1844. // } else {
  1845. // base = this.headerText === 'wordCount' ? this.base.vocabularyCount : this.base.vocabularyTextCount;
  1846. // }
  1847. // postapi({
  1848. // url: '/GCLSTCServer/tools/TS/statistics',
  1849. // data: {
  1850. // searchType: this.leftNavIndex,
  1851. // partitionKey: this.partitionKey,
  1852. // statisticsType: this.xifen ? 0 : 1,
  1853. // base: base || null,
  1854. // textType: this.headerText === 'wordCount' ? 0 : 1,
  1855. // },
  1856. // })
  1857. .then((res) => {
  1858. this.allRatio = 0;
  1859. this.allValue = 0;
  1860. res.data_list.forEach((item) => {
  1861. this.allRatio += Number(item.ratio);
  1862. this.allValue += item.count;
  1863. item.value = item.count;
  1864. });
  1865. res.data_list.forEach((item) => {
  1866. if (item.count !== 0) {
  1867. item.ratio = ((item.count / this.allValue) * 100).toFixed(2);
  1868. }
  1869. });
  1870. this.allRatio = this.allRatio.toFixed(2);
  1871. this.leftList = res.data_list;
  1872. this.createEcharts('main_echarts', '柱状图', this.leftList, 0);
  1873. // this.loading = false;
  1874. if (type) {
  1875. this.LeftLoading = false;
  1876. } else {
  1877. this.getArticleData();
  1878. }
  1879. })
  1880. .catch(() => {
  1881. this.loading = false;
  1882. });
  1883. },
  1884. // 获取分析结果
  1885. getArticleData() {
  1886. this.loading = true;
  1887. publicMethods('/TeachingServer/TextAnalyser/GetParsedTextInfo', {
  1888. analyse_record_id: this.id,
  1889. })
  1890. .then((res) => {
  1891. if (res.status === 1) {
  1892. let newdata = [];
  1893. res.parsed_text.paragraph_list.forEach((item) => {
  1894. if (item.length !== 0) {
  1895. newdata.push(item);
  1896. }
  1897. });
  1898. this.ArticelData = newdata;
  1899. let str = [];
  1900. // 合并标点
  1901. this.ArticelData.forEach((item) => {
  1902. item.forEach((items) => {
  1903. items.forEach((itemss, index) => {
  1904. let wordStr = '';
  1905. let pinyinStr = '';
  1906. itemss.text.forEach((itemsss) => {
  1907. wordStr += itemsss.word;
  1908. pinyinStr += itemsss.pinyin;
  1909. if (this.chsFhList.indexOf(itemsss.word) === -1) {
  1910. itemsss.isShow = true;
  1911. } else {
  1912. let obj = JSON.parse(JSON.stringify(itemsss));
  1913. // obj.isShow = true;
  1914. obj.isShow = false;
  1915. obj.isChsFh = true;
  1916. if (index > 0) {
  1917. if (items[index - 1].text[items[index - 1].text.length - 1].isShow) {
  1918. items[index - 1].text.push(obj);
  1919. if (!items[index - 1].hasOwnProperty('texts')) {
  1920. this.$set(items[index - 1], 'texts', []);
  1921. }
  1922. items[index - 1].texts.push(obj);
  1923. itemsss.isShow = false;
  1924. } else {
  1925. items[index - 2].text.push(obj);
  1926. if (!items[index - 2].hasOwnProperty('texts')) {
  1927. this.$set(items[index - 2], 'texts', []);
  1928. }
  1929. items[index - 2].texts.push(obj);
  1930. itemsss.isShow = false;
  1931. }
  1932. } else {
  1933. itemsss.isShow = true;
  1934. }
  1935. }
  1936. str.push(itemsss.word);
  1937. });
  1938. if (itemss.pinyin_lt) {
  1939. itemss.wordStr = wordStr;
  1940. }
  1941. itemss.pinyinStr = pinyinStr;
  1942. });
  1943. });
  1944. });
  1945. let index = 0;
  1946. // 添加索引
  1947. this.ArticelData.forEach((item) => {
  1948. item.forEach((items) => {
  1949. items.forEach((itemss) => {
  1950. itemss.text.forEach((itemsss) => {
  1951. if (itemsss.isShow) {
  1952. itemsss.index = index;
  1953. index += 1;
  1954. }
  1955. });
  1956. if (itemss.hasOwnProperty('texts')) {
  1957. itemss.texts.forEach((itemsss) => {
  1958. if (itemsss.isChsFh) {
  1959. itemsss.index = index;
  1960. index += 1;
  1961. }
  1962. });
  1963. }
  1964. });
  1965. });
  1966. });
  1967. let arr = [];
  1968. this.ArticelData.forEach((item, i) => {
  1969. arr.push([]);
  1970. item.forEach((items) => {
  1971. items.forEach((itemss) => {
  1972. arr[i].push(itemss);
  1973. });
  1974. });
  1975. });
  1976. this.ArticelData = arr;
  1977. this.textContent = str;
  1978. let flag = sessionStorage.getItem('tablehighlight');
  1979. if (this.$route.query.remarks && flag === 'true') {
  1980. this.cutNav(Number(this.$route.query.leftNavIndex));
  1981. this.wordTablehighlight(JSON.parse(this.$route.query.remarks), this.$route.query.color);
  1982. }
  1983. this.partitionKey = Number(res.record.partition_key);
  1984. this.subjectWords = JSON.parse(res.record.subject_words || '[]');
  1985. this.base.wordTextCount = Number(res.record.word_text_count);
  1986. this.base.wordCount = Number(res.record.word_count);
  1987. this.base.vocabularyTextCount = Number(res.record.vocabulary_text_count);
  1988. this.base.vocabularyCount = Number(res.record.vocabulary_count);
  1989. this.base.pinyinCount = Number(res.record.pinyin_count);
  1990. this.base.pinyinTextCount = Number(res.record.pinyin_text_count);
  1991. this.difficulty.pinyinDifficulty = res.record.pinyin_ttr;
  1992. this.difficulty.vocabularyDifficulty = res.record.vocabulary_ttr;
  1993. this.difficulty.wordDifficulty = res.record.word_ttr;
  1994. this.pinyinBottom = res.record.pinyin_mark_position !== 0;
  1995. this.loading = false;
  1996. }
  1997. })
  1998. .catch(() => {
  1999. this.loading = false;
  2000. });
  2001. },
  2002. // 跳转到教材语料库
  2003. jumpSeekPage() {
  2004. if (!this.searchVal.trim()) {
  2005. return;
  2006. }
  2007. this.$router.push({
  2008. path: '/corpus/seekPage',
  2009. query: {
  2010. keyword: this.searchVal.trim(),
  2011. },
  2012. });
  2013. },
  2014. // 校对
  2015. checkArticle() {
  2016. this.$router.push({
  2017. path: '/textanalysis/checkArticle',
  2018. query: {
  2019. id: this.id,
  2020. userID: this.userID,
  2021. },
  2022. });
  2023. },
  2024. // 切换保存拼音位置
  2025. changePinyinPosition(value) {
  2026. publicMethods('/TeachingServer/TextAnalyser/SetPinyinMarkPosition', {
  2027. analyse_record_id: this.id,
  2028. pinyin_mark_position: value ? 1 : 0,
  2029. });
  2030. },
  2031. // 返回上一页
  2032. goBack() {
  2033. this.$router.push({
  2034. path: '/TextAnalysis',
  2035. });
  2036. },
  2037. // 修改文本
  2038. editArticle() {
  2039. this.editArticleFlag = true;
  2040. },
  2041. handleClose() {
  2042. this.editArticleFlag = false;
  2043. },
  2044. saveWord(analyse_record_id) {
  2045. this.loading = true;
  2046. publicMethods('/TeachingServer/TextAnalyser/Analyse', {
  2047. analyse_record_id: this.id,
  2048. text: this.noPosContent,
  2049. userID: this.userID,
  2050. })
  2051. .then((res) => {
  2052. if (res.status === 1) {
  2053. this.$message.success('修改成功');
  2054. this.editArticleFlag = false;
  2055. reparse({ analyse_record_id })
  2056. .then(({ record }) => {
  2057. this.getArticleData();
  2058. })
  2059. .finally(() => {
  2060. this.loading = false;
  2061. });
  2062. }
  2063. })
  2064. .catch(() => {
  2065. this.loading = false;
  2066. });
  2067. },
  2068. },
  2069. };
  2070. </script>
  2071. <style lang="scss" scoped>
  2072. .textanalysis_index {
  2073. min-height: 100%;
  2074. background: #f6f6f6;
  2075. .wheader {
  2076. background: #fff;
  2077. }
  2078. .main {
  2079. padding-top: 29px;
  2080. padding-bottom: 66px;
  2081. > div {
  2082. display: flex;
  2083. width: 1200px;
  2084. padding: 24px;
  2085. margin: 0 auto;
  2086. // height: 1187px;
  2087. background: #fff;
  2088. > .left {
  2089. width: 352px;
  2090. .go-back {
  2091. display: flex;
  2092. align-items: center;
  2093. width: 60px;
  2094. padding: 9px 8px;
  2095. margin-bottom: 16px;
  2096. font-size: 14px;
  2097. font-weight: 400;
  2098. line-height: 22px;
  2099. color: #333;
  2100. cursor: pointer;
  2101. background: #fff;
  2102. border: 1px solid #d9d9d9;
  2103. border-radius: 4px;
  2104. box-shadow: 0 2px 0 0 rgba(0, 0, 0, 2%);
  2105. .el-icon-arrow-left {
  2106. margin-right: 8px;
  2107. font-size: 16px;
  2108. }
  2109. }
  2110. .top_nav {
  2111. display: flex;
  2112. align-items: center;
  2113. justify-content: center;
  2114. width: 352px;
  2115. height: 32px;
  2116. margin-top: 16px;
  2117. background: #eee;
  2118. border-radius: 4px;
  2119. > div {
  2120. width: 116px;
  2121. height: 28px;
  2122. font-size: 12px;
  2123. font-weight: 500;
  2124. line-height: 28px;
  2125. color: #888;
  2126. text-align: center;
  2127. cursor: pointer;
  2128. border-radius: 2px;
  2129. }
  2130. .sele {
  2131. color: #000;
  2132. background: #fff;
  2133. box-shadow: 0 2px 2px rgba(0, 0, 0, 8%);
  2134. }
  2135. }
  2136. .search {
  2137. position: relative;
  2138. box-sizing: border-box;
  2139. display: flex;
  2140. align-items: center;
  2141. justify-content: flex-start;
  2142. width: 100%;
  2143. height: 40px;
  2144. padding: 7px 0;
  2145. border: 1px solid #ddd;
  2146. .select-result {
  2147. display: flex;
  2148. align-items: center;
  2149. justify-content: flex-start;
  2150. height: 24px;
  2151. padding: 4px 11px;
  2152. cursor: pointer;
  2153. .selectBg {
  2154. width: 16px;
  2155. height: 16px;
  2156. background: #de4444;
  2157. border-radius: 2px;
  2158. }
  2159. .tri {
  2160. width: 10px;
  2161. height: 10px;
  2162. margin-left: 4px;
  2163. background: url('../../assets/teacherdev/down-icon.png') no-repeat left top;
  2164. background-size: 100% 100%;
  2165. }
  2166. }
  2167. .searchVal {
  2168. box-sizing: border-box;
  2169. flex: 1;
  2170. padding: 0 30px 0 12px;
  2171. font-weight: bold;
  2172. border: 0;
  2173. border-left: 1px solid #ddd;
  2174. outline: 0;
  2175. }
  2176. .search-icon {
  2177. position: absolute;
  2178. right: 12px;
  2179. display: block;
  2180. width: 14px;
  2181. height: 14px;
  2182. background: url('../../assets/teacherdev/search-icon.png') no-repeat left top;
  2183. background-size: 100% 100%;
  2184. }
  2185. .searchColorList {
  2186. position: absolute;
  2187. top: 38px;
  2188. left: 0;
  2189. width: 58px;
  2190. padding: 0;
  2191. margin: 0;
  2192. list-style: none;
  2193. background: #fff;
  2194. border: 1px #d9d9d9 solid;
  2195. > li {
  2196. display: flex;
  2197. align-items: center;
  2198. justify-content: center;
  2199. width: 100%;
  2200. padding: 8px 0;
  2201. cursor: pointer;
  2202. > span {
  2203. width: 14px;
  2204. height: 14px;
  2205. border-radius: 2px;
  2206. }
  2207. &.close {
  2208. font-size: 12px;
  2209. border-top: 1px #d9d9d9 solid;
  2210. }
  2211. }
  2212. }
  2213. }
  2214. .result-left-numberclose {
  2215. display: flex;
  2216. align-items: center;
  2217. justify-content: space-between;
  2218. padding-bottom: 16px;
  2219. margin-top: 16px;
  2220. font-size: 14px;
  2221. font-weight: 400;
  2222. color: #333;
  2223. border-bottom: 1px solid rgba(0, 0, 0, 8%);
  2224. .resule-right-btn {
  2225. display: inline-block;
  2226. height: 32px;
  2227. // width: 88px;
  2228. padding: 0 16px;
  2229. margin-left: 8px;
  2230. line-height: 32px;
  2231. text-align: center;
  2232. cursor: pointer;
  2233. background: #fff;
  2234. border: 1px solid #d9d9d9;
  2235. border-radius: 4px;
  2236. box-shadow: 0 2px 0 rgba(0, 0, 0, 2%);
  2237. }
  2238. }
  2239. .left_list {
  2240. margin-top: 16px;
  2241. .left_list_nav {
  2242. display: flex;
  2243. align-items: center;
  2244. justify-content: space-between;
  2245. height: 52px;
  2246. .left {
  2247. display: flex;
  2248. align-items: center;
  2249. justify-content: center;
  2250. width: 84px;
  2251. height: 28px;
  2252. background: #eee;
  2253. border-radius: 4px;
  2254. span {
  2255. display: inline-block;
  2256. width: 40px;
  2257. height: 24px;
  2258. font-size: 12px;
  2259. font-weight: 400;
  2260. line-height: 24px;
  2261. text-align: center;
  2262. cursor: pointer;
  2263. border-radius: 2px;
  2264. }
  2265. .sele {
  2266. color: #000;
  2267. background: #fff;
  2268. box-shadow: 0 2px 2px rgba(0, 0, 0, 8%);
  2269. }
  2270. }
  2271. .right {
  2272. display: flex;
  2273. > span {
  2274. display: flex;
  2275. align-items: center;
  2276. }
  2277. span {
  2278. font-size: 14px;
  2279. font-weight: 400;
  2280. line-height: 22px;
  2281. /* identical to box height, or 157% */
  2282. color: #000;
  2283. cursor: pointer;
  2284. }
  2285. img {
  2286. width: 24px;
  2287. height: 24px;
  2288. }
  2289. .el-switch.is-checked .el-switch__core::after {
  2290. left: 100%;
  2291. margin-left: -10px;
  2292. }
  2293. .el-switch__core {
  2294. height: 16px;
  2295. }
  2296. .el-switch__core::after {
  2297. top: 3px;
  2298. width: 8px;
  2299. height: 8px;
  2300. }
  2301. }
  2302. }
  2303. .left_list_main {
  2304. .heji {
  2305. font-size: 14px;
  2306. font-weight: 600;
  2307. line-height: 22px;
  2308. color: #333;
  2309. }
  2310. .sele {
  2311. background: #eaeaea;
  2312. }
  2313. > div {
  2314. display: flex;
  2315. align-items: center;
  2316. justify-content: space-between;
  2317. // width: 100%;
  2318. height: 48px;
  2319. padding: 0 12px;
  2320. font-size: 14px;
  2321. line-height: 22px;
  2322. color: #333;
  2323. cursor: pointer;
  2324. border-bottom: 1px solid #eee;
  2325. &.active {
  2326. background: #eee;
  2327. }
  2328. &.fontWeight {
  2329. font-weight: bold;
  2330. }
  2331. > .leftType {
  2332. > .color {
  2333. display: inline-block;
  2334. width: 9px;
  2335. height: 9px;
  2336. margin-right: 10px;
  2337. border-radius: 50%;
  2338. }
  2339. }
  2340. > .rightCount {
  2341. display: flex;
  2342. > span.count {
  2343. width: 70px;
  2344. font-size: 14px;
  2345. color: #333;
  2346. text-align: right;
  2347. }
  2348. > span.precent {
  2349. width: 88px;
  2350. font-size: 14px;
  2351. color: #333;
  2352. text-align: right;
  2353. }
  2354. }
  2355. }
  2356. }
  2357. }
  2358. .tubiao {
  2359. position: relative;
  2360. width: 352px;
  2361. height: 374px;
  2362. padding-top: 20px;
  2363. margin: 0 auto;
  2364. margin-top: 24px;
  2365. background: #f5f5f5;
  2366. border-radius: 4px;
  2367. .tubiao_top {
  2368. height: 22px;
  2369. margin-bottom: 24px;
  2370. font-size: 14px;
  2371. font-weight: 500;
  2372. color: #000;
  2373. text-align: center;
  2374. }
  2375. .main_echarts {
  2376. margin: 0 auto;
  2377. }
  2378. .cut_download {
  2379. position: absolute;
  2380. bottom: 24px;
  2381. left: 56px;
  2382. display: flex;
  2383. .sele {
  2384. background: rgba(0, 0, 0, 8%);
  2385. border-radius: 4px;
  2386. }
  2387. span {
  2388. display: flex;
  2389. align-items: center;
  2390. justify-content: center;
  2391. width: 32px;
  2392. height: 32px;
  2393. margin-right: 16px;
  2394. cursor: pointer;
  2395. }
  2396. .download {
  2397. width: 56px;
  2398. }
  2399. img {
  2400. width: 24px;
  2401. height: 24px;
  2402. }
  2403. }
  2404. }
  2405. }
  2406. > .right {
  2407. flex: 1;
  2408. margin-left: 24px;
  2409. .word_back {
  2410. display: flex;
  2411. align-items: center;
  2412. justify-content: space-between;
  2413. .word {
  2414. font-size: 14px;
  2415. font-weight: 400;
  2416. line-height: 22px;
  2417. color: #000;
  2418. .title {
  2419. font-weight: 500;
  2420. }
  2421. span {
  2422. margin-right: 16px;
  2423. }
  2424. }
  2425. .back {
  2426. width: 88px;
  2427. height: 32px;
  2428. font-size: 14px;
  2429. font-weight: 400;
  2430. line-height: 32px;
  2431. text-align: center;
  2432. cursor: pointer;
  2433. border: 1px solid #d9d9d9;
  2434. border-radius: 4px;
  2435. box-shadow: 0 2px 0 rgba(0, 0, 0, 2%);
  2436. }
  2437. }
  2438. .btn_set {
  2439. display: flex;
  2440. align-items: center;
  2441. justify-content: space-between;
  2442. margin-top: 21px;
  2443. .btn {
  2444. display: flex;
  2445. .btn_dv {
  2446. display: flex;
  2447. align-items: center;
  2448. justify-content: center;
  2449. width: 82px;
  2450. height: 30px;
  2451. font-size: 14px;
  2452. font-weight: 400;
  2453. color: rgba(0, 0, 0, 85%);
  2454. cursor: pointer;
  2455. border: 1px solid #d9d9d9;
  2456. border-radius: 4px;
  2457. box-shadow: 0 2px 0 rgba(0, 0, 0, 2%);
  2458. img {
  2459. width: 14px;
  2460. height: 14px;
  2461. margin-right: 8px;
  2462. }
  2463. }
  2464. }
  2465. .daxiao {
  2466. display: flex;
  2467. align-items: center;
  2468. span {
  2469. box-sizing: border-box;
  2470. display: flex;
  2471. align-items: center;
  2472. justify-content: center;
  2473. width: 24px;
  2474. height: 24px;
  2475. cursor: pointer;
  2476. border: 1px solid gainsboro;
  2477. border-radius: 4px;
  2478. img {
  2479. width: 22px;
  2480. height: 22px;
  2481. }
  2482. }
  2483. > img {
  2484. width: 24px;
  2485. height: 24px;
  2486. margin: 0 8px;
  2487. }
  2488. }
  2489. }
  2490. .right_main {
  2491. height: calc(100% - 137px);
  2492. padding: 12px 15px;
  2493. margin-top: 16px;
  2494. border: 1px solid rgba(0, 0, 0, 8%);
  2495. // background: #f9f9f9;
  2496. border-radius: 4px;
  2497. .right_main_top {
  2498. display: flex;
  2499. flex: 1;
  2500. align-items: center;
  2501. justify-content: center;
  2502. font-size: 14px;
  2503. font-weight: 600;
  2504. line-height: 22px;
  2505. color: #a5a5a5;
  2506. > div {
  2507. display: flex;
  2508. align-items: center;
  2509. }
  2510. .twoline {
  2511. margin: 0 20px;
  2512. span {
  2513. margin: 0 2px;
  2514. }
  2515. }
  2516. // > div {
  2517. // margin-left: 24px;
  2518. // }
  2519. .line {
  2520. flex-shrink: 0;
  2521. width: 1px;
  2522. margin: 0 12px;
  2523. font-size: 12px;
  2524. line-height: 1;
  2525. color: #525252;
  2526. }
  2527. }
  2528. .edit-btn {
  2529. font-size: 14px;
  2530. font-weight: 600;
  2531. line-height: 22px;
  2532. color: #000;
  2533. cursor: pointer;
  2534. .el-icon-edit {
  2535. margin-right: 8px;
  2536. }
  2537. }
  2538. .articel {
  2539. width: 640px;
  2540. margin: 0 auto;
  2541. margin-top: 40px;
  2542. font-weight: 500;
  2543. .paragraph {
  2544. display: flex;
  2545. flex-wrap: wrap;
  2546. margin-bottom: 22px;
  2547. // .sentence {
  2548. // display: flex;
  2549. // flex-wrap: wrap;
  2550. // margin-bottom: 8px;
  2551. .words {
  2552. display: flex;
  2553. .word {
  2554. display: flex;
  2555. text-align: center;
  2556. }
  2557. .pinyin {
  2558. min-height: 12px;
  2559. font-family: 'League';
  2560. line-height: 12px;
  2561. color: rgba(0, 0, 0, 50%);
  2562. text-align: center;
  2563. }
  2564. .hanzi {
  2565. line-height: 28px;
  2566. color: #000;
  2567. text-align: center;
  2568. }
  2569. .hanzi-fz {
  2570. font-family: 'FZJCGFKTK';
  2571. }
  2572. }
  2573. }
  2574. // }
  2575. }
  2576. }
  2577. }
  2578. }
  2579. }
  2580. }
  2581. </style>
  2582. <style lang="scss">
  2583. .textanalysis_index {
  2584. .el-switch {
  2585. .el-switch__label {
  2586. color: #888;
  2587. }
  2588. }
  2589. .el-switch__label.is-active {
  2590. color: #000;
  2591. }
  2592. .el-switch.is-checked .el-switch__core::after {
  2593. left: 100%;
  2594. margin-left: -10px;
  2595. }
  2596. .el-switch__core {
  2597. height: 16px;
  2598. }
  2599. .el-switch__core::after {
  2600. top: 3px;
  2601. width: 8px;
  2602. height: 8px;
  2603. }
  2604. }
  2605. .edit-dialog {
  2606. .el-dialog__header {
  2607. padding: 0;
  2608. }
  2609. .el-dialog__body {
  2610. padding: 16px;
  2611. }
  2612. .el-dialog__footer {
  2613. padding-top: 0;
  2614. }
  2615. .dialog-footer {
  2616. display: flex;
  2617. justify-content: space-between;
  2618. .el-button {
  2619. width: 124px;
  2620. padding: 8px;
  2621. color: #000;
  2622. background: #f8f8f8;
  2623. border: 1px solid rgba(0, 0, 0, 15%);
  2624. border-radius: 4px;
  2625. box-shadow: 0 2px 0 0 rgba(0, 0, 0, 4%);
  2626. &.el-button--primary {
  2627. background: #ffc600;
  2628. }
  2629. }
  2630. }
  2631. }
  2632. </style>