|
@@ -304,23 +304,25 @@
|
|
|
:key="indexsss + 'word'"
|
|
|
:class="['word']"
|
|
|
>
|
|
|
- <span
|
|
|
+ <div
|
|
|
v-if="pinyinShow"
|
|
|
:class="['pinyin']"
|
|
|
:style="{
|
|
|
fontSize: pinyinFontsize + 'px',
|
|
|
lineHeight: pinyinLineHeight + 'px',
|
|
|
}"
|
|
|
- >{{ word.pinyin }}</span
|
|
|
>
|
|
|
- <br v-if="pinyinShow" />
|
|
|
- <span
|
|
|
+ {{ word.pinyin }}
|
|
|
+ </div>
|
|
|
+ <!-- <br v-if="pinyinShow" /> -->
|
|
|
+ <div
|
|
|
class="hanzi"
|
|
|
:style="{
|
|
|
fontSize: wordFontsize + 'px',
|
|
|
lineHeight: wordLineHeight + 'px',
|
|
|
+ background: word.color ? word.color : '',
|
|
|
color: word.color
|
|
|
- ? word.color
|
|
|
+ ? '#FFFFFF'
|
|
|
: !xifen
|
|
|
? leftNavIndex == 0
|
|
|
? seleLevelMapList.indexOf(word.levels.P_G) !=
|
|
@@ -352,8 +354,9 @@
|
|
|
: ''
|
|
|
: '',
|
|
|
}"
|
|
|
- >{{ word.word }}</span
|
|
|
>
|
|
|
+ {{ word.word }}
|
|
|
+ </div>
|
|
|
</span>
|
|
|
</template>
|
|
|
<template v-else>
|
|
@@ -362,24 +365,25 @@
|
|
|
v-for="(word, indexsss) in itemss.text"
|
|
|
:key="indexsss + 'word'"
|
|
|
>
|
|
|
- <span
|
|
|
+ <div
|
|
|
v-if="pinyinShow"
|
|
|
:class="['pinyin']"
|
|
|
:style="{
|
|
|
fontSize: pinyinFontsize + 'px',
|
|
|
lineHeight: pinyinLineHeight + 'px',
|
|
|
}"
|
|
|
- >{{ word.pinyin }}</span
|
|
|
>
|
|
|
- <br v-if="pinyinShow" />
|
|
|
- <span
|
|
|
+ {{ word.pinyin }}
|
|
|
+ </div>
|
|
|
+ <!-- <br v-if="pinyinShow" /> -->
|
|
|
+ <div
|
|
|
class="hanzi"
|
|
|
:style="{
|
|
|
fontSize: wordFontsize + 'px',
|
|
|
lineHeight: wordLineHeight + 'px',
|
|
|
-
|
|
|
+ background: word.color ? word.color : '',
|
|
|
color: word.color
|
|
|
- ? word.color
|
|
|
+ ? '#FFFFFF'
|
|
|
: !xifen
|
|
|
? leftNavIndex == 0
|
|
|
? seleLevelMapList.indexOf(word.levels.P_G) !=
|
|
@@ -411,8 +415,9 @@
|
|
|
: ''
|
|
|
: '',
|
|
|
}"
|
|
|
- >{{ word.word }}</span
|
|
|
>
|
|
|
+ {{ word.word }}
|
|
|
+ </div>
|
|
|
</span>
|
|
|
</template>
|
|
|
</span>
|
|
@@ -425,8 +430,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
-
|
|
|
-<script>
|
|
|
+
|
|
|
+ <script>
|
|
|
import Header from "@/components/Header.vue";
|
|
|
import * as echarts from "echarts";
|
|
|
import "echarts/lib/chart/bar";
|
|
@@ -521,46 +526,53 @@ export default {
|
|
|
// 下载文章
|
|
|
downArticle() {
|
|
|
let html = "";
|
|
|
+ let newhtml = "";
|
|
|
if (this.$(".articel").length > 0) {
|
|
|
html = this.$(".articel").html();
|
|
|
+ this.$("br").remove();
|
|
|
+ newhtml = this.$(".articel").html();
|
|
|
+ this.$(".articel").html(html);
|
|
|
}
|
|
|
- let style = ` <style>
|
|
|
- .sentence {
|
|
|
- margin-bottom: 8px;
|
|
|
-}
|
|
|
-.word {
|
|
|
- writing-mode: vertical-lr;
|
|
|
-}
|
|
|
-.word > span {
|
|
|
- writing-mode: horizontal-tb;
|
|
|
-}
|
|
|
-.pinyin {
|
|
|
- color: rgba(255, 255, 255, 0.5);
|
|
|
- text-align: center;
|
|
|
- line-height: 12px;
|
|
|
- font-family: "GB-PINYINOK-B";
|
|
|
-}
|
|
|
-.hanzi {
|
|
|
- color: rgb(255, 255, 255);
|
|
|
- text-align: center;
|
|
|
- line-height: 28px;
|
|
|
- font-family: "FZJCGFKTK";
|
|
|
-}
|
|
|
- </style>`;
|
|
|
+ let dv = document.createElement("div");
|
|
|
+ dv.id = "html_dv";
|
|
|
+ dv.innerHTML = newhtml;
|
|
|
+ dv.style.display = "none";
|
|
|
+ document.body.appendChild(dv);
|
|
|
+ let cxzcxz = this.$("#html_dv").html();
|
|
|
+ let style = `<style>
|
|
|
+ .sentence {
|
|
|
+ margin-bottom: 8px;
|
|
|
+ }
|
|
|
+ .word{
|
|
|
+ float:left;
|
|
|
+ }
|
|
|
+ .pinyin {
|
|
|
+ color: rgba(255, 255, 255, 0.5);
|
|
|
+ text-align: center;
|
|
|
+ line-height: 12px;
|
|
|
+ font-family: "GB-PINYINOK-B";
|
|
|
+ }
|
|
|
+ .hanzi {
|
|
|
+ color: rgb(255, 255, 255);
|
|
|
+ text-align: center;
|
|
|
+ line-height: 28px;
|
|
|
+ font-family: "FZJCGFKTK";
|
|
|
+ }
|
|
|
+ </style>`;
|
|
|
let content = `<!DOCTYPE html>
|
|
|
-<html lang="en">
|
|
|
-<head>
|
|
|
- <meta charset="UTF-8">
|
|
|
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
- ${style}
|
|
|
-</head>
|
|
|
-<body>
|
|
|
-<div style="background:#26272a">
|
|
|
- ${html}
|
|
|
-</div>
|
|
|
-</body>
|
|
|
-</html>`;
|
|
|
+ <html lang="en">
|
|
|
+ <head>
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
+ ${style}
|
|
|
+ </head>
|
|
|
+ <body>
|
|
|
+ <div style="background:#26272a">
|
|
|
+ ${cxzcxz}
|
|
|
+ </div>
|
|
|
+ </body>
|
|
|
+ </html>`;
|
|
|
let converted = htmlDocx.asBlob(content);
|
|
|
FileSaver.saveAs(converted, "文章.docx");
|
|
|
},
|
|
@@ -1079,7 +1091,7 @@ export default {
|
|
|
|
|
|
// this.loading = false;
|
|
|
if (type) {
|
|
|
- this.LeftLoading = true;
|
|
|
+ this.LeftLoading = false;
|
|
|
} else {
|
|
|
this.getArticleData();
|
|
|
}
|
|
@@ -1146,8 +1158,8 @@ export default {
|
|
|
mounted() {},
|
|
|
};
|
|
|
</script>
|
|
|
-
|
|
|
-<style lang="scss" scoped>
|
|
|
+
|
|
|
+ <style lang="scss" scoped>
|
|
|
.textanalysis_index {
|
|
|
background: #f6f6f6;
|
|
|
min-height: 100%;
|
|
@@ -1588,27 +1600,20 @@ export default {
|
|
|
display: flex;
|
|
|
.word {
|
|
|
text-align: center;
|
|
|
- // writing-mode: vertical-lr;
|
|
|
- > span {
|
|
|
- // writing-mode: horizontal-tb;
|
|
|
- }
|
|
|
- }
|
|
|
- .fc_pinyin {
|
|
|
- float: left;
|
|
|
}
|
|
|
.pinyin {
|
|
|
+ display: inline-block;
|
|
|
+ min-height: 12px;
|
|
|
color: rgba(255, 255, 255, 0.5);
|
|
|
text-align: center;
|
|
|
line-height: 12px;
|
|
|
font-family: "GB-PINYINOK-B";
|
|
|
- // display: flex;
|
|
|
}
|
|
|
.hanzi {
|
|
|
color: rgb(255, 255, 255);
|
|
|
text-align: center;
|
|
|
line-height: 28px;
|
|
|
font-family: "FZJCGFKTK";
|
|
|
- // display: flex;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1620,7 +1625,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
</style>
|
|
|
-<style lang="scss">
|
|
|
+ <style lang="scss">
|
|
|
.textanalysis_index {
|
|
|
.el-switch__label.is-active {
|
|
|
color: #000000;
|