|
@@ -2,7 +2,10 @@
|
|
|
<template>
|
|
|
<div
|
|
|
class="Big-Book-prev-Textdes InputHasRecordNPC"
|
|
|
- :class="[curQue.guide ? 'NPC-zhedie' : '']"
|
|
|
+ :class="[
|
|
|
+ curQue.guide ? 'NPC-zhedie' : '',
|
|
|
+ isPhone ? 'InputHasRecordNPC-phone' : ''
|
|
|
+ ]"
|
|
|
v-if="
|
|
|
curQue && judgeAnswer == 'standardAnswer'
|
|
|
? userErrList.length > 0
|
|
@@ -34,10 +37,10 @@
|
|
|
<template
|
|
|
v-if="
|
|
|
items.detail.wordsList[indexCon + 1] &&
|
|
|
- items.detail.wordsList[indexCon + 1].chs &&
|
|
|
- chsFhList.indexOf(
|
|
|
- items.detail.wordsList[indexCon + 1].chs
|
|
|
- ) > -1
|
|
|
+ items.detail.wordsList[indexCon + 1].chs &&
|
|
|
+ chsFhList.indexOf(
|
|
|
+ items.detail.wordsList[indexCon + 1].chs
|
|
|
+ ) > -1
|
|
|
"
|
|
|
>
|
|
|
<div class="synthesis-box">
|
|
@@ -46,16 +49,20 @@
|
|
|
v-if="items.detail.pyPosition == 'top'"
|
|
|
class="pinyin"
|
|
|
:class="[
|
|
|
- noFont.indexOf(itemCon.pinyin) > -1 ? 'noFont' : '',
|
|
|
+ noFont.indexOf(itemCon.pinyin) > -1 ? 'noFont' : ''
|
|
|
]"
|
|
|
>{{ itemCon.pinyin }}</span
|
|
|
>
|
|
|
- <span class="hanzi content-con" :style="wordStyle(itemCon.config)">{{ itemCon.chs }}</span>
|
|
|
+ <span
|
|
|
+ class="hanzi content-con"
|
|
|
+ :style="wordStyle(itemCon.config)"
|
|
|
+ >{{ itemCon.chs }}</span
|
|
|
+ >
|
|
|
<span
|
|
|
v-if="items.detail.pyPosition == 'bottom'"
|
|
|
class="pinyin"
|
|
|
:class="[
|
|
|
- noFont.indexOf(itemCon.pinyin) > -1 ? 'noFont' : '',
|
|
|
+ noFont.indexOf(itemCon.pinyin) > -1 ? 'noFont' : ''
|
|
|
]"
|
|
|
>{{ itemCon.pinyin }}</span
|
|
|
>
|
|
@@ -69,13 +76,17 @@
|
|
|
items.detail.wordsList[indexCon + 1].pinyin
|
|
|
) > -1
|
|
|
? 'noFont'
|
|
|
- : '',
|
|
|
+ : ''
|
|
|
]"
|
|
|
>{{ items.detail.wordsList[indexCon + 1].pinyin }}</span
|
|
|
>
|
|
|
- <span class="hanzi content-con" :style="wordStyle(items.detail.resArr[indexCon + 1].config)">{{
|
|
|
- items.detail.wordsList[indexCon + 1].chs
|
|
|
- }}</span>
|
|
|
+ <span
|
|
|
+ class="hanzi content-con"
|
|
|
+ :style="
|
|
|
+ wordStyle(items.detail.resArr[indexCon + 1].config)
|
|
|
+ "
|
|
|
+ >{{ items.detail.wordsList[indexCon + 1].chs }}</span
|
|
|
+ >
|
|
|
<span
|
|
|
v-if="items.detail.pyPosition == 'bottom'"
|
|
|
class="pinyin"
|
|
@@ -84,7 +95,7 @@
|
|
|
items.detail.wordsList[indexCon + 1].pinyin
|
|
|
) > -1
|
|
|
? 'noFont'
|
|
|
- : '',
|
|
|
+ : ''
|
|
|
]"
|
|
|
>{{ items.detail.wordsList[indexCon + 1].pinyin }}</span
|
|
|
>
|
|
@@ -96,16 +107,20 @@
|
|
|
v-if="items.detail.pyPosition == 'top'"
|
|
|
class="pinyin"
|
|
|
:class="[
|
|
|
- noFont.indexOf(itemCon.pinyin) > -1 ? 'noFont' : '',
|
|
|
+ noFont.indexOf(itemCon.pinyin) > -1 ? 'noFont' : ''
|
|
|
]"
|
|
|
>{{ itemCon.pinyin }}</span
|
|
|
>
|
|
|
- <span class="hanzi content-con" :style="wordStyle(itemCon.config)">{{ itemCon.chs }}</span>
|
|
|
+ <span
|
|
|
+ class="hanzi content-con"
|
|
|
+ :style="wordStyle(itemCon.config)"
|
|
|
+ >{{ itemCon.chs }}</span
|
|
|
+ >
|
|
|
<span
|
|
|
v-if="items.detail.pyPosition == 'bottom'"
|
|
|
class="pinyin"
|
|
|
:class="[
|
|
|
- noFont.indexOf(itemCon.pinyin) > -1 ? 'noFont' : '',
|
|
|
+ noFont.indexOf(itemCon.pinyin) > -1 ? 'noFont' : ''
|
|
|
]"
|
|
|
>{{ itemCon.pinyin }}</span
|
|
|
>
|
|
@@ -114,12 +129,15 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</div>
|
|
|
- <div class="inputInner" :style="{marginLeft:items.number===''?'0px':''}">
|
|
|
+ <div
|
|
|
+ class="inputInner"
|
|
|
+ :style="{ marginLeft: items.number === '' ? '0px' : '' }"
|
|
|
+ >
|
|
|
<el-input
|
|
|
:class="[
|
|
|
'textarea',
|
|
|
items.record ? '' : 'textareaNoRecord',
|
|
|
- 'correct',
|
|
|
+ 'correct'
|
|
|
]"
|
|
|
type="textarea"
|
|
|
v-model="items.answer"
|
|
@@ -195,10 +213,10 @@
|
|
|
<template
|
|
|
v-if="
|
|
|
items.detail.wordsList[indexCon + 1] &&
|
|
|
- items.detail.wordsList[indexCon + 1].chs &&
|
|
|
- chsFhList.indexOf(
|
|
|
- items.detail.wordsList[indexCon + 1].chs
|
|
|
- ) > -1
|
|
|
+ items.detail.wordsList[indexCon + 1].chs &&
|
|
|
+ chsFhList.indexOf(
|
|
|
+ items.detail.wordsList[indexCon + 1].chs
|
|
|
+ ) > -1
|
|
|
"
|
|
|
>
|
|
|
<div class="synthesis-box">
|
|
@@ -209,20 +227,22 @@
|
|
|
:class="[
|
|
|
noFont.indexOf(itemCon.pinyin) > -1
|
|
|
? 'noFont'
|
|
|
- : '',
|
|
|
+ : ''
|
|
|
]"
|
|
|
>{{ itemCon.pinyin }}</span
|
|
|
>
|
|
|
- <span class="hanzi content-con" :style="wordStyle(itemCon.config)">{{
|
|
|
- itemCon.chs
|
|
|
- }}</span>
|
|
|
+ <span
|
|
|
+ class="hanzi content-con"
|
|
|
+ :style="wordStyle(itemCon.config)"
|
|
|
+ >{{ itemCon.chs }}</span
|
|
|
+ >
|
|
|
<span
|
|
|
v-if="items.detail.pyPosition == 'bottom'"
|
|
|
class="pinyin"
|
|
|
:class="[
|
|
|
noFont.indexOf(itemCon.pinyin) > -1
|
|
|
? 'noFont'
|
|
|
- : '',
|
|
|
+ : ''
|
|
|
]"
|
|
|
>{{ itemCon.pinyin }}</span
|
|
|
>
|
|
@@ -236,15 +256,23 @@
|
|
|
items.detail.wordsList[indexCon + 1].pinyin
|
|
|
) > -1
|
|
|
? 'noFont'
|
|
|
- : '',
|
|
|
+ : ''
|
|
|
]"
|
|
|
>{{
|
|
|
items.detail.wordsList[indexCon + 1].pinyin
|
|
|
}}</span
|
|
|
>
|
|
|
- <span class="hanzi content-con" :style="wordStyle(items.detail.resArr[indexCon + 1].config)">{{
|
|
|
- items.detail.wordsList[indexCon + 1].chs
|
|
|
- }}</span>
|
|
|
+ <span
|
|
|
+ class="hanzi content-con"
|
|
|
+ :style="
|
|
|
+ wordStyle(
|
|
|
+ items.detail.resArr[indexCon + 1].config
|
|
|
+ )
|
|
|
+ "
|
|
|
+ >{{
|
|
|
+ items.detail.wordsList[indexCon + 1].chs
|
|
|
+ }}</span
|
|
|
+ >
|
|
|
<span
|
|
|
v-if="items.detail.pyPosition == 'bottom'"
|
|
|
class="pinyin"
|
|
@@ -253,7 +281,7 @@
|
|
|
items.detail.wordsList[indexCon + 1].pinyin
|
|
|
) > -1
|
|
|
? 'noFont'
|
|
|
- : '',
|
|
|
+ : ''
|
|
|
]"
|
|
|
>{{
|
|
|
items.detail.wordsList[indexCon + 1].pinyin
|
|
@@ -267,16 +295,20 @@
|
|
|
v-if="items.detail.pyPosition == 'top'"
|
|
|
class="pinyin"
|
|
|
:class="[
|
|
|
- noFont.indexOf(itemCon.pinyin) > -1 ? 'noFont' : '',
|
|
|
+ noFont.indexOf(itemCon.pinyin) > -1 ? 'noFont' : ''
|
|
|
]"
|
|
|
>{{ itemCon.pinyin }}</span
|
|
|
>
|
|
|
- <span class="hanzi content-con" :style="wordStyle(itemCon.config)">{{ itemCon.chs }}</span>
|
|
|
+ <span
|
|
|
+ class="hanzi content-con"
|
|
|
+ :style="wordStyle(itemCon.config)"
|
|
|
+ >{{ itemCon.chs }}</span
|
|
|
+ >
|
|
|
<span
|
|
|
v-if="items.detail.pyPosition == 'bottom'"
|
|
|
class="pinyin"
|
|
|
:class="[
|
|
|
- noFont.indexOf(itemCon.pinyin) > -1 ? 'noFont' : '',
|
|
|
+ noFont.indexOf(itemCon.pinyin) > -1 ? 'noFont' : ''
|
|
|
]"
|
|
|
>{{ itemCon.pinyin }}</span
|
|
|
>
|
|
@@ -285,7 +317,10 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</div>
|
|
|
- <div class="inputInner" :style="{marginLeft:items.number===''?'0px':''}">
|
|
|
+ <div
|
|
|
+ class="inputInner"
|
|
|
+ :style="{ marginLeft: items.number === '' ? '0px' : '' }"
|
|
|
+ >
|
|
|
<el-input
|
|
|
:class="[
|
|
|
'textarea',
|
|
@@ -297,13 +332,14 @@
|
|
|
'[JUDGE##T##JUDGE]'
|
|
|
? 'correct'
|
|
|
: 'error'
|
|
|
- : '',
|
|
|
+ : ''
|
|
|
]"
|
|
|
type="textarea"
|
|
|
v-model="curQue.Bookanswer[indexs].answer"
|
|
|
@blur="
|
|
|
- curQue.Bookanswer[indexs].answer =
|
|
|
- curQue.Bookanswer[indexs].answer.trim()
|
|
|
+ curQue.Bookanswer[indexs].answer = curQue.Bookanswer[
|
|
|
+ indexs
|
|
|
+ ].answer.trim()
|
|
|
"
|
|
|
placeholder=""
|
|
|
maxlength="200"
|
|
@@ -354,10 +390,10 @@
|
|
|
<template
|
|
|
v-if="
|
|
|
items.detail.wordsList[indexCon + 1] &&
|
|
|
- items.detail.wordsList[indexCon + 1].chs &&
|
|
|
- chsFhList.indexOf(
|
|
|
- items.detail.wordsList[indexCon + 1].chs
|
|
|
- ) > -1
|
|
|
+ items.detail.wordsList[indexCon + 1].chs &&
|
|
|
+ chsFhList.indexOf(
|
|
|
+ items.detail.wordsList[indexCon + 1].chs
|
|
|
+ ) > -1
|
|
|
"
|
|
|
>
|
|
|
<div class="synthesis-box">
|
|
@@ -366,16 +402,20 @@
|
|
|
v-if="items.detail.pyPosition == 'top'"
|
|
|
class="pinyin"
|
|
|
:class="[
|
|
|
- noFont.indexOf(itemCon.pinyin) > -1 ? 'noFont' : '',
|
|
|
+ noFont.indexOf(itemCon.pinyin) > -1 ? 'noFont' : ''
|
|
|
]"
|
|
|
>{{ itemCon.pinyin }}</span
|
|
|
>
|
|
|
- <span class="hanzi content-con" :style="wordStyle(itemCon.config)">{{ itemCon.chs }}</span>
|
|
|
+ <span
|
|
|
+ class="hanzi content-con"
|
|
|
+ :style="wordStyle(itemCon.config)"
|
|
|
+ >{{ itemCon.chs }}</span
|
|
|
+ >
|
|
|
<span
|
|
|
v-if="items.detail.pyPosition == 'bottom'"
|
|
|
class="pinyin"
|
|
|
:class="[
|
|
|
- noFont.indexOf(itemCon.pinyin) > -1 ? 'noFont' : '',
|
|
|
+ noFont.indexOf(itemCon.pinyin) > -1 ? 'noFont' : ''
|
|
|
]"
|
|
|
>{{ itemCon.pinyin }}</span
|
|
|
>
|
|
@@ -389,15 +429,19 @@
|
|
|
items.detail.wordsList[indexCon + 1].pinyin
|
|
|
) > -1
|
|
|
? 'noFont'
|
|
|
- : '',
|
|
|
+ : ''
|
|
|
]"
|
|
|
>{{
|
|
|
items.detail.wordsList[indexCon + 1].pinyin
|
|
|
}}</span
|
|
|
>
|
|
|
- <span class="hanzi content-con" :style="wordStyle(items.detail.resArr[indexCon + 1].config)">{{
|
|
|
- items.detail.wordsList[indexCon + 1].chs
|
|
|
- }}</span>
|
|
|
+ <span
|
|
|
+ class="hanzi content-con"
|
|
|
+ :style="
|
|
|
+ wordStyle(items.detail.resArr[indexCon + 1].config)
|
|
|
+ "
|
|
|
+ >{{ items.detail.wordsList[indexCon + 1].chs }}</span
|
|
|
+ >
|
|
|
<span
|
|
|
v-if="items.detail.pyPosition == 'bottom'"
|
|
|
class="pinyin"
|
|
@@ -406,7 +450,7 @@
|
|
|
items.detail.wordsList[indexCon + 1].pinyin
|
|
|
) > -1
|
|
|
? 'noFont'
|
|
|
- : '',
|
|
|
+ : ''
|
|
|
]"
|
|
|
>{{
|
|
|
items.detail.wordsList[indexCon + 1].pinyin
|
|
@@ -420,16 +464,20 @@
|
|
|
v-if="items.detail.pyPosition == 'top'"
|
|
|
class="pinyin"
|
|
|
:class="[
|
|
|
- noFont.indexOf(itemCon.pinyin) > -1 ? 'noFont' : '',
|
|
|
+ noFont.indexOf(itemCon.pinyin) > -1 ? 'noFont' : ''
|
|
|
]"
|
|
|
>{{ itemCon.pinyin }}</span
|
|
|
>
|
|
|
- <span class="hanzi content-con" :style="wordStyle(itemCon.config)">{{ itemCon.chs }}</span>
|
|
|
+ <span
|
|
|
+ class="hanzi content-con"
|
|
|
+ :style="wordStyle(itemCon.config)"
|
|
|
+ >{{ itemCon.chs }}</span
|
|
|
+ >
|
|
|
<span
|
|
|
v-if="items.detail.pyPosition == 'bottom'"
|
|
|
class="pinyin"
|
|
|
:class="[
|
|
|
- noFont.indexOf(itemCon.pinyin) > -1 ? 'noFont' : '',
|
|
|
+ noFont.indexOf(itemCon.pinyin) > -1 ? 'noFont' : ''
|
|
|
]"
|
|
|
>{{ itemCon.pinyin }}</span
|
|
|
>
|
|
@@ -438,7 +486,10 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</div>
|
|
|
- <div class="inputInner" :style="{marginLeft:items.number===''?'0px':''}">
|
|
|
+ <div
|
|
|
+ class="inputInner"
|
|
|
+ :style="{ marginLeft: items.number === '' ? '0px' : '' }"
|
|
|
+ >
|
|
|
<el-input
|
|
|
:class="[
|
|
|
'textarea',
|
|
@@ -452,13 +503,14 @@
|
|
|
? 'correct'
|
|
|
: 'error'
|
|
|
: ''
|
|
|
- : '',
|
|
|
+ : ''
|
|
|
]"
|
|
|
type="textarea"
|
|
|
v-model="curQue.Bookanswer[indexs].answer"
|
|
|
@blur="
|
|
|
- curQue.Bookanswer[indexs].answer =
|
|
|
- curQue.Bookanswer[indexs].answer.trim()
|
|
|
+ curQue.Bookanswer[indexs].answer = curQue.Bookanswer[
|
|
|
+ indexs
|
|
|
+ ].answer.trim()
|
|
|
"
|
|
|
placeholder=""
|
|
|
maxlength="200"
|
|
@@ -492,7 +544,7 @@ import Soundrecord from "../preview/Soundrecord.vue"; // 录音模板
|
|
|
import AnswerTitle from "../preview/components/AnswerTitle.vue";
|
|
|
export default {
|
|
|
components: { Soundrecord, AnswerTitle },
|
|
|
- props: ["curQue", "TaskModel", "judgeAnswer"],
|
|
|
+ props: ["curQue", "TaskModel", "judgeAnswer", "isPhone"],
|
|
|
data() {
|
|
|
return {
|
|
|
wordShow: true,
|
|
@@ -500,24 +552,23 @@ export default {
|
|
|
chsFhList: [",", "。", "“", ":", "》", "?", "!", ";"],
|
|
|
noFont: ["~", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")"], // 对应不要拼音字体
|
|
|
answerArr: [],
|
|
|
- userErrList: [],
|
|
|
+ userErrList: []
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
wordStyle() {
|
|
|
- return function (config) {
|
|
|
- if(config){
|
|
|
- let sizeVal = config.fontSize.replace("px", "");
|
|
|
- return {
|
|
|
- minHeight: Number(sizeVal) + 9 + "px",
|
|
|
- lineHeight: Number(sizeVal) + 8 + "px",
|
|
|
- fontSize: config.fontSize,
|
|
|
- fontFamily: config.fontFamily
|
|
|
- };
|
|
|
+ return function(config) {
|
|
|
+ if (config) {
|
|
|
+ let sizeVal = config.fontSize.replace("px", "");
|
|
|
+ return {
|
|
|
+ minHeight: Number(sizeVal) + 9 + "px",
|
|
|
+ lineHeight: Number(sizeVal) + 8 + "px",
|
|
|
+ fontSize: config.fontSize,
|
|
|
+ fontFamily: config.fontFamily
|
|
|
+ };
|
|
|
}
|
|
|
-
|
|
|
};
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
watch: {},
|
|
|
//方法集合
|
|
@@ -559,7 +610,7 @@ export default {
|
|
|
curCorrect.push({
|
|
|
answer: "",
|
|
|
recordList: [],
|
|
|
- userAnswerJudge: dItem.answer ? "[JUDGE##F##JUDGE]" : "",
|
|
|
+ userAnswerJudge: dItem.answer ? "[JUDGE##F##JUDGE]" : ""
|
|
|
});
|
|
|
let paraArr = [];
|
|
|
dItem.detail.wordsList.forEach((sItem, sIndex) => {
|
|
@@ -569,12 +620,12 @@ export default {
|
|
|
chs: sItem.chs,
|
|
|
isShow: sItem.isShow,
|
|
|
config: {
|
|
|
- fontColor: sItem.fontColor,
|
|
|
- fontFamily: sItem.fontFamily,
|
|
|
- fontSize: sItem.fontSize,
|
|
|
- underLine: sItem.underLine,
|
|
|
- wordPadding: sItem.wordPadding,
|
|
|
- },
|
|
|
+ fontColor: sItem.fontColor,
|
|
|
+ fontFamily: sItem.fontFamily,
|
|
|
+ fontSize: sItem.fontSize,
|
|
|
+ underLine: sItem.underLine,
|
|
|
+ wordPadding: sItem.wordPadding
|
|
|
+ }
|
|
|
};
|
|
|
paraArr.push(obj);
|
|
|
});
|
|
@@ -607,7 +658,7 @@ export default {
|
|
|
},
|
|
|
handleChangeTab() {
|
|
|
this.wordShow = !this.wordShow;
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {
|
|
@@ -621,10 +672,10 @@ export default {
|
|
|
updated() {}, //生命周期 - 更新之后
|
|
|
beforeDestroy() {}, //生命周期 - 销毁之前
|
|
|
destroyed() {}, //生命周期 - 销毁完成
|
|
|
- activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
+ activated() {} //如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
};
|
|
|
</script>
|
|
|
-<style lang='scss' scoped>
|
|
|
+<style lang="scss" scoped>
|
|
|
//@import url(); 引入公共css类
|
|
|
|
|
|
.Big-Book-prev-Textdes {
|
|
@@ -815,6 +866,11 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+.InputHasRecordNPC-phone {
|
|
|
+ .inputInner {
|
|
|
+ margin-bottom: 12px;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|
|
|
<style lang="scss">
|
|
|
.InputHasRecordNPC {
|
|
@@ -843,4 +899,4 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|