articleDetail.vue 62 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709
  1. <template>
  2. <div class="bookStore" :style="{background:bgColorList[activeIndex].contentBg}" v-if="articleInfo" :v-loading="loading">
  3. <Header :LoginNavIndex="LoginNavIndex"/>
  4. <div class="navBar" :class="['navBar-'+bgColorList[activeIndex].type]" :style="{background:bgColorList[activeIndex].navBg}">
  5. <div class="navBar-left">
  6. <a class="goback" @click="$router.go(-1)"><i class="el-icon-arrow-left"></i> 第 {{articleInfo.iss_no}} 期</a>
  7. <div class="border"></div>
  8. <p class="article-title">{{articleInfo.art_title}}</p>
  9. </div>
  10. <div class="navBar-right">
  11. <el-input-number class="article-fontsize" v-model="wordFontsize" :step="2" step-strictly :min="12" :max="24" :style="{borderColor:bgColorList[activeIndex].boxBorder}"></el-input-number>
  12. <ul class="article-color" :style="{borderColor:bgColorList[activeIndex].boxBorder}">
  13. <li :class="['color-item',activeIndex===indexC?'active':'']" v-for="(itemC,indexC) in bgColorList" :key="indexC" @click="handleChangeBgColor(indexC)" :style="{borderColor:activeIndex===indexC?itemC.border_active:''}">
  14. <a :style="{background:itemC.border,borderColor:activeIndex===indexC?itemC.borderColor:''}"></a>
  15. </li>
  16. </ul>
  17. </div>
  18. </div>
  19. <div class="article-box">
  20. <div class="artricle-inner" :style="{background:bgColorList[activeIndex].contentInnerBg}">
  21. <!-- 文章 -->
  22. <div class="atricle-data">
  23. <normal-model :titleFontsize="wordFontsize+30" :wordFontsize="wordFontsize" :colorObj="bgColorList[activeIndex]" :articleType="articleType" :style="{'padding':'0 40px'}" v-if="menuType==='original'" :articleInfo="articleInfo" :likeSentencelist="likeSentencelist" :likeWord="likeWordList"></normal-model>
  24. <phrase-model :titleFontsize="wordFontsize+30" :wordFontsize="wordFontsize" :colorObj="bgColorList[activeIndex]" :articleType="articleType" :style="{'padding':'0 40px'}" v-if="menuType==='newWord'" :articleInfo="articleInfo" :likePhraseList="likePhraseList" :likeWord="likeWordList" @changeLike="changeLike" :likeSentencelist="likeSentencelist"></phrase-model>
  25. <practice-model :titleFontsize="wordFontsize+30" :wordFontsize="wordFontsize" :colorObj="bgColorList[activeIndex]" :articleType="articleType" :style="{'padding':'0 40px'}" v-if="menuType==='practice'" :articleInfo="articleInfo" :likeSentencelist="likeSentencelist" :likeWord="likeWordList"></practice-model>
  26. <inner-text-search :titleFontsize="wordFontsize+30" :wordFontsize="wordFontsize" :colorObj="bgColorList[activeIndex]" :articleType="articleType" :style="{'padding':'0 40px'}" v-if="menuType==='search'" :articleInfo="articleInfo" ref="innerTextSearchs" :likeSentencelist="likeSentencelist" :likeWord="likeWordList"></inner-text-search>
  27. <lexical-type :titleFontsize="wordFontsize+30" :wordFontsize="wordFontsize" :colorObj="bgColorList[activeIndex]" :articleType="articleType" :style="{'padding':'0 40px'}" v-if="menuType==='filtrate'" :articleInfo="articleInfo" ref="lexicalType" :likeSentencelist="likeSentencelist" :likeWord="likeWordList"></lexical-type>
  28. <notes-model :titleFontsize="wordFontsize+30" :wordFontsize="wordFontsize" :colorObj="bgColorList[activeIndex]" :articleType="articleType" :style="{'padding':'0 40px'}" v-if="menuType==='notebook'" :articleInfo="articleInfo" :likeSentencelist="likeSentencelist" :likeWord="likeWordList"></notes-model>
  29. <div class="article-btn" v-if="this.$route.query.iss_id&&menuType!=='practice'">
  30. <div class="left">
  31. <span :class="['support colloct-article',!noRead?'active':'']" @click="changeStatus('noRead')"><svg-icon icon-class="like-line" :style="{marginRight:articleNumber?'8px':'0px'}"></svg-icon>{{articleNumber?articleNumber:''}}</span>
  32. <!-- <span :class="['oppose',oppose?'active':'']" @click="changeStatus('oppose')"><svg-icon icon-class="oppose"></svg-icon></span> -->
  33. </div>
  34. <div class="center">
  35. <el-button type="text" class="btn-left" :class="[activeArticleIndex===0?'not-allow':'']" @click="handlePage('-')"><svg-icon icon-class="arrow-left-line"></svg-icon>上一篇</el-button>
  36. <el-button type="text" class="btn-right" :class="[activeArticleIndex===issueChnTanList.length-1?'not-allow':'']" @click="handlePage('+')">下一篇<svg-icon icon-class="arrow-right-line"></svg-icon></el-button>
  37. </div>
  38. <div class="right">
  39. <template v-if="support">
  40. <span class="support" @click="handleReadArticle"><svg-icon icon-class="no-read"></svg-icon>标记为已读</span>
  41. </template>
  42. <template v-else>
  43. <span class="support readed"><svg-icon icon-class="readed"></svg-icon>已读</span>
  44. </template>
  45. </div>
  46. </div>
  47. </div>
  48. <!-- 词汇表 -->
  49. <div class="glossary-box" :style="{borderTopColor:bgColorList[activeIndex].contentBg}" v-if="menuType!=='practice'">
  50. <div class="title" :style="{color:bgColorList[activeIndex].glossaryTitle}">
  51. <h2>词汇表</h2>
  52. <a @click="showGlossary=!showGlossary">{{showGlossary?'收起':'展开'}}</a>
  53. </div>
  54. <el-collapse-transition >
  55. <div v-if="showGlossary">
  56. <template v-if="articleInfo.art_voc_data.length>0">
  57. <h4 :style="{color:bgColorList[activeIndex].glossarySubtitle}">生词</h4>
  58. <new-word-list class="newWord-list" :list="articleInfo.art_voc_data" :style="{background:bgColorList[activeIndex].glossaryBg}" :colorObj="bgColorList[activeIndex]" :likeWordList="likeWordList" @changeLike="changeLike" ref="newWordList"></new-word-list>
  59. </template>
  60. <template v-if="articleInfo.art_phrase_data.length>0">
  61. <h4 :style="{color:bgColorList[activeIndex].glossarySubtitle}">短语</h4>
  62. <phrase-list class="newWord-list" :list="articleInfo.art_phrase_data" :style="{background:bgColorList[activeIndex].glossaryBg}" :colorObj="bgColorList[activeIndex]" :likePhraseList="likePhraseList" @changeLike="changeLike" ref="phraseList"></phrase-list>
  63. </template>
  64. <template v-if="articleInfo.art_explain_data.length>0">
  65. <h4 :style="{color:bgColorList[activeIndex].glossarySubtitle}">注释</h4>
  66. <annotation-list class="newWord-list" :list="articleInfo.art_explain_data" :style="{background:bgColorList[activeIndex].glossaryBg}" :colorObj="bgColorList[activeIndex]"></annotation-list>
  67. </template>
  68. </div>
  69. </el-collapse-transition>
  70. <div class="title" :style="{color:bgColorList[activeIndex].glossaryTitle,marginTop:'40px'}">
  71. <h2>详细统计</h2>
  72. </div>
  73. <h4 :style="{color:bgColorList[activeIndex].glossarySubtitle}">词汇信息</h4>
  74. <div class="word-info" v-if="articleInfo.art_corpus_data&&articleInfo.art_corpus_data.artStatInfo">
  75. <div :style="{background:bgColorList[activeIndex].glossaryBg}">
  76. <label :style="{color:bgColorList[activeIndex].statisticTitle}">文章长度</label>
  77. <span :style="{color:bgColorList[activeIndex].statisticValue}">{{articleInfo.art_corpus_data.artStatInfo.wc}}</span>
  78. </div>
  79. <div :style="{background:bgColorList[activeIndex].glossaryBg}">
  80. <label :style="{color:bgColorList[activeIndex].statisticTitle}">词汇数量</label>
  81. <span :style="{color:bgColorList[activeIndex].statisticValue}">{{articleInfo.art_corpus_data.artStatInfo.wdc}}</span>
  82. </div>
  83. <div :style="{background:bgColorList[activeIndex].glossaryBg}">
  84. <label :style="{color:bgColorList[activeIndex].statisticTitle}">平均词长</label>
  85. <span :style="{color:bgColorList[activeIndex].statisticValue}">{{articleInfo.art_corpus_data.artStatInfo.avgWordLen}}</span>
  86. </div>
  87. <div :style="{background:bgColorList[activeIndex].glossaryBg}">
  88. <label :style="{color:bgColorList[activeIndex].statisticTitle}">词汇密度</label>
  89. <span :style="{color:bgColorList[activeIndex].statisticValue}">{{articleInfo.art_corpus_data.artStatInfo.vocabDensity}}</span>
  90. </div>
  91. <div :style="{background:bgColorList[activeIndex].glossaryBg}">
  92. <label :style="{color:bgColorList[activeIndex].statisticTitle}">词汇难度</label>
  93. <span :style="{color:bgColorList[activeIndex].statisticValue}">{{articleInfo.art_corpus_data.artStatInfo.vocabHardLevel}}</span>
  94. </div>
  95. </div>
  96. <h4 :style="{color:bgColorList[activeIndex].glossarySubtitle}">词汇分布</h4>
  97. <div class="echarts-box" v-if="articleInfo&&articleInfo.art_corpus_data&&articleInfo.art_corpus_data.artStatInfo&&articleInfo.art_corpus_data.artStatInfo.vocabVlLevelItems">
  98. <ul class="echarts-type">
  99. <li v-for="(itemE,indexE) in articleInfo.art_corpus_data.artStatInfo.vocabVlLevelItems" :key="indexE"
  100. @mouseover="gaolangbzt(indexE, 'shanxing_main')"
  101. @mouseout="closegaolangbzt(indexE, 'shanxing_main')"
  102. :style="{background:bgColorList[activeIndex].type==='white'?itemE.bg:bgColorList[activeIndex].type==='darkGreen'?itemE.darkGreenBg:itemE.darkBg,color:bgColorList[activeIndex].type==='white'?itemE.color:bgColorList[activeIndex].type==='darkGreen'?itemE.darkGreenColor:itemE.darkColor,borderColor:bgColorList[activeIndex].type==='white'?itemE.border:bgColorList[activeIndex].type==='darkGreen'?itemE.darkGreenBorder:itemE.darkBorder}">
  103. <span class="name">{{itemE.vlCnName}}</span>
  104. <span class="number">{{itemE.value}}</span>
  105. <span class="percent">{{itemE.vocabPercentStr}}</span>
  106. </li>
  107. </ul>
  108. <div id="shanxing_main" style="height: 360px"></div>
  109. </div>
  110. </div>
  111. <!-- 右侧菜单 -->
  112. <div class="mene-right" :style="{background:bgColorList[activeIndex].contentInnerBg,borderColor:bgColorList[activeIndex].glossaryBg}">
  113. <menu-right :colorObj="bgColorList[activeIndex]" @changeArticleType="changeArticleType"></menu-right>
  114. </div>
  115. </div>
  116. </div>
  117. <div class="share-box" v-if="menuFeature==='share'" v-loading="shareLoading">
  118. <div class="share-box-top">
  119. <h5>分享</h5>
  120. <i class="el-icon-close" @click="handleCloseShare"></i>
  121. </div>
  122. <template v-if="shareSrc">
  123. <img :src="shareSrc" />
  124. </template>
  125. <template v-else>
  126. <el-skeleton style="width: 240px" :loading="true" animated>
  127. <template slot="template">
  128. <el-skeleton-item
  129. variant="image"
  130. style="width: 380px; height: 532px;"
  131. />
  132. </template>
  133. </el-skeleton>
  134. </template>
  135. <div class="share-box-bottom">
  136. <el-button type="primary" @click="downLoadImg(shareSrc)" size="small">下载图片</el-button>
  137. <el-button @click="CopyToClipboard('copyDownUrl')" size="small" type="primary" plain>复制链接</el-button>
  138. <span id="copyDownUrl">{{share_url}}</span>
  139. </div>
  140. </div>
  141. <div class="catalog-box" v-if="menuFeature==='list'">
  142. <ul class="treeList">
  143. <li v-for="(item,index) in issueChnList" :key="index">
  144. <p class="parent-node"><span class="number">{{index+1}}</span><b class="title">{{item.chn_name}}</b></p>
  145. <ul v-if="item.arts&&item.arts.length>0">
  146. <li :class="[items.canRead?'children-buy':'children-no','children']" v-for="(items,indexs) in item.arts" :key="indexs" @click="handleLink(items,items.canRead,index)">
  147. <p class="children-node"><span class="number">{{indexs+1}}</span><b class="title">{{items.art_title}}</b></p>
  148. </li>
  149. </ul>
  150. </li>
  151. </ul>
  152. </div>
  153. <el-dialog
  154. :visible.sync="articleInfoFlag"
  155. :show-close="false"
  156. :close-on-click-modal="false"
  157. width="968px"
  158. class="articleDetail-dialog"
  159. v-if="articleInfoFlag">
  160. <article-info @closeArticleInfo="closeArticleInfo" :articleInfo="articleInfo" :colorObj="bgColorList[activeIndex]"></article-info>
  161. </el-dialog>
  162. <el-dialog
  163. :visible.sync="ciyunShow"
  164. :show-close="true"
  165. :title="articleInfo.art_corpus_data.artTitle"
  166. :close-on-click-modal="false"
  167. width="1182px"
  168. class="ciyun-dialog"
  169. v-if="ciyunShow">
  170. <iframe width="100%" height="834px" border="none" :src="'./ciyun/ciyunindex.html?partitionKey=1&searchType=2&articleId='+articleId"></iframe>
  171. </el-dialog>
  172. <el-dialog
  173. :visible.sync="printFlag"
  174. :show-close="false"
  175. :close-on-click-modal="false"
  176. width="100%"
  177. top="0"
  178. class="articleDetail-dialog"
  179. v-if="printFlag"
  180. >
  181. <print-model :titleFontsize="wordFontsize+30" :wordFontsize="wordFontsize" :colorObj="bgColorList[activeIndex]" :articleType="articleType" :articleInfo="articleInfo" @closePrint="closePrint"></print-model>
  182. </el-dialog>
  183. </div>
  184. </template>
  185. <script>
  186. import Header from "../../components/Header.vue";
  187. import NavBar from "../../components/common/NavBar.vue"
  188. import NewWordList from './components/NewWordList.vue';
  189. import PhraseList from './components/PhraseList.vue';
  190. import AnnotationList from './components/AnnotationList.vue'
  191. import NormalModel from "./components/NormalModel.vue"
  192. import PhraseModel from "./components/PhraseModel.vue"
  193. import MenuRight from "./components/MenuRight.vue"
  194. import ArticleInfo from "./components/ArticleInfo.vue"
  195. import InnerTextSearch from "./components/InnerTextSearch.vue"
  196. import LexicalType from "./components/LexicalType.vue"
  197. import PracticeModel from "./components/PracticeModel.vue"
  198. import NotesModel from "./components/NotesModel.vue"
  199. import printModel from "./components/PrintModel.vue"
  200. import * as echarts from "echarts";
  201. import { getLogin } from "@/api/ajax";
  202. import { getToken } from '@/utils/auth'
  203. export default {
  204. name: 'articleDetail',
  205. computed: {
  206. },
  207. components: {
  208. Header,
  209. NavBar,
  210. NewWordList,
  211. PhraseList,
  212. AnnotationList,
  213. NormalModel,
  214. MenuRight,
  215. PhraseModel,
  216. ArticleInfo,
  217. InnerTextSearch,
  218. LexicalType,
  219. PracticeModel,
  220. NotesModel,
  221. printModel
  222. },
  223. data(){
  224. return{
  225. config: this.$route.query.headerConfig?decodeURIComponent(this.$route.query.headerConfig):'',
  226. LoginNavIndex: 0,
  227. wordFontsize: 18, // 文章文字大小
  228. bgColorList:[
  229. {
  230. type:'white',
  231. contentBg:'#F2F3F5',
  232. contentInnerBg:'#FFFFFF',
  233. navBg:'#FFFFFF',
  234. border:'#E5E6EB',
  235. bg:'#FFFFFF',
  236. border_active:'#3459D2',
  237. boxBorder:'#E5E6EB',
  238. titleColor:'#1F2C5C',
  239. sourceColor:'#929CA8',
  240. contentColor:'#2F3742',
  241. btnColor:'#3459D2',
  242. glossaryTitle:'#2F3742',
  243. glossarySubtitle:'#4E5969',
  244. glossaryBg:'#F7F8FA',
  245. newWordColor:'#175DFF',
  246. newWordOtherColor:'#667180',
  247. newWordStar:'#FFB224',
  248. newWordType:{
  249. 'L0':{
  250. color:'#5B7217',
  251. bg:'#F1FCE3'
  252. },
  253. 'L1':{
  254. color:'#3D9A50',
  255. bg:'#EFFCEF'
  256. },
  257. 'L2':{
  258. color:'#0081F1',
  259. bg:'#E7F3FF'
  260. },
  261. 'L3':{
  262. color:'#3459D2',
  263. bg:'#EEF3FF'
  264. },
  265. 'LA':{
  266. color:'#E03177',
  267. bg:'#FFECF5'
  268. },
  269. 'LB':{
  270. color:'#CD2B31',
  271. bg:'#FFE8E8'
  272. },
  273. 'LC':{
  274. color:'#99A29E',
  275. bg:'#DFE4E2'
  276. },
  277. 'LD':{
  278. color:'#504F57',
  279. bg:'#C1C5CD'
  280. }
  281. },
  282. phraseColor:'#ED5F00',
  283. phraseOhterColor:'#2F3742',
  284. annotationTitle:'#4E5969',
  285. annotationOhter:'#667180',
  286. statisticTitle:'#2F3742',
  287. statisticValue:'#3459D2',
  288. menuBg:'#EEF3FF',
  289. audiobg:'#FFFFFF',
  290. audioBorder:'#EBEBEB'
  291. },
  292. {
  293. type:'darkGreen',
  294. contentBg:'#C2C9C6',
  295. contentInnerBg:'#DFE4E2',
  296. navBg:'#236E55',
  297. border:'#5BB99A',
  298. bg:'#FFFFFF',
  299. border_active:'#FFFFFF',
  300. boxBorder:'#1B5441',
  301. titleColor:'#1F2C5C',
  302. sourceColor:'#929CA8',
  303. contentColor:'#2F3742',
  304. btnColor:'#3459D2',
  305. glossaryTitle:'#393F3C',
  306. glossarySubtitle:'#66736D',
  307. glossaryBg:'#D7DCDA',
  308. newWordColor:'#175DFF',
  309. newWordOtherColor:'#667180',
  310. newWordStar:'#FFB224',
  311. newWordType:{
  312. 'L0':{
  313. color:'#5B7217',
  314. bg:'#F1FCE3'
  315. },
  316. 'L1':{
  317. color:'#3D9A50',
  318. bg:'#EFFCEF'
  319. },
  320. 'L2':{
  321. color:'#0081F1',
  322. bg:'#E7F3FF'
  323. },
  324. 'L3':{
  325. color:'#3459D2',
  326. bg:'#EEF3FF'
  327. },
  328. 'LA':{
  329. color:'#E03177',
  330. bg:'#FFECF5'
  331. },
  332. 'LB':{
  333. color:'#CD2B31',
  334. bg:'#FFE8E8'
  335. },
  336. 'LC':{
  337. color:'#99A29E',
  338. bg:'#DFE4E2'
  339. },
  340. 'LD':{
  341. color:'#504F57',
  342. bg:'#C1C5CD'
  343. }
  344. },
  345. phraseColor:'#ED5F00',
  346. phraseOhterColor:'#2F3742',
  347. statisticTitle:'#393F3C',
  348. statisticValue:'#299772',
  349. menuBg:'#E9F7F2',
  350. audiobg:'#ECEFED',
  351. audioBorder:'#DFE4E2'
  352. },
  353. {
  354. type:'darkBlue',
  355. contentBg:'#1C2129',
  356. contentInnerBg:'#2F3742',
  357. navBg:'#2F3742',
  358. border:'#1F2C5C',
  359. bg:'#1F2C5C',
  360. border_active:'#FFFFFF',
  361. boxBorder:'#1C2129',
  362. titleColor:'#5373E7',
  363. sourceColor:'#929CA8',
  364. contentColor:'#C1C5CD',
  365. btnColor:'#5373E7',
  366. glossaryTitle:'#929CA8',
  367. glossarySubtitle:'#929CA8',
  368. glossaryBg:'#3E4855',
  369. newWordColor:'#8DA4EF',
  370. newWordOtherColor:'#929CA8',
  371. newWordStar:'#816C00',
  372. newWordType:{
  373. 'L0':{
  374. color:'rgba(255, 255, 255, 0.64)',
  375. bg:'#5B7217'
  376. },
  377. 'L1':{
  378. color:'rgba(255, 255, 255, 0.64)',
  379. bg:'#2F6E3B'
  380. },
  381. 'L2':{
  382. color:'rgba(255, 255, 255, 0.64)',
  383. bg:'#006793'
  384. },
  385. 'L3':{
  386. color:'rgba(255, 255, 255, 0.64)',
  387. bg:'#AE1955'
  388. },
  389. 'LA':{
  390. color:'rgba(255, 255, 255, 0.64)',
  391. bg:'#AE1955'
  392. },
  393. 'LB':{
  394. color:'rgba(255, 255, 255, 0.64)',
  395. bg:'#8F2025'
  396. },
  397. 'LC':{
  398. color:'rgba(255, 255, 255, 0.64)',
  399. bg:'#4A524E'
  400. },
  401. 'LD':{
  402. color:'rgba(255, 255, 255, 0.64)',
  403. bg:'#2F3742'
  404. }
  405. },
  406. phraseColor:'#ED5F00',
  407. phraseOhterColor:'#929CA8',
  408. statisticTitle:'#D0D3D9',
  409. statisticValue:'#5373E7',
  410. menuBg:'#EEF3FF',
  411. audiobg:'#3E4855',
  412. audioBorder:'#2F3742'
  413. },
  414. {
  415. type:'armyGreen',
  416. contentBg:'#2A2F2C',
  417. contentInnerBg:'#393F3C',
  418. navBg:'#393F3C',
  419. border:'#13392E',
  420. bg:'#13392E',
  421. border_active:'#FFFFFF',
  422. boxBorder:'#2A2F2C',
  423. titleColor:'#30A47D',
  424. sourceColor:'#99A29E',
  425. contentColor:'#C1C5CD',
  426. btnColor:'#30A47D',
  427. glossaryTitle:'#99A29E',
  428. glossarySubtitle:'#99A29E',
  429. glossaryBg:'#4A524E',
  430. newWordColor:'#8DA4EF',
  431. newWordOtherColor:'#99A29E',
  432. newWordStar:'#816C00',
  433. newWordType:{
  434. 'L0':{
  435. color:'rgba(255, 255, 255, 0.64)',
  436. bg:'#5B7217'
  437. },
  438. 'L1':{
  439. color:'rgba(255, 255, 255, 0.64)',
  440. bg:'#2F6E3B'
  441. },
  442. 'L2':{
  443. color:'rgba(255, 255, 255, 0.64)',
  444. bg:'#006793'
  445. },
  446. 'L3':{
  447. color:'rgba(255, 255, 255, 0.64)',
  448. bg:'#AE1955'
  449. },
  450. 'LA':{
  451. color:'rgba(255, 255, 255, 0.64)',
  452. bg:'#AE1955'
  453. },
  454. 'LB':{
  455. color:'rgba(255, 255, 255, 0.64)',
  456. bg:'#8F2025'
  457. },
  458. 'LC':{
  459. color:'rgba(255, 255, 255, 0.64)',
  460. bg:'#4A524E'
  461. },
  462. 'LD':{
  463. color:'rgba(255, 255, 255, 0.64)',
  464. bg:'#2F3742'
  465. }
  466. },
  467. phraseColor:'#ED5F00',
  468. phraseOhterColor:'#99A29E',
  469. statisticTitle:'#D0D3D9',
  470. statisticValue:'#30A47D',
  471. menuBg:'#EEF3FF',
  472. audiobg:'#4A524E',
  473. audioBorder:'#393F3C'
  474. }
  475. ],
  476. activeIndex:0, // 选择主题色的索引
  477. showGlossary: true, // 是否展开词汇表
  478. wordList:[
  479. {
  480. src: '.',
  481. word:'cremation',
  482. symbol:'/krəˈmeɪʃn/',
  483. paraList:[
  484. {
  485. cixing:'n.',
  486. shiyi:'火葬;火化'
  487. }
  488. ],
  489. type:'daochu',
  490. rate:3
  491. },
  492. {
  493. src: '.',
  494. word:'thrive',
  495. symbol:'/θraɪv/',
  496. paraList:[
  497. {
  498. cixing:'v.',
  499. shiyi:'茁壮成长,兴旺,繁荣;(尤指在别人觉得困难的时候)以……为乐,可以出色应对'
  500. }
  501. ],
  502. type:'xuanbi',
  503. rate:4
  504. },
  505. {
  506. src: '.',
  507. word:'diversify',
  508. symbol:'/daɪˈvɜːsɪfaɪ/',
  509. paraList:[
  510. {
  511. cixing:'v.',
  512. shiyi:'(使)多样化,(使)不同;扩大经营范围,增加……的品种;(投资)多元化;'
  513. },
  514. {
  515. cixing:'n.',
  516. shiyi:"兽医;<美,非正式>老兵;兽医诊所(vet's)"
  517. }
  518. ],
  519. type:'daochu',
  520. rate:2
  521. },
  522. ],
  523. phraseList:[
  524. {
  525. word:'send off',
  526. paraList:[
  527. '送行'
  528. ]
  529. },
  530. {
  531. word:'more than',
  532. paraList:[
  533. '多于'
  534. ]
  535. },
  536. {
  537. word:'according to',
  538. paraList:[
  539. '根据'
  540. ]
  541. },
  542. {
  543. word:'In addition to',
  544. paraList:[
  545. '除了……之外'
  546. ]
  547. },
  548. ],
  549. annotationList:[
  550. {
  551. prefix:'visiting team',
  552. para:'时区。全球划分为24个时区。相邻两个时区的时问相差1小时。出国旅行的人,必须随时调整自己的手表,才能和当地时间相一致。凡向西走,每过一个时区,就要把表拨慢1小时;凡向东走,每过一个时区,就要把表拨快1小时。'
  553. },
  554. {
  555. prefix:'jet–lagged',
  556. para:'有时差反应的,有时差感的。人体症状多表现为疲劳、方向感减弱和失眠、往往会影响人们最初几天的活动。'
  557. }
  558. ],
  559. vocabularyType:{
  560. L0:{
  561. bg:'#F2FCE3',
  562. color:'#5B7217',
  563. darkBg:'#5B7217',
  564. border:'#F2FCE3',
  565. darkColor:'rgba(255, 255, 255, 0.64)',
  566. darkBorder:'rgba(255, 255, 255, 0.08)',
  567. darkGreenBg:'#F2FCE3',
  568. darkGreenColor:'#5B7217',
  569. darkGreenBorder:'#F2FCE3'
  570. },
  571. L1:{
  572. bg:'#EFFCEF',
  573. color:'#3D9A50',
  574. darkBg:'#2F6E3B',
  575. darkColor:'rgba(255, 255, 255, 0.64)',
  576. darkBorder:'rgba(255, 255, 255, 0.08)',
  577. darkGreenBg:'#EFFCEF',
  578. darkGreenColor:'#3D9A50',
  579. darkGreenBorder:'#EFFCEF'
  580. },
  581. L2:{
  582. bg:'#E7EEFF',
  583. color:'#175DFF',
  584. darkBg:'#006793',
  585. darkColor:'rgba(255, 255, 255, 0.64)',
  586. darkBorder:'rgba(255, 255, 255, 0.08)',
  587. darkGreenBg:'#E7F3FF',
  588. darkGreenColor:'#0081F1',
  589. darkGreenBorder:'#E7F3FF'
  590. },
  591. L3:{
  592. bg:'#EEF3FF',
  593. color:'#3459D2',
  594. darkBg:'#2C49AA',
  595. darkColor:'rgba(255, 255, 255, 0.64)',
  596. darkBorder:'rgba(255, 255, 255, 0.08)',
  597. darkGreenBg:'#EEF3FF',
  598. darkGreenColor:'#3459D2',
  599. darkGreenBorder:'#EEF3FF'
  600. },
  601. LA:{
  602. bg:'#FFECF5',
  603. color:'#E03177',
  604. darkBg:'#AE1955',
  605. darkColor:'rgba(255, 255, 255, 0.64)',
  606. darkBorder:'rgba(255, 255, 255, 0.08)',
  607. darkGreenBg:'#FFECF5',
  608. darkGreenColor:'#E03177',
  609. darkGreenBorder:'#FFECF5'
  610. },
  611. LB:{
  612. bg:'#FFE8E8',
  613. color:'#CD2B31',
  614. darkBg:'#8F2025',
  615. darkColor:'rgba(255, 255, 255, 0.64)',
  616. darkBorder:'rgba(255, 255, 255, 0.08)',
  617. darkGreenBg:'#FFE8E8',
  618. darkGreenColor:'#CD2B31',
  619. darkGreenBorder:'#FFE8E8'
  620. },
  621. LC:{
  622. bg:'#DFE4E2',
  623. color:'#99A29E',
  624. border:'rgba(0, 0, 0, 0.08)',
  625. darkBg:'#4A524E',
  626. darkColor:'rgba(255, 255, 255, 0.64)',
  627. darkBorder:'rgba(255, 255, 255, 0.08)',
  628. darkGreenBg:'#DFE4E2',
  629. darkGreenColor:'#4A524E',
  630. darkGreenBorder:'rgba(0, 0, 0, 0.08)'
  631. },
  632. LD:{
  633. bg:'#C1C5CD',
  634. color:'#504F57',
  635. darkBg:'#2F3742',
  636. darkColor:'rgba(255, 255, 255, 0.64)',
  637. darkBorder:'rgba(255, 255, 255, 0.08)',
  638. darkGreenBg:'#C1C5CD',
  639. darkGreenColor:'#504F57',
  640. darkGreenBorder:'#C1C5CD'
  641. }
  642. },
  643. articleType:this.$route.query.type?this.$route.query.type*1:1,
  644. articleId:this.$route.query.id?this.$route.query.id:'',
  645. noRead: true, // 未读
  646. support: false, // 点赞
  647. oppose: false, // 不支持
  648. timer: null,
  649. readLength: 0,
  650. articleInfo: null,
  651. loading: false,
  652. menuType: 'original',
  653. menuFeature: '', // 功能
  654. shareSrc: '', // 分享图片
  655. share_url: '', // 分享链接
  656. shareLoading: false,
  657. likeWordList: [], // 收藏短语list
  658. likePhraseList: [],
  659. likeSentencelist: [],
  660. issueChnList:[], // 报刊文章目录
  661. issueChnTanList: [], //文章摊平
  662. userMessage: getToken()?JSON.parse(getToken()):null,
  663. activeArticleIndex: 0,
  664. articleNumber: 0,
  665. articleInfoFlag: false, // 显示文章信息
  666. ciyunShow: false, // 显示词云
  667. printFlag: false, // 打印
  668. }
  669. },
  670. watch: {
  671. },
  672. methods: {
  673. inityuan() {
  674. if(this.articleInfo&&this.articleInfo.art_corpus_data&&this.articleInfo.art_corpus_data.artStatInfo&&this.articleInfo.art_corpus_data.artStatInfo.vocabVlLevelItems){
  675. var chartDom = document.getElementById("shanxing_main");
  676. var myChart = echarts.init(chartDom);
  677. var option;
  678. let newdata = JSON.parse(JSON.stringify(this.articleInfo.art_corpus_data.artStatInfo.vocabVlLevelItems));
  679. newdata.forEach((item) => {
  680. let percent = item.vocabPercent / 100;
  681. if (percent % 1 == 0) {
  682. item.name = item.vlCnName + " " + percent + "%";
  683. } else {
  684. item.name = item.vlCnName + " " + percent.toFixed(2) + "%";
  685. }
  686. });
  687. option = {
  688. color:this.bgColorList[this.activeIndex].type==='white'?this.articleInfo.vl_id==='VL26'?['#90C62F','#55B467','#F04F88','#F2555A','#D7DCDA','#99A29E']:['#90C62F','#55B467','#5FD4F4','#5373E7','#F04F88','#F2555A','#D7DCDA','#99A29E']:this.bgColorList[this.activeIndex].type==='darkGreen'?this.articleInfo.vl_id==='VL26'?['#90C62F','#55B467','#5FD4F4','#5373E7','#F04F88','#F2555A','#D7DCDA','#99A29E']:['#90C62F','#55B467','#F04F88','#F2555A','#D7DCDA','#99A29E']:this.articleInfo.vl_id==='VL26'?['#5B7217','#2F6E3B','#006793','#2C49AA','#AE1955','#F2555A','#4A524E','#2F3742']:['#5B7217','#2F6E3B','#AE1955','#F2555A','#4A524E','#2F3742'],
  689. series: [
  690. {
  691. name: "Access From",
  692. type: "pie",
  693. radius: ["50%", "90%"],
  694. data: newdata,
  695. itemStyle: {
  696. borderColor: "rgba(255, 255, 255, 0.24)",
  697. borderWidth: 1,
  698. },
  699. top: 50,
  700. emphasis: {
  701. itemStyle: {
  702. shadowBlur: 10,
  703. shadowOffsetX: 0,
  704. shadowColor: "rgba(0, 0, 0, 0.5)",
  705. },
  706. },
  707. },
  708. ],
  709. xAxis: {
  710. show: false, //不显示坐标轴线、坐标轴刻度线和坐标轴上的文字
  711. axisTick: {
  712. show: false, //不显示坐标轴刻度线
  713. },
  714. axisLine: {
  715. show: false, //不显示坐标轴线
  716. },
  717. axisLabel: {
  718. show: false, //不显示坐标轴上的文字
  719. },
  720. },
  721. };
  722. option && myChart.setOption(option);
  723. }
  724. },
  725. // 鼠标进入
  726. gaolangbzt(index, id) {
  727. var compareChart = echarts.getInstanceByDom(document.getElementById(id));
  728. compareChart.dispatchAction({
  729. type: "highlight",
  730. seriesIndex: 0,
  731. dataIndex: index,
  732. });
  733. },
  734. // 鼠标移出
  735. closegaolangbzt(index, id) {
  736. var compareChart = echarts.getInstanceByDom(document.getElementById(id));
  737. compareChart.dispatchAction({
  738. type: "downplay",
  739. seriesIndex: 0,
  740. dataIndex: index,
  741. });
  742. },
  743. // 切换主题颜色
  744. handleChangeBgColor(index){
  745. this.activeIndex = index
  746. this.inityuan()
  747. },
  748. async handlePage(type){
  749. if(type==='-'){
  750. if(this.activeArticleIndex!==0){
  751. if(!this.issueChnTanList[this.activeArticleIndex-1].canRead){
  752. this.$message.error('您没有阅读其他文章的相关权益')
  753. return
  754. }
  755. this.activeArticleIndex --
  756. let MethodName = "/PaperServer/Client/Issue/SaveLastReadArtInIss";
  757. let data = {
  758. iss_id: this.$route.query.iss_id,
  759. art_id: this.issueChnTanList[this.activeArticleIndex].id
  760. }
  761. await getLogin(MethodName, data)
  762. .then((res) => {
  763. })
  764. this.$router.replace({
  765. path: "/articleDetail",
  766. query: {
  767. headerConfig: this.$route.query.headerConfig?this.$route.query.headerConfig:'',
  768. id: this.issueChnTanList[this.activeArticleIndex].id,
  769. iss_id: this.$route.query.iss_id
  770. },
  771. })
  772. }else{
  773. return
  774. }
  775. }else{
  776. if(this.activeArticleIndex!==this.issueChnTanList.length-1){
  777. if(!this.issueChnTanList[this.activeArticleIndex+1].canRead){
  778. this.$message.error('您没有阅读其他文章的相关权益')
  779. return
  780. }
  781. this.activeArticleIndex ++
  782. let MethodName = "/PaperServer/Client/Issue/SaveLastReadArtInIss";
  783. let data = {
  784. iss_id: this.$route.query.iss_id,
  785. art_id: this.issueChnTanList[this.activeArticleIndex].id
  786. }
  787. await getLogin(MethodName, data)
  788. .then((res) => {
  789. })
  790. this.$router.replace({
  791. path: "/articleDetail",
  792. query: {
  793. headerConfig: this.$route.query.headerConfig?this.$route.query.headerConfig:'',
  794. id: this.issueChnTanList[this.activeArticleIndex].id,
  795. iss_id: this.$route.query.iss_id
  796. },
  797. })
  798. }else{
  799. return
  800. }
  801. }
  802. location.reload()
  803. },
  804. // 跳转
  805. async handleLink(item,flag){
  806. if(!flag){
  807. return
  808. }
  809. let MethodName = "/PaperServer/Client/Issue/SaveLastReadArtInIss";
  810. let data = {
  811. iss_id: this.$route.query.iss_id,
  812. art_id: item.id
  813. }
  814. await getLogin(MethodName, data)
  815. .then((res) => {
  816. })
  817. this.$router.replace({
  818. path: "/articleDetail",
  819. query: {
  820. headerConfig: this.$route.query.headerConfig?this.$route.query.headerConfig:'',
  821. id: item.id,
  822. iss_id: this.$route.query.iss_id
  823. },
  824. })
  825. location.reload()
  826. },
  827. getArticleDetail(){
  828. this.loading = true
  829. let this_ = this;
  830. let MethodName = "/PaperServer/Client/Article/GetArticleDetail";
  831. let data = {
  832. id: this.articleId,
  833. }
  834. getLogin(MethodName, data)
  835. .then((res) => {
  836. this.loading = false
  837. if(res.status===1){
  838. this.articleInfo = res.data
  839. if(this.articleInfo&&this.articleInfo.art_corpus_data&&this.articleInfo.art_corpus_data.artStatInfo&&this.articleInfo.art_corpus_data.artStatInfo.vocabVlLevelItems){
  840. this.articleInfo.art_corpus_data.artStatInfo.vocabVlLevelItems.forEach(item=>{
  841. item.value = item.vocabCount
  842. item = Object.assign(item, this.vocabularyType[item.vlId])
  843. })
  844. this.articleInfo.art_voc_data.forEach(item=>{
  845. item.collect = false
  846. })
  847. }
  848. setTimeout(() => {
  849. this_.inityuan()
  850. }, 100);
  851. }
  852. })
  853. .catch(() => {
  854. this.loading = false
  855. });
  856. getLogin('/ShopServer/Client/CollectManager/GetMyCollectIntegrateInfo_Article', {
  857. article_id: this.articleId,
  858. })
  859. .then((res) => {
  860. if(res.status===1){
  861. this.noRead = res.is_collect_article === 'false'
  862. this.articleNumber = res.collect_person_count
  863. this.likeWordList = []
  864. res.word_list.forEach(item=>{
  865. this.likeWordList.push(item.word)
  866. })
  867. this.likePhraseList = []
  868. res.phrase_list.forEach(item=>{
  869. this.likePhraseList.push(item.phrase)
  870. })
  871. this.likeSentencelist = []
  872. res.sentence_list.forEach(item=>{
  873. this.likeSentencelist.push(item.sentence_id)
  874. })
  875. }
  876. })
  877. .catch(() => {
  878. this.loading = false
  879. });
  880. getLogin('/ShopServer/Client/ReadingRecordManager/GetReadingStatus_Article', {
  881. goods_type: 21,
  882. article_id: this.articleId
  883. })
  884. .then((res) => {
  885. if(res.status===1){
  886. this.support = res.reading_info.is_reading === 'false'
  887. if(!this.support){
  888. clearInterval(this_.timer);
  889. this_.timer = null;
  890. }
  891. }
  892. })
  893. .catch(() => {
  894. this.loading = false
  895. });
  896. },
  897. handleReadArticle(){
  898. let this_ = this;
  899. clearInterval(this_.timer);
  900. this_.timer = null;
  901. let MethodName = "/ShopServer/Client/ReadingRecordManager/AddReadingRecord_Article";
  902. let data = {
  903. goods_type: 21,
  904. article_id: this.articleId,
  905. duration: this.readLength
  906. }
  907. getLogin(MethodName, data)
  908. .then((res) => {
  909. if(res.status===1){
  910. this.support = false
  911. }
  912. })
  913. .catch(() => {
  914. });
  915. },
  916. changeStatus(flag){
  917. if(this[flag]){
  918. let MethodName = "/ShopServer/Client/CollectManager/AddCollect_Article";
  919. let data = {
  920. article_id: this.articleId
  921. }
  922. getLogin(MethodName, data)
  923. .then((res) => {
  924. if(res.status===1){
  925. this[flag] = !this[flag]
  926. this.articleNumber++
  927. this.$message({
  928. message: "收藏成功",
  929. type: "success",
  930. });
  931. }
  932. })
  933. .catch(() => {
  934. });
  935. // let datas = {
  936. // sentence_id: this.articleInfo.art_sound_srt_data?this.articleInfo.art_sound_srt_data.sents[1].id:this.articleInfo.art_corpus_data.sentList[1].id,
  937. // audio_file_id: this.articleInfo.art_sound_srt_data?this.articleInfo.art_sound_srt_data.mp3:'',
  938. // audio_begin_time: this.articleInfo.art_sound_srt_data?this.articleInfo.art_sound_srt_data.sents[1].s:null,
  939. // audio_end_time: this.articleInfo.art_sound_srt_data?this.articleInfo.art_sound_srt_data.sents[1].e:null
  940. // }
  941. // getLogin('/ShopServer/Client/CollectManager/AddCollect_Sentence', datas)
  942. // .then((res) => {
  943. // if(res.status===1){
  944. // }
  945. // })
  946. // .catch(() => {
  947. // });
  948. }else{
  949. let MethodName = "/ShopServer/Client/CollectManager/CancelCollect_Article"
  950. getLogin(MethodName, {
  951. article_id: this.articleId
  952. })
  953. .then((res) => {
  954. if(res.status===1){
  955. this[flag] = !this[flag]
  956. this.articleNumber--
  957. this.$message({
  958. message: "取消收藏",
  959. type: "success",
  960. });
  961. }
  962. })
  963. .catch(() => {
  964. this.loading = false
  965. });
  966. }
  967. },
  968. changeArticleType(type,e){
  969. if(type==='print'||type==='share'||type==='list'||type==='cloud'||type==='chart'){
  970. if(type==='share'||type==='cloud'||type==='print'){
  971. if(this.userMessage){
  972. if(type==='cloud'){
  973. this.ciyunEvent()
  974. }else if(type==='print'){
  975. this.printFlag = true
  976. }else{
  977. this.handleCreateShare()
  978. }
  979. this.menuFeature = type
  980. }else{
  981. this.$message.error('请先登录')
  982. }
  983. }else{
  984. if(type==='chart'){
  985. this.articleInfoFlag = true
  986. }else{
  987. this.articleInfoFlag = false
  988. }
  989. this.menuFeature = type
  990. }
  991. }else{
  992. this.menuType = type
  993. if(type==='search'){
  994. setTimeout(() => {
  995. this.$refs.innerTextSearchs.changeShow()
  996. }, 100);
  997. }else if(type==='filtrate'){
  998. setTimeout(() => {
  999. this.$refs.lexicalType.changeShow()
  1000. }, 100);
  1001. }
  1002. this.menuFeature = ''
  1003. }
  1004. },
  1005. ciyunEvent() {
  1006. // let MethodName = "/PaperServer/Client/Article/CalcArtWordCloud";
  1007. // let data = {
  1008. // type: 0,
  1009. // id: this.articleId
  1010. // }
  1011. // getLogin(MethodName, data)
  1012. // .then((res) => {
  1013. this.ciyunShow = true
  1014. // window.localStorage.setItem('ciyunData', JSON.stringify(res.data))
  1015. // window.open(
  1016. // "./ciyun/ciyunindex.html?partitionKey=1&searchType=2&articleId=" +
  1017. // this.articleId,
  1018. // "_blank"
  1019. // );
  1020. // })
  1021. // .catch(() => {
  1022. // });
  1023. },
  1024. handleCloseShare(){
  1025. this.menuFeature = ''
  1026. },
  1027. CopyToClipboard(element) {
  1028. var doc = document,
  1029. text = doc.getElementById(element),
  1030. range,
  1031. selection;
  1032. if (doc.body.createTextRange) {
  1033. range = doc.body.createTextRange();
  1034. range.moveToElementText(text);
  1035. range.select();
  1036. } else if (window.getSelection) {
  1037. selection = window.getSelection();
  1038. range = doc.createRange();
  1039. range.selectNodeContents(text);
  1040. selection.removeAllRanges();
  1041. selection.addRange(range);
  1042. }
  1043. document.execCommand("copy");
  1044. this.$message({
  1045. message: "复制成功",
  1046. type: "success",
  1047. });
  1048. window.getSelection().removeAllRanges();
  1049. },
  1050. downLoadImg(base64URL){
  1051. const a = document.createElement('a');
  1052. a.download = '分享图片';
  1053. const mimeType = base64URL.match(/:(.*?);/)[1];
  1054. const byteCharacters = atob(base64URL.split(',')[1]);
  1055. const byteNumbers = new Array(byteCharacters.length);
  1056. for (let i = 0; i < byteCharacters.length; i++) {
  1057. byteNumbers[i] = byteCharacters.charCodeAt(i);
  1058. }
  1059. const byteArray = new Uint8Array(byteNumbers);
  1060. const blob = new Blob([byteArray], {type: mimeType});
  1061. a.href = URL.createObjectURL(blob);
  1062. document.body.appendChild(a);
  1063. a.click();
  1064. document.body.removeChild(a);
  1065. },
  1066. // 创建分享
  1067. handleCreateShare(){
  1068. this.shareLoading = true
  1069. let MethodName = "/ShopServer/Client/ShareManager/CreateShareRecord";
  1070. let data = {
  1071. goods_type: 21,
  1072. goods_id: this.articleId
  1073. }
  1074. getLogin(MethodName, data)
  1075. .then((res) => {
  1076. this.shareLoading = false
  1077. if(res.status===1){
  1078. this.share_url = res.share_url
  1079. this.shareSrc = 'data:image/jpeg;base64,'+res.image_content_base64
  1080. }
  1081. })
  1082. .catch(() => {
  1083. this.shareLoading = false
  1084. });
  1085. },
  1086. changeLike(type,list){
  1087. this[type] = list
  1088. if(type==='likePhraseList'){
  1089. this.$refs.phraseList.handleData()
  1090. }else if(type==='likeWordList'){
  1091. this.$refs.newWordList.handleData()
  1092. }
  1093. },
  1094. // 报刊信息
  1095. getIssueDetail(){
  1096. this.issueChnTanList = []
  1097. this.issueChnList = []
  1098. let articleindex = 0
  1099. let MethodName = '/PaperServer/Client/Issue/GetIssueBriefInfo'
  1100. let data = {
  1101. id: this.$route.query.iss_id
  1102. }
  1103. getLogin(MethodName, data)
  1104. .then((res) => {
  1105. if(res.status===1){
  1106. let issueChnList = res.data.chn_art_data
  1107. if(this.userMessage){
  1108. getLogin('/ShopServer/Client/BookshelfQuery/GetGoodsBuyStatus', {
  1109. goods_type: 2,
  1110. goods_id: this.$route.query.iss_id
  1111. })
  1112. .then((res) => {
  1113. if(res.status===1){
  1114. let isBuy = res.buy_info.is_buy==='true'
  1115. issueChnList.forEach((item,index)=>{
  1116. item.canRead = isBuy||index===0
  1117. item.arts.forEach(items=>{
  1118. if(items.id===this.$route.query.id){
  1119. this.activeArticleIndex = articleindex
  1120. item.active = true
  1121. items.active = true
  1122. }
  1123. this.issueChnTanList.push({
  1124. id: items.id,
  1125. canRead: isBuy||index===0
  1126. })
  1127. if(isBuy||index===0){
  1128. items.canRead = true
  1129. }else{
  1130. items.canRead = false
  1131. }
  1132. articleindex ++
  1133. })
  1134. })
  1135. this.issueChnList = issueChnList
  1136. }
  1137. })
  1138. .catch(() => {
  1139. });
  1140. }else{
  1141. let isBuy = false
  1142. issueChnList.forEach((item,index)=>{
  1143. item.canRead = isBuy||index===0
  1144. item.arts.forEach(items=>{
  1145. if(items.id===this.$route.query.id){
  1146. this.activeArticleIndex = articleindex
  1147. item.active = true
  1148. items.active = true
  1149. }
  1150. this.issueChnTanList.push({
  1151. id: items.id,
  1152. canRead: isBuy||index===0
  1153. })
  1154. if(isBuy||index===0){
  1155. items.canRead = true
  1156. }else{
  1157. items.canRead = false
  1158. }
  1159. articleindex ++
  1160. })
  1161. })
  1162. this.issueChnList = issueChnList
  1163. }
  1164. }
  1165. })
  1166. .catch(() => {
  1167. });
  1168. },
  1169. closeArticleInfo(){
  1170. this.articleInfoFlag = false
  1171. },
  1172. closePrint(){
  1173. this.printFlag = false
  1174. }
  1175. },
  1176. created(){
  1177. if(this.config){
  1178. let arr = this.config.split('&&&')
  1179. this.LoginNavIndex = arr[0] * 1
  1180. this.userBg = arr[1] ? arr[1] : 'rgba(0, 0, 0, 0.24)'
  1181. this.headerBorder = arr[2] ? arr[2] : '#5C5C5C'
  1182. this.headerBg = arr[3] ? arr[3] : '#1F1F1F'
  1183. this.previousPage = arr[4] ? arr[4] : '商城'
  1184. }
  1185. if(this.articleId){
  1186. this.getArticleDetail()
  1187. }
  1188. if(this.$route.query.iss_id){
  1189. this.getIssueDetail()
  1190. }
  1191. },
  1192. mounted(){
  1193. let this_ = this;
  1194. this_.timer = null;
  1195. this_.readLength = 0
  1196. this_.timer = setInterval(() => {
  1197. this_.readLength++;
  1198. }, 1000);
  1199. }
  1200. }
  1201. </script>
  1202. <style lang="scss" scoped>
  1203. .bookStore{
  1204. min-height: calc(100vh - 64px);
  1205. .navBar-right{
  1206. display: flex;
  1207. align-items: center;
  1208. }
  1209. .article-color{
  1210. display: flex;
  1211. width: 132px;
  1212. height: 32px;
  1213. justify-content: space-between;
  1214. align-items: center;
  1215. border: 1px solid #E5E6EB;
  1216. border-radius: 40px;
  1217. margin-left: 12px;
  1218. padding: 4px;
  1219. .color-item{
  1220. padding: 2px;
  1221. border: 2px solid transparent;
  1222. border-radius: 50%;
  1223. a{
  1224. width: 16px;
  1225. height: 16px;
  1226. border-radius: 50%;
  1227. display: block;
  1228. border: 1px solid transparent;
  1229. padding: 0;
  1230. }
  1231. }
  1232. }
  1233. .article-box{
  1234. position: relative;
  1235. padding: 80px 0;
  1236. .artricle-inner{
  1237. width: 1000px;
  1238. margin: 0 auto;
  1239. border-radius: 8px;
  1240. }
  1241. .mene-right{
  1242. position: fixed;
  1243. right: calc((100% - 1000px)/2 - 196px);
  1244. top: 144px;
  1245. width: 176px;
  1246. max-height: 80%;
  1247. overflow: auto;
  1248. background: #FFFFFF;
  1249. border: 1px solid #E5E6EB;
  1250. border-radius: 8px;
  1251. padding: 4px;
  1252. z-index: 99;
  1253. }
  1254. }
  1255. .atricle-data{
  1256. padding: 120px 100px 40px 100px;
  1257. }
  1258. .glossary-box{
  1259. border-top: 1px solid #F2F3F5;
  1260. padding: 40px;
  1261. .title{
  1262. display: flex;
  1263. justify-content: space-between;
  1264. h2{
  1265. margin: 0;
  1266. font-weight: 400;
  1267. font-size: 24px;
  1268. line-height: 32px;
  1269. }
  1270. a{
  1271. font-weight: 400;
  1272. font-size: 16px;
  1273. line-height: 24px;
  1274. }
  1275. }
  1276. h4{
  1277. margin: 24px 0 8px 0;
  1278. font-weight: 400;
  1279. font-size: 12px;
  1280. line-height: 20px;
  1281. }
  1282. }
  1283. .newWord-list{
  1284. padding: 2px 4px;
  1285. }
  1286. .word-info{
  1287. display: flex;
  1288. justify-content: space-between;
  1289. >div{
  1290. width: 178px;
  1291. height: 64px;
  1292. border-radius: 4px;
  1293. padding: 8px 12px;
  1294. label{
  1295. display: block;
  1296. font-weight: 400;
  1297. font-size: 12px;
  1298. line-height: 20px;
  1299. margin-bottom: 4px;
  1300. }
  1301. span{
  1302. font-weight: 400;
  1303. font-size: 16px;
  1304. line-height: 24px;
  1305. }
  1306. }
  1307. }
  1308. .echarts-box{
  1309. display: flex;
  1310. .echarts-type{
  1311. width: 232px;
  1312. flex-shrink: 0;
  1313. li{
  1314. height: 38px;
  1315. border-radius: 4px;
  1316. margin-bottom: 8px;
  1317. font-size: 14px;
  1318. line-height: 20px;
  1319. display: flex;
  1320. padding: 8px 12px;
  1321. cursor: pointer;
  1322. border: 1px solid transparent;
  1323. .name{
  1324. flex: 1;
  1325. }
  1326. .number{
  1327. width: 40px;
  1328. text-align: right;
  1329. }
  1330. .percent{
  1331. width: 80px;
  1332. text-align: right;
  1333. }
  1334. }
  1335. }
  1336. #shanxing_main{
  1337. flex: 1;
  1338. }
  1339. }
  1340. }
  1341. .article-btn{
  1342. display: flex;
  1343. justify-content: space-between;
  1344. align-items: center;
  1345. .right{
  1346. width: 150px;
  1347. margin-right: -8px;
  1348. text-align: right;
  1349. }
  1350. .support{
  1351. padding: 8px 16px;
  1352. border-radius: 20px;
  1353. background: #E5E6EB;
  1354. margin-right: 8px;
  1355. color:rgba(0, 0, 0, 0.88);
  1356. font-size: 16px;
  1357. font-weight: 400;
  1358. line-height: 24px;
  1359. cursor: pointer;
  1360. .svg-icon{
  1361. margin-right: 8px;
  1362. color: rgba(23, 93, 255, 1);
  1363. }
  1364. &.active{
  1365. background: rgba(48, 110, 255, 1);
  1366. color: #fff;
  1367. .svg-icon{
  1368. color: #fff;
  1369. }
  1370. }
  1371. }
  1372. .colloct-article{
  1373. .svg-icon{
  1374. color: rgba(242, 85, 90, 1);
  1375. }
  1376. &.active{
  1377. background: rgba(242, 85, 90, 1);
  1378. }
  1379. }
  1380. .oppose{
  1381. padding: 12px;
  1382. border-radius: 20px;
  1383. background: #E5E6EB;
  1384. height: 40px;
  1385. font-size: 16px;
  1386. line-height: 16px;
  1387. display: inline-block;
  1388. cursor: pointer;
  1389. .svg-icon{
  1390. width: 16px;
  1391. height: 16px;
  1392. }
  1393. &.active{
  1394. background: rgba(48, 110, 255, 1);
  1395. .svg-icon{
  1396. color: #fff;
  1397. }
  1398. }
  1399. }
  1400. .btn-left,.btn-right{
  1401. color: #3459D2;
  1402. font-size: 16px;
  1403. line-height: 24px;
  1404. padding: 0;
  1405. .svg-icon{
  1406. margin-right: 12px;
  1407. }
  1408. &.not-allow{
  1409. color: #5E89EF;
  1410. cursor: not-allowed;
  1411. }
  1412. }
  1413. .btn-right{
  1414. .svg-icon{
  1415. margin-right: 0;
  1416. margin-left: 12px;
  1417. }
  1418. }
  1419. .readed{
  1420. background: rgba(231, 238, 255, 1);
  1421. color: rgba(23, 93, 255, 1);
  1422. cursor: initial;
  1423. }
  1424. }
  1425. .share-box,.catalog-box{
  1426. padding: 24px;
  1427. width: 428px;
  1428. height: 90%;
  1429. overflow: auto;
  1430. max-height: 712px;
  1431. position: fixed;
  1432. top: 40%;
  1433. left: 50%;
  1434. z-index: 9;
  1435. font-size:0;
  1436. margin-top: -270px;
  1437. margin-left: -214px;
  1438. border-radius: 8px;
  1439. border: 1px solid #D0D3D9;
  1440. background: #FFF;
  1441. box-shadow: 0px 8px 10px -5px rgba(0, 0, 0, 0.08), 0px 16px 24px 2px rgba(0, 0, 0, 0.04), 0px 6px 30px 5px rgba(0, 0, 0, 0.05);
  1442. &-top{
  1443. display: flex;
  1444. justify-content: space-between;
  1445. align-items: center;
  1446. h5{
  1447. color: #000;
  1448. font-size: 24px;
  1449. font-weight: 400;
  1450. line-height: 32px;
  1451. margin: 0;
  1452. }
  1453. .el-icon-close{
  1454. color: rgba(47, 55, 66, 1);
  1455. cursor: pointer;
  1456. font-size: 16px;
  1457. }
  1458. }
  1459. img{
  1460. width: 380px;
  1461. height: 532px;
  1462. border-radius: 16px;
  1463. margin: 24px 0;
  1464. }
  1465. #copyDownUrl{
  1466. width: 0;
  1467. height: 0;
  1468. opacity: 0;
  1469. display: block;
  1470. }
  1471. &-bottom{
  1472. .el-button{
  1473. width: 174px;
  1474. height: 48px;
  1475. color: #FFF;
  1476. font-size: 16px;
  1477. font-weight: 400;
  1478. line-height: 24px;
  1479. border-radius: 8px;
  1480. &.is-plain{
  1481. color: rgba(23, 93, 255, 1);
  1482. border-color: rgba(23, 93, 255, 1);
  1483. &:hover{
  1484. background: rgba(231, 238, 255, 1);
  1485. }
  1486. &:focus{
  1487. color: rgba(23, 93, 255, 1);
  1488. border-color: rgba(23, 93, 255, 1);
  1489. background: rgba(231, 238, 255, 1);
  1490. }
  1491. }
  1492. }
  1493. }
  1494. }
  1495. .catalog-box{
  1496. right: calc((100% - 1000px)/2);
  1497. left: auto;
  1498. margin-left: auto;
  1499. .treeList{
  1500. .parent-node{
  1501. display: flex;
  1502. align-items: center;
  1503. margin-bottom: 16px;
  1504. .number{
  1505. width: 26px;
  1506. font-weight: 500;
  1507. font-size: 16px;
  1508. line-height: 24px;
  1509. color: #2F3742;
  1510. }
  1511. .title{
  1512. font-weight: 500;
  1513. font-size: 16px;
  1514. line-height: 24px;
  1515. color: #2F3742;
  1516. }
  1517. }
  1518. ul{
  1519. margin-bottom: 16px;
  1520. .children{
  1521. padding: 0 32px;
  1522. border-radius: 4px;
  1523. height: 40px;
  1524. display: flex;
  1525. align-items: center;
  1526. margin-bottom: 4px;
  1527. &-buy{
  1528. .number,.title{
  1529. color: #2F3742;
  1530. }
  1531. }
  1532. &-no{
  1533. .number,.title{
  1534. color: #929CA8;
  1535. }
  1536. }
  1537. &-buy:hover{
  1538. background: #E5E6EB;
  1539. cursor: pointer;
  1540. }
  1541. &-node{
  1542. display: flex;
  1543. width: 100%;
  1544. }
  1545. .number{
  1546. width: 24px;
  1547. }
  1548. .title{
  1549. flex: 1;
  1550. }
  1551. .number,.title{
  1552. font-weight: 400;
  1553. font-size: 16px;
  1554. line-height: 24px;
  1555. }
  1556. .el-icon-lock{
  1557. height: 16px;
  1558. color: #929CA8;
  1559. }
  1560. }
  1561. }
  1562. }
  1563. }
  1564. </style>
  1565. <style lang="scss">
  1566. .article-fontsize{
  1567. width: 144px;
  1568. height: 32px;
  1569. line-height: 30px;
  1570. border: 1px solid #E5E6EB;
  1571. border-radius: 40px;
  1572. overflow: hidden;
  1573. .el-input{
  1574. height: 30px;
  1575. }
  1576. .el-input-number__decrease, .el-input-number__increase{
  1577. height: 30px;
  1578. border: none;
  1579. background: transparent;
  1580. color: #D9E2FC;
  1581. }
  1582. .el-input-number__decrease{
  1583. border-right: 1px solid #1B5441;
  1584. }
  1585. .el-input-number__increase{
  1586. border-left: 1px solid #1B5441;
  1587. }
  1588. .el-input__inner{
  1589. height: 30px;
  1590. border: none;
  1591. line-height: 30px;
  1592. background: transparent;
  1593. color: #D9E2FC;
  1594. }
  1595. }
  1596. .navBar{
  1597. border-color: transparent;
  1598. &-white{
  1599. border-color: #EBEBEB;
  1600. .el-input-number__decrease, .el-input-number__increase,.el-input__inner{
  1601. color: #1C2129;
  1602. }
  1603. .el-input-number__decrease{
  1604. border-right: 1px solid #E5E6EB;
  1605. }
  1606. .el-input-number__increase{
  1607. border-left: 1px solid #E5E6EB;
  1608. }
  1609. .goback{
  1610. color: #1D2129;
  1611. }
  1612. .border{
  1613. background: #E5E6EB;
  1614. height: 16px;
  1615. margin-top: 2px;
  1616. }
  1617. .article-title{
  1618. color: #86909C;
  1619. }
  1620. }
  1621. &-darkGreen{
  1622. .el-input-number__decrease{
  1623. border-right: 1px solid #1B5441;
  1624. }
  1625. .el-input-number__increase{
  1626. border-left: 1px solid #1B5441;
  1627. }
  1628. .goback{
  1629. color: #E9F7F2;
  1630. }
  1631. .border{
  1632. background: #1B5441;
  1633. height: 16px;
  1634. margin-top: 2px;
  1635. }
  1636. .article-title{
  1637. color: #CCEBE1;
  1638. }
  1639. }
  1640. &-darkBlue{
  1641. .el-input-number__decrease{
  1642. border-right: 1px solid #1C2129;
  1643. }
  1644. .el-input-number__increase{
  1645. border-left: 1px solid #1C2129;
  1646. }
  1647. .goback{
  1648. color: #E9F7F2;
  1649. }
  1650. .border{
  1651. background: #667180;
  1652. height: 16px;
  1653. margin-top: 2px;
  1654. }
  1655. .article-title{
  1656. color: #D9E2FC;
  1657. }
  1658. }
  1659. &-armyGreen{
  1660. .el-input-number__decrease{
  1661. border-right: 1px solid #2A2F2C;
  1662. }
  1663. .el-input-number__increase{
  1664. border-left: 1px solid #2A2F2C;
  1665. }
  1666. .goback{
  1667. color: #E9F7F2;
  1668. }
  1669. .border{
  1670. background: #99A29E;
  1671. height: 16px;
  1672. margin-top: 2px;
  1673. }
  1674. .article-title{
  1675. color: #D9E2FC;
  1676. }
  1677. }
  1678. }
  1679. .articleDetail-dialog{
  1680. .el-dialog__header,.el-dialog__body{
  1681. padding: 0;
  1682. }
  1683. }
  1684. .ciyun-dialog{
  1685. .el-dialog__title{
  1686. color:#2F3742;
  1687. font-size: 24px;
  1688. font-weight: 600;
  1689. line-height: 32px;
  1690. }
  1691. iframe{
  1692. border: none;
  1693. }
  1694. .el-dialog__body{
  1695. padding: 0;
  1696. }
  1697. }
  1698. </style>