|
@@ -2,7 +2,22 @@
|
|
|
<template>
|
|
|
<div class="NPC-ArticleView NPC-ArticleView-container">
|
|
|
<div class="ArticleView-header">
|
|
|
- <a class="ArticleView-full" @click="fullScreen">全屏模式</a>
|
|
|
+ <a class="ArticleView-full" @click="fullScreen">黑板模式</a>
|
|
|
+ <div>
|
|
|
+ <div
|
|
|
+ class="left"
|
|
|
+ @click="submit"
|
|
|
+ :style="{ marginLeft: showPractice ? '97px' : '' }"
|
|
|
+ v-if="
|
|
|
+ tokenData &&
|
|
|
+ tokenData.popedom_code_list &&
|
|
|
+ tokenData.popedom_code_list.indexOf(2000001) != -1
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <img src="../../../../assets/NPC/wbfx-icon.png" alt="" />
|
|
|
+ 文本分析
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<template v-if="curQue.checkList.indexOf(1) > -1">
|
|
|
<el-switch
|
|
|
style="display: block"
|
|
@@ -149,6 +164,8 @@ import NormalModelChs from "./NormalModelChs.vue";
|
|
|
import Practice from "./Practicechs.vue"; // 语音练习模式
|
|
|
import WordModel from "./WordModelChs.vue"; // 语音练习模式
|
|
|
import Voicefullscreen from "../Voicefullscreen.vue";
|
|
|
+import { getToken } from "@/utils/auth";
|
|
|
+import { analysSubmit } from "@/api/ajax";
|
|
|
|
|
|
export default {
|
|
|
name: "ArticleViewChs",
|
|
@@ -194,6 +211,7 @@ export default {
|
|
|
writeModel: {}, //生词/取词模式
|
|
|
practiceModel: {} //练习模式
|
|
|
},
|
|
|
+ tokenData: null,
|
|
|
mathNum: Math.random()
|
|
|
.toString(36)
|
|
|
.substr(2),
|
|
@@ -280,6 +298,28 @@ export default {
|
|
|
});
|
|
|
return pinyin;
|
|
|
},
|
|
|
+ submit() {
|
|
|
+ let loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: "Loading",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(0, 0, 0, 0.7)"
|
|
|
+ });
|
|
|
+ analysSubmit({
|
|
|
+ app_user_id: "",
|
|
|
+ text: this.curQue.article
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ window.open(
|
|
|
+ window.location.origin +
|
|
|
+ `/GCLS-TC/#/textanalysis/Result?id=${res.record.id}&type=文本分析`
|
|
|
+ );
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ .catch(res => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
+ },
|
|
|
//语音全屏
|
|
|
fullScreen() {
|
|
|
this.pauseAudio();
|
|
@@ -510,6 +550,8 @@ export default {
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {
|
|
|
+ let data = getToken() ? JSON.parse(getToken()) : null;
|
|
|
+ this.tokenData = data;
|
|
|
if (this.NNPENewWordList && this.NNPENewWordList.length > 0) {
|
|
|
this.handleNewword();
|
|
|
}
|
|
@@ -563,7 +605,7 @@ export default {
|
|
|
}
|
|
|
.ArticleView-full {
|
|
|
position: absolute;
|
|
|
- top: 0;
|
|
|
+ top: 5px;
|
|
|
background: url("../../../../assets/NPC/full-screen-red.png") left center
|
|
|
no-repeat;
|
|
|
background-size: 16px 16px;
|
|
@@ -581,6 +623,23 @@ export default {
|
|
|
align-items: center;
|
|
|
margin-bottom: 16px;
|
|
|
position: relative;
|
|
|
+ .left {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ width: 104px;
|
|
|
+ height: 32px;
|
|
|
+ background: #ffffff;
|
|
|
+ border: 1px solid rgba(0, 0, 0, 0.25);
|
|
|
+ box-shadow: 0px 2px 0px rgba(0, 0, 0, 0.02);
|
|
|
+ border-radius: 4px;
|
|
|
+ cursor: pointer;
|
|
|
+ img {
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ margin-right: 4px;
|
|
|
+ }
|
|
|
+ }
|
|
|
.setting-fontsize {
|
|
|
display: flex;
|
|
|
margin-left: 24px;
|