123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292 |
- <template>
- <div
- class="bookStore"
- :style="{ background: bgColorList[activeIndex].contentBg }"
- v-if="articleInfo"
- :v-loading="loading"
- >
- <Header :LoginNavIndex="LoginNavIndex" />
- <div
- class="navBar"
- :class="['navBar-' + bgColorList[activeIndex].type]"
- :style="{ background: bgColorList[activeIndex].navBg }"
- >
- <div class="navBar-left">
- <a class="goback" @click="$router.go(-1)"
- ><i class="el-icon-arrow-left"></i> 第 {{ articleInfo.iss_no }} 期</a
- >
- <div class="border"></div>
- <p class="article-title">{{ articleInfo.art_title }}</p>
- </div>
- <div class="navBar-right">
- <el-input-number
- class="article-fontsize"
- v-model="wordFontsize"
- :step="2"
- step-strictly
- :min="12"
- :max="28"
- :style="{ borderColor: bgColorList[activeIndex].boxBorder }"
- ></el-input-number>
- <ul
- class="article-color"
- :style="{ borderColor: bgColorList[activeIndex].boxBorder }"
- >
- <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 : '',
- }"
- >
- <a
- :style="{
- background: itemC.border,
- borderColor: activeIndex === indexC ? itemC.borderColor : '',
- }"
- ></a>
- </li>
- </ul>
- </div>
- </div>
- <div class="article-box">
- <div
- class="artricle-inner"
- :style="{ background: bgColorList[activeIndex].contentInnerBg }"
- >
- <!-- 文章 -->
- <div class="atricle-data">
- <normal-model
- :titleFontsize="48"
- :wordFontsize="wordFontsize"
- :colorObj="bgColorList[activeIndex]"
- :articleType="articleType"
- :style="{ padding: '0 40px' }"
- v-if="menuType === 'original'"
- :articleInfo="articleInfo"
- :likeSentencelist="likeSentencelist"
- :likeWord="likeWordList"
- :articleImg="articleImg"
- :activeArticleIndexLen="issueChnTanList.length"
- :activeArticleIndex="activeArticleIndex"
- @handlePage="handlePage"
- ></normal-model>
- <phrase-model
- :titleFontsize="48"
- :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"
- :articleImg="articleImg"
- ></phrase-model>
- <practice-model
- :titleFontsize="48"
- :wordFontsize="wordFontsize"
- :colorObj="bgColorList[activeIndex]"
- :articleType="articleType"
- :style="{ padding: '0 40px' }"
- v-if="menuType === 'practice'"
- :articleInfo="articleInfo"
- :likeSentencelist="likeSentencelist"
- :likeWord="likeWordList"
- :articleImg="articleImg"
- ></practice-model>
- <inner-text-search
- :titleFontsize="48"
- :wordFontsize="wordFontsize"
- :colorObj="bgColorList[activeIndex]"
- :articleType="articleType"
- :style="{ padding: '0 40px' }"
- v-if="menuType === 'search'"
- :articleInfo="articleInfo"
- ref="innerTextSearchs"
- :likeSentencelist="likeSentencelist"
- :likeWord="likeWordList"
- :articleImg="articleImg"
- ></inner-text-search>
- <lexical-type
- :titleFontsize="48"
- :wordFontsize="wordFontsize"
- :colorObj="bgColorList[activeIndex]"
- :articleType="articleType"
- :style="{ padding: '0 40px' }"
- v-if="menuType === 'filtrate'"
- :articleInfo="articleInfo"
- ref="lexicalType"
- :likeSentencelist="likeSentencelist"
- :likeWord="likeWordList"
- :articleImg="articleImg"
- ></lexical-type>
- <notes-model
- :titleFontsize="48"
- :wordFontsize="wordFontsize"
- :colorObj="bgColorList[activeIndex]"
- :articleType="articleType"
- :style="{ padding: '0 40px' }"
- v-if="menuType === 'notebook'"
- :articleInfo="articleInfo"
- :likeSentencelist="likeSentencelist"
- :likeWord="likeWordList"
- :articleImg="articleImg"
- ></notes-model>
- </div>
- <div
- class="article-btn"
- v-if="this.$route.query.iss_id && menuType !== 'practice'"
- :style="{ background: bgColorList[activeIndex].glossaryBg }"
- >
- <div class="left">
- <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
- >
- <!-- <span :class="['oppose',oppose?'active':'']" @click="changeStatus('oppose')"><svg-icon icon-class="oppose"></svg-icon></span> -->
- </div>
- <div class="center">
- <el-button
- type="text"
- class="btn-left"
- :class="[activeArticleIndex === 0 ? 'not-allow' : '']"
- @click="handlePage('-')"
- :style="{ color: bgColorList[activeIndex].btnColor }"
- ><svg-icon icon-class="arrow-left-line"></svg-icon
- >上一篇</el-button
- >
- <el-button
- type="text"
- class="btn-right"
- :class="[
- activeArticleIndex === issueChnTanList.length - 1
- ? 'not-allow'
- : '',
- ]"
- @click="handlePage('+')"
- :style="{ color: bgColorList[activeIndex].btnColor }"
- >下一篇<svg-icon icon-class="arrow-right-line"></svg-icon
- ></el-button>
- </div>
- <div class="right">
- <template v-if="support">
- <span
- class="support"
- @click="handleReadArticle"
- :style="{ color: bgColorList[activeIndex].btnColor }"
- ><svg-icon icon-class="no-read"></svg-icon>标记为已读</span
- >
- </template>
- <template v-else>
- <span
- class="support readed"
- :style="{ color: bgColorList[activeIndex].btnColor }"
- ><svg-icon
- icon-class="readed"
- :style="{ color: bgColorList[activeIndex].btnColor }"
- ></svg-icon
- >已读</span
- >
- </template>
- </div>
- </div>
- <!-- 词汇表 -->
- <div class="glossary-box" v-if="menuType !== 'practice'">
- <div
- class="title"
- :style="{ color: bgColorList[activeIndex].glossaryTitle }"
- v-if="
- (articleInfo.art_voc_data &&
- articleInfo.art_voc_data.length > 0) ||
- (articleInfo.art_phrase_data &&
- articleInfo.art_phrase_data.length > 0) ||
- (articleInfo.art_explain_data &&
- articleInfo.art_explain_data.length > 0)
- "
- >
- <h2>词汇表</h2>
- <a @click="showGlossary = !showGlossary">{{
- showGlossary ? "收起" : "展开"
- }}</a>
- </div>
- <el-collapse-transition>
- <div v-if="showGlossary">
- <template
- v-if="
- articleInfo.art_voc_data &&
- articleInfo.art_voc_data.length > 0
- "
- >
- <h4
- :style="{ color: bgColorList[activeIndex].glossarySubtitle }"
- >
- 生词
- </h4>
- <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>
- </template>
- <template
- v-if="
- articleInfo.art_phrase_data &&
- articleInfo.art_phrase_data.length > 0
- "
- >
- <h4
- :style="{ color: bgColorList[activeIndex].glossarySubtitle }"
- >
- 短语
- </h4>
- <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>
- </template>
- <template
- v-if="
- articleInfo.art_explain_data &&
- articleInfo.art_explain_data.length > 0
- "
- >
- <h4
- :style="{ color: bgColorList[activeIndex].glossarySubtitle }"
- >
- 注释
- </h4>
- <annotation-list
- class="newWord-list"
- :list="articleInfo.art_explain_data"
- :style="{ background: bgColorList[activeIndex].glossaryBg }"
- :colorObj="bgColorList[activeIndex]"
- ></annotation-list>
- </template>
- </div>
- </el-collapse-transition>
- <div
- class="title"
- :style="{
- color: bgColorList[activeIndex].glossaryTitle,
- marginTop: '40px',
- }"
- v-if="articleInfo.en_flag"
- >
- <h2>详细统计</h2>
- <a @click="showWordInfo = !showWordInfo">{{
- showWordInfo ? "收起" : "展开"
- }}</a>
- </div>
- <el-collapse-transition v-if="articleInfo.en_flag">
- <div v-if="showWordInfo">
- <h4 :style="{ color: bgColorList[activeIndex].glossarySubtitle }">
- 词汇信息
- </h4>
- <div
- class="word-info"
- v-if="
- articleInfo.art_corpus_data &&
- articleInfo.art_corpus_data.artStatInfo
- "
- >
- <div
- :style="{ background: bgColorList[activeIndex].glossaryBg }"
- >
- <label
- :style="{ color: bgColorList[activeIndex].statisticTitle }"
- >文章长度</label
- >
- <span
- :style="{ color: bgColorList[activeIndex].statisticValue }"
- >{{ articleInfo.art_corpus_data.artStatInfo.wc }}</span
- >
- </div>
- <div
- :style="{ background: bgColorList[activeIndex].glossaryBg }"
- >
- <label
- :style="{ color: bgColorList[activeIndex].statisticTitle }"
- >词汇数量</label
- >
- <span
- :style="{ color: bgColorList[activeIndex].statisticValue }"
- >{{ articleInfo.art_corpus_data.artStatInfo.wdc }}</span
- >
- </div>
- <div
- :style="{ background: bgColorList[activeIndex].glossaryBg }"
- >
- <label
- :style="{ color: bgColorList[activeIndex].statisticTitle }"
- >平均词长</label
- >
- <span
- :style="{ color: bgColorList[activeIndex].statisticValue }"
- >{{
- articleInfo.art_corpus_data.artStatInfo.avgWordLen
- }}</span
- >
- </div>
- <div
- :style="{ background: bgColorList[activeIndex].glossaryBg }"
- >
- <label
- :style="{ color: bgColorList[activeIndex].statisticTitle }"
- >词汇密度</label
- >
- <span
- :style="{ color: bgColorList[activeIndex].statisticValue }"
- >{{
- articleInfo.art_corpus_data.artStatInfo.vocabDensity
- }}</span
- >
- </div>
- <div
- :style="{ background: bgColorList[activeIndex].glossaryBg }"
- >
- <label
- :style="{ color: bgColorList[activeIndex].statisticTitle }"
- >词汇难度</label
- >
- <span
- :style="{ color: bgColorList[activeIndex].statisticValue }"
- >{{
- articleInfo.art_corpus_data.artStatInfo.vocabHardLevel
- }}</span
- >
- </div>
- </div>
- <h4 :style="{ color: bgColorList[activeIndex].glossarySubtitle }">
- 词汇分布
- </h4>
- <div
- class="echarts-box"
- v-if="
- articleInfo &&
- articleInfo.art_corpus_data &&
- articleInfo.art_corpus_data.artStatInfo &&
- articleInfo.art_corpus_data.artStatInfo.vocabVlLevelItems
- "
- >
- <ul class="echarts-type">
- <li
- v-for="(itemE, indexE) in articleInfo.art_corpus_data
- .artStatInfo.vocabVlLevelItems"
- :key="indexE"
- @mouseover="gaolangbzt(indexE, 'shanxing_main')"
- @mouseout="closegaolangbzt(indexE, 'shanxing_main')"
- :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,
- }"
- >
- <span class="name">{{ itemE.vlCnName }}</span>
- <span class="number">{{ itemE.value }}</span>
- <span class="percent">{{ itemE.vocabPercentStr }}</span>
- </li>
- </ul>
- <div id="shanxing_main" style="height: 360px"></div>
- </div>
- </div>
- </el-collapse-transition>
- </div>
- <!-- 右侧菜单 -->
- <div
- class="mene-right"
- :style="{
- background: bgColorList[activeIndex].contentInnerBg,
- borderColor: bgColorList[activeIndex].glossaryBg,
- }"
- v-if="articleInfo.en_flag"
- >
- <menu-right
- :colorObj="bgColorList[activeIndex]"
- @changeArticleType="changeArticleType"
- ></menu-right>
- </div>
- </div>
- </div>
- <div
- class="share-box"
- v-if="menuFeature === 'share'"
- v-loading="shareLoading"
- >
- <div class="share-box-top">
- <h5>分享</h5>
- <i class="el-icon-close" @click="handleCloseShare"></i>
- </div>
- <template v-if="shareSrc">
- <img :src="shareSrc" />
- </template>
- <template v-else>
- <el-skeleton style="width: 380px" :loading="true" animated>
- <template slot="template">
- <el-skeleton-item
- variant="image"
- style="width: 380px; height: 738px"
- />
- </template>
- </el-skeleton>
- </template>
- <div class="share-box-bottom">
- <el-button type="primary" @click="downLoadImg(shareSrc)" size="small"
- >下载图片</el-button
- >
- <el-button
- @click="CopyToClipboard('copyDownUrl')"
- size="small"
- type="primary"
- plain
- >复制链接</el-button
- >
- <span id="copyDownUrl">{{ share_url }}</span>
- </div>
- </div>
- <div class="catalog-box" v-if="menuFeature === 'list'">
- <ul class="treeList">
- <li v-for="(item, index) in issueChnList" :key="index">
- <p class="parent-node">
- <span class="number">{{ index + 1 }}</span
- ><b class="title">{{ item.chn_name }}</b>
- </p>
- <ul v-if="item.arts && item.arts.length > 0">
- <li
- :class="[
- items.canRead ? 'children-buy' : 'children-no',
- 'children',
- ]"
- v-for="(items, indexs) in item.arts"
- :key="indexs"
- @click="handleLink(items, items.canRead, index)"
- >
- <p class="children-node">
- <span class="number">{{ indexs + 1 }}</span
- ><b class="title">{{ items.art_title }}</b>
- </p>
- </li>
- </ul>
- </li>
- </ul>
- </div>
- <el-dialog
- :visible.sync="articleInfoFlag"
- :show-close="false"
- :close-on-click-modal="false"
- width="968px"
- class="articleDetail-dialog"
- v-if="articleInfoFlag"
- >
- <article-info
- @closeArticleInfo="closeArticleInfo"
- :articleInfo="articleInfo"
- :colorObj="bgColorList[activeIndex]"
- ></article-info>
- </el-dialog>
- <el-dialog
- :visible.sync="ciyunShow"
- :show-close="true"
- :title="articleInfo.art_corpus_data.artTitle"
- :close-on-click-modal="false"
- width="1182px"
- class="ciyun-dialog"
- v-if="ciyunShow"
- >
- <iframe
- width="100%"
- height="834px"
- border="none"
- :src="
- './ciyun/ciyunindex.html?partitionKey=1&searchType=2&articleId=' +
- articleId
- "
- ></iframe>
- </el-dialog>
- <el-dialog
- :visible.sync="printFlag"
- :show-close="false"
- :close-on-click-modal="false"
- width="100%"
- top="0"
- class="articleDetail-dialog"
- v-if="printFlag"
- >
- <print-model
- :titleFontsize="48"
- :wordFontsize="wordFontsize"
- :colorObj="bgColorList[activeIndex]"
- :articleType="articleType"
- :articleInfo="articleInfo"
- @closePrint="closePrint"
- :articleImg="articleImg"
- ></print-model>
- </el-dialog>
- </div>
- </template>
- <script>
- import Header from "../../components/Header.vue";
- import NavBar from "../../components/common/NavBar.vue";
- import NewWordList from "./components/NewWordList.vue";
- import PhraseList from "./components/PhraseList.vue";
- import AnnotationList from "./components/AnnotationList.vue";
- import NormalModel from "./components/NormalModel.vue";
- import PhraseModel from "./components/PhraseModel.vue";
- import MenuRight from "./components/MenuRight.vue";
- import ArticleInfo from "./components/ArticleInfo.vue";
- import InnerTextSearch from "./components/InnerTextSearch.vue";
- import LexicalType from "./components/LexicalType.vue";
- import PracticeModel from "./components/PracticeModel.vue";
- import NotesModel from "./components/NotesModel.vue";
- import printModel from "./components/PrintModel.vue";
- import * as echarts from "echarts";
- import { getLogin } from "@/api/ajax";
- import { getToken } from "@/utils/auth";
- export default {
- name: "articleDetail",
- computed: {},
- components: {
- Header,
- NavBar,
- NewWordList,
- PhraseList,
- AnnotationList,
- NormalModel,
- MenuRight,
- PhraseModel,
- ArticleInfo,
- InnerTextSearch,
- LexicalType,
- PracticeModel,
- NotesModel,
- printModel,
- },
- data() {
- return {
- config: this.$route.query.headerConfig
- ? decodeURIComponent(this.$route.query.headerConfig)
- : "",
- LoginNavIndex: 0,
- wordFontsize: 22, // 文章文字大小
- bgColorList: [
- {
- type: "white",
- contentBg: "#D9EAF1",
- contentInnerBg: "#FFFFFF",
- navBg: "#00ADEF",
- border: "#E5E6EB",
- bg: "#FFFFFF",
- border_active: "#3459D2",
- boxBorder: "#E5E6EB",
- titleColor: "#1F2C5C",
- sourceColor: "#929CA8",
- contentColor: "#2F3742",
- btnColor: "#3459D2",
- glossaryTitle: "#2F3742",
- glossarySubtitle: "#4E5969",
- glossaryBg: "#F7F8FA",
- newWordColor: "#175DFF",
- newWordOtherColor: "#667180",
- newWordStar: "#FFB224",
- newWordType: {
- L0: {
- color: "#5B7217",
- bg: "#F1FCE3",
- },
- L1: {
- color: "#3D9A50",
- bg: "#EFFCEF",
- },
- L2: {
- color: "#0081F1",
- bg: "#E7F3FF",
- },
- L3: {
- color: "#3459D2",
- bg: "#EEF3FF",
- },
- LA: {
- color: "#E03177",
- bg: "#FFECF5",
- },
- LB: {
- color: "#CD2B31",
- bg: "#FFE8E8",
- },
- LC: {
- color: "#99A29E",
- bg: "#DFE4E2",
- },
- LD: {
- color: "#504F57",
- bg: "#C1C5CD",
- },
- },
- phraseColor: "#ED5F00",
- phraseOhterColor: "#2F3742",
- annotationTitle: "#4E5969",
- annotationOhter: "#667180",
- statisticTitle: "#2F3742",
- statisticValue: "#3459D2",
- menuBg: "#EEF3FF",
- audiobg: "#FFFFFF",
- audioBorder: "#EBEBEB",
- audioBtnColor: "#175DFF",
- audioBtnBg: "#EEF3FF",
- audioTimeColor: "#2F3742",
- audioSpeedColor: "#2F3742",
- },
- {
- type: "darkGreen",
- contentBg: "#C2C9C6",
- contentInnerBg: "#DFE4E2",
- navBg: "#236E55",
- border: "#5BB99A",
- bg: "#FFFFFF",
- border_active: "#FFFFFF",
- boxBorder: "#1B5441",
- titleColor: "#1F2C5C",
- sourceColor: "#929CA8",
- contentColor: "#2F3742",
- btnColor: "#3459D2",
- glossaryTitle: "#393F3C",
- glossarySubtitle: "#66736D",
- glossaryBg: "#D7DCDA",
- newWordColor: "#175DFF",
- newWordOtherColor: "#667180",
- newWordStar: "#FFB224",
- newWordType: {
- L0: {
- color: "#5B7217",
- bg: "#F1FCE3",
- },
- L1: {
- color: "#3D9A50",
- bg: "#EFFCEF",
- },
- L2: {
- color: "#0081F1",
- bg: "#E7F3FF",
- },
- L3: {
- color: "#3459D2",
- bg: "#EEF3FF",
- },
- LA: {
- color: "#E03177",
- bg: "#FFECF5",
- },
- LB: {
- color: "#CD2B31",
- bg: "#FFE8E8",
- },
- LC: {
- color: "#99A29E",
- bg: "#DFE4E2",
- },
- LD: {
- color: "#504F57",
- bg: "#C1C5CD",
- },
- },
- phraseColor: "#ED5F00",
- phraseOhterColor: "#2F3742",
- statisticTitle: "#393F3C",
- statisticValue: "#299772",
- menuBg: "#E9F7F2",
- audiobg: "#ECEFED",
- audioBorder: "#DFE4E2",
- audioBtnColor: "#299772",
- audioBtnBg: "#DFE4E2",
- audioTimeColor: "#393F3C",
- audioSpeedColor: "#299772",
- },
- {
- type: "darkBlue",
- contentBg: "#1C2129",
- contentInnerBg: "#2F3742",
- navBg: "#2F3742",
- border: "#1F2C5C",
- bg: "#1F2C5C",
- border_active: "#FFFFFF",
- boxBorder: "#1C2129",
- titleColor: "#5373E7",
- sourceColor: "#929CA8",
- contentColor: "#C1C5CD",
- btnColor: "#5373E7",
- glossaryTitle: "#929CA8",
- glossarySubtitle: "#929CA8",
- glossaryBg: "#3E4855",
- newWordColor: "#8DA4EF",
- newWordOtherColor: "#929CA8",
- newWordStar: "#816C00",
- newWordType: {
- L0: {
- color: "rgba(255, 255, 255, 0.64)",
- bg: "#5B7217",
- },
- L1: {
- color: "rgba(255, 255, 255, 0.64)",
- bg: "#2F6E3B",
- },
- L2: {
- color: "rgba(255, 255, 255, 0.64)",
- bg: "#006793",
- },
- L3: {
- color: "rgba(255, 255, 255, 0.64)",
- bg: "#AE1955",
- },
- LA: {
- color: "rgba(255, 255, 255, 0.64)",
- bg: "#AE1955",
- },
- LB: {
- color: "rgba(255, 255, 255, 0.64)",
- bg: "#8F2025",
- },
- LC: {
- color: "rgba(255, 255, 255, 0.64)",
- bg: "#4A524E",
- },
- LD: {
- color: "rgba(255, 255, 255, 0.64)",
- bg: "#2F3742",
- },
- },
- phraseColor: "#ED5F00",
- phraseOhterColor: "#929CA8",
- statisticTitle: "#D0D3D9",
- statisticValue: "#5373E7",
- menuBg: "#EEF3FF",
- audiobg: "#3E4855",
- audioBorder: "#2F3742",
- audioBtnColor: "#D0D3D9",
- audioBtnBg: "#4E5969",
- audioTimeColor: "#D0D3D9",
- audioSpeedColor: "#D0D3D9",
- },
- {
- type: "armyGreen",
- contentBg: "#2A2F2C",
- contentInnerBg: "#393F3C",
- navBg: "#393F3C",
- border: "#13392E",
- bg: "#13392E",
- border_active: "#FFFFFF",
- boxBorder: "#2A2F2C",
- titleColor: "#30A47D",
- sourceColor: "#99A29E",
- contentColor: "#C1C5CD",
- btnColor: "#30A47D",
- glossaryTitle: "#99A29E",
- glossarySubtitle: "#99A29E",
- glossaryBg: "#4A524E",
- newWordColor: "#8DA4EF",
- newWordOtherColor: "#99A29E",
- newWordStar: "#816C00",
- newWordType: {
- L0: {
- color: "rgba(255, 255, 255, 0.64)",
- bg: "#5B7217",
- },
- L1: {
- color: "rgba(255, 255, 255, 0.64)",
- bg: "#2F6E3B",
- },
- L2: {
- color: "rgba(255, 255, 255, 0.64)",
- bg: "#006793",
- },
- L3: {
- color: "rgba(255, 255, 255, 0.64)",
- bg: "#AE1955",
- },
- LA: {
- color: "rgba(255, 255, 255, 0.64)",
- bg: "#AE1955",
- },
- LB: {
- color: "rgba(255, 255, 255, 0.64)",
- bg: "#8F2025",
- },
- LC: {
- color: "rgba(255, 255, 255, 0.64)",
- bg: "#4A524E",
- },
- LD: {
- color: "rgba(255, 255, 255, 0.64)",
- bg: "#2F3742",
- },
- },
- phraseColor: "#ED5F00",
- phraseOhterColor: "#99A29E",
- statisticTitle: "#D0D3D9",
- statisticValue: "#30A47D",
- menuBg: "#EEF3FF",
- audiobg: "#4A524E",
- audioBorder: "#393F3C",
- audioBtnColor: "#D7DCDA",
- audioBtnBg: "#66736D",
- audioTimeColor: "#D7DCDA",
- audioSpeedColor: "#D7DCDA",
- },
- ],
- activeIndex: 0, // 选择主题色的索引
- showGlossary: true, // 是否展开词汇表
- showWordInfo: true,
- wordList: [
- {
- src: ".",
- word: "cremation",
- symbol: "/krəˈmeɪʃn/",
- paraList: [
- {
- cixing: "n.",
- shiyi: "火葬;火化",
- },
- ],
- type: "daochu",
- rate: 3,
- },
- {
- src: ".",
- word: "thrive",
- symbol: "/θraɪv/",
- paraList: [
- {
- cixing: "v.",
- shiyi:
- "茁壮成长,兴旺,繁荣;(尤指在别人觉得困难的时候)以……为乐,可以出色应对",
- },
- ],
- type: "xuanbi",
- rate: 4,
- },
- {
- src: ".",
- word: "diversify",
- symbol: "/daɪˈvɜːsɪfaɪ/",
- paraList: [
- {
- cixing: "v.",
- shiyi:
- "(使)多样化,(使)不同;扩大经营范围,增加……的品种;(投资)多元化;",
- },
- {
- cixing: "n.",
- shiyi: "兽医;<美,非正式>老兵;兽医诊所(vet's)",
- },
- ],
- type: "daochu",
- rate: 2,
- },
- ],
- phraseList: [
- {
- word: "send off",
- paraList: ["送行"],
- },
- {
- word: "more than",
- paraList: ["多于"],
- },
- {
- word: "according to",
- paraList: ["根据"],
- },
- {
- word: "In addition to",
- paraList: ["除了……之外"],
- },
- ],
- annotationList: [
- {
- prefix: "visiting team",
- para: "时区。全球划分为24个时区。相邻两个时区的时问相差1小时。出国旅行的人,必须随时调整自己的手表,才能和当地时间相一致。凡向西走,每过一个时区,就要把表拨慢1小时;凡向东走,每过一个时区,就要把表拨快1小时。",
- },
- {
- prefix: "jet–lagged",
- para: "有时差反应的,有时差感的。人体症状多表现为疲劳、方向感减弱和失眠、往往会影响人们最初几天的活动。",
- },
- ],
- vocabularyType: {
- L0: {
- bg: "#F2FCE3",
- color: "#5B7217",
- darkBg: "#5B7217",
- border: "#F2FCE3",
- darkColor: "rgba(255, 255, 255, 0.64)",
- darkBorder: "rgba(255, 255, 255, 0.08)",
- darkGreenBg: "#F2FCE3",
- darkGreenColor: "#5B7217",
- darkGreenBorder: "#F2FCE3",
- },
- L1: {
- bg: "#EFFCEF",
- color: "#3D9A50",
- darkBg: "#2F6E3B",
- darkColor: "rgba(255, 255, 255, 0.64)",
- darkBorder: "rgba(255, 255, 255, 0.08)",
- darkGreenBg: "#EFFCEF",
- darkGreenColor: "#3D9A50",
- darkGreenBorder: "#EFFCEF",
- },
- L2: {
- bg: "#E7EEFF",
- color: "#175DFF",
- darkBg: "#006793",
- darkColor: "rgba(255, 255, 255, 0.64)",
- darkBorder: "rgba(255, 255, 255, 0.08)",
- darkGreenBg: "#E7F3FF",
- darkGreenColor: "#0081F1",
- darkGreenBorder: "#E7F3FF",
- },
- L3: {
- bg: "#EEF3FF",
- color: "#3459D2",
- darkBg: "#2C49AA",
- darkColor: "rgba(255, 255, 255, 0.64)",
- darkBorder: "rgba(255, 255, 255, 0.08)",
- darkGreenBg: "#EEF3FF",
- darkGreenColor: "#3459D2",
- darkGreenBorder: "#EEF3FF",
- },
- LA: {
- bg: "#FFECF5",
- color: "#E03177",
- darkBg: "#AE1955",
- darkColor: "rgba(255, 255, 255, 0.64)",
- darkBorder: "rgba(255, 255, 255, 0.08)",
- darkGreenBg: "#FFECF5",
- darkGreenColor: "#E03177",
- darkGreenBorder: "#FFECF5",
- },
- LB: {
- bg: "#FFE8E8",
- color: "#CD2B31",
- darkBg: "#8F2025",
- darkColor: "rgba(255, 255, 255, 0.64)",
- darkBorder: "rgba(255, 255, 255, 0.08)",
- darkGreenBg: "#FFE8E8",
- darkGreenColor: "#CD2B31",
- darkGreenBorder: "#FFE8E8",
- },
- LC: {
- bg: "#DFE4E2",
- color: "#99A29E",
- border: "rgba(0, 0, 0, 0.08)",
- darkBg: "#4A524E",
- darkColor: "rgba(255, 255, 255, 0.64)",
- darkBorder: "rgba(255, 255, 255, 0.08)",
- darkGreenBg: "#DFE4E2",
- darkGreenColor: "#4A524E",
- darkGreenBorder: "rgba(0, 0, 0, 0.08)",
- },
- LD: {
- bg: "#C1C5CD",
- color: "#504F57",
- darkBg: "#2F3742",
- darkColor: "rgba(255, 255, 255, 0.64)",
- darkBorder: "rgba(255, 255, 255, 0.08)",
- darkGreenBg: "#C1C5CD",
- darkGreenColor: "#504F57",
- darkGreenBorder: "#C1C5CD",
- },
- },
- articleType: this.$route.query.type ? this.$route.query.type * 1 : 1,
- articleId: this.$route.query.id ? this.$route.query.id : "",
- noRead: true, // 未读
- support: false, // 点赞
- oppose: false, // 不支持
- timer: null,
- readLength: 0,
- articleInfo: null,
- loading: false,
- menuType: "original",
- menuFeature: "", // 功能
- shareSrc: "", // 分享图片
- share_url: "", // 分享链接
- shareLoading: false,
- likeWordList: [], // 收藏短语list
- likePhraseList: [],
- likeSentencelist: [],
- issueChnList: [], // 报刊文章目录
- issueChnTanList: [], //文章摊平
- userMessage: getToken() ? JSON.parse(getToken()) : null,
- activeArticleIndex: 0,
- articleNumber: 0,
- articleInfoFlag: false, // 显示文章信息
- ciyunShow: false, // 显示词云
- printFlag: false, // 打印
- articleImg: {}, // 文章图片
- };
- },
- watch: {
- showWordInfo: {
- handler(val, oldVal) {
- const _this = this;
- if (val) {
- setTimeout(() => {
- _this.inityuan();
- }, 100);
- }
- },
- // 深度观察监听
- deep: true,
- },
- },
- methods: {
- inityuan() {
- if (
- this.articleInfo &&
- this.articleInfo.art_corpus_data &&
- this.articleInfo.art_corpus_data.artStatInfo &&
- this.articleInfo.art_corpus_data.artStatInfo.vocabVlLevelItems
- ) {
- var chartDom = document.getElementById("shanxing_main");
- var myChart = echarts.init(chartDom);
- var option;
- let newdata = JSON.parse(
- JSON.stringify(
- this.articleInfo.art_corpus_data.artStatInfo.vocabVlLevelItems
- )
- );
- newdata.forEach((item) => {
- let percent = item.vocabPercent / 100;
- if (percent % 1 == 0) {
- item.name = item.vlCnName + " " + percent + "%";
- } else {
- item.name = item.vlCnName + " " + percent.toFixed(2) + "%";
- }
- });
- option = {
- 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",
- ],
- series: [
- {
- name: "Access From",
- type: "pie",
- radius: ["50%", "90%"],
- data: newdata,
- itemStyle: {
- borderColor: "rgba(255, 255, 255, 0.24)",
- borderWidth: 1,
- },
- top: 50,
- emphasis: {
- itemStyle: {
- shadowBlur: 10,
- shadowOffsetX: 0,
- shadowColor: "rgba(0, 0, 0, 0.5)",
- },
- },
- },
- ],
- xAxis: {
- show: false, //不显示坐标轴线、坐标轴刻度线和坐标轴上的文字
- axisTick: {
- show: false, //不显示坐标轴刻度线
- },
- axisLine: {
- show: false, //不显示坐标轴线
- },
- axisLabel: {
- show: false, //不显示坐标轴上的文字
- },
- },
- };
- option && myChart.setOption(option);
- }
- },
- // 鼠标进入
- gaolangbzt(index, id) {
- var compareChart = echarts.getInstanceByDom(document.getElementById(id));
- compareChart.dispatchAction({
- type: "highlight",
- seriesIndex: 0,
- dataIndex: index,
- });
- },
- // 鼠标移出
- closegaolangbzt(index, id) {
- var compareChart = echarts.getInstanceByDom(document.getElementById(id));
- compareChart.dispatchAction({
- type: "downplay",
- seriesIndex: 0,
- dataIndex: index,
- });
- },
- // 切换主题颜色
- handleChangeBgColor(index) {
- this.activeIndex = index;
- this.inityuan();
- },
- async handlePage(type) {
- if (type === "-") {
- if (this.activeArticleIndex !== 0) {
- if (!this.issueChnTanList[this.activeArticleIndex - 1].canRead) {
- this.$message.error("您没有阅读其他文章的相关权益");
- return;
- }
- this.activeArticleIndex--;
- let MethodName = "/PaperServer/Client/Issue/SaveLastReadArtInIss";
- let data = {
- iss_id: this.$route.query.iss_id,
- art_id: this.issueChnTanList[this.activeArticleIndex].id,
- };
- await getLogin(MethodName, data).then((res) => {});
- this.$router.replace({
- path: "/articleDetail",
- query: {
- headerConfig: this.$route.query.headerConfig
- ? this.$route.query.headerConfig
- : "",
- id: this.issueChnTanList[this.activeArticleIndex].id,
- iss_id: this.$route.query.iss_id,
- },
- });
- } else {
- return;
- }
- } else {
- if (this.activeArticleIndex !== this.issueChnTanList.length - 1) {
- if (!this.issueChnTanList[this.activeArticleIndex + 1].canRead) {
- this.$message.error("您没有阅读其他文章的相关权益");
- return;
- }
- this.activeArticleIndex++;
- let MethodName = "/PaperServer/Client/Issue/SaveLastReadArtInIss";
- let data = {
- iss_id: this.$route.query.iss_id,
- art_id: this.issueChnTanList[this.activeArticleIndex].id,
- };
- await getLogin(MethodName, data).then((res) => {});
- this.$router.replace({
- path: "/articleDetail",
- query: {
- headerConfig: this.$route.query.headerConfig
- ? this.$route.query.headerConfig
- : "",
- id: this.issueChnTanList[this.activeArticleIndex].id,
- iss_id: this.$route.query.iss_id,
- },
- });
- } else {
- return;
- }
- }
- location.reload();
- },
- // 跳转
- async handleLink(item, flag) {
- if (!flag) {
- return;
- }
- let MethodName = "/PaperServer/Client/Issue/SaveLastReadArtInIss";
- let data = {
- iss_id: this.$route.query.iss_id,
- art_id: item.id,
- };
- await getLogin(MethodName, data).then((res) => {});
- this.$router.replace({
- path: "/articleDetail",
- query: {
- headerConfig: this.$route.query.headerConfig
- ? this.$route.query.headerConfig
- : "",
- id: item.id,
- iss_id: this.$route.query.iss_id,
- },
- });
- location.reload();
- },
- getArticleDetail() {
- this.loading = true;
- let this_ = this;
- let MethodName = "/PaperServer/Client/Article/GetArticleDetail";
- let data = {
- id: this.articleId,
- };
- getLogin(MethodName, data)
- .then((res) => {
- this.loading = false;
- if (res.status === 1) {
- this.articleInfo = res.data;
- if (
- this.articleInfo &&
- this.articleInfo.art_corpus_data &&
- this.articleInfo.art_corpus_data.artStatInfo &&
- this.articleInfo.art_corpus_data.artStatInfo.vocabVlLevelItems
- ) {
- this.articleInfo.art_corpus_data.artStatInfo.vocabVlLevelItems.forEach(
- (item) => {
- item.value = item.vocabCount;
- item = Object.assign(item, this.vocabularyType[item.vlId]);
- }
- );
- if (this.articleInfo.art_voc_data) {
- this.articleInfo.art_voc_data.forEach((item) => {
- item.collect = false;
- });
- }
- }
- let articleArr =
- this.articleInfo.art_content.split('<p class="para"');
- articleArr.forEach((itema) => {
- if (itema.indexOf("<img") > -1) {
- // 当前段落有图片
- let imgArr = [];
- let pno =
- itema.indexOf('pno="') > -1
- ? itema.substring(
- itema.indexOf('pno="') + 5,
- itema
- .substring(itema.indexOf('pno="') + 5)
- .indexOf('"') +
- 1 +
- 5
- )
- : 0;
- let itemArr = itema.split("<img");
- itemArr.forEach((items) => {
- if (items.indexOf('src="') > -1) {
- let indexS =
- items.substring(items.indexOf('src="') + 5).indexOf('"') +
- items.indexOf('src="'); // src所在索引
- let indexW =
- items.indexOf('width="') > -1
- ? items
- .substring(items.indexOf('width="') + 7)
- .indexOf('"')
- : items.indexOf("width: ") > -1
- ? items
- .substring(items.indexOf("width: ") + 7)
- .indexOf(";")
- : -1; // width所在索引
- let indexH =
- items.indexOf('height="') > -1
- ? items
- .substring(items.indexOf('height="') + 8)
- .indexOf('"')
- : items.indexOf("height: ") > -1
- ? items
- .substring(items.indexOf("height: ") + 8)
- .indexOf(";")
- : -1; // height所在索引
- let imgobj = {
- src: items.substring(
- items.indexOf('src="') + 5,
- indexS + 5
- ),
- width:
- items.indexOf('width="') > -1
- ? items.substring(
- items.indexOf('width="') + 7,
- items.indexOf('width="') + indexW + 7
- )
- : items.indexOf("width: ") > -1
- ? items.substring(
- items.indexOf("width: ") + 7,
- items.indexOf("width: ") + indexW + 7
- )
- : null,
- };
- imgArr.push(imgobj);
- }
- });
- this.articleImg[pno] = imgArr;
- }
- });
- setTimeout(() => {
- this_.inityuan();
- }, 100);
- }
- })
- .catch(() => {
- this.loading = false;
- });
- getLogin(
- "/ShopServer/Client/CollectManager/GetMyCollectIntegrateInfo_Article",
- {
- article_id: this.articleId,
- }
- )
- .then((res) => {
- if (res.status === 1) {
- this.noRead = res.is_collect_article === "false";
- this.articleNumber = res.collect_person_count;
- this.likeWordList = [];
- res.word_list.forEach((item) => {
- this.likeWordList.push(item.word);
- });
- this.likePhraseList = [];
- res.phrase_list.forEach((item) => {
- this.likePhraseList.push(item.phrase);
- });
- this.likeSentencelist = [];
- res.sentence_list.forEach((item) => {
- this.likeSentencelist.push(item.sentence_id);
- });
- }
- })
- .catch(() => {
- this.loading = false;
- });
- getLogin(
- "/ShopServer/Client/ReadingRecordManager/GetReadingStatus_Article",
- {
- goods_type: 21,
- article_id: this.articleId,
- }
- )
- .then((res) => {
- if (res.status === 1) {
- this.support = res.reading_info.is_reading === "false";
- if (!this.support) {
- clearInterval(this_.timer);
- this_.timer = null;
- }
- }
- })
- .catch(() => {
- this.loading = false;
- });
- },
- handleReadArticle() {
- let this_ = this;
- clearInterval(this_.timer);
- this_.timer = null;
- let MethodName =
- "/ShopServer/Client/ReadingRecordManager/AddReadingRecord_Article";
- let data = {
- goods_type: 21,
- article_id: this.articleId,
- duration: this.readLength,
- };
- getLogin(MethodName, data)
- .then((res) => {
- if (res.status === 1) {
- this.support = false;
- }
- })
- .catch(() => {});
- },
- changeStatus(flag) {
- if (this[flag]) {
- let MethodName = "/ShopServer/Client/CollectManager/AddCollect_Article";
- let data = {
- article_id: this.articleId,
- };
- getLogin(MethodName, data)
- .then((res) => {
- if (res.status === 1) {
- this[flag] = !this[flag];
- this.articleNumber++;
- this.$message({
- message: "收藏成功",
- type: "success",
- });
- }
- })
- .catch(() => {});
- // let datas = {
- // 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,
- // audio_file_id: this.articleInfo.art_sound_srt_data?this.articleInfo.art_sound_srt_data.mp3:'',
- // audio_begin_time: this.articleInfo.art_sound_srt_data?this.articleInfo.art_sound_srt_data.sents[1].s:null,
- // audio_end_time: this.articleInfo.art_sound_srt_data?this.articleInfo.art_sound_srt_data.sents[1].e:null
- // }
- // getLogin('/ShopServer/Client/CollectManager/AddCollect_Sentence', datas)
- // .then((res) => {
- // if(res.status===1){
- // }
- // })
- // .catch(() => {
- // });
- } else {
- let MethodName =
- "/ShopServer/Client/CollectManager/CancelCollect_Article";
- getLogin(MethodName, {
- article_id: this.articleId,
- })
- .then((res) => {
- if (res.status === 1) {
- this[flag] = !this[flag];
- this.articleNumber--;
- this.$message({
- message: "取消收藏",
- type: "success",
- });
- }
- })
- .catch(() => {
- this.loading = false;
- });
- }
- },
- changeArticleType(type, e) {
- if (
- type === "print" ||
- type === "share" ||
- type === "list" ||
- type === "cloud" ||
- type === "chart"
- ) {
- if (type === "share" || type === "cloud" || type === "print") {
- if (this.userMessage) {
- if (type === "cloud") {
- this.ciyunEvent();
- } else if (type === "print") {
- let MethodName =
- "/ShopServer/Client/PrintRecordManager/GetMyPrintCount_Article";
- getLogin(MethodName, {
- goods_type: 21,
- date_range: "TODAY",
- article_id: this.articleId,
- }).then((res) => {
- if (res.status === 1) {
- if (res.print_count < 5) {
- this.printFlag = true;
- } else {
- this.$message.warning("今日打印次数已达上限");
- }
- }
- });
- } else {
- this.handleCreateShare();
- }
- this.menuFeature = type;
- } else {
- this.$message.error("请先登录");
- }
- } else {
- if (type === "chart") {
- this.articleInfoFlag = true;
- } else {
- this.articleInfoFlag = false;
- }
- this.menuFeature = type;
- }
- } else {
- this.menuType = type;
- if (type === "search") {
- setTimeout(() => {
- this.$refs.innerTextSearchs.changeShow();
- }, 100);
- } else if (type === "filtrate") {
- setTimeout(() => {
- this.$refs.lexicalType.changeShow();
- }, 100);
- }
- this.menuFeature = "";
- }
- },
- ciyunEvent() {
- // let MethodName = "/PaperServer/Client/Article/CalcArtWordCloud";
- // let data = {
- // type: 0,
- // id: this.articleId
- // }
- // getLogin(MethodName, data)
- // .then((res) => {
- this.ciyunShow = true;
- // window.localStorage.setItem('ciyunData', JSON.stringify(res.data))
- // window.open(
- // "./ciyun/ciyunindex.html?partitionKey=1&searchType=2&articleId=" +
- // this.articleId,
- // "_blank"
- // );
- // })
- // .catch(() => {
- // });
- },
- handleCloseShare() {
- this.menuFeature = "";
- },
- CopyToClipboard(element) {
- var doc = document,
- text = doc.getElementById(element),
- range,
- selection;
- if (doc.body.createTextRange) {
- range = doc.body.createTextRange();
- range.moveToElementText(text);
- range.select();
- } else if (window.getSelection) {
- selection = window.getSelection();
- range = doc.createRange();
- range.selectNodeContents(text);
- selection.removeAllRanges();
- selection.addRange(range);
- }
- document.execCommand("copy");
- this.$message({
- message: "复制成功",
- type: "success",
- });
- window.getSelection().removeAllRanges();
- },
- downLoadImg(base64URL) {
- const a = document.createElement("a");
- a.download = "分享图片";
- const mimeType = base64URL.match(/:(.*?);/)[1];
- const byteCharacters = atob(base64URL.split(",")[1]);
- const byteNumbers = new Array(byteCharacters.length);
- for (let i = 0; i < byteCharacters.length; i++) {
- byteNumbers[i] = byteCharacters.charCodeAt(i);
- }
- const byteArray = new Uint8Array(byteNumbers);
- const blob = new Blob([byteArray], { type: mimeType });
- a.href = URL.createObjectURL(blob);
- document.body.appendChild(a);
- a.click();
- document.body.removeChild(a);
- },
- // 创建分享
- handleCreateShare() {
- this.shareLoading = true;
- let MethodName = "/ShopServer/Client/ShareManager/CreateShareRecord";
- let data = {
- goods_type: 21,
- goods_id: this.articleId,
- };
- getLogin(MethodName, data)
- .then((res) => {
- this.shareLoading = false;
- if (res.status === 1) {
- this.share_url = res.share_url;
- this.shareSrc =
- "data:image/jpeg;base64," + res.image_content_base64;
- }
- })
- .catch(() => {
- this.shareLoading = false;
- });
- },
- changeLike(type, list) {
- this[type] = list;
- if (type === "likePhraseList") {
- this.$refs.phraseList.handleData();
- } else if (type === "likeWordList") {
- this.$refs.newWordList.handleData();
- }
- },
- // 报刊信息
- getIssueDetail() {
- this.issueChnTanList = [];
- this.issueChnList = [];
- let articleindex = 0;
- let MethodName = "/PaperServer/Client/Issue/GetIssueBriefInfo";
- let data = {
- id: this.$route.query.iss_id,
- };
- getLogin(MethodName, data)
- .then((res) => {
- if (res.status === 1) {
- let issueChnList = res.data.chn_art_data;
- if (this.userMessage) {
- getLogin("/ShopServer/Client/BookshelfQuery/GetGoodsBuyStatus", {
- goods_type: 2,
- goods_id: this.$route.query.iss_id,
- })
- .then((res) => {
- if (res.status === 1) {
- let isBuy = res.buy_info.is_buy === "true";
- issueChnList.forEach((item, index) => {
- item.canRead = isBuy || index === 0;
- item.arts.forEach((items) => {
- if (items.id === this.$route.query.id) {
- this.activeArticleIndex = articleindex;
- item.active = true;
- items.active = true;
- }
- this.issueChnTanList.push({
- id: items.id,
- canRead: isBuy || index === 0,
- });
- if (isBuy || index === 0) {
- items.canRead = true;
- } else {
- items.canRead = false;
- }
- articleindex++;
- });
- });
- this.issueChnList = issueChnList;
- }
- })
- .catch(() => {});
- } else {
- let isBuy = false;
- issueChnList.forEach((item, index) => {
- item.canRead = isBuy || index === 0;
- item.arts.forEach((items) => {
- if (items.id === this.$route.query.id) {
- this.activeArticleIndex = articleindex;
- item.active = true;
- items.active = true;
- }
- this.issueChnTanList.push({
- id: items.id,
- canRead: isBuy || index === 0,
- });
- if (isBuy || index === 0) {
- items.canRead = true;
- } else {
- items.canRead = false;
- }
- articleindex++;
- });
- });
- this.issueChnList = issueChnList;
- }
- }
- })
- .catch(() => {});
- },
- closeArticleInfo() {
- this.articleInfoFlag = false;
- },
- closePrint() {
- this.printFlag = false;
- },
- },
- created() {
- if (this.config) {
- let arr = this.config.split("&&&");
- this.LoginNavIndex = arr[0] * 1;
- this.userBg = arr[1] ? arr[1] : "rgba(0, 0, 0, 0.24)";
- this.headerBorder = arr[2] ? arr[2] : "#5C5C5C";
- this.headerBg = arr[3] ? arr[3] : "#00ADEF";
- this.previousPage = arr[4] ? arr[4] : "商城";
- }
- if (this.articleId) {
- this.getArticleDetail();
- }
- if (this.$route.query.iss_id) {
- this.getIssueDetail();
- }
- },
- mounted() {
- let this_ = this;
- this_.timer = null;
- this_.readLength = 0;
- this_.timer = setInterval(() => {
- this_.readLength++;
- }, 1000);
- },
- };
- </script>
- <style lang="scss" scoped>
- .bookStore {
- min-height: calc(100vh - 64px);
- .navBar-right {
- display: flex;
- align-items: center;
- }
- .article-color {
- display: flex;
- width: 132px;
- height: 32px;
- justify-content: space-between;
- align-items: center;
- border: 1px solid #e5e6eb;
- border-radius: 40px;
- margin-left: 12px;
- padding: 4px;
- .color-item {
- padding: 2px;
- border: 2px solid transparent;
- border-radius: 50%;
- a {
- width: 16px;
- height: 16px;
- border-radius: 50%;
- display: block;
- border: 1px solid transparent;
- padding: 0;
- }
- }
- }
- .article-box {
- position: relative;
- padding: 80px 0;
- .artricle-inner {
- width: 1000px;
- margin: 0 auto;
- border-radius: 8px;
- }
- .mene-right {
- position: fixed;
- right: calc((100% - 1000px) / 2 - 172px);
- top: 144px;
- width: 152px;
- max-height: 80%;
- overflow: auto;
- background: #ffffff;
- border: 1px solid #e5e6eb;
- border-radius: 8px;
- padding: 4px;
- z-index: 99;
- }
- }
- .atricle-data {
- padding: 120px 100px 40px 100px;
- }
- .glossary-box {
- // border-top: 1px solid #F2F3F5;
- padding: 40px;
- .title {
- display: flex;
- justify-content: space-between;
- h2 {
- margin: 0;
- font-weight: 400;
- font-size: 24px;
- line-height: 32px;
- }
- a {
- font-weight: 400;
- font-size: 16px;
- line-height: 24px;
- }
- }
- h4 {
- margin: 24px 0 8px 0;
- font-weight: 400;
- font-size: 12px;
- line-height: 20px;
- }
- }
- .newWord-list {
- padding: 2px 4px;
- }
- .word-info {
- display: flex;
- justify-content: space-between;
- > div {
- width: 178px;
- height: 64px;
- border-radius: 4px;
- padding: 8px 12px;
- label {
- display: block;
- font-weight: 400;
- font-size: 12px;
- line-height: 20px;
- margin-bottom: 4px;
- }
- span {
- font-weight: 400;
- font-size: 16px;
- line-height: 24px;
- }
- }
- }
- .echarts-box {
- display: flex;
- .echarts-type {
- width: 232px;
- flex-shrink: 0;
- li {
- height: 38px;
- border-radius: 4px;
- margin-bottom: 8px;
- font-size: 14px;
- line-height: 20px;
- display: flex;
- padding: 8px 12px;
- cursor: pointer;
- border: 1px solid transparent;
- .name {
- flex: 1;
- }
- .number {
- width: 40px;
- text-align: right;
- }
- .percent {
- width: 80px;
- text-align: right;
- }
- }
- }
- #shanxing_main {
- flex: 1;
- }
- }
- }
- .article-btn {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 16px;
- background: #f7f8fa;
- .right {
- width: 150px;
- margin-right: -8px;
- text-align: right;
- }
- .support {
- padding: 8px 16px;
- border-radius: 20px;
- background: #e5e6eb;
- margin-right: 8px;
- color: rgba(0, 0, 0, 0.88);
- font-size: 16px;
- font-weight: 400;
- line-height: 24px;
- cursor: pointer;
- .svg-icon {
- margin-right: 8px;
- color: rgba(23, 93, 255, 1);
- }
- &.active {
- background: rgba(48, 110, 255, 1);
- color: #fff;
- .svg-icon {
- color: #fff;
- }
- }
- }
- .colloct-article {
- .svg-icon {
- color: rgba(242, 85, 90, 1);
- }
- &.active {
- background: rgba(242, 85, 90, 1);
- }
- }
- .oppose {
- padding: 12px;
- border-radius: 20px;
- background: #e5e6eb;
- height: 40px;
- font-size: 16px;
- line-height: 16px;
- display: inline-block;
- cursor: pointer;
- .svg-icon {
- width: 16px;
- height: 16px;
- }
- &.active {
- background: rgba(48, 110, 255, 1);
- .svg-icon {
- color: #fff;
- }
- }
- }
- .btn-left,
- .btn-right {
- color: #3459d2;
- font-size: 16px;
- line-height: 24px;
- padding: 0;
- .svg-icon {
- margin-right: 12px;
- }
- &.not-allow {
- color: #5e89ef;
- cursor: not-allowed;
- }
- }
- .btn-right {
- .svg-icon {
- margin-right: 0;
- margin-left: 12px;
- }
- }
- .readed {
- background: rgba(231, 238, 255, 1);
- color: rgba(23, 93, 255, 1);
- cursor: initial;
- }
- }
- .share-box,
- .catalog-box {
- padding: 24px;
- width: 428px;
- height: 90%;
- overflow: auto;
- max-height: 712px;
- position: fixed;
- top: 40%;
- left: 50%;
- z-index: 10;
- font-size: 0;
- margin-top: -270px;
- margin-left: -214px;
- border-radius: 8px;
- border: 1px solid #d0d3d9;
- background: #fff;
- 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);
- &-top {
- display: flex;
- justify-content: space-between;
- align-items: center;
- h5 {
- color: #000;
- font-size: 24px;
- font-weight: 400;
- line-height: 32px;
- margin: 0;
- }
- .el-icon-close {
- color: rgba(47, 55, 66, 1);
- cursor: pointer;
- font-size: 16px;
- }
- }
- img {
- width: 380px;
- height: 738px;
- border-radius: 16px;
- margin: 24px 0;
- }
- #copyDownUrl {
- width: 0;
- height: 0;
- opacity: 0;
- display: block;
- }
- &-bottom {
- .el-button {
- width: 174px;
- height: 48px;
- color: #fff;
- font-size: 16px;
- font-weight: 400;
- line-height: 24px;
- border-radius: 8px;
- &.is-plain {
- color: rgba(23, 93, 255, 1);
- border-color: rgba(23, 93, 255, 1);
- &:hover {
- background: rgba(231, 238, 255, 1);
- }
- &:focus {
- color: rgba(23, 93, 255, 1);
- border-color: rgba(23, 93, 255, 1);
- background: rgba(231, 238, 255, 1);
- }
- }
- }
- }
- }
- .catalog-box {
- right: calc((100% - 1000px) / 2);
- left: auto;
- margin-left: auto;
- .treeList {
- .parent-node {
- display: flex;
- align-items: center;
- margin-bottom: 16px;
- .number {
- width: 26px;
- font-weight: 500;
- font-size: 16px;
- line-height: 24px;
- color: #2f3742;
- }
- .title {
- font-weight: 500;
- font-size: 16px;
- line-height: 24px;
- color: #2f3742;
- word-break: break-word;
- }
- }
- ul {
- margin-bottom: 16px;
- .children {
- padding: 0 32px;
- border-radius: 4px;
- height: 40px;
- display: flex;
- align-items: center;
- margin-bottom: 4px;
- &-buy {
- .number,
- .title {
- color: #2f3742;
- }
- }
- &-no {
- .number,
- .title {
- color: #929ca8;
- }
- }
- &-buy:hover {
- background: #e5e6eb;
- cursor: pointer;
- }
- &-node {
- display: flex;
- width: 100%;
- }
- .number {
- width: 24px;
- }
- .title {
- flex: 1;
- word-break: break-word;
- }
- .number,
- .title {
- font-weight: 400;
- font-size: 16px;
- line-height: 24px;
- }
- .el-icon-lock {
- height: 16px;
- color: #929ca8;
- }
- }
- }
- }
- }
- </style>
- <style lang="scss">
- .article-fontsize {
- width: 144px;
- height: 32px;
- line-height: 30px;
- border: 1px solid #e5e6eb;
- border-radius: 40px;
- overflow: hidden;
- .el-input {
- height: 30px;
- }
- .el-input-number__decrease,
- .el-input-number__increase {
- height: 30px;
- border: none;
- background: transparent;
- color: #d9e2fc;
- }
- .el-input-number__decrease {
- border-right: 1px solid #1b5441;
- }
- .el-input-number__increase {
- border-left: 1px solid #1b5441;
- }
- .el-input__inner {
- height: 30px;
- border: none;
- line-height: 30px;
- background: transparent;
- color: #d9e2fc;
- }
- }
- .navBar {
- border-color: transparent;
- &-white {
- border-color: #ebebeb;
- .el-input-number__decrease,
- .el-input-number__increase,
- .el-input__inner {
- color: #fff;
- }
- .el-input-number__decrease {
- border-right: 1px solid #e5e6eb;
- }
- .el-input-number__increase {
- border-left: 1px solid #e5e6eb;
- }
- .goback {
- color: #fff;
- }
- .border {
- background: #e5e6eb;
- height: 16px;
- margin-top: 2px;
- }
- .article-title {
- color: #fff;
- }
- }
- &-darkGreen {
- .el-input-number__decrease {
- border-right: 1px solid #1b5441;
- }
- .el-input-number__increase {
- border-left: 1px solid #1b5441;
- }
- .goback {
- color: #e9f7f2;
- }
- .border {
- background: #1b5441;
- height: 16px;
- margin-top: 2px;
- }
- .article-title {
- color: #ccebe1;
- }
- }
- &-darkBlue {
- .el-input-number__decrease {
- border-right: 1px solid #1c2129;
- }
- .el-input-number__increase {
- border-left: 1px solid #1c2129;
- }
- .goback {
- color: #e9f7f2;
- }
- .border {
- background: #667180;
- height: 16px;
- margin-top: 2px;
- }
- .article-title {
- color: #d9e2fc;
- }
- }
- &-armyGreen {
- .el-input-number__decrease {
- border-right: 1px solid #2a2f2c;
- }
- .el-input-number__increase {
- border-left: 1px solid #2a2f2c;
- }
- .goback {
- color: #e9f7f2;
- }
- .border {
- background: #99a29e;
- height: 16px;
- margin-top: 2px;
- }
- .article-title {
- color: #d9e2fc;
- }
- }
- }
- .articleDetail-dialog {
- .el-dialog__header,
- .el-dialog__body {
- padding: 0;
- }
- }
- .ciyun-dialog {
- .el-dialog__title {
- color: #2f3742;
- font-size: 24px;
- font-weight: 600;
- line-height: 32px;
- }
- iframe {
- border: none;
- }
- .el-dialog__body {
- padding: 0;
- }
- }
- .NNPE-ArticleView {
- figure {
- font-size: 0;
- img {
- max-width: 100%;
- }
- }
- }
- </style>
|