PrintModel.vue 72 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294
  1. <template>
  2. <div class="print-model">
  3. <div class="print-model-top">
  4. <a class="goback" @click="goBack"
  5. ><i class="el-icon-arrow-left"></i>回到文章</a
  6. >
  7. <div class="border"></div>
  8. <p class="article-title">打印预览</p>
  9. </div>
  10. <div class="print-model-bottom">
  11. <div
  12. class="print-model-bottom-left"
  13. ref="printArea"
  14. id="showWaterMark"
  15. :style="{ width: isPrint ? '220mm' : '' }"
  16. >
  17. <div class="print-inner">
  18. <h2>
  19. <span
  20. :style="{
  21. color: colorObj.titleColor,
  22. fontSize: titleFontsize + 'px',
  23. lineHeight: titleFontsize + 8 + 'px',
  24. marginRight: '10px',
  25. fontWeight: '700',
  26. cursor: 'pointer',
  27. wordBreak: 'break-word',
  28. }"
  29. >{{ articleInfo.art_title }}</span
  30. >
  31. </h2>
  32. <h6
  33. class="nnpe-article-author"
  34. :style="{
  35. color: colorObj.sourceColor,
  36. fontSize: wordFontsize - 4 + 'px',
  37. lineHeight: wordFontsize + 4 + 'px',
  38. fontWeight: '400',
  39. }"
  40. >
  41. {{
  42. articleInfo.art_author +
  43. " · " +
  44. articleInfo.study_phase_name +
  45. "版 · 第 " +
  46. articleInfo.iss_no +
  47. " 期 · " +
  48. articleInfo.release_date +
  49. " · " +
  50. articleInfo.chn_item +
  51. (articleInfo.page_no_in_pub
  52. ? " · P" + articleInfo.page_no_in_pub
  53. : "")
  54. }}
  55. {{ printForm.info.length > 0 ? " | " : "" }}
  56. {{
  57. printForm.info.indexOf("wordLength") > -1
  58. ? " 长度 " + articleInfo.art_corpus_data.artStatInfo.wc
  59. : ""
  60. }}
  61. {{
  62. printForm.info.indexOf("wordNumber") > -1
  63. ? " · 词数 " + articleInfo.art_corpus_data.artStatInfo.wdc
  64. : ""
  65. }}
  66. {{
  67. printForm.info.indexOf("difficulty") > -1
  68. ? " · 难度 " +
  69. articleInfo.art_corpus_data.artStatInfo.vocabHardLevel
  70. : ""
  71. }}
  72. </h6>
  73. <template v-if="resArr.length > 0 && articleInfo.en_flag">
  74. <div class="table-box">
  75. <div
  76. :class="['NNPE-detail']"
  77. v-for="(item, index) in resArr"
  78. :key="'detail' + index"
  79. >
  80. <div class="wordsList-box">
  81. <template v-if="index !== 0">
  82. <div class="nnpe-sentence-box">
  83. <div
  84. v-for="(pItem, pIndex) in item.wordsList"
  85. :key="'wordsList' + pIndex"
  86. class="word-box"
  87. :class="[
  88. pItem.isExplain || pItem.explainNumber
  89. ? 'hasExplain'
  90. : '',
  91. ]"
  92. >
  93. <template v-if="pItem.isShow">
  94. <template v-if="pItem.tokens[2] === '#@@#'">
  95. <span
  96. class="NNPE-chs"
  97. :style="{
  98. width: printForm.fontSize + 'px',
  99. height:
  100. printForm.fontSize * printForm.lineHeight +
  101. 'px',
  102. display: 'block',
  103. fontFamily: printForm.fontFamily,
  104. }"
  105. ></span>
  106. </template>
  107. <template v-else>
  108. <div :class="['NNPE-words']">
  109. <span
  110. class="NNPE-chs"
  111. :class="[
  112. pItem.tokens[9] === '' ? 'marginRight' : '',
  113. (pItem.highIndex &&
  114. printForm.bold.indexOf(pItem.types) > -1) ||
  115. (printForm.bold.indexOf('sentence') > -1 &&
  116. longSentIds.indexOf(pItem.sent_id) > -1)
  117. ? 'fontWeight'
  118. : '',
  119. pItem.marginRigh ? 'marginSingleRight' : '',
  120. ]"
  121. :style="{
  122. fontSize: printForm.fontSize + 'px',
  123. color: printForm.color,
  124. lineHeight: printForm.lineHeight,
  125. fontFamily: printForm.fontFamily,
  126. }"
  127. >{{ pItem.tokens[2] }}</span
  128. >
  129. <span
  130. class="NNPE-chs NNPE-chs-both"
  131. v-if="
  132. item.wordsList[pIndex + 1] &&
  133. item.wordsList[pIndex + 1].tokens[2] &&
  134. enFhList.indexOf(
  135. item.wordsList[pIndex + 1].tokens[2]
  136. ) > -1
  137. "
  138. :class="[
  139. item.wordsList[pIndex + 1].tokens[8] === ''
  140. ? 'marginLeft'
  141. : '',
  142. (item.wordsList[pIndex + 1].highIndex &&
  143. printForm.bold.indexOf(
  144. item.wordsList[pIndex + 1].types
  145. ) > -1) ||
  146. (printForm.bold.indexOf('sentence') > -1 &&
  147. longSentIds.indexOf(
  148. item.wordsList[pIndex + 1].sent_id
  149. ) > -1)
  150. ? 'fontWeight'
  151. : '',
  152. item.wordsList[pIndex + 1].marginRight
  153. ? 'marginSingleRight'
  154. : '',
  155. ]"
  156. :style="{
  157. fontSize: printForm.fontSize + 'px',
  158. color: printForm.color,
  159. lineHeight: printForm.lineHeight,
  160. fontFamily: printForm.fontFamily,
  161. }"
  162. >{{
  163. item.wordsList[pIndex + 1].tokens[2]
  164. }}</span
  165. >
  166. </div>
  167. </template>
  168. </template>
  169. </div>
  170. </div>
  171. </template>
  172. </div>
  173. <template
  174. v-if="
  175. articleImg &&
  176. articleImg[index] &&
  177. printForm.range.indexOf('image') > -1
  178. "
  179. >
  180. <figure
  181. v-for="(itemI, indexI) in articleImg[index]"
  182. :key="indexI"
  183. style="text-align: center"
  184. >
  185. <img
  186. @load="handleImageLoad($event, itemI)"
  187. :style="{
  188. width: itemI.width,
  189. height: itemI.height,
  190. }"
  191. :src="itemI.newSrc ? itemI.newSrc : itemI.src"
  192. />
  193. <!-- <el-image
  194. :src="itemI.src"
  195. fit="contain"
  196. :style="{
  197. width: itemI.width,
  198. height: itemI.height,
  199. }"
  200. :preview-src-list="[itemI.src]"
  201. @load="handleImageLoad($event, itemI)"
  202. ></el-image> -->
  203. </figure>
  204. </template>
  205. </div>
  206. </div>
  207. </template>
  208. <div
  209. v-else
  210. class="cn-content"
  211. v-html="articleInfo.art_content"
  212. :style="{
  213. color: printForm.color,
  214. fontSize: printForm.fontSize + 'px',
  215. lineHeight: printForm.lineHeight,
  216. }"
  217. ></div>
  218. <template v-if="printForm.range.indexOf('vocab') > -1">
  219. <h5>词表</h5>
  220. <ul class="newwordlist">
  221. <li
  222. v-for="(itemW, indexW) in wordLit"
  223. :key="indexW"
  224. :class="['li-' + colorObj.type]"
  225. >
  226. <div class="word-info">
  227. <div class="word-info-top">
  228. <b class="word" :style="{ color: colorObj.newWordColor }">{{
  229. itemW.word
  230. }}</b>
  231. <span
  232. class="symbol"
  233. :style="{ color: colorObj.newWordOtherColor }"
  234. >{{ itemW.symbol }}</span
  235. >
  236. <label
  237. class="word-type"
  238. :style="{
  239. color: colorObj.newWordType[itemW.type]
  240. ? colorObj.newWordType[itemW.type].color
  241. : '',
  242. background: colorObj.newWordType[itemW.type]
  243. ? colorObj.newWordType[itemW.type].bg
  244. : '',
  245. }"
  246. >{{ itemW.typeCn }}</label
  247. >
  248. <span class="star" v-if="itemW.rate">
  249. <svg-icon
  250. icon-class="star-filled"
  251. v-for="(itemS, indexS) in itemW.rate"
  252. :key="indexS"
  253. :style="{ color: colorObj.newWordStar }"
  254. ></svg-icon>
  255. </span>
  256. <div class="para-list">
  257. <div
  258. class="para"
  259. v-for="(itemP, indexP) in itemW.paraList"
  260. :key="indexP"
  261. >
  262. <span
  263. class="cixing"
  264. :style="{ color: colorObj.newWordOtherColor }"
  265. >{{ itemP.cixing }}</span
  266. >
  267. <span
  268. class="shiyi"
  269. :style="{ color: colorObj.newWordOtherColor }"
  270. >{{ itemP.para }}</span
  271. >
  272. </div>
  273. </div>
  274. </div>
  275. </div>
  276. </li>
  277. </ul>
  278. <h5
  279. v-if="
  280. articleInfo.art_phrase_data &&
  281. articleInfo.art_phrase_data.length > 0
  282. "
  283. >
  284. 短语
  285. </h5>
  286. <ul
  287. class="phraselist"
  288. v-if="
  289. articleInfo.art_phrase_data &&
  290. articleInfo.art_phrase_data.length > 0
  291. "
  292. >
  293. <li v-for="(itemW, indexW) in phraseList" :key="indexW">
  294. <div class="word-info">
  295. <div class="word-info-top">
  296. <b
  297. class="phrase"
  298. :style="{ color: colorObj.phraseColor }"
  299. @click="showItem(itemW, indexW)"
  300. >{{ itemW.exp_title }}</b
  301. >
  302. <div class="para-list">
  303. <div class="para">
  304. <span
  305. class="shiyi"
  306. :style="{ color: colorObj.phraseOhterColor }"
  307. >{{ itemW.exp_content }}</span
  308. >
  309. </div>
  310. </div>
  311. </div>
  312. </div>
  313. </li>
  314. </ul>
  315. <h5
  316. v-if="
  317. articleInfo.art_explain_data &&
  318. articleInfo.art_explain_data.length > 0
  319. "
  320. >
  321. 注释
  322. </h5>
  323. <ul
  324. class="explainlist"
  325. v-if="
  326. articleInfo.art_explain_data &&
  327. articleInfo.art_explain_data.length > 0
  328. "
  329. >
  330. <li
  331. v-for="(itemW, indexW) in articleInfo.art_explain_data"
  332. :key="indexW"
  333. >
  334. <b
  335. class="prefix"
  336. :style="{ color: colorObj.phraseOhterColor }"
  337. >{{ itemW.exp_title }}</b
  338. >
  339. <div
  340. class="para-list"
  341. :style="{ color: colorObj.newWordOtherColor }"
  342. v-html="itemW.exp_content"
  343. ></div>
  344. </li>
  345. </ul>
  346. </template>
  347. <template v-if="printForm.range.indexOf('ciyun') > -1">
  348. <iframe
  349. class="ciyun-box"
  350. width="100%"
  351. height="720px"
  352. border="none"
  353. :src="
  354. './ciyun/ciyunPrint.html?partitionKey=1&searchType=2&articleId=' +
  355. articleId
  356. "
  357. ></iframe>
  358. </template>
  359. <template v-if="printForm.range.indexOf('notes') > -1">
  360. <h5 v-if="notesList.length > 0">笔记</h5>
  361. <ul class="explainlist">
  362. <li v-for="(itemW, indexW) in notesList" :key="indexW">
  363. <b
  364. class="prefix"
  365. :style="{ color: colorObj.phraseOhterColor }"
  366. >{{ itemW.select_text }}</b
  367. >
  368. <div
  369. class="para-list"
  370. :style="{ color: colorObj.newWordOtherColor }"
  371. v-html="itemW.note"
  372. ></div>
  373. </li>
  374. </ul>
  375. </template>
  376. </div>
  377. <footer class="print-footer">
  378. <span>{{ printForm.school }}</span>
  379. <span>{{ printForm.className }}</span>
  380. <span>{{ printForm.name }}</span>
  381. <span style="flex: 1"></span>
  382. <span>{{ printForm.dateStr }}</span>
  383. <span>{{ printForm.momo }}</span>
  384. </footer>
  385. </div>
  386. <div class="print-model-bottom-right">
  387. <h3><svg-icon icon-class="print"></svg-icon>打印设置</h3>
  388. <div class="config-box">
  389. <div class="item-page">
  390. <label>字体:</label>
  391. <el-select v-model="printForm.fontFamily" placeholder="请选择">
  392. <el-option
  393. v-for="item in fontList"
  394. :key="item.value"
  395. :label="item.name"
  396. :value="item.value"
  397. >
  398. </el-option>
  399. </el-select>
  400. </div>
  401. <div class="item-page">
  402. <label>字号:</label>
  403. <el-input-number
  404. v-model="printForm.fontSize"
  405. :step="2"
  406. ></el-input-number>
  407. </div>
  408. <div class="item-page">
  409. <label>颜色:</label>
  410. <el-color-picker
  411. v-model="printForm.color"
  412. size="small"
  413. ></el-color-picker>
  414. </div>
  415. <el-divider class="print-divider"></el-divider>
  416. <div class="item-page">
  417. <label>行距:</label>
  418. <el-select v-model="printForm.lineHeight" placeholder="请选择">
  419. <el-option
  420. v-for="item in lineHeightList"
  421. :key="item.value"
  422. :label="item.name"
  423. :value="item.value"
  424. >
  425. </el-option>
  426. </el-select>
  427. </div>
  428. <el-divider class="print-divider"></el-divider>
  429. <div class="item-page">
  430. <label>打印范围:</label>
  431. <el-checkbox-group v-model="printForm.range">
  432. <el-checkbox
  433. v-for="(itemT, indexT) in rangeList"
  434. :key="indexT"
  435. :label="itemT.value"
  436. >{{ itemT.name }}</el-checkbox
  437. >
  438. </el-checkbox-group>
  439. </div>
  440. <div class="item-page" v-if="articleInfo.en_flag">
  441. <label>加粗显示:</label>
  442. <el-checkbox-group v-model="printForm.bold">
  443. <el-checkbox
  444. v-for="(itemT, indexT) in boldList"
  445. :key="indexT"
  446. :label="itemT.value"
  447. >{{ itemT.name }}</el-checkbox
  448. >
  449. </el-checkbox-group>
  450. </div>
  451. <el-divider class="print-divider"></el-divider>
  452. <div class="item-page">
  453. <label>附加信息:</label>
  454. <b @click="handleClear"
  455. ><svg-icon icon-class="clear"></svg-icon>清除</b
  456. >
  457. </div>
  458. <div class="item-page">
  459. <label>姓名:</label>
  460. <el-input
  461. v-model="printForm.name"
  462. autocomplete="off"
  463. placeholder="请输入"
  464. maxlength="20"
  465. >
  466. </el-input>
  467. </div>
  468. <div class="item-page">
  469. <label>学校:</label>
  470. <el-input
  471. v-model="printForm.school"
  472. autocomplete="off"
  473. placeholder="请输入"
  474. maxlength="20"
  475. >
  476. </el-input>
  477. </div>
  478. <div class="item-page">
  479. <label>班级:</label>
  480. <el-input
  481. v-model="printForm.className"
  482. autocomplete="off"
  483. placeholder="请输入"
  484. maxlength="20"
  485. >
  486. </el-input>
  487. </div>
  488. <div class="item-page">
  489. <label>日期:</label>
  490. <el-input
  491. v-model="printForm.dateStr"
  492. autocomplete="off"
  493. placeholder="请输入"
  494. maxlength="20"
  495. >
  496. </el-input>
  497. </div>
  498. <div class="item-page">
  499. <label>备注:</label>
  500. <el-input
  501. v-model="printForm.momo"
  502. autocomplete="off"
  503. placeholder="请输入"
  504. maxlength="20"
  505. >
  506. </el-input>
  507. </div>
  508. <el-divider class="print-divider"></el-divider>
  509. <div class="item-page">
  510. <label>统计信息:</label>
  511. <el-checkbox-group v-model="printForm.info">
  512. <el-checkbox
  513. v-for="(itemT, indexT) in infoList"
  514. :key="indexT"
  515. :label="itemT.value"
  516. >{{ itemT.name }}</el-checkbox
  517. >
  518. </el-checkbox-group>
  519. </div>
  520. <el-divider class="print-divider"></el-divider>
  521. </div>
  522. <p style="color: red; width: 100%; margin: 10px 0; text-align: center">
  523. 若点击打印按钮无法显示,下一个页面点击更多设置,勾选背景图形
  524. </p>
  525. <div class="item-page" style="padding: 0 24px">
  526. <el-button @click="goBack" size="small">取消</el-button>
  527. <el-button
  528. type="primary"
  529. @click="generatePDF(articleInfo.art_title)"
  530. size="small"
  531. >下载</el-button
  532. >
  533. <el-button type="primary" @click="handlePrint" size="small"
  534. >打印</el-button
  535. >
  536. <el-button type="primary" @click="handleManyPrint" size="small"
  537. >打印多篇</el-button
  538. >
  539. </div>
  540. </div>
  541. </div>
  542. <el-dialog
  543. :visible.sync="printManyFlag"
  544. width="500px"
  545. append-to-body
  546. :show-close="true"
  547. title="选择打印的文章"
  548. :close-on-click-modal="false"
  549. >
  550. <el-form ref="form">
  551. <el-form-item prop="name">
  552. <el-cascader
  553. v-model="printManyId"
  554. :props="{ multiple: true }"
  555. collapse-tags
  556. :options="printManyMenu"
  557. style="width: 470px"
  558. />
  559. </el-form-item>
  560. <el-form-item style="text-align: right">
  561. <el-button @click="printManyFlag = false">取 消</el-button>
  562. <el-button :loading="loading" type="primary" @click="submitPrintMore"
  563. >确 定</el-button
  564. ></el-form-item
  565. >
  566. </el-form>
  567. </el-dialog>
  568. <div
  569. class="print-model-bottom-left"
  570. ref="printAreaManys"
  571. id="showWaterMarks"
  572. v-if="isPrintMore"
  573. :style="{
  574. width: '220mm',
  575. }"
  576. >
  577. <div
  578. class="print-inner"
  579. v-for="(itemA, index) in printManyDetails"
  580. :key="index"
  581. >
  582. <h2>
  583. <span
  584. :style="{
  585. color: colorObj.titleColor,
  586. fontSize: titleFontsize + 'px',
  587. lineHeight: titleFontsize + 8 + 'px',
  588. marginRight: '10px',
  589. fontWeight: '700',
  590. cursor: 'pointer',
  591. wordBreak: 'break-word',
  592. }"
  593. >{{ itemA.art_title }}</span
  594. >
  595. </h2>
  596. <h6
  597. class="nnpe-article-author"
  598. :style="{
  599. color: colorObj.sourceColor,
  600. fontSize: wordFontsize - 4 + 'px',
  601. lineHeight: wordFontsize + 4 + 'px',
  602. fontWeight: '400',
  603. }"
  604. >
  605. {{
  606. itemA.art_author +
  607. " · " +
  608. itemA.study_phase_name +
  609. "版 · 第 " +
  610. itemA.iss_no +
  611. " 期 · " +
  612. itemA.release_date +
  613. " · " +
  614. itemA.chn_item +
  615. (itemA.page_no_in_pub ? " · P" + itemA.page_no_in_pub : "")
  616. }}
  617. {{ printForm.info.length > 0 ? " | " : "" }}
  618. {{
  619. printForm.info.indexOf("wordLength") > -1
  620. ? " 长度 " + itemA.art_corpus_data.artStatInfo.wc
  621. : ""
  622. }}
  623. {{
  624. printForm.info.indexOf("wordNumber") > -1
  625. ? " · 词数 " + itemA.art_corpus_data.artStatInfo.wdc
  626. : ""
  627. }}
  628. {{
  629. printForm.info.indexOf("difficulty") > -1
  630. ? " · 难度 " + itemA.art_corpus_data.artStatInfo.vocabHardLevel
  631. : ""
  632. }}
  633. </h6>
  634. <template v-if="itemA.resArr.length > 0 && itemA.en_flag">
  635. <div class="table-box">
  636. <div
  637. :class="['NNPE-detail']"
  638. v-for="(item, index) in itemA.resArr"
  639. :key="'detail' + index"
  640. >
  641. <div class="wordsList-box">
  642. <template v-if="index !== 0">
  643. <div class="nnpe-sentence-box">
  644. <div
  645. v-for="(pItem, pIndex) in item.wordsList"
  646. :key="'wordsList' + pIndex"
  647. class="word-box"
  648. :class="[
  649. pItem.isExplain || pItem.explainNumber
  650. ? 'hasExplain'
  651. : '',
  652. ]"
  653. >
  654. <template v-if="pItem.isShow">
  655. <template v-if="pItem.tokens[2] === '#@@#'">
  656. <span
  657. class="NNPE-chs"
  658. :style="{
  659. width: printForm.fontSize + 'px',
  660. height:
  661. printForm.fontSize * printForm.lineHeight +
  662. 'px',
  663. display: 'block',
  664. fontFamily: printForm.fontFamily,
  665. }"
  666. ></span>
  667. </template>
  668. <template v-else>
  669. <div :class="['NNPE-words']">
  670. <span
  671. class="NNPE-chs"
  672. :class="[
  673. pItem.tokens[9] === '' ? 'marginRight' : '',
  674. (pItem.highIndex &&
  675. printForm.bold.indexOf(pItem.types) > -1) ||
  676. (printForm.bold.indexOf('sentence') > -1 &&
  677. longSentIds.indexOf(pItem.sent_id) > -1)
  678. ? 'fontWeight'
  679. : '',
  680. pItem.marginRigh ? 'marginSingleRight' : '',
  681. ]"
  682. :style="{
  683. fontSize: printForm.fontSize + 'px',
  684. color: printForm.color,
  685. lineHeight: printForm.lineHeight,
  686. fontFamily: printForm.fontFamily,
  687. }"
  688. >{{ pItem.tokens[2] }}</span
  689. >
  690. <span
  691. class="NNPE-chs NNPE-chs-both"
  692. v-if="
  693. item.wordsList[pIndex + 1] &&
  694. item.wordsList[pIndex + 1].tokens[2] &&
  695. enFhList.indexOf(
  696. item.wordsList[pIndex + 1].tokens[2]
  697. ) > -1
  698. "
  699. :class="[
  700. item.wordsList[pIndex + 1].tokens[8] === ''
  701. ? 'marginLeft'
  702. : '',
  703. (item.wordsList[pIndex + 1].highIndex &&
  704. printForm.bold.indexOf(
  705. item.wordsList[pIndex + 1].types
  706. ) > -1) ||
  707. (printForm.bold.indexOf('sentence') > -1 &&
  708. longSentIds.indexOf(
  709. item.wordsList[pIndex + 1].sent_id
  710. ) > -1)
  711. ? 'fontWeight'
  712. : '',
  713. item.wordsList[pIndex + 1].marginRight
  714. ? 'marginSingleRight'
  715. : '',
  716. ]"
  717. :style="{
  718. fontSize: printForm.fontSize + 'px',
  719. color: printForm.color,
  720. lineHeight: printForm.lineHeight,
  721. fontFamily: printForm.fontFamily,
  722. }"
  723. >{{ item.wordsList[pIndex + 1].tokens[2] }}</span
  724. >
  725. </div>
  726. </template>
  727. </template>
  728. </div>
  729. </div>
  730. </template>
  731. </div>
  732. <template
  733. v-if="
  734. itemA.articleImg &&
  735. itemA.articleImg[index] &&
  736. printForm.range.indexOf('image') > -1
  737. "
  738. >
  739. <figure
  740. v-for="(itemI, indexI) in itemA.articleImg[index]"
  741. :key="indexI"
  742. style="text-align: center"
  743. >
  744. <img
  745. @load="handleImageLoad($event, itemI)"
  746. :style="{
  747. width: itemI.width,
  748. height: itemI.height,
  749. }"
  750. :src="itemI.src"
  751. />
  752. <!-- <el-image
  753. :src="itemI.src"
  754. fit="contain"
  755. :style="{
  756. width: itemI.width,
  757. height: itemI.height,
  758. }"
  759. :preview-src-list="[itemI.src]"
  760. ></el-image> -->
  761. </figure>
  762. </template>
  763. </div>
  764. </div>
  765. </template>
  766. <div
  767. v-else
  768. class="cn-content"
  769. v-html="itemA.art_content"
  770. :style="{
  771. color: printForm.color,
  772. fontSize: printForm.fontSize + 'px',
  773. lineHeight: printForm.lineHeight,
  774. }"
  775. ></div>
  776. <template v-if="printForm.range.indexOf('vocab') > -1">
  777. <h5>词表</h5>
  778. <ul class="newwordlist">
  779. <li
  780. v-for="(itemW, indexW) in itemA.wordLit"
  781. :key="indexW"
  782. :class="['li-' + colorObj.type]"
  783. >
  784. <div class="word-info">
  785. <div class="word-info-top">
  786. <b class="word" :style="{ color: colorObj.newWordColor }">{{
  787. itemW.word
  788. }}</b>
  789. <span
  790. class="symbol"
  791. :style="{ color: colorObj.newWordOtherColor }"
  792. >{{ itemW.symbol }}</span
  793. >
  794. <label
  795. class="word-type"
  796. :style="{
  797. color: colorObj.newWordType[itemW.type]
  798. ? colorObj.newWordType[itemW.type].color
  799. : '',
  800. background: colorObj.newWordType[itemW.type]
  801. ? colorObj.newWordType[itemW.type].bg
  802. : '',
  803. }"
  804. >{{ itemW.typeCn }}</label
  805. >
  806. <span class="star" v-if="itemW.rate">
  807. <svg-icon
  808. icon-class="star-filled"
  809. v-for="(itemS, indexS) in itemW.rate"
  810. :key="indexS"
  811. :style="{ color: colorObj.newWordStar }"
  812. ></svg-icon>
  813. </span>
  814. <div class="para-list">
  815. <div
  816. class="para"
  817. v-for="(itemP, indexP) in itemW.paraList"
  818. :key="indexP"
  819. >
  820. <span
  821. class="cixing"
  822. :style="{ color: colorObj.newWordOtherColor }"
  823. >{{ itemP.cixing }}</span
  824. >
  825. <span
  826. class="shiyi"
  827. :style="{ color: colorObj.newWordOtherColor }"
  828. >{{ itemP.para }}</span
  829. >
  830. </div>
  831. </div>
  832. </div>
  833. </div>
  834. </li>
  835. </ul>
  836. <h5 v-if="itemA.art_phrase_data && itemA.art_phrase_data.length > 0">
  837. 短语
  838. </h5>
  839. <ul
  840. class="phraselist"
  841. v-if="itemA.art_phrase_data && itemA.art_phrase_data.length > 0"
  842. >
  843. <li v-for="(itemW, indexW) in itemA.phraseList" :key="indexW">
  844. <div class="word-info">
  845. <div class="word-info-top">
  846. <b
  847. class="phrase"
  848. :style="{ color: colorObj.phraseColor }"
  849. @click="showItem(itemW, indexW)"
  850. >{{ itemW.exp_title }}</b
  851. >
  852. <div class="para-list">
  853. <div class="para">
  854. <span
  855. class="shiyi"
  856. :style="{ color: colorObj.phraseOhterColor }"
  857. >{{ itemW.exp_content }}</span
  858. >
  859. </div>
  860. </div>
  861. </div>
  862. </div>
  863. </li>
  864. </ul>
  865. <h5
  866. v-if="itemA.art_explain_data && itemA.art_explain_data.length > 0"
  867. >
  868. 注释
  869. </h5>
  870. <ul
  871. class="explainlist"
  872. v-if="itemA.art_explain_data && itemA.art_explain_data.length > 0"
  873. >
  874. <li v-for="(itemW, indexW) in itemA.art_explain_data" :key="indexW">
  875. <b class="prefix" :style="{ color: colorObj.phraseOhterColor }">{{
  876. itemW.exp_title
  877. }}</b>
  878. <div
  879. class="para-list"
  880. :style="{ color: colorObj.newWordOtherColor }"
  881. v-html="itemW.exp_content"
  882. ></div>
  883. </li>
  884. </ul>
  885. </template>
  886. <template v-if="printForm.range.indexOf('ciyun') > -1">
  887. <iframe
  888. class="ciyun-box"
  889. width="100%"
  890. height="720px"
  891. border="none"
  892. :src="
  893. './ciyun/ciyunPrint.html?partitionKey=1&searchType=2&articleId=' +
  894. itemA.id
  895. "
  896. ></iframe>
  897. </template>
  898. <template v-if="printForm.range.indexOf('notes') > -1">
  899. <h5 v-if="itemA.notesList.length > 0">笔记</h5>
  900. <ul class="explainlist">
  901. <li v-for="(itemW, indexW) in itemA.notesList" :key="indexW">
  902. <b class="prefix" :style="{ color: colorObj.phraseOhterColor }">{{
  903. itemW.select_text
  904. }}</b>
  905. <div
  906. class="para-list"
  907. :style="{ color: colorObj.newWordOtherColor }"
  908. v-html="itemW.note"
  909. ></div>
  910. </li>
  911. </ul>
  912. </template>
  913. </div>
  914. <footer class="print-footer">
  915. <span>{{ printForm.school }}</span>
  916. <span>{{ printForm.className }}</span>
  917. <span>{{ printForm.name }}</span>
  918. <span style="flex: 1"></span>
  919. <span>{{ printForm.dateStr }}</span>
  920. <span>{{ printForm.momo }}</span>
  921. </footer>
  922. </div>
  923. </div>
  924. </template>
  925. <script>
  926. import waterMark from "../../../store/watermark";
  927. import { getToken } from "@/utils/auth";
  928. import { getLogin } from "@/api/ajax";
  929. import html2pdf from "html2pdf.js";
  930. export default {
  931. props: [
  932. "titleFontsize",
  933. "wordFontsize",
  934. "colorObj",
  935. "articleType",
  936. "articleInfo",
  937. "likePhraseList",
  938. "likeWord",
  939. "articleImg",
  940. ],
  941. data() {
  942. return {
  943. userMessage: getToken() ? JSON.parse(getToken()) : null,
  944. articleId: this.$route.query.id ? this.$route.query.id : "",
  945. issId: this.$route.query.iss_id ? this.$route.query.iss_id : "",
  946. resArr: [],
  947. enFhList: [
  948. ",",
  949. ".",
  950. ";",
  951. "?",
  952. "!",
  953. ":",
  954. ">",
  955. "<",
  956. "'",
  957. "’",
  958. "n't",
  959. "n’t",
  960. "n’ts",
  961. "n‘t",
  962. "'t",
  963. "’t",
  964. "‘t",
  965. "'s",
  966. "’s",
  967. "‘s",
  968. "'m",
  969. "’m",
  970. "‘m",
  971. "'re",
  972. "’re",
  973. "‘re",
  974. "'d",
  975. "’d",
  976. "‘d",
  977. "'ve",
  978. "’ve",
  979. "‘ve",
  980. ")",
  981. "'ll",
  982. "’ll",
  983. "‘ll",
  984. "”",
  985. ],
  986. sentenceList: [],
  987. longSentIds: [], // 长句id
  988. allWordList: [], // 生词短语注释总列表
  989. wordLit: [],
  990. annotationList: [],
  991. phraseList: [],
  992. notesList: [], // 笔记列表
  993. fontList: [
  994. {
  995. value: "roman",
  996. name: "Times New Roman",
  997. },
  998. {
  999. value: "Arial",
  1000. name: "Arial",
  1001. },
  1002. ],
  1003. lineHeightList: [
  1004. {
  1005. value: "0.8",
  1006. name: "0.8倍",
  1007. },
  1008. {
  1009. value: "1.0",
  1010. name: "1.0倍",
  1011. },
  1012. {
  1013. value: "1.5",
  1014. name: "1.5倍",
  1015. },
  1016. {
  1017. value: "2.0",
  1018. name: "2.0倍",
  1019. },
  1020. ],
  1021. rangeList: [
  1022. {
  1023. value: "image",
  1024. name: "图片",
  1025. },
  1026. {
  1027. value: "vocab",
  1028. name: "词表",
  1029. },
  1030. // {
  1031. // value: "ciyun",
  1032. // name: "词云",
  1033. // },
  1034. {
  1035. value: "notes",
  1036. name: "笔记",
  1037. },
  1038. ],
  1039. boldList: [
  1040. {
  1041. value: "newWord",
  1042. name: "生词",
  1043. },
  1044. {
  1045. value: "phrase",
  1046. name: "短语",
  1047. },
  1048. {
  1049. value: "sentence",
  1050. name: "长句",
  1051. },
  1052. ],
  1053. infoList: [
  1054. {
  1055. value: "wordLength",
  1056. name: "长度",
  1057. },
  1058. {
  1059. value: "wordNumber",
  1060. name: "词数",
  1061. },
  1062. {
  1063. value: "difficulty",
  1064. name: "难度",
  1065. },
  1066. ],
  1067. printForm: {
  1068. fontFamily: "roman",
  1069. fontSize: 24,
  1070. color: "#2F3742",
  1071. lineHeight: "1.5",
  1072. range: [],
  1073. bold: ["newWord", "phrase"],
  1074. info: [],
  1075. name: "",
  1076. school: "",
  1077. className: "",
  1078. dateStr: "",
  1079. momo: "",
  1080. },
  1081. isPrint: false,
  1082. printNumber: 0,
  1083. issDetail: null, // 整期文章内容
  1084. issDetailMap: {}, // 整期文章详情map
  1085. printManyFlag: false,
  1086. printManyId: [], // 打印多篇文章id
  1087. loading: false,
  1088. printManyMenu: [], // 打印多篇文章目录
  1089. printManyDetails: [], // 最终确定打印文章内容详情
  1090. isPrintMore: false,
  1091. };
  1092. },
  1093. created() {
  1094. if (this.articleInfo.en_flag) {
  1095. this.rangeList = [
  1096. {
  1097. value: "image",
  1098. name: "图片",
  1099. },
  1100. {
  1101. value: "vocab",
  1102. name: "词表",
  1103. },
  1104. // {
  1105. // value: "ciyun",
  1106. // name: "词云",
  1107. // },
  1108. {
  1109. value: "notes",
  1110. name: "笔记",
  1111. },
  1112. ];
  1113. } else {
  1114. this.rangeList = [
  1115. {
  1116. value: "vocab",
  1117. name: "词表",
  1118. },
  1119. // {
  1120. // value: "ciyun",
  1121. // name: "词云",
  1122. // },
  1123. {
  1124. value: "notes",
  1125. name: "笔记",
  1126. },
  1127. ];
  1128. }
  1129. this.getIssueDetail();
  1130. },
  1131. methods: {
  1132. goBack() {
  1133. this.$emit("closePrint");
  1134. },
  1135. handleData() {
  1136. let explainNumber = 1;
  1137. let resArr = [];
  1138. let articleInfo = JSON.parse(JSON.stringify(this.articleInfo));
  1139. this.sentenceList =
  1140. articleInfo.art_corpus_data && articleInfo.art_corpus_data.sentList
  1141. ? articleInfo.art_corpus_data.sentList
  1142. : [];
  1143. this.longSentIds =
  1144. articleInfo.art_corpus_data && articleInfo.art_corpus_data.artStatInfo
  1145. ? articleInfo.art_corpus_data.artStatInfo.longSentIds
  1146. : [];
  1147. this.wordLit = articleInfo.art_voc_data ? articleInfo.art_voc_data : [];
  1148. this.annotationList = articleInfo.art_phrase_data
  1149. ? articleInfo.art_explain_data
  1150. : [];
  1151. this.phraseList = articleInfo.art_explain_data
  1152. ? articleInfo.art_phrase_data
  1153. : [];
  1154. this.wordLit.forEach((item) => {
  1155. item.types = "newWord";
  1156. item.exp_title = item.word_name;
  1157. let paraStr = "";
  1158. if (item.word_explain && item.word_explain.word_para_list) {
  1159. item.word_explain.word_para_list.forEach((items) => {
  1160. paraStr += items.para;
  1161. });
  1162. }
  1163. item.exp_content = paraStr;
  1164. item.word = item.word_name;
  1165. item.symbol = item.word_explain.ph ? item.word_explain.ph : "";
  1166. item.paraList = item.word_explain.word_para_list;
  1167. item.type = item.word_explain.vl_level
  1168. ? item.word_explain.vl_level
  1169. : "";
  1170. item.typeCn = item.word_explain.vl_level_name
  1171. ? item.word_explain.vl_level_name
  1172. : "";
  1173. item.rate = item.word_explain.star ? item.word_explain.star : null;
  1174. });
  1175. this.phraseList.forEach((item) => {
  1176. item.type = "phrase";
  1177. });
  1178. this.annotationList.forEach((item) => {
  1179. item.type = "explain";
  1180. });
  1181. this.allWordList = this.wordLit.concat(this.phraseList);
  1182. let leg = articleInfo.art_corpus_data
  1183. ? articleInfo.art_corpus_data.sentList[
  1184. articleInfo.art_corpus_data.sentList.length - 1
  1185. ].pno
  1186. : 0;
  1187. this.sentenceList.forEach((item, index) => {
  1188. let flag = "";
  1189. item.StyleTokens = [];
  1190. item.tokens.forEach((items, indexs) => {
  1191. let obj = {
  1192. tokens: items,
  1193. marginRight: indexs === item.tokens.length - 1,
  1194. };
  1195. this.allWordList.forEach((itema, indexa) => {
  1196. itema.bind_sent_data.bind_sents.forEach((itemb, indexb) => {
  1197. if (itemb.sent_id === item.id) {
  1198. if (itema.type === "explain") {
  1199. if (
  1200. indexs ===
  1201. itemb.sel_token_idxes[itemb.sel_token_idxes.length - 1]
  1202. ) {
  1203. obj.highIndex = true;
  1204. obj.type = itema.type;
  1205. obj.types = itema.type;
  1206. obj.word_id = itema.id; // 生词注释短语的id
  1207. obj.explainNumber = explainNumber;
  1208. explainNumber++;
  1209. }
  1210. } else {
  1211. itemb.sel_token_idxes.forEach((itemi) => {
  1212. if (indexs === itemi) {
  1213. obj.highIndex = true;
  1214. obj.type = itema.type;
  1215. obj.types = itema.types ? itema.types : itema.type;
  1216. obj.word_id = itema.id; // 生词注释短语的id
  1217. }
  1218. });
  1219. }
  1220. if (
  1221. itemb.sel_token_idxes.length === 0 &&
  1222. itema.type === "explain" &&
  1223. indexs === item.tokens.length - 1
  1224. ) {
  1225. flag = itema.id;
  1226. }
  1227. }
  1228. });
  1229. });
  1230. item.StyleTokens.push(obj);
  1231. if (flag) {
  1232. item.StyleTokens.push({
  1233. tokens: [
  1234. 0,
  1235. 8,
  1236. "Students",
  1237. "",
  1238. "",
  1239. "",
  1240. "",
  1241. "",
  1242. "",
  1243. " ",
  1244. 0,
  1245. "",
  1246. "",
  1247. "",
  1248. ],
  1249. type: "explain",
  1250. word_id: flag,
  1251. isExplain: true,
  1252. explainNumber: explainNumber,
  1253. });
  1254. explainNumber++;
  1255. }
  1256. });
  1257. });
  1258. for (let i = 0; i < leg + 1; i++) {
  1259. let obgs = {
  1260. isShow: true,
  1261. marginRight: false,
  1262. tokens: [
  1263. "",
  1264. "",
  1265. "#@@#",
  1266. "",
  1267. "",
  1268. "",
  1269. "",
  1270. "",
  1271. " ",
  1272. " ",
  1273. "",
  1274. "",
  1275. "",
  1276. "",
  1277. "",
  1278. ],
  1279. };
  1280. let obj = {
  1281. wordsList: i === 0 ? [] : [obgs, obgs],
  1282. };
  1283. resArr.push(obj);
  1284. }
  1285. this.sentenceList.forEach((item, index) => {
  1286. item.StyleTokens.forEach((items, indexs) => {
  1287. items.isShow = this.enFhList.indexOf(items.tokens[2]) == -1;
  1288. items.sent_id = item.id;
  1289. resArr[item.pno].wordsList.push(items);
  1290. });
  1291. });
  1292. this.resArr = resArr;
  1293. setTimeout(() => {
  1294. waterMark.set(
  1295. this.userMessage.user_name + " " + this.userMessage.phone,
  1296. "",
  1297. "showWaterMark"
  1298. );
  1299. }, 1000);
  1300. },
  1301. // 打印
  1302. handlePrint() {
  1303. let MethodName =
  1304. "/ShopServer/Client/PrintRecordManager/GetMyPrintCount_Article";
  1305. getLogin(MethodName, {
  1306. goods_type: 21,
  1307. date_range: "TODAY",
  1308. article_id: this.articleId,
  1309. }).then((res) => {
  1310. if (res.status === 1) {
  1311. if (res.print_count < 5) {
  1312. getLogin(
  1313. "/ShopServer/Client/PrintRecordManager/AddPrintRecord_Article",
  1314. {
  1315. goods_type: 21,
  1316. article_id: this.articleId,
  1317. }
  1318. ).then((res) => {
  1319. if (res.status === 1) {
  1320. }
  1321. });
  1322. this.$nextTick(() => {
  1323. this.$print(this.$refs["printArea"], {
  1324. noPrint: ".noPrint",
  1325. type: "html",
  1326. scanStyles: true,
  1327. showModal: true,
  1328. // style: style,// 亦可使用引入的外部css;
  1329. onStart: () => {
  1330. // console.log("打印开始");
  1331. },
  1332. onEnd: () => {
  1333. // console.log("打印完成");
  1334. },
  1335. });
  1336. });
  1337. } else {
  1338. this.$message.warning("今日打印次数已达上限");
  1339. }
  1340. }
  1341. });
  1342. },
  1343. // 清除
  1344. handleClear() {
  1345. this.printForm.name = "";
  1346. this.printForm.school = "";
  1347. this.printForm.className = "";
  1348. this.printForm.dateStr = "";
  1349. this.printForm.momo = "";
  1350. },
  1351. // 高亮笔记句子
  1352. handleHighSentence() {
  1353. let MethodName = "/PaperServer/Client/Article/ArtNoteListInArt";
  1354. let data = {
  1355. id: this.$route.query.id,
  1356. };
  1357. getLogin(MethodName, data).then((res) => {
  1358. if (res.status === 1) {
  1359. this.notesList = res.data;
  1360. }
  1361. });
  1362. },
  1363. // 下载pdf
  1364. async generatePDF(title) {
  1365. let MethodName =
  1366. "/ShopServer/Client/PrintRecordManager/GetMyPrintCount_Article";
  1367. getLogin(MethodName, {
  1368. goods_type: 21,
  1369. date_range: "TODAY",
  1370. article_id: this.articleId,
  1371. }).then((res) => {
  1372. if (res.status === 1) {
  1373. if (res.print_count < 5) {
  1374. getLogin(
  1375. "/ShopServer/Client/PrintRecordManager/AddPrintRecord_Article",
  1376. {
  1377. goods_type: 21,
  1378. article_id: this.articleId,
  1379. }
  1380. ).then((res) => {
  1381. if (res.status === 1) {
  1382. }
  1383. });
  1384. this.$nextTick(() => {
  1385. this.isPrint = true;
  1386. const element = document.getElementById("showWaterMark");
  1387. const opt = {
  1388. margin: [0, 0, 0, 0],
  1389. useCORS: true,
  1390. filename: title + ".pdf",
  1391. image: { type: "jpeg", quality: 0.98 },
  1392. html2canvas: { scale: 2 }, // 或其他自定义设置,例如scale可以放大内容以便更容易阅读和打印。
  1393. jsPDF: { unit: "mm", format: "a4", orientation: "portrait" }, // A4尺寸的PDF,纵向打印。
  1394. };
  1395. html2pdf().set(opt).from(element).save();
  1396. setTimeout(() => {
  1397. this.isPrint = false;
  1398. }, 100);
  1399. });
  1400. } else {
  1401. this.$message.warning("今日下载次数已达上限");
  1402. }
  1403. }
  1404. });
  1405. },
  1406. // 获取整期报刊内容
  1407. getIssueDetail() {
  1408. this.issDetail = null;
  1409. this.issDetailMap = {};
  1410. let MethodName = "/PaperServer/Client/Article/GetIssueDetail";
  1411. getLogin(MethodName, {
  1412. id: this.issId,
  1413. }).then((res) => {
  1414. if (res.status === 1) {
  1415. this.issDetail = res.data;
  1416. if (res.data.articles) {
  1417. this.issDetailMap = res.data.articles.reduce((acc, user) => {
  1418. acc[user.id] = user;
  1419. return acc;
  1420. }, {});
  1421. res.data.articles.forEach((itemA) => {
  1422. let explainNumber = 1;
  1423. let resArr = [];
  1424. let articleInfo = JSON.parse(JSON.stringify(itemA));
  1425. let sentenceList = articleInfo.art_corpus_data
  1426. ? articleInfo.art_corpus_data.sentList
  1427. : [];
  1428. let longSentIds =
  1429. articleInfo.art_corpus_data &&
  1430. articleInfo.art_corpus_data.artStatInfo
  1431. ? articleInfo.art_corpus_data.artStatInfo.longSentIds
  1432. : [];
  1433. let wordLit = articleInfo.art_voc_data
  1434. ? articleInfo.art_voc_data
  1435. : [];
  1436. let annotationList = articleInfo.art_phrase_data
  1437. ? articleInfo.art_explain_data
  1438. : [];
  1439. let phraseList = articleInfo.art_explain_data
  1440. ? articleInfo.art_phrase_data
  1441. : [];
  1442. wordLit.forEach((item) => {
  1443. item.types = "newWord";
  1444. item.exp_title = item.word_name;
  1445. let paraStr = "";
  1446. if (item.word_explain && item.word_explain.word_para_list) {
  1447. item.word_explain.word_para_list.forEach((items) => {
  1448. paraStr += items.para;
  1449. });
  1450. }
  1451. item.exp_content = paraStr;
  1452. item.word = item.word_name;
  1453. item.symbol = item.word_explain.ph ? item.word_explain.ph : "";
  1454. item.paraList = item.word_explain.word_para_list;
  1455. item.type = item.word_explain.vl_level
  1456. ? item.word_explain.vl_level
  1457. : "";
  1458. item.typeCn = item.word_explain.vl_level_name
  1459. ? item.word_explain.vl_level_name
  1460. : "";
  1461. item.rate = item.word_explain.star
  1462. ? item.word_explain.star
  1463. : null;
  1464. });
  1465. phraseList.forEach((item) => {
  1466. item.type = "phrase";
  1467. });
  1468. annotationList.forEach((item) => {
  1469. item.type = "explain";
  1470. });
  1471. let allWordList = wordLit.concat(phraseList);
  1472. let leg =
  1473. articleInfo.art_corpus_data &&
  1474. articleInfo.art_corpus_data.sentList
  1475. ? articleInfo.art_corpus_data.sentList[
  1476. articleInfo.art_corpus_data.sentList.length - 1
  1477. ].pno
  1478. : 0;
  1479. sentenceList.forEach((item, index) => {
  1480. let flag = "";
  1481. item.StyleTokens = [];
  1482. item.tokens.forEach((items, indexs) => {
  1483. let obj = {
  1484. tokens: items,
  1485. marginRight: indexs === item.tokens.length - 1,
  1486. };
  1487. allWordList.forEach((itema, indexa) => {
  1488. itema.bind_sent_data.bind_sents.forEach((itemb, indexb) => {
  1489. if (itemb.sent_id === item.id) {
  1490. if (itema.type === "explain") {
  1491. if (
  1492. indexs ===
  1493. itemb.sel_token_idxes[
  1494. itemb.sel_token_idxes.length - 1
  1495. ]
  1496. ) {
  1497. obj.highIndex = true;
  1498. obj.type = itema.type;
  1499. obj.types = itema.type;
  1500. obj.word_id = itema.id; // 生词注释短语的id
  1501. obj.explainNumber = explainNumber;
  1502. explainNumber++;
  1503. }
  1504. } else {
  1505. itemb.sel_token_idxes.forEach((itemi) => {
  1506. if (indexs === itemi) {
  1507. obj.highIndex = true;
  1508. obj.type = itema.type;
  1509. obj.types = itema.types
  1510. ? itema.types
  1511. : itema.type;
  1512. obj.word_id = itema.id; // 生词注释短语的id
  1513. }
  1514. });
  1515. }
  1516. if (
  1517. itemb.sel_token_idxes.length === 0 &&
  1518. itema.type === "explain" &&
  1519. indexs === item.tokens.length - 1
  1520. ) {
  1521. flag = itema.id;
  1522. }
  1523. }
  1524. });
  1525. });
  1526. item.StyleTokens.push(obj);
  1527. if (flag) {
  1528. item.StyleTokens.push({
  1529. tokens: [
  1530. 0,
  1531. 8,
  1532. "Students",
  1533. "",
  1534. "",
  1535. "",
  1536. "",
  1537. "",
  1538. "",
  1539. " ",
  1540. 0,
  1541. "",
  1542. "",
  1543. "",
  1544. ],
  1545. type: "explain",
  1546. word_id: flag,
  1547. isExplain: true,
  1548. explainNumber: explainNumber,
  1549. });
  1550. explainNumber++;
  1551. }
  1552. });
  1553. });
  1554. for (let i = 0; i < leg + 1; i++) {
  1555. let obgs = {
  1556. isShow: true,
  1557. marginRight: false,
  1558. tokens: [
  1559. "",
  1560. "",
  1561. "#@@#",
  1562. "",
  1563. "",
  1564. "",
  1565. "",
  1566. "",
  1567. " ",
  1568. " ",
  1569. "",
  1570. "",
  1571. "",
  1572. "",
  1573. "",
  1574. ],
  1575. };
  1576. let obj = {
  1577. wordsList: i === 0 ? [] : [obgs, obgs],
  1578. };
  1579. resArr.push(obj);
  1580. }
  1581. sentenceList.forEach((item, index) => {
  1582. item.StyleTokens.forEach((items, indexs) => {
  1583. items.isShow = this.enFhList.indexOf(items.tokens[2]) == -1;
  1584. items.sent_id = item.id;
  1585. resArr[item.pno].wordsList.push(items);
  1586. });
  1587. });
  1588. itemA.resArr = resArr;
  1589. itemA.longSentIds = longSentIds;
  1590. itemA.sentenceList = sentenceList;
  1591. itemA.wordLit = wordLit;
  1592. itemA.annotationList = annotationList;
  1593. itemA.phraseList = phraseList;
  1594. itemA.allWordList = allWordList;
  1595. itemA.articleImg = {};
  1596. let articleArr = itemA.art_content.split('<p class="para"');
  1597. articleArr.forEach((itema) => {
  1598. if (itema.indexOf("<img") > -1) {
  1599. // 当前段落有图片
  1600. let imgArr = [];
  1601. let pno =
  1602. itema.indexOf('pno="') > -1
  1603. ? itema.substring(
  1604. itema.indexOf('pno="') + 5,
  1605. itema
  1606. .substring(itema.indexOf('pno="') + 5)
  1607. .indexOf('"') +
  1608. 1 +
  1609. 5
  1610. )
  1611. : 0;
  1612. let itemArr = itema.split("<img");
  1613. itemArr.forEach((items) => {
  1614. if (items.indexOf('src="') > -1) {
  1615. let indexS =
  1616. items
  1617. .substring(items.indexOf('src="') + 5)
  1618. .indexOf('"') + items.indexOf('src="'); // src所在索引
  1619. let indexW =
  1620. items.indexOf('width="') > -1
  1621. ? items
  1622. .substring(items.indexOf('width="') + 7)
  1623. .indexOf('"')
  1624. : items.indexOf("width: ") > -1
  1625. ? items
  1626. .substring(items.indexOf("width: ") + 7)
  1627. .indexOf(";")
  1628. : -1; // width所在索引
  1629. let indexH =
  1630. items.indexOf('height="') > -1
  1631. ? items
  1632. .substring(items.indexOf('height="') + 8)
  1633. .indexOf('"')
  1634. : items.indexOf("height: ") > -1
  1635. ? items
  1636. .substring(items.indexOf("height: ") + 8)
  1637. .indexOf(";")
  1638. : -1; // height所在索引
  1639. let imgobj = {
  1640. src: items.substring(
  1641. items.indexOf('src="') + 5,
  1642. indexS + 5
  1643. ),
  1644. width:
  1645. items.indexOf('width="') > -1
  1646. ? items.substring(
  1647. items.indexOf('width="') + 7,
  1648. items.indexOf('width="') + indexW + 7
  1649. )
  1650. : items.indexOf("width: ") > -1
  1651. ? items.substring(
  1652. items.indexOf("width: ") + 7,
  1653. items.indexOf("width: ") + indexW + 7
  1654. )
  1655. : null,
  1656. height:
  1657. items.indexOf('height="') > -1
  1658. ? items.substring(
  1659. items.indexOf('height="') + 8,
  1660. items.indexOf('height="') + indexH + 8
  1661. )
  1662. : items.indexOf("height: ") > -1
  1663. ? items.substring(
  1664. items.indexOf("height: ") + 8,
  1665. items.indexOf('height="') + indexH + 8
  1666. )
  1667. : null,
  1668. };
  1669. imgArr.push(imgobj);
  1670. }
  1671. });
  1672. itemA.articleImg[pno] = imgArr;
  1673. }
  1674. });
  1675. let MethodNames = "/PaperServer/Client/Article/ArtNoteListInArt";
  1676. let data = {
  1677. id: itemA.id,
  1678. };
  1679. getLogin(MethodNames, data).then((res) => {
  1680. if (res.status === 1) {
  1681. itemA.notesList = res.data;
  1682. }
  1683. });
  1684. });
  1685. }
  1686. if (res.data.issueInfo) {
  1687. let arr = [];
  1688. res.data.issueInfo.chn_art_data.forEach((item) => {
  1689. let arrs = [];
  1690. item.arts.forEach((items) => {
  1691. arrs.push({
  1692. value: items.id,
  1693. label: items.art_title,
  1694. });
  1695. });
  1696. arr.push({
  1697. value: item.chn_idx,
  1698. label: item.chn_name,
  1699. children: arrs,
  1700. });
  1701. });
  1702. this.printManyMenu = [
  1703. {
  1704. value: res.data.issueInfo.id,
  1705. label: res.data.issueInfo.iss_name,
  1706. children: arr,
  1707. },
  1708. ];
  1709. }
  1710. }
  1711. });
  1712. },
  1713. // 打印多篇按钮
  1714. handleManyPrint() {
  1715. this.printManyFlag = true;
  1716. },
  1717. // 确定打印多篇
  1718. submitPrintMore() {
  1719. this.loading = true;
  1720. let printManyIds = [];
  1721. let printManyDetails = [];
  1722. this.printManyId.forEach((item) => {
  1723. printManyIds.push(item[2]);
  1724. printManyDetails.push(this.issDetailMap[item[2]]);
  1725. });
  1726. this.printManyDetails = printManyDetails;
  1727. this.isPrintMore = true;
  1728. setTimeout(() => {
  1729. waterMark.set(
  1730. this.userMessage.user_name + " " + this.userMessage.phone,
  1731. "",
  1732. "showWaterMarks"
  1733. );
  1734. }, 1000);
  1735. setTimeout(() => {
  1736. this.handlePrintManyDetails();
  1737. }, 1500);
  1738. },
  1739. handlePrintManyDetails() {
  1740. let MethodName =
  1741. "/ShopServer/Client/PrintRecordManager/GetMyPrintCount_Article";
  1742. getLogin(MethodName, {
  1743. goods_type: 21,
  1744. date_range: "TODAY",
  1745. article_id: this.articleId,
  1746. }).then((res) => {
  1747. if (res.status === 1) {
  1748. if (res.print_count < 5) {
  1749. getLogin(
  1750. "/ShopServer/Client/PrintRecordManager/AddPrintRecord_Article",
  1751. {
  1752. goods_type: 21,
  1753. article_id: this.articleId,
  1754. }
  1755. ).then((res) => {
  1756. if (res.status === 1) {
  1757. }
  1758. });
  1759. this.$nextTick(() => {
  1760. this.$print(this.$refs["printAreaManys"], {
  1761. noPrint: ".noPrint",
  1762. type: "html",
  1763. scanStyles: true,
  1764. showModal: true,
  1765. // style: style,// 亦可使用引入的外部css;
  1766. onStart: () => {
  1767. // console.log("打印开始");
  1768. },
  1769. onEnd: () => {
  1770. // console.log("打印完成");
  1771. },
  1772. });
  1773. this.loading = false;
  1774. this.printManyFlag = false;
  1775. this.isPrintMore = false;
  1776. });
  1777. } else {
  1778. this.loading = false;
  1779. this.printManyFlag = false;
  1780. this.isPrintMore = false;
  1781. this.$message.warning("今日打印次数已达上限");
  1782. }
  1783. }
  1784. });
  1785. },
  1786. handleImageLoad(event, item) {
  1787. if (!item.width || item.width > 870) {
  1788. item.width =
  1789. event.target.naturalWidth > 870
  1790. ? 870 + "px"
  1791. : event.target.naturalWidth + "px";
  1792. }
  1793. if (!item.height) {
  1794. item.height =
  1795. item.width === "870px" ? "" : event.target.naturalHeight + "px";
  1796. }
  1797. // item.src = this.getBase64Image(
  1798. // "http://cms-bucket.ws.126.net/2021/0114/003bc5dej00qmxg5o0089c000s600e3c.jpg"
  1799. // );
  1800. this.getBase64Image(item);
  1801. },
  1802. getBase64Image(item) {
  1803. var image = new Image();
  1804. image.src = item.src + "?v=" + Math.random(); // 处理缓存
  1805. image.crossOrigin = "*"; // 支持跨域图片
  1806. image.onload = () => {
  1807. var canvas = document.createElement("canvas");
  1808. canvas.width = image.width;
  1809. canvas.height = image.height;
  1810. var context = canvas.getContext("2d");
  1811. context.drawImage(image, 0, 0, image.width, image.height);
  1812. var quality = 0.8;
  1813. let dataurl = canvas.toDataURL("image/jpeg", quality);
  1814. // this.url = dataurl;
  1815. item.src = dataurl;
  1816. this.$forceUpdate();
  1817. };
  1818. },
  1819. },
  1820. mounted() {
  1821. if (this.articleInfo) {
  1822. this.handleData();
  1823. this.handleHighSentence();
  1824. }
  1825. this.$nextTick(() => {
  1826. document.onselectstart = new Function("event.returnValue=false");
  1827. });
  1828. },
  1829. beforeDestroy() {
  1830. document.onselectstart = new Function("event.returnValue=true");
  1831. },
  1832. };
  1833. </script>
  1834. <style lang="scss" scoped>
  1835. .print-model {
  1836. background: #f2f3f5;
  1837. &-top {
  1838. padding: 8px 16px;
  1839. border-bottom: 1px solid #ebebeb;
  1840. background: #fff;
  1841. display: flex;
  1842. align-items: center;
  1843. width: 100%;
  1844. position: fixed;
  1845. top: 0;
  1846. left: 0;
  1847. z-index: 10000;
  1848. .goback {
  1849. color: #2f3742;
  1850. font-size: 20px;
  1851. font-weight: 500;
  1852. line-height: 28px;
  1853. padding-right: 12px;
  1854. .el-icon-arrow-left {
  1855. width: 24px;
  1856. height: 24px;
  1857. }
  1858. }
  1859. .border {
  1860. background: #e5e6eb;
  1861. height: 16px;
  1862. margin-top: 2px;
  1863. width: 1px;
  1864. }
  1865. p {
  1866. margin: 0 12px;
  1867. color: #1c2129;
  1868. font-size: 14px;
  1869. font-weight: 500;
  1870. line-height: 22px;
  1871. }
  1872. }
  1873. &-bottom {
  1874. display: flex;
  1875. justify-content: center;
  1876. padding-top: 46px;
  1877. &-left {
  1878. width: 1070px;
  1879. margin: 8px 346px 8px 8px;
  1880. background: #fff;
  1881. flex-shrink: 0;
  1882. .print-inner {
  1883. overflow: auto;
  1884. padding: 120px 100px 30px 100px;
  1885. }
  1886. .nnpe-article-author {
  1887. margin: 24px 0;
  1888. text-align: center;
  1889. }
  1890. h2 {
  1891. display: flex;
  1892. flex-flow: wrap;
  1893. justify-content: center;
  1894. }
  1895. .table-box {
  1896. // background: #f7f7f7;
  1897. // border-top: 1px solid rgba(0, 0, 0, 0.1);
  1898. :last-child {
  1899. :last-child.wordsList-box {
  1900. padding-bottom: 40px;
  1901. }
  1902. }
  1903. .wordsList-box {
  1904. flex: 1;
  1905. // padding: 6px 0 12px 0;
  1906. .nnpe-sentence-box {
  1907. display: flex;
  1908. flex-flow: wrap;
  1909. .word-box {
  1910. position: relative;
  1911. }
  1912. }
  1913. > img {
  1914. max-width: 50%;
  1915. display: block;
  1916. padding: 16px 0;
  1917. margin: 0 auto;
  1918. }
  1919. }
  1920. }
  1921. .NNPE-detail {
  1922. clear: both;
  1923. overflow: hidden;
  1924. // display: flex;
  1925. .NNPE-words {
  1926. float: left;
  1927. padding: 0;
  1928. &.noPadding {
  1929. padding: 0;
  1930. }
  1931. &.sentActive {
  1932. background: rgba(24, 144, 255, 0.1);
  1933. }
  1934. &.overActive {
  1935. background: rgba(0, 0, 0, 0.06);
  1936. }
  1937. > span {
  1938. float: left;
  1939. &.NNPE-chs {
  1940. // font-size: 24px;
  1941. font-family: "Smartisan";
  1942. line-height: 150%;
  1943. color: #000000;
  1944. padding: 0 3px;
  1945. &.wordActive {
  1946. color: #175dff !important;
  1947. }
  1948. &.marginRight {
  1949. padding-right: 0;
  1950. }
  1951. &.marginLeft {
  1952. padding-left: 0;
  1953. }
  1954. &.marginSingleRight {
  1955. padding-right: 3px;
  1956. }
  1957. &.fontWeight {
  1958. font-weight: bold;
  1959. }
  1960. &.newWord {
  1961. color: #3459d2 !important;
  1962. }
  1963. &.phrase {
  1964. color: #ff802b !important;
  1965. }
  1966. &.explain {
  1967. // color: #23C847 !important;
  1968. font-weight: 400;
  1969. }
  1970. }
  1971. &.padding {
  1972. padding: 0 3px;
  1973. cursor: pointer;
  1974. }
  1975. }
  1976. }
  1977. }
  1978. h5 {
  1979. color: #000;
  1980. font-size: 36px;
  1981. font-weight: 700;
  1982. line-height: 44px;
  1983. margin: 24px 0;
  1984. }
  1985. .newwordlist,
  1986. .phraselist {
  1987. li {
  1988. padding: 4px;
  1989. display: flex;
  1990. margin: 1px 0;
  1991. border-radius: 4px;
  1992. .word-info {
  1993. flex: 1;
  1994. }
  1995. .sentence {
  1996. font-size: 14px;
  1997. line-height: 22px;
  1998. color: #2f3742;
  1999. }
  2000. .word-type {
  2001. padding: 0px 8px;
  2002. border-radius: 2px;
  2003. font-weight: 500;
  2004. font-size: 12px;
  2005. line-height: 20px;
  2006. height: 20px;
  2007. margin: 4px 8px 0 0;
  2008. }
  2009. .el-icon-arrow-right {
  2010. width: 24px;
  2011. height: 24px;
  2012. color: #929ca8;
  2013. text-align: center;
  2014. line-height: 24px;
  2015. cursor: pointer;
  2016. }
  2017. .word-info-top {
  2018. display: flex;
  2019. .word {
  2020. font-weight: 700;
  2021. font-size: 20px;
  2022. line-height: 28px;
  2023. color: #175dff;
  2024. margin-right: 8px;
  2025. font-family: "Arial";
  2026. cursor: pointer;
  2027. }
  2028. .phrase {
  2029. font-weight: 500;
  2030. font-size: 24px;
  2031. line-height: 32px;
  2032. color: #ed5f00;
  2033. }
  2034. .symbol {
  2035. font-size: 20px;
  2036. line-height: 28px;
  2037. color: #667180;
  2038. margin-right: 8px;
  2039. font-family: "Arial";
  2040. }
  2041. .star {
  2042. margin-right: 8px;
  2043. line-height: 20px;
  2044. }
  2045. .para-list {
  2046. flex: 1;
  2047. .para {
  2048. display: flex;
  2049. font-size: 16px;
  2050. line-height: 24px;
  2051. color: #1c2129;
  2052. margin-bottom: 4px;
  2053. .cixing {
  2054. margin-right: 4px;
  2055. }
  2056. }
  2057. }
  2058. }
  2059. .word-info-bottom {
  2060. font-size: 12px;
  2061. line-height: 20px;
  2062. color: #929ca8;
  2063. margin: 4px 8px 0 0;
  2064. span {
  2065. margin-right: 8px;
  2066. }
  2067. }
  2068. }
  2069. }
  2070. .phraselist {
  2071. .para {
  2072. line-height: 32px !important;
  2073. margin-left: 8px;
  2074. margin-bottom: 0 !important;
  2075. }
  2076. }
  2077. .explainlist {
  2078. li {
  2079. padding: 8px;
  2080. margin: 4px 0;
  2081. .prefix {
  2082. color: #151515;
  2083. font-size: 24px;
  2084. font-weight: 700;
  2085. line-height: 32px;
  2086. }
  2087. .para-list {
  2088. color: #2f3742;
  2089. font-size: 16px;
  2090. font-weight: 500;
  2091. line-height: 24px;
  2092. margin-top: 8px;
  2093. }
  2094. }
  2095. }
  2096. }
  2097. &-right {
  2098. width: 360px;
  2099. padding: 24px 0;
  2100. background: #fff;
  2101. position: fixed;
  2102. z-index: 1;
  2103. top: 46px;
  2104. right: calc((100% - 1450px) / 2);
  2105. height: calc(100% - 48px);
  2106. .config-box {
  2107. height: calc(100% - 110px);
  2108. overflow: auto;
  2109. padding: 0 24px;
  2110. }
  2111. h3 {
  2112. color: #2f3742;
  2113. font-size: 24px;
  2114. font-weight: 400;
  2115. line-height: 32px;
  2116. margin: 0;
  2117. padding: 0 24px;
  2118. .svg-icon {
  2119. width: 24px;
  2120. height: 24px;
  2121. margin-right: 8px;
  2122. }
  2123. }
  2124. }
  2125. }
  2126. }
  2127. .item-page {
  2128. display: flex;
  2129. padding-top: 24px;
  2130. > label {
  2131. color: #2f3742;
  2132. text-align: right;
  2133. font-size: 14px;
  2134. font-weight: 500;
  2135. line-height: 30px;
  2136. width: 72px;
  2137. margin-right: 16px;
  2138. flex-shrink: 0;
  2139. }
  2140. .el-select {
  2141. height: 32px;
  2142. border-radius: 2px;
  2143. width: 202px;
  2144. }
  2145. .el-button {
  2146. width: 70px;
  2147. padding: 8px 0;
  2148. color: rgba(0, 0, 0, 0.91);
  2149. font-size: 14px;
  2150. font-weight: 400;
  2151. line-height: 22px;
  2152. border-radius: 4px;
  2153. background: #ebebeb;
  2154. border: none;
  2155. }
  2156. .el-button--primary {
  2157. background: #3459d2;
  2158. color: #fff;
  2159. }
  2160. > b {
  2161. flex: 1;
  2162. text-align: right;
  2163. cursor: pointer;
  2164. line-height: 30px;
  2165. color: #175dff;
  2166. font-size: 14px;
  2167. font-weight: 400;
  2168. .svg-icon {
  2169. width: 12px;
  2170. margin-right: 4px;
  2171. }
  2172. }
  2173. }
  2174. .print-divider {
  2175. margin: 24px 0 0 0;
  2176. background-color: #f2f3f5;
  2177. }
  2178. #showWaterMark,
  2179. #showWaterMarks {
  2180. overflow: hidden;
  2181. position: relative;
  2182. z-index: 9999;
  2183. // width: 210mm;
  2184. }
  2185. .print-footer {
  2186. width: 100%;
  2187. min-height: 22px;
  2188. padding: 30px 96px;
  2189. color: #667180;
  2190. font-size: 14px;
  2191. font-weight: 700;
  2192. line-height: 22px;
  2193. display: flex;
  2194. justify-content: space-between;
  2195. span {
  2196. margin: 0 4px;
  2197. }
  2198. }
  2199. .ciyun-box {
  2200. width: 870px;
  2201. height: 720px;
  2202. border: none;
  2203. overflow: hidden;
  2204. }
  2205. @media print {
  2206. .no-print {
  2207. display: none;
  2208. }
  2209. body {
  2210. margin-top: 0;
  2211. margin-bottom: 0;
  2212. padding-top: 0;
  2213. padding-bottom: 0;
  2214. }
  2215. .printheader {
  2216. font-size: 50px;
  2217. color: green;
  2218. font-weight: bold;
  2219. position: fixed;
  2220. top: 0;
  2221. left: 0;
  2222. z-index: 10000;
  2223. }
  2224. .printFotter {
  2225. position: fixed;
  2226. left: 0;
  2227. bottom: 0;
  2228. z-index: 100000;
  2229. }
  2230. .print-footer {
  2231. position: fixed;
  2232. bottom: -30px;
  2233. left: 10px;
  2234. }
  2235. @page {
  2236. margin: 30px 30px 60px 30px;
  2237. }
  2238. #showWaterMark,
  2239. #showWaterMarks {
  2240. margin: 0;
  2241. }
  2242. }
  2243. :deep .image img {
  2244. max-width: 100%;
  2245. }
  2246. :deep figure {
  2247. margin: 1em 0;
  2248. text-align: center;
  2249. }
  2250. </style>
  2251. <style lang="scss">
  2252. .item-page {
  2253. .el-input__inner {
  2254. height: 32px;
  2255. line-height: 32px;
  2256. background: #f2f3f5;
  2257. border: none;
  2258. }
  2259. .el-input__icon {
  2260. line-height: 32px;
  2261. }
  2262. .el-input-number {
  2263. line-height: 30px;
  2264. width: 202px;
  2265. }
  2266. .el-input-number__decrease,
  2267. .el-input-number__increase {
  2268. height: 30px;
  2269. width: 30px;
  2270. }
  2271. .el-checkbox {
  2272. margin-right: 12px;
  2273. line-height: 30px;
  2274. }
  2275. .el-checkbox__input.is-checked + .el-checkbox__label {
  2276. color: #2f3742;
  2277. }
  2278. .el-checkbox__input.is-checked .el-checkbox__inner,
  2279. .el-checkbox__input.is-indeterminate .el-checkbox__inner {
  2280. background-color: #3459d2;
  2281. border-color: #3459d2;
  2282. }
  2283. }
  2284. </style>