|
@@ -520,9 +520,383 @@
|
|
|
<el-button type="primary" @click="handlePrint" size="small"
|
|
|
>打印</el-button
|
|
|
>
|
|
|
+ <el-button type="primary" @click="handleManyPrint" size="small"
|
|
|
+ >打印多篇</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <el-dialog
|
|
|
+ :visible.sync="printManyFlag"
|
|
|
+ width="500px"
|
|
|
+ append-to-body
|
|
|
+ :show-close="true"
|
|
|
+ title="选择打印的文章"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ >
|
|
|
+ <el-form ref="form">
|
|
|
+ <el-form-item prop="name">
|
|
|
+ <el-cascader
|
|
|
+ v-model="printManyId"
|
|
|
+ :props="{ multiple: true }"
|
|
|
+ collapse-tags
|
|
|
+ :options="printManyMenu"
|
|
|
+ style="width: 470px"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item style="text-align: right">
|
|
|
+ <el-button @click="printManyFlag = false">取 消</el-button>
|
|
|
+ <el-button :loading="loading" type="primary" @click="submitPrintMore"
|
|
|
+ >确 定</el-button
|
|
|
+ ></el-form-item
|
|
|
+ >
|
|
|
+ </el-form>
|
|
|
+ </el-dialog>
|
|
|
+ <div
|
|
|
+ class="print-model-bottom-left"
|
|
|
+ ref="printAreaManys"
|
|
|
+ id="showWaterMarks"
|
|
|
+ v-if="isPrintMore"
|
|
|
+ :style="{
|
|
|
+ width: '220mm',
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ class="print-inner"
|
|
|
+ v-for="(itemA, index) in printManyDetails"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ <h2>
|
|
|
+ <span
|
|
|
+ :style="{
|
|
|
+ color: colorObj.titleColor,
|
|
|
+ fontSize: titleFontsize + 'px',
|
|
|
+ lineHeight: titleFontsize + 8 + 'px',
|
|
|
+ marginRight: '10px',
|
|
|
+ fontWeight: '700',
|
|
|
+ cursor: 'pointer',
|
|
|
+ wordBreak: 'break-word',
|
|
|
+ }"
|
|
|
+ >{{ itemA.art_title }}</span
|
|
|
+ >
|
|
|
+ </h2>
|
|
|
+ <h6
|
|
|
+ class="nnpe-article-author"
|
|
|
+ :style="{
|
|
|
+ color: colorObj.sourceColor,
|
|
|
+ fontSize: wordFontsize - 4 + 'px',
|
|
|
+ lineHeight: wordFontsize + 4 + 'px',
|
|
|
+ fontWeight: '400',
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ {{
|
|
|
+ itemA.art_author +
|
|
|
+ " · " +
|
|
|
+ itemA.study_phase_name +
|
|
|
+ "版 · 第 " +
|
|
|
+ itemA.iss_no +
|
|
|
+ " 期 · " +
|
|
|
+ itemA.release_date +
|
|
|
+ " · " +
|
|
|
+ itemA.chn_item +
|
|
|
+ (itemA.page_no_in_pub ? " · P" + itemA.page_no_in_pub : "")
|
|
|
+ }}
|
|
|
+ {{ printForm.info.length > 0 ? " | " : "" }}
|
|
|
+ {{
|
|
|
+ printForm.info.indexOf("wordLength") > -1
|
|
|
+ ? " 长度 " + itemA.art_corpus_data.artStatInfo.wc
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
+ {{
|
|
|
+ printForm.info.indexOf("wordNumber") > -1
|
|
|
+ ? " · 词数 " + itemA.art_corpus_data.artStatInfo.wdc
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
+ {{
|
|
|
+ printForm.info.indexOf("difficulty") > -1
|
|
|
+ ? " · 难度 " + itemA.art_corpus_data.artStatInfo.vocabHardLevel
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
+ </h6>
|
|
|
+ <template v-if="itemA.resArr.length > 0 && itemA.en_flag">
|
|
|
+ <div class="table-box">
|
|
|
+ <div
|
|
|
+ :class="['NNPE-detail']"
|
|
|
+ v-for="(item, index) in itemA.resArr"
|
|
|
+ :key="'detail' + index"
|
|
|
+ >
|
|
|
+ <div class="wordsList-box">
|
|
|
+ <template v-if="index !== 0">
|
|
|
+ <div class="nnpe-sentence-box">
|
|
|
+ <div
|
|
|
+ v-for="(pItem, pIndex) in item.wordsList"
|
|
|
+ :key="'wordsList' + pIndex"
|
|
|
+ class="word-box"
|
|
|
+ :class="[
|
|
|
+ pItem.isExplain || pItem.explainNumber
|
|
|
+ ? 'hasExplain'
|
|
|
+ : '',
|
|
|
+ ]"
|
|
|
+ >
|
|
|
+ <template v-if="pItem.isShow">
|
|
|
+ <template v-if="pItem.tokens[2] === '#@@#'">
|
|
|
+ <span
|
|
|
+ class="NNPE-chs"
|
|
|
+ :style="{
|
|
|
+ width: printForm.fontSize + 'px',
|
|
|
+ height:
|
|
|
+ printForm.fontSize * printForm.lineHeight +
|
|
|
+ 'px',
|
|
|
+ display: 'block',
|
|
|
+ fontFamily: printForm.fontFamily,
|
|
|
+ }"
|
|
|
+ ></span>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <div :class="['NNPE-words']">
|
|
|
+ <span
|
|
|
+ class="NNPE-chs"
|
|
|
+ :class="[
|
|
|
+ pItem.tokens[9] === '' ? 'marginRight' : '',
|
|
|
+ (pItem.highIndex &&
|
|
|
+ printForm.bold.indexOf(pItem.types) > -1) ||
|
|
|
+ (printForm.bold.indexOf('sentence') > -1 &&
|
|
|
+ longSentIds.indexOf(pItem.sent_id) > -1)
|
|
|
+ ? 'fontWeight'
|
|
|
+ : '',
|
|
|
+ pItem.marginRigh ? 'marginSingleRight' : '',
|
|
|
+ ]"
|
|
|
+ :style="{
|
|
|
+ fontSize: printForm.fontSize + 'px',
|
|
|
+ color: printForm.color,
|
|
|
+ lineHeight: printForm.lineHeight,
|
|
|
+ fontFamily: printForm.fontFamily,
|
|
|
+ }"
|
|
|
+ >{{ pItem.tokens[2] }}</span
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ class="NNPE-chs NNPE-chs-both"
|
|
|
+ v-if="
|
|
|
+ item.wordsList[pIndex + 1] &&
|
|
|
+ item.wordsList[pIndex + 1].tokens[2] &&
|
|
|
+ enFhList.indexOf(
|
|
|
+ item.wordsList[pIndex + 1].tokens[2]
|
|
|
+ ) > -1
|
|
|
+ "
|
|
|
+ :class="[
|
|
|
+ item.wordsList[pIndex + 1].tokens[8] === ''
|
|
|
+ ? 'marginLeft'
|
|
|
+ : '',
|
|
|
+ (item.wordsList[pIndex + 1].highIndex &&
|
|
|
+ printForm.bold.indexOf(
|
|
|
+ item.wordsList[pIndex + 1].types
|
|
|
+ ) > -1) ||
|
|
|
+ (printForm.bold.indexOf('sentence') > -1 &&
|
|
|
+ longSentIds.indexOf(
|
|
|
+ item.wordsList[pIndex + 1].sent_id
|
|
|
+ ) > -1)
|
|
|
+ ? 'fontWeight'
|
|
|
+ : '',
|
|
|
+ item.wordsList[pIndex + 1].marginRight
|
|
|
+ ? 'marginSingleRight'
|
|
|
+ : '',
|
|
|
+ ]"
|
|
|
+ :style="{
|
|
|
+ fontSize: printForm.fontSize + 'px',
|
|
|
+ color: printForm.color,
|
|
|
+ lineHeight: printForm.lineHeight,
|
|
|
+ fontFamily: printForm.fontFamily,
|
|
|
+ }"
|
|
|
+ >{{ item.wordsList[pIndex + 1].tokens[2] }}</span
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ <template
|
|
|
+ v-if="
|
|
|
+ itemA.articleImg &&
|
|
|
+ itemA.articleImg[index] &&
|
|
|
+ printForm.range.indexOf('image') > -1
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <figure
|
|
|
+ v-for="(itemI, indexI) in itemA.articleImg[index]"
|
|
|
+ :key="indexI"
|
|
|
+ style="text-align: center"
|
|
|
+ >
|
|
|
+ <el-image
|
|
|
+ :width="itemI.width"
|
|
|
+ :height="itemI.height"
|
|
|
+ :src="itemI.src"
|
|
|
+ fit="contain"
|
|
|
+ :preview-src-list="[itemI.src]"
|
|
|
+ ></el-image>
|
|
|
+ </figure>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <div
|
|
|
+ v-else
|
|
|
+ class="cn-content"
|
|
|
+ v-html="itemA.art_content"
|
|
|
+ :style="{
|
|
|
+ color: printForm.color,
|
|
|
+ fontSize: printForm.fontSize + 'px',
|
|
|
+ lineHeight: printForm.lineHeight,
|
|
|
+ }"
|
|
|
+ ></div>
|
|
|
+ <template v-if="printForm.range.indexOf('vocab') > -1">
|
|
|
+ <h5>词表</h5>
|
|
|
+ <ul class="newwordlist">
|
|
|
+ <li
|
|
|
+ v-for="(itemW, indexW) in itemA.wordLit"
|
|
|
+ :key="indexW"
|
|
|
+ :class="['li-' + colorObj.type]"
|
|
|
+ >
|
|
|
+ <div class="word-info">
|
|
|
+ <div class="word-info-top">
|
|
|
+ <b class="word" :style="{ color: colorObj.newWordColor }">{{
|
|
|
+ itemW.word
|
|
|
+ }}</b>
|
|
|
+ <span
|
|
|
+ class="symbol"
|
|
|
+ :style="{ color: colorObj.newWordOtherColor }"
|
|
|
+ >{{ itemW.symbol }}</span
|
|
|
+ >
|
|
|
+ <label
|
|
|
+ class="word-type"
|
|
|
+ :style="{
|
|
|
+ color: colorObj.newWordType[itemW.type]
|
|
|
+ ? colorObj.newWordType[itemW.type].color
|
|
|
+ : '',
|
|
|
+ background: colorObj.newWordType[itemW.type]
|
|
|
+ ? colorObj.newWordType[itemW.type].bg
|
|
|
+ : '',
|
|
|
+ }"
|
|
|
+ >{{ itemW.typeCn }}</label
|
|
|
+ >
|
|
|
+ <span class="star" v-if="itemW.rate">
|
|
|
+ <svg-icon
|
|
|
+ icon-class="star-filled"
|
|
|
+ v-for="(itemS, indexS) in itemW.rate"
|
|
|
+ :key="indexS"
|
|
|
+ :style="{ color: colorObj.newWordStar }"
|
|
|
+ ></svg-icon>
|
|
|
+ </span>
|
|
|
+ <div class="para-list">
|
|
|
+ <div
|
|
|
+ class="para"
|
|
|
+ v-for="(itemP, indexP) in itemW.paraList"
|
|
|
+ :key="indexP"
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ class="cixing"
|
|
|
+ :style="{ color: colorObj.newWordOtherColor }"
|
|
|
+ >{{ itemP.cixing }}</span
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ class="shiyi"
|
|
|
+ :style="{ color: colorObj.newWordOtherColor }"
|
|
|
+ >{{ itemP.para }}</span
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <h5 v-if="itemA.art_phrase_data && itemA.art_phrase_data.length > 0">
|
|
|
+ 短语
|
|
|
+ </h5>
|
|
|
+ <ul
|
|
|
+ class="phraselist"
|
|
|
+ v-if="itemA.art_phrase_data && itemA.art_phrase_data.length > 0"
|
|
|
+ >
|
|
|
+ <li v-for="(itemW, indexW) in itemA.phraseList" :key="indexW">
|
|
|
+ <div class="word-info">
|
|
|
+ <div class="word-info-top">
|
|
|
+ <b
|
|
|
+ class="phrase"
|
|
|
+ :style="{ color: colorObj.phraseColor }"
|
|
|
+ @click="showItem(itemW, indexW)"
|
|
|
+ >{{ itemW.exp_title }}</b
|
|
|
+ >
|
|
|
+ <div class="para-list">
|
|
|
+ <div class="para">
|
|
|
+ <span
|
|
|
+ class="shiyi"
|
|
|
+ :style="{ color: colorObj.phraseOhterColor }"
|
|
|
+ >{{ itemW.exp_content }}</span
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <h5
|
|
|
+ v-if="itemA.art_explain_data && itemA.art_explain_data.length > 0"
|
|
|
+ >
|
|
|
+ 注释
|
|
|
+ </h5>
|
|
|
+ <ul
|
|
|
+ class="explainlist"
|
|
|
+ v-if="itemA.art_explain_data && itemA.art_explain_data.length > 0"
|
|
|
+ >
|
|
|
+ <li v-for="(itemW, indexW) in itemA.art_explain_data" :key="indexW">
|
|
|
+ <b class="prefix" :style="{ color: colorObj.phraseOhterColor }">{{
|
|
|
+ itemW.exp_title
|
|
|
+ }}</b>
|
|
|
+ <div
|
|
|
+ class="para-list"
|
|
|
+ :style="{ color: colorObj.newWordOtherColor }"
|
|
|
+ v-html="itemW.exp_content"
|
|
|
+ ></div>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </template>
|
|
|
+ <template v-if="printForm.range.indexOf('ciyun') > -1">
|
|
|
+ <iframe
|
|
|
+ class="ciyun-box"
|
|
|
+ width="100%"
|
|
|
+ height="720px"
|
|
|
+ border="none"
|
|
|
+ :src="
|
|
|
+ './ciyun/ciyunPrint.html?partitionKey=1&searchType=2&articleId=' +
|
|
|
+ itemA.id
|
|
|
+ "
|
|
|
+ ></iframe>
|
|
|
+ </template>
|
|
|
+ <template v-if="printForm.range.indexOf('notes') > -1">
|
|
|
+ <h5 v-if="itemA.notesList.length > 0">笔记</h5>
|
|
|
+ <ul class="explainlist">
|
|
|
+ <li v-for="(itemW, indexW) in itemA.notesList" :key="indexW">
|
|
|
+ <b class="prefix" :style="{ color: colorObj.phraseOhterColor }">{{
|
|
|
+ itemW.select_text
|
|
|
+ }}</b>
|
|
|
+ <div
|
|
|
+ class="para-list"
|
|
|
+ :style="{ color: colorObj.newWordOtherColor }"
|
|
|
+ v-html="itemW.note"
|
|
|
+ ></div>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ <footer class="print-footer">
|
|
|
+ <span>{{ printForm.school }}</span>
|
|
|
+ <span>{{ printForm.className }}</span>
|
|
|
+ <span>{{ printForm.name }}</span>
|
|
|
+ <span style="flex: 1"></span>
|
|
|
+ <span>{{ printForm.dateStr }}</span>
|
|
|
+ <span>{{ printForm.momo }}</span>
|
|
|
+ </footer>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -546,6 +920,7 @@ export default {
|
|
|
return {
|
|
|
userMessage: getToken() ? JSON.parse(getToken()) : null,
|
|
|
articleId: this.$route.query.id ? this.$route.query.id : "",
|
|
|
+ issId: this.$route.query.iss_id ? this.$route.query.iss_id : "",
|
|
|
resArr: [],
|
|
|
enFhList: [
|
|
|
",",
|
|
@@ -683,6 +1058,14 @@ export default {
|
|
|
},
|
|
|
isPrint: false,
|
|
|
printNumber: 0,
|
|
|
+ issDetail: null, // 整期文章内容
|
|
|
+ issDetailMap: {}, // 整期文章详情map
|
|
|
+ printManyFlag: false,
|
|
|
+ printManyId: [], // 打印多篇文章id
|
|
|
+ loading: false,
|
|
|
+ printManyMenu: [], // 打印多篇文章目录
|
|
|
+ printManyDetails: [], // 最终确定打印文章内容详情
|
|
|
+ isPrintMore: false,
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -721,6 +1104,7 @@ export default {
|
|
|
},
|
|
|
];
|
|
|
}
|
|
|
+ this.getIssueDetail();
|
|
|
},
|
|
|
methods: {
|
|
|
goBack() {
|
|
@@ -886,7 +1270,8 @@ export default {
|
|
|
setTimeout(() => {
|
|
|
waterMark.set(
|
|
|
this.userMessage.user_name + " " + this.userMessage.phone,
|
|
|
- ""
|
|
|
+ "",
|
|
|
+ "showWaterMark"
|
|
|
);
|
|
|
}, 1000);
|
|
|
},
|
|
@@ -996,6 +1381,374 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ // 获取整期报刊内容
|
|
|
+ getIssueDetail() {
|
|
|
+ this.issDetail = null;
|
|
|
+ this.issDetailMap = {};
|
|
|
+ let MethodName = "/PaperServer/Client/Article/GetIssueDetail";
|
|
|
+ getLogin(MethodName, {
|
|
|
+ id: this.issId,
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.status === 1) {
|
|
|
+ this.issDetail = res.data;
|
|
|
+ if (res.data.articles) {
|
|
|
+ this.issDetailMap = res.data.articles.reduce((acc, user) => {
|
|
|
+ acc[user.id] = user;
|
|
|
+ return acc;
|
|
|
+ }, {});
|
|
|
+ res.data.articles.forEach((itemA) => {
|
|
|
+ let explainNumber = 1;
|
|
|
+ let resArr = [];
|
|
|
+ let articleInfo = JSON.parse(JSON.stringify(itemA));
|
|
|
+ let sentenceList = articleInfo.art_corpus_data
|
|
|
+ ? articleInfo.art_corpus_data.sentList
|
|
|
+ : [];
|
|
|
+ let longSentIds =
|
|
|
+ articleInfo.art_corpus_data &&
|
|
|
+ articleInfo.art_corpus_data.artStatInfo
|
|
|
+ ? articleInfo.art_corpus_data.artStatInfo.longSentIds
|
|
|
+ : [];
|
|
|
+ let wordLit = articleInfo.art_voc_data
|
|
|
+ ? articleInfo.art_voc_data
|
|
|
+ : [];
|
|
|
+ let annotationList = articleInfo.art_phrase_data
|
|
|
+ ? articleInfo.art_explain_data
|
|
|
+ : [];
|
|
|
+ let phraseList = articleInfo.art_explain_data
|
|
|
+ ? articleInfo.art_phrase_data
|
|
|
+ : [];
|
|
|
+ wordLit.forEach((item) => {
|
|
|
+ item.types = "newWord";
|
|
|
+ item.exp_title = item.word_name;
|
|
|
+ let paraStr = "";
|
|
|
+ if (item.word_explain && item.word_explain.word_para_list) {
|
|
|
+ item.word_explain.word_para_list.forEach((items) => {
|
|
|
+ paraStr += items.para;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ item.exp_content = paraStr;
|
|
|
+ item.word = item.word_name;
|
|
|
+ item.symbol = item.word_explain.ph ? item.word_explain.ph : "";
|
|
|
+ item.paraList = item.word_explain.word_para_list;
|
|
|
+ item.type = item.word_explain.vl_level
|
|
|
+ ? item.word_explain.vl_level
|
|
|
+ : "";
|
|
|
+ item.typeCn = item.word_explain.vl_level_name
|
|
|
+ ? item.word_explain.vl_level_name
|
|
|
+ : "";
|
|
|
+ item.rate = item.word_explain.star
|
|
|
+ ? item.word_explain.star
|
|
|
+ : null;
|
|
|
+ });
|
|
|
+ phraseList.forEach((item) => {
|
|
|
+ item.type = "phrase";
|
|
|
+ });
|
|
|
+ annotationList.forEach((item) => {
|
|
|
+ item.type = "explain";
|
|
|
+ });
|
|
|
+ let allWordList = wordLit.concat(phraseList);
|
|
|
+ let leg =
|
|
|
+ articleInfo.art_corpus_data.sentList[
|
|
|
+ articleInfo.art_corpus_data.sentList.length - 1
|
|
|
+ ].pno;
|
|
|
+ sentenceList.forEach((item, index) => {
|
|
|
+ let flag = "";
|
|
|
+ item.StyleTokens = [];
|
|
|
+ item.tokens.forEach((items, indexs) => {
|
|
|
+ let obj = {
|
|
|
+ tokens: items,
|
|
|
+ marginRight: indexs === item.tokens.length - 1,
|
|
|
+ };
|
|
|
+ allWordList.forEach((itema, indexa) => {
|
|
|
+ itema.bind_sent_data.bind_sents.forEach((itemb, indexb) => {
|
|
|
+ if (itemb.sent_id === item.id) {
|
|
|
+ if (itema.type === "explain") {
|
|
|
+ if (
|
|
|
+ indexs ===
|
|
|
+ itemb.sel_token_idxes[
|
|
|
+ itemb.sel_token_idxes.length - 1
|
|
|
+ ]
|
|
|
+ ) {
|
|
|
+ obj.highIndex = true;
|
|
|
+ obj.type = itema.type;
|
|
|
+ obj.types = itema.type;
|
|
|
+ obj.word_id = itema.id; // 生词注释短语的id
|
|
|
+ obj.explainNumber = explainNumber;
|
|
|
+ explainNumber++;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ itemb.sel_token_idxes.forEach((itemi) => {
|
|
|
+ if (indexs === itemi) {
|
|
|
+ obj.highIndex = true;
|
|
|
+ obj.type = itema.type;
|
|
|
+ obj.types = itema.types
|
|
|
+ ? itema.types
|
|
|
+ : itema.type;
|
|
|
+ obj.word_id = itema.id; // 生词注释短语的id
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ if (
|
|
|
+ itemb.sel_token_idxes.length === 0 &&
|
|
|
+ itema.type === "explain" &&
|
|
|
+ indexs === item.tokens.length - 1
|
|
|
+ ) {
|
|
|
+ flag = itema.id;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ item.StyleTokens.push(obj);
|
|
|
+ if (flag) {
|
|
|
+ item.StyleTokens.push({
|
|
|
+ tokens: [
|
|
|
+ 0,
|
|
|
+ 8,
|
|
|
+ "Students",
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ " ",
|
|
|
+ 0,
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ ],
|
|
|
+ type: "explain",
|
|
|
+ word_id: flag,
|
|
|
+ isExplain: true,
|
|
|
+ explainNumber: explainNumber,
|
|
|
+ });
|
|
|
+ explainNumber++;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ for (let i = 0; i < leg + 1; i++) {
|
|
|
+ let obgs = {
|
|
|
+ isShow: true,
|
|
|
+ marginRight: false,
|
|
|
+ tokens: [
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ "#@@#",
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ " ",
|
|
|
+ " ",
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ ],
|
|
|
+ };
|
|
|
+ let obj = {
|
|
|
+ wordsList: i === 0 ? [] : [obgs, obgs],
|
|
|
+ };
|
|
|
+ resArr.push(obj);
|
|
|
+ }
|
|
|
+ sentenceList.forEach((item, index) => {
|
|
|
+ item.StyleTokens.forEach((items, indexs) => {
|
|
|
+ items.isShow = this.enFhList.indexOf(items.tokens[2]) == -1;
|
|
|
+ items.sent_id = item.id;
|
|
|
+ resArr[item.pno].wordsList.push(items);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ itemA.resArr = resArr;
|
|
|
+ itemA.longSentIds = longSentIds;
|
|
|
+ itemA.sentenceList = sentenceList;
|
|
|
+ itemA.wordLit = wordLit;
|
|
|
+ itemA.annotationList = annotationList;
|
|
|
+ itemA.phraseList = phraseList;
|
|
|
+ itemA.allWordList = allWordList;
|
|
|
+ itemA.articleImg = {};
|
|
|
+ let articleArr = itemA.art_content.split('<p class="para"');
|
|
|
+ articleArr.forEach((itema) => {
|
|
|
+ if (itema.indexOf("<img") > -1) {
|
|
|
+ // 当前段落有图片
|
|
|
+ let imgArr = [];
|
|
|
+ let pno =
|
|
|
+ itema.indexOf('pno="') > -1
|
|
|
+ ? itema.substring(
|
|
|
+ itema.indexOf('pno="') + 5,
|
|
|
+ itema
|
|
|
+ .substring(itema.indexOf('pno="') + 5)
|
|
|
+ .indexOf('"') +
|
|
|
+ 1 +
|
|
|
+ 5
|
|
|
+ )
|
|
|
+ : 0;
|
|
|
+ let itemArr = itema.split("<img");
|
|
|
+ itemArr.forEach((items) => {
|
|
|
+ if (items.indexOf('src="') > -1) {
|
|
|
+ let indexS =
|
|
|
+ items
|
|
|
+ .substring(items.indexOf('src="') + 5)
|
|
|
+ .indexOf('"') + items.indexOf('src="'); // src所在索引
|
|
|
+ let indexW =
|
|
|
+ items.indexOf('width="') > -1
|
|
|
+ ? items
|
|
|
+ .substring(items.indexOf('width="') + 7)
|
|
|
+ .indexOf('"')
|
|
|
+ : items.indexOf("width: ") > -1
|
|
|
+ ? items
|
|
|
+ .substring(items.indexOf("width: ") + 7)
|
|
|
+ .indexOf(";")
|
|
|
+ : -1; // width所在索引
|
|
|
+ let indexH =
|
|
|
+ items.indexOf('height="') > -1
|
|
|
+ ? items
|
|
|
+ .substring(items.indexOf('height="') + 8)
|
|
|
+ .indexOf('"')
|
|
|
+ : items.indexOf("height: ") > -1
|
|
|
+ ? items
|
|
|
+ .substring(items.indexOf("height: ") + 8)
|
|
|
+ .indexOf(";")
|
|
|
+ : -1; // height所在索引
|
|
|
+ let imgobj = {
|
|
|
+ src: items.substring(
|
|
|
+ items.indexOf('src="') + 5,
|
|
|
+ indexS + 5
|
|
|
+ ),
|
|
|
+ width:
|
|
|
+ items.indexOf('width="') > -1
|
|
|
+ ? items.substring(
|
|
|
+ items.indexOf('width="') + 7,
|
|
|
+ items.indexOf('width="') + indexW + 7
|
|
|
+ )
|
|
|
+ : items.indexOf("width: ") > -1
|
|
|
+ ? items.substring(
|
|
|
+ items.indexOf("width: ") + 7,
|
|
|
+ items.indexOf("width: ") + indexW + 7
|
|
|
+ )
|
|
|
+ : null,
|
|
|
+ };
|
|
|
+ imgArr.push(imgobj);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ itemA.articleImg[pno] = imgArr;
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ let MethodNames = "/PaperServer/Client/Article/ArtNoteListInArt";
|
|
|
+ let data = {
|
|
|
+ id: itemA.id,
|
|
|
+ };
|
|
|
+ getLogin(MethodNames, data).then((res) => {
|
|
|
+ if (res.status === 1) {
|
|
|
+ itemA.notesList = res.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (res.data.issueInfo) {
|
|
|
+ let arr = [];
|
|
|
+ res.data.issueInfo.chn_art_data.forEach((item) => {
|
|
|
+ let arrs = [];
|
|
|
+ item.arts.forEach((items) => {
|
|
|
+ arrs.push({
|
|
|
+ value: items.id,
|
|
|
+ label: items.art_title,
|
|
|
+ });
|
|
|
+ });
|
|
|
+ arr.push({
|
|
|
+ value: item.chn_idx,
|
|
|
+ label: item.chn_name,
|
|
|
+ children: arrs,
|
|
|
+ });
|
|
|
+ });
|
|
|
+ this.printManyMenu = [
|
|
|
+ {
|
|
|
+ value: res.data.issueInfo.id,
|
|
|
+ label: res.data.issueInfo.iss_name,
|
|
|
+ children: arr,
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 打印多篇按钮
|
|
|
+ handleManyPrint() {
|
|
|
+ this.printManyFlag = true;
|
|
|
+ },
|
|
|
+ // 确定打印多篇
|
|
|
+ submitPrintMore() {
|
|
|
+ this.loading = true;
|
|
|
+ let printManyIds = [];
|
|
|
+ let printManyDetails = [];
|
|
|
+ this.printManyId.forEach((item) => {
|
|
|
+ printManyIds.push(item[2]);
|
|
|
+ printManyDetails.push(this.issDetailMap[item[2]]);
|
|
|
+ });
|
|
|
+ this.printManyDetails = printManyDetails;
|
|
|
+ this.isPrintMore = true;
|
|
|
+ setTimeout(() => {
|
|
|
+ waterMark.set(
|
|
|
+ this.userMessage.user_name + " " + this.userMessage.phone,
|
|
|
+ "",
|
|
|
+ "showWaterMarks"
|
|
|
+ );
|
|
|
+ }, 1000);
|
|
|
+ setTimeout(() => {
|
|
|
+ this.handlePrintManyDetails();
|
|
|
+ }, 1500);
|
|
|
+ },
|
|
|
+ handlePrintManyDetails() {
|
|
|
+ let MethodName =
|
|
|
+ "/ShopServer/Client/PrintRecordManager/GetMyPrintCount_Article";
|
|
|
+ getLogin(MethodName, {
|
|
|
+ goods_type: 21,
|
|
|
+ date_range: "TODAY",
|
|
|
+ article_id: this.articleId,
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.status === 1) {
|
|
|
+ if (res.print_count < 5) {
|
|
|
+ getLogin(
|
|
|
+ "/ShopServer/Client/PrintRecordManager/AddPrintRecord_Article",
|
|
|
+ {
|
|
|
+ goods_type: 21,
|
|
|
+ article_id: this.articleId,
|
|
|
+ }
|
|
|
+ ).then((res) => {
|
|
|
+ if (res.status === 1) {
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$print(this.$refs["printAreaManys"], {
|
|
|
+ noPrint: ".noPrint",
|
|
|
+ type: "html",
|
|
|
+ scanStyles: true,
|
|
|
+ showModal: true,
|
|
|
+ // style: style,// 亦可使用引入的外部css;
|
|
|
+ onStart: () => {
|
|
|
+ // console.log("打印开始");
|
|
|
+ },
|
|
|
+ onEnd: () => {
|
|
|
+ // console.log("打印完成");
|
|
|
+ },
|
|
|
+ });
|
|
|
+
|
|
|
+ this.loading = false;
|
|
|
+ this.printManyFlag = false;
|
|
|
+ this.isPrintMore = false;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.loading = false;
|
|
|
+ this.printManyFlag = false;
|
|
|
+ this.isPrintMore = false;
|
|
|
+ this.$message.warning("今日打印次数已达上限");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
if (this.articleInfo) {
|
|
@@ -1325,8 +2078,8 @@ export default {
|
|
|
width: 202px;
|
|
|
}
|
|
|
.el-button {
|
|
|
- width: 140px;
|
|
|
- padding: 8px 32px;
|
|
|
+ width: 70px;
|
|
|
+ padding: 8px 0;
|
|
|
color: rgba(0, 0, 0, 0.91);
|
|
|
font-size: 14px;
|
|
|
font-weight: 400;
|