PrintModel.vue 71 KB

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