|
@@ -9,13 +9,13 @@
|
|
|
<a class="ArticleView-full" @click="fullScreen">黑板模式</a>
|
|
<a class="ArticleView-full" @click="fullScreen">黑板模式</a>
|
|
|
<div>
|
|
<div>
|
|
|
<div
|
|
<div
|
|
|
- class="left"
|
|
|
|
|
- @click="submit"
|
|
|
|
|
- :style="{ marginLeft: '104px' }"
|
|
|
|
|
v-if="
|
|
v-if="
|
|
|
(tokenData && tokenData.popedom_code_list && tokenData.popedom_code_list.indexOf(2100001) != -1) ||
|
|
(tokenData && tokenData.popedom_code_list && tokenData.popedom_code_list.indexOf(2100001) != -1) ||
|
|
|
(tokenData && tokenData.user_type === 'APP')
|
|
(tokenData && tokenData.user_type === 'APP')
|
|
|
"
|
|
"
|
|
|
|
|
+ class="left"
|
|
|
|
|
+ :style="{ marginLeft: '104px' }"
|
|
|
|
|
+ @click="submit"
|
|
|
>
|
|
>
|
|
|
<!-- <img src="@/assets/wbfx-icon.png" alt="" /> -->
|
|
<!-- <img src="@/assets/wbfx-icon.png" alt="" /> -->
|
|
|
文本分析
|
|
文本分析
|
|
@@ -24,139 +24,136 @@
|
|
|
<div class="right">
|
|
<div class="right">
|
|
|
<template v-if="data.property.is_enable_new_word === 'true'">
|
|
<template v-if="data.property.is_enable_new_word === 'true'">
|
|
|
<el-switch
|
|
<el-switch
|
|
|
- style="display: block"
|
|
|
|
|
v-model="showPhrases"
|
|
v-model="showPhrases"
|
|
|
|
|
+ style="display: block"
|
|
|
:active-color="bookInfo.theme_color"
|
|
:active-color="bookInfo.theme_color"
|
|
|
inactive-color="rgba(0,0,0,0.1)"
|
|
inactive-color="rgba(0,0,0,0.1)"
|
|
|
active-text=""
|
|
active-text=""
|
|
|
inactive-text="本课生词"
|
|
inactive-text="本课生词"
|
|
|
@change="handleSwitchChange('showPractice', 'showWord')"
|
|
@change="handleSwitchChange('showPractice', 'showWord')"
|
|
|
- >
|
|
|
|
|
- </el-switch>
|
|
|
|
|
|
|
+ />
|
|
|
</template>
|
|
</template>
|
|
|
<template v-if="data.property.is_enable_read === 'true'">
|
|
<template v-if="data.property.is_enable_read === 'true'">
|
|
|
<el-switch
|
|
<el-switch
|
|
|
- style="display: block"
|
|
|
|
|
v-model="showPractice"
|
|
v-model="showPractice"
|
|
|
|
|
+ style="display: block"
|
|
|
:active-color="bookInfo.theme_color"
|
|
:active-color="bookInfo.theme_color"
|
|
|
inactive-color="rgba(0,0,0,0.1)"
|
|
inactive-color="rgba(0,0,0,0.1)"
|
|
|
active-text=""
|
|
active-text=""
|
|
|
inactive-text="语音练习"
|
|
inactive-text="语音练习"
|
|
|
@change="handleSwitchChange('showPhrases', 'showWord')"
|
|
@change="handleSwitchChange('showPhrases', 'showWord')"
|
|
|
- >
|
|
|
|
|
- </el-switch>
|
|
|
|
|
|
|
+ />
|
|
|
</template>
|
|
</template>
|
|
|
<template v-if="data.property.is_enable_word === 'true'">
|
|
<template v-if="data.property.is_enable_word === 'true'">
|
|
|
<el-switch
|
|
<el-switch
|
|
|
- style="display: block"
|
|
|
|
|
v-model="showWord"
|
|
v-model="showWord"
|
|
|
|
|
+ style="display: block"
|
|
|
:active-color="bookInfo.theme_color"
|
|
:active-color="bookInfo.theme_color"
|
|
|
inactive-color="rgba(0,0,0,0.1)"
|
|
inactive-color="rgba(0,0,0,0.1)"
|
|
|
active-text=""
|
|
active-text=""
|
|
|
inactive-text="取词"
|
|
inactive-text="取词"
|
|
|
@change="handleSwitchChange('showPhrases', 'showPractice')"
|
|
@change="handleSwitchChange('showPhrases', 'showPractice')"
|
|
|
- >
|
|
|
|
|
- </el-switch>
|
|
|
|
|
|
|
+ />
|
|
|
</template>
|
|
</template>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="ArticleView-body" ref="ArticleViewbody">
|
|
|
|
|
|
|
+ <div ref="ArticleViewbody" class="ArticleView-body">
|
|
|
<NormalModelChs
|
|
<NormalModelChs
|
|
|
- :curQue="data"
|
|
|
|
|
- :titleFontsize="titleFontsize"
|
|
|
|
|
- :wordFontsize="wordFontsize"
|
|
|
|
|
- :bodyLeft="bodyLeft"
|
|
|
|
|
- :bodyWidth="bodyWidth"
|
|
|
|
|
- :attrib="data.unified_attrib"
|
|
|
|
|
- :noFont="noFont"
|
|
|
|
|
v-if="!showPhrases && !showPractice && !showWord"
|
|
v-if="!showPhrases && !showPractice && !showWord"
|
|
|
|
|
+ :cur-que="data"
|
|
|
|
|
+ :title-fontsize="titleFontsize"
|
|
|
|
|
+ :word-fontsize="wordFontsize"
|
|
|
|
|
+ :body-left="bodyLeft"
|
|
|
|
|
+ :body-width="bodyWidth"
|
|
|
|
|
+ :attrib="data.unified_attrib"
|
|
|
|
|
+ :no-font="noFont"
|
|
|
:config="config"
|
|
:config="config"
|
|
|
- @changeConfig="changeConfig"
|
|
|
|
|
:NNPEAnnotationList="NNPEAnnotationList"
|
|
:NNPEAnnotationList="NNPEAnnotationList"
|
|
|
- :colLength="colLength"
|
|
|
|
|
|
|
+ :col-length="colLength"
|
|
|
:multilingual="showLang && getLang() ? getLang() : ''"
|
|
:multilingual="showLang && getLang() ? getLang() : ''"
|
|
|
|
|
+ @changeConfig="changeConfig"
|
|
|
/>
|
|
/>
|
|
|
<PhraseModel
|
|
<PhraseModel
|
|
|
- :curQue="data"
|
|
|
|
|
- :titleFontsize="titleFontsize"
|
|
|
|
|
- :wordFontsize="wordFontsize"
|
|
|
|
|
|
|
+ v-if="showPhrases"
|
|
|
|
|
+ :cur-que="data"
|
|
|
|
|
+ :title-fontsize="titleFontsize"
|
|
|
|
|
+ :word-fontsize="wordFontsize"
|
|
|
:NNPENewWordList="NNPENewWordList"
|
|
:NNPENewWordList="NNPENewWordList"
|
|
|
:attrib="data.unified_attrib"
|
|
:attrib="data.unified_attrib"
|
|
|
- :noFont="noFont"
|
|
|
|
|
- :bodyLeft="bodyLeft"
|
|
|
|
|
- v-if="showPhrases"
|
|
|
|
|
|
|
+ :no-font="noFont"
|
|
|
|
|
+ :body-left="bodyLeft"
|
|
|
:config="config"
|
|
:config="config"
|
|
|
- @changeConfig="changeConfig"
|
|
|
|
|
:TaskModel="isJudgingRightWrong ? 'ANSWER' : ''"
|
|
:TaskModel="isJudgingRightWrong ? 'ANSWER' : ''"
|
|
|
:NNPEAnnotationList="NNPEAnnotationList"
|
|
:NNPEAnnotationList="NNPEAnnotationList"
|
|
|
- :colLength="colLength"
|
|
|
|
|
|
|
+ :col-length="colLength"
|
|
|
:NpcNewWordMp3="NpcNewWordMp3"
|
|
:NpcNewWordMp3="NpcNewWordMp3"
|
|
|
:multilingual="showLang && getLang() ? getLang() : ''"
|
|
:multilingual="showLang && getLang() ? getLang() : ''"
|
|
|
|
|
+ @changeConfig="changeConfig"
|
|
|
/>
|
|
/>
|
|
|
<Practice
|
|
<Practice
|
|
|
- :curQue="data"
|
|
|
|
|
- :titleFontsize="titleFontsize"
|
|
|
|
|
- :wordFontsize="wordFontsize"
|
|
|
|
|
|
|
+ v-if="showPractice"
|
|
|
|
|
+ :cur-que="data"
|
|
|
|
|
+ :title-fontsize="titleFontsize"
|
|
|
|
|
+ :word-fontsize="wordFontsize"
|
|
|
:attrib="data.unified_attrib"
|
|
:attrib="data.unified_attrib"
|
|
|
- :noFont="noFont"
|
|
|
|
|
|
|
+ :no-font="noFont"
|
|
|
:NNPENewWordList="NNPENewWordList"
|
|
:NNPENewWordList="NNPENewWordList"
|
|
|
- v-if="showPractice"
|
|
|
|
|
:config="config"
|
|
:config="config"
|
|
|
- @changeConfig="changeConfig"
|
|
|
|
|
:TaskModel="isJudgingRightWrong ? 'ANSWER' : ''"
|
|
:TaskModel="isJudgingRightWrong ? 'ANSWER' : ''"
|
|
|
- :colLength="colLength"
|
|
|
|
|
|
|
+ :col-length="colLength"
|
|
|
:NpcNewWordMp3="NpcNewWordMp3"
|
|
:NpcNewWordMp3="NpcNewWordMp3"
|
|
|
- :isFull="isFull"
|
|
|
|
|
|
|
+ :is-full="isFull"
|
|
|
:multilingual="showLang && getLang() ? getLang() : ''"
|
|
:multilingual="showLang && getLang() ? getLang() : ''"
|
|
|
|
|
+ @changeConfig="changeConfig"
|
|
|
/>
|
|
/>
|
|
|
<WordModel
|
|
<WordModel
|
|
|
- :curQue="data"
|
|
|
|
|
- :titleFontsize="titleFontsize"
|
|
|
|
|
- :wordFontsize="wordFontsize"
|
|
|
|
|
- :bodyLeft="bodyLeft"
|
|
|
|
|
- :bodyWidth="bodyWidth"
|
|
|
|
|
|
|
+ v-if="showWord"
|
|
|
|
|
+ :cur-que="data"
|
|
|
|
|
+ :title-fontsize="titleFontsize"
|
|
|
|
|
+ :word-fontsize="wordFontsize"
|
|
|
|
|
+ :body-left="bodyLeft"
|
|
|
|
|
+ :body-width="bodyWidth"
|
|
|
:NNPENewWordList="NNPENewWordList"
|
|
:NNPENewWordList="NNPENewWordList"
|
|
|
:attrib="data.unified_attrib"
|
|
:attrib="data.unified_attrib"
|
|
|
- :noFont="noFont"
|
|
|
|
|
- v-if="showWord"
|
|
|
|
|
|
|
+ :no-font="noFont"
|
|
|
:config="config"
|
|
:config="config"
|
|
|
- @changeConfig="changeConfig"
|
|
|
|
|
:TaskModel="isJudgingRightWrong ? 'ANSWER' : ''"
|
|
:TaskModel="isJudgingRightWrong ? 'ANSWER' : ''"
|
|
|
- :colLength="colLength"
|
|
|
|
|
|
|
+ :col-length="colLength"
|
|
|
:multilingual="showLang && getLang() ? getLang() : ''"
|
|
:multilingual="showLang && getLang() ? getLang() : ''"
|
|
|
|
|
+ @changeConfig="changeConfig"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="voice-full-screen" :id="'screen-' + mathNum">
|
|
|
|
|
|
|
+ <div :id="'screen-' + mathNum" class="voice-full-screen">
|
|
|
<Voicefullscreen
|
|
<Voicefullscreen
|
|
|
v-if="isFull && resObj"
|
|
v-if="isFull && resObj"
|
|
|
- :themeColor="bookInfo.theme_color"
|
|
|
|
|
- :curQue="data"
|
|
|
|
|
- :sentList="resObj.sentList"
|
|
|
|
|
- :sentIndex="0"
|
|
|
|
|
|
|
+ :theme-color="bookInfo.theme_color"
|
|
|
|
|
+ :cur-que="data"
|
|
|
|
|
+ :sent-list="resObj.sentList"
|
|
|
|
|
+ :sent-index="0"
|
|
|
:mp3="data.mp3_list && data.mp3_list[0] ? data.mp3_list[0].url : ''"
|
|
:mp3="data.mp3_list && data.mp3_list[0] ? data.mp3_list[0].url : ''"
|
|
|
- :noFont="noFont"
|
|
|
|
|
|
|
+ :no-font="noFont"
|
|
|
:NNPENewWordList="NNPENewWordList"
|
|
:NNPENewWordList="NNPENewWordList"
|
|
|
- :isFull="isFull"
|
|
|
|
|
|
|
+ :is-full="isFull"
|
|
|
:config="config"
|
|
:config="config"
|
|
|
:TaskModel="isJudgingRightWrong ? 'ANSWER' : ''"
|
|
:TaskModel="isJudgingRightWrong ? 'ANSWER' : ''"
|
|
|
|
|
+ :NpcNewWordMp3="NpcNewWordMp3"
|
|
|
|
|
+ :attrib="data.unified_attrib"
|
|
|
@handleWav="handleWav"
|
|
@handleWav="handleWav"
|
|
|
@changePinyin="changePinyins"
|
|
@changePinyin="changePinyins"
|
|
|
@changeEN="changeENs"
|
|
@changeEN="changeENs"
|
|
|
@exitFullscreen="exitFullscreen"
|
|
@exitFullscreen="exitFullscreen"
|
|
|
@changeIsFull="changeIsFull"
|
|
@changeIsFull="changeIsFull"
|
|
|
- :NpcNewWordMp3="NpcNewWordMp3"
|
|
|
|
|
- :attrib="data.unified_attrib"
|
|
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<template v-if="data.new_word_list.new_word_list.length > 0">
|
|
<template v-if="data.new_word_list.new_word_list.length > 0">
|
|
|
- <NewWordPreview :newData="data.new_word_list"></NewWordPreview>
|
|
|
|
|
|
|
+ <NewWordPreview :new-data="data.new_word_list" />
|
|
|
</template>
|
|
</template>
|
|
|
<template v-if="data.other_word_list.new_word_list.length > 0">
|
|
<template v-if="data.other_word_list.new_word_list.length > 0">
|
|
|
- <NewWordPreview :newData="data.other_word_list"></NewWordPreview>
|
|
|
|
|
|
|
+ <NewWordPreview :new-data="data.other_word_list" />
|
|
|
</template>
|
|
</template>
|
|
|
<template v-if="data.notes_list.option.length > 0">
|
|
<template v-if="data.notes_list.option.length > 0">
|
|
|
- <NotesPreview :notesData="data.notes_list"></NotesPreview>
|
|
|
|
|
|
|
+ <NotesPreview :notes-data="data.notes_list" />
|
|
|
</template>
|
|
</template>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -190,40 +187,6 @@ export default {
|
|
|
},
|
|
},
|
|
|
mixins: [PreviewMixin],
|
|
mixins: [PreviewMixin],
|
|
|
inject: ['bookInfo'],
|
|
inject: ['bookInfo'],
|
|
|
- watch: {
|
|
|
|
|
- 'data.detail.length': {
|
|
|
|
|
- handler(val) {
|
|
|
|
|
- if (val) {
|
|
|
|
|
- this.handleData();
|
|
|
|
|
- let _this = this;
|
|
|
|
|
- // if (!this.isJudgingRightWrong) {
|
|
|
|
|
- // let userAnswer = JSON.parse(JSON.stringify(_this.userAnswer));
|
|
|
|
|
- // _this.$set(this.data, 'Bookanswer', userAnswer);
|
|
|
|
|
- // }
|
|
|
|
|
- _this.$nextTick(() => {
|
|
|
|
|
- _this.bodyLeft = _this.$refs.ArticleViewbody.getBoundingClientRect().left;
|
|
|
|
|
- });
|
|
|
|
|
- for (let i = 0; i < this.data.detail.length; i++) {
|
|
|
|
|
- let enStr = this.data.detail[i].sentencesEn ? this.data.detail[i].sentencesEn.join('') : '';
|
|
|
|
|
- if (enStr) {
|
|
|
|
|
- this.config.isShowEN = false;
|
|
|
|
|
- this.config.isHasEN = true;
|
|
|
|
|
- }
|
|
|
|
|
- let pinyin = this.handleObj(this.data.detail[i].wordsList);
|
|
|
|
|
- if (pinyin && this.isEnable(this.data.property.view_pinyin)) {
|
|
|
|
|
- this.config.isShowPY = true;
|
|
|
|
|
- this.config.isHasPY = true;
|
|
|
|
|
- }
|
|
|
|
|
- if (enStr && pinyin) {
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- deep: true,
|
|
|
|
|
- immediate: true,
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
data: getArticleData(),
|
|
data: getArticleData(),
|
|
@@ -247,8 +210,8 @@ export default {
|
|
|
normalModel: {
|
|
normalModel: {
|
|
|
recordList: [],
|
|
recordList: [],
|
|
|
},
|
|
},
|
|
|
- writeModel: {}, //生词/取词模式
|
|
|
|
|
- practiceModel: {}, //练习模式
|
|
|
|
|
|
|
+ writeModel: {}, // 生词/取词模式
|
|
|
|
|
+ practiceModel: {}, // 练习模式
|
|
|
wordModel: {
|
|
wordModel: {
|
|
|
recordList: [],
|
|
recordList: [],
|
|
|
},
|
|
},
|
|
@@ -270,6 +233,61 @@ export default {
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {},
|
|
computed: {},
|
|
|
|
|
+ watch: {
|
|
|
|
|
+ showLang: {
|
|
|
|
|
+ handler(val) {
|
|
|
|
|
+ if (val) {
|
|
|
|
|
+ this.data.multilingual.forEach((item) => {
|
|
|
|
|
+ let trans_arr = item.translation.split('\n');
|
|
|
|
|
+ this.data.detail.forEach((items) => {
|
|
|
|
|
+ let items_trans_arr = [];
|
|
|
|
|
+ if (!items.hasOwnProperty('multilingualTextList')) {
|
|
|
|
|
+ this.$set(items, 'multilingualTextList', {});
|
|
|
|
|
+ }
|
|
|
|
|
+ if (items.para) {
|
|
|
|
|
+ items_trans_arr = trans_arr.splice(0, items.sentences.length);
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$set(items.multilingualTextList, item.type, items_trans_arr);
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ deep: true,
|
|
|
|
|
+ immediate: true,
|
|
|
|
|
+ },
|
|
|
|
|
+ 'data.detail.length': {
|
|
|
|
|
+ handler(val) {
|
|
|
|
|
+ if (val) {
|
|
|
|
|
+ this.handleData();
|
|
|
|
|
+ let _this = this;
|
|
|
|
|
+ // if (!this.isJudgingRightWrong) {
|
|
|
|
|
+ // let userAnswer = JSON.parse(JSON.stringify(_this.userAnswer));
|
|
|
|
|
+ // _this.$set(this.data, 'Bookanswer', userAnswer);
|
|
|
|
|
+ // }
|
|
|
|
|
+ _this.$nextTick(() => {
|
|
|
|
|
+ _this.bodyLeft = _this.$refs.ArticleViewbody.getBoundingClientRect().left;
|
|
|
|
|
+ });
|
|
|
|
|
+ for (let i = 0; i < this.data.detail.length; i++) {
|
|
|
|
|
+ let enStr = this.data.detail[i].sentencesEn ? this.data.detail[i].sentencesEn.join('') : '';
|
|
|
|
|
+ if (enStr) {
|
|
|
|
|
+ this.config.isShowEN = false;
|
|
|
|
|
+ this.config.isHasEN = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ let pinyin = this.handleObj(this.data.detail[i].wordsList);
|
|
|
|
|
+ if (pinyin && this.isEnable(this.data.property.view_pinyin)) {
|
|
|
|
|
+ this.config.isShowPY = true;
|
|
|
|
|
+ this.config.isHasPY = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (enStr && pinyin) {
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ deep: true,
|
|
|
|
|
+ immediate: true,
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
created() {},
|
|
created() {},
|
|
|
methods: {
|
|
methods: {
|
|
|
changeConfig(obj) {
|
|
changeConfig(obj) {
|
|
@@ -278,7 +296,7 @@ export default {
|
|
|
changeIsFull() {
|
|
changeIsFull() {
|
|
|
this.isFull = false;
|
|
this.isFull = false;
|
|
|
},
|
|
},
|
|
|
- //拼音的显示和隐藏
|
|
|
|
|
|
|
+ // 拼音的显示和隐藏
|
|
|
changePinyins() {
|
|
changePinyins() {
|
|
|
if (this.config.isHasPY) {
|
|
if (this.config.isHasPY) {
|
|
|
this.changeConfig('isShowPY');
|
|
this.changeConfig('isShowPY');
|
|
@@ -294,13 +312,13 @@ export default {
|
|
|
handleFontsize(symbol) {
|
|
handleFontsize(symbol) {
|
|
|
if (symbol == '+') {
|
|
if (symbol == '+') {
|
|
|
if (this.wordFontsize < 24) {
|
|
if (this.wordFontsize < 24) {
|
|
|
- this.titleFontsize = this.titleFontsize + 2;
|
|
|
|
|
- this.wordFontsize = this.wordFontsize + 2;
|
|
|
|
|
|
|
+ this.titleFontsize += 2;
|
|
|
|
|
+ this.wordFontsize += 2;
|
|
|
}
|
|
}
|
|
|
} else if (symbol == '-') {
|
|
} else if (symbol == '-') {
|
|
|
if (this.wordFontsize > 12) {
|
|
if (this.wordFontsize > 12) {
|
|
|
- this.titleFontsize = this.titleFontsize - 2;
|
|
|
|
|
- this.wordFontsize = this.wordFontsize - 2;
|
|
|
|
|
|
|
+ this.titleFontsize -= 2;
|
|
|
|
|
+ this.wordFontsize -= 2;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -331,14 +349,14 @@ export default {
|
|
|
text: this.data.content,
|
|
text: this.data.content,
|
|
|
})
|
|
})
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
- window.open(window.location.origin + `/GCLS-TC/#/textanalysis/Result?id=${res.record.id}&type=文本分析`);
|
|
|
|
|
|
|
+ window.open(`${window.location.origin}/GCLS-TC/#/textanalysis/Result?id=${res.record.id}&type=文本分析`);
|
|
|
loading.close();
|
|
loading.close();
|
|
|
})
|
|
})
|
|
|
.catch((res) => {
|
|
.catch((res) => {
|
|
|
loading.close();
|
|
loading.close();
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- //语音全屏
|
|
|
|
|
|
|
+ // 语音全屏
|
|
|
fullScreen() {
|
|
fullScreen() {
|
|
|
this.pauseAudio();
|
|
this.pauseAudio();
|
|
|
this.pauseVideo();
|
|
this.pauseVideo();
|
|
@@ -362,8 +380,8 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
goFullscreen() {
|
|
goFullscreen() {
|
|
|
- let id = 'screen-' + this.mathNum;
|
|
|
|
|
- var element = document.getElementById(id);
|
|
|
|
|
|
|
+ let id = `screen-${this.mathNum}`;
|
|
|
|
|
+ let element = document.getElementById(id);
|
|
|
if (element.requestFullscreen) {
|
|
if (element.requestFullscreen) {
|
|
|
element.requestFullscreen();
|
|
element.requestFullscreen();
|
|
|
} else if (element.msRequestFullscreen) {
|
|
} else if (element.msRequestFullscreen) {
|
|
@@ -424,9 +442,9 @@ export default {
|
|
|
.concat(this.data.new_word_list.new_word_list)
|
|
.concat(this.data.new_word_list.new_word_list)
|
|
|
.concat(this.data.other_word_list.new_word_list);
|
|
.concat(this.data.other_word_list.new_word_list);
|
|
|
this.NNPEAnnotationList = this.data.notes_list.option;
|
|
this.NNPEAnnotationList = this.data.notes_list.option;
|
|
|
- let resArr = [],
|
|
|
|
|
- sentArrTotal = [],
|
|
|
|
|
- timeArr = [];
|
|
|
|
|
|
|
+ let resArr = [];
|
|
|
|
|
+ let sentArrTotal = [];
|
|
|
|
|
+ let timeArr = [];
|
|
|
let curQue = JSON.parse(JSON.stringify(this.data));
|
|
let curQue = JSON.parse(JSON.stringify(this.data));
|
|
|
let wordTimeList = curQue.wordTime;
|
|
let wordTimeList = curQue.wordTime;
|
|
|
let dhaspinyin = false; // 每段是否有拼音
|
|
let dhaspinyin = false; // 每段是否有拼音
|
|
@@ -446,30 +464,28 @@ export default {
|
|
|
if (!this.highWords) {
|
|
if (!this.highWords) {
|
|
|
this.findLightWord(wItem, wIndex, sentence, sItem);
|
|
this.findLightWord(wItem, wIndex, sentence, sItem);
|
|
|
words = this.highWords ? this.highWords.words : '';
|
|
words = this.highWords ? this.highWords.words : '';
|
|
|
|
|
+ } else if (wIndex > this.highWords.endIndex - 1) {
|
|
|
|
|
+ this.highWords = null;
|
|
|
|
|
+ this.findLightWord(wItem, wIndex, sentence, sItem);
|
|
|
|
|
+ words = this.highWords ? this.highWords.words : '';
|
|
|
} else {
|
|
} else {
|
|
|
- if (wIndex > this.highWords.endIndex - 1) {
|
|
|
|
|
- this.highWords = null;
|
|
|
|
|
- this.findLightWord(wItem, wIndex, sentence, sItem);
|
|
|
|
|
- words = this.highWords ? this.highWords.words : '';
|
|
|
|
|
- } else {
|
|
|
|
|
- words = this.highWords ? this.highWords.words : '';
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ words = this.highWords ? this.highWords.words : '';
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
let obj = {
|
|
let obj = {
|
|
|
- paraIndex: dIndex, //段落索引
|
|
|
|
|
- sentIndex: sIndex, //在段落中句子索引
|
|
|
|
|
- wordIndex: wIndex, //单词的索引
|
|
|
|
|
|
|
+ paraIndex: dIndex, // 段落索引
|
|
|
|
|
+ sentIndex: sIndex, // 在段落中句子索引
|
|
|
|
|
+ wordIndex: wIndex, // 单词的索引
|
|
|
pinyin: wItem.pinyin,
|
|
pinyin: wItem.pinyin,
|
|
|
chs: wItem.chs,
|
|
chs: wItem.chs,
|
|
|
padding: true,
|
|
padding: true,
|
|
|
className: wItem.className,
|
|
className: wItem.className,
|
|
|
isShow: wItem.isShow,
|
|
isShow: wItem.isShow,
|
|
|
- startIndex: startIndex,
|
|
|
|
|
- endIndex: endIndex,
|
|
|
|
|
|
|
+ startIndex,
|
|
|
|
|
+ endIndex,
|
|
|
leg: wItem.chs.length,
|
|
leg: wItem.chs.length,
|
|
|
timeList: [],
|
|
timeList: [],
|
|
|
- words: words,
|
|
|
|
|
|
|
+ words,
|
|
|
config: {
|
|
config: {
|
|
|
fontFamily: wItem.fontFamily,
|
|
fontFamily: wItem.fontFamily,
|
|
|
},
|
|
},
|
|
@@ -478,7 +494,7 @@ export default {
|
|
|
if (wItem.pinyin) dhaspinyin = true;
|
|
if (wItem.pinyin) dhaspinyin = true;
|
|
|
});
|
|
});
|
|
|
let objs = {
|
|
let objs = {
|
|
|
- sentArr: sentArr,
|
|
|
|
|
|
|
+ sentArr,
|
|
|
enwords: dItem.sentencesEn && dItem.sentencesEn[sIndex] && dItem.sentencesEn[sIndex].replace(/\'/g, '’'),
|
|
enwords: dItem.sentencesEn && dItem.sentencesEn[sIndex] && dItem.sentencesEn[sIndex].replace(/\'/g, '’'),
|
|
|
};
|
|
};
|
|
|
sentArrTotal.push(sentArr);
|
|
sentArrTotal.push(sentArr);
|
|
@@ -502,8 +518,8 @@ export default {
|
|
|
});
|
|
});
|
|
|
this.resObj = {
|
|
this.resObj = {
|
|
|
sentList: resArr,
|
|
sentList: resArr,
|
|
|
- timeList: timeList,
|
|
|
|
|
- dhaspinyinArr: dhaspinyinArr,
|
|
|
|
|
|
|
+ timeList,
|
|
|
|
|
+ dhaspinyinArr,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
mergeWordTime(resArr, wordTimeList) {
|
|
mergeWordTime(resArr, wordTimeList) {
|
|
@@ -517,43 +533,41 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
findLightWord(wItem, startIndex, sentence, sItem) {
|
|
findLightWord(wItem, startIndex, sentence, sItem) {
|
|
|
- let words = '',
|
|
|
|
|
- endIndex = 0;
|
|
|
|
|
|
|
+ let endIndex = 0;
|
|
|
|
|
+ let words = '';
|
|
|
this.newWordList.forEach((item) => {
|
|
this.newWordList.forEach((item) => {
|
|
|
if (item.length == 1) {
|
|
if (item.length == 1) {
|
|
|
if (item == wItem.chs && !wItem.banLight) {
|
|
if (item == wItem.chs && !wItem.banLight) {
|
|
|
words = wItem.chs;
|
|
words = wItem.chs;
|
|
|
endIndex = startIndex + 1;
|
|
endIndex = startIndex + 1;
|
|
|
}
|
|
}
|
|
|
- } else {
|
|
|
|
|
- if (item[0] == wItem.chs && sentence.indexOf(item) > -1) {
|
|
|
|
|
- let index = null;
|
|
|
|
|
- let chsStr = '';
|
|
|
|
|
- for (let i = startIndex; i < sItem.length + 1; i++) {
|
|
|
|
|
- index = i;
|
|
|
|
|
- if (chsStr.length == item.length) {
|
|
|
|
|
- break;
|
|
|
|
|
- } else {
|
|
|
|
|
- chsStr += sItem[i] ? sItem[i].chs : '';
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- if (chsStr == item && !wItem.banLight) {
|
|
|
|
|
- words = item;
|
|
|
|
|
- endIndex = index;
|
|
|
|
|
|
|
+ } else if (item[0] == wItem.chs && sentence.indexOf(item) > -1) {
|
|
|
|
|
+ let index = null;
|
|
|
|
|
+ let chsStr = '';
|
|
|
|
|
+ for (let i = startIndex; i < sItem.length + 1; i++) {
|
|
|
|
|
+ index = i;
|
|
|
|
|
+ if (chsStr.length == item.length) {
|
|
|
|
|
+ break;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ chsStr += sItem[i] ? sItem[i].chs : '';
|
|
|
}
|
|
}
|
|
|
- } else if (wItem.new_word && wItem.new_word == item && !wItem.banLight) {
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ if (chsStr == item && !wItem.banLight) {
|
|
|
words = item;
|
|
words = item;
|
|
|
- endIndex = startIndex + 1;
|
|
|
|
|
|
|
+ endIndex = index;
|
|
|
}
|
|
}
|
|
|
|
|
+ } else if (wItem.new_word && wItem.new_word == item && !wItem.banLight) {
|
|
|
|
|
+ words = item;
|
|
|
|
|
+ endIndex = startIndex + 1;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
if (words) {
|
|
if (words) {
|
|
|
- this.highWords = { words: words, endIndex: endIndex };
|
|
|
|
|
|
|
+ this.highWords = { words, endIndex };
|
|
|
} else {
|
|
} else {
|
|
|
this.highWords = null;
|
|
this.highWords = null;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- //词和标点合一起
|
|
|
|
|
|
|
+ // 词和标点合一起
|
|
|
mergeWordSymbol(wItem) {
|
|
mergeWordSymbol(wItem) {
|
|
|
if (this.chsFhList.indexOf(wItem.chs) > -1) {
|
|
if (this.chsFhList.indexOf(wItem.chs) > -1) {
|
|
|
wItem.isShow = false;
|
|
wItem.isShow = false;
|
|
@@ -562,7 +576,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
handleWav(list, tmIndex) {
|
|
handleWav(list, tmIndex) {
|
|
|
- tmIndex = tmIndex ? tmIndex : 0;
|
|
|
|
|
|
|
+ tmIndex = tmIndex || 0;
|
|
|
this.data.Bookanswer.practiceModel[tmIndex] = {
|
|
this.data.Bookanswer.practiceModel[tmIndex] = {
|
|
|
recordList: [],
|
|
recordList: [],
|
|
|
};
|
|
};
|