|
@@ -1,6 +1,6 @@
|
|
|
<!-- -->
|
|
|
<template>
|
|
|
- <div class="NNPE-ArticleView" v-if="curQue">
|
|
|
+ <div class="NNPE-ArticleView" v-if="curQue && Bookanswer">
|
|
|
<div
|
|
|
class="aduioLine-box"
|
|
|
v-if="
|
|
@@ -91,15 +91,10 @@
|
|
|
>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <!-- <input
|
|
|
- v-model="pItem.answer"
|
|
|
- class="answer-input"
|
|
|
- /> -->
|
|
|
- <div
|
|
|
- class="answer-input"
|
|
|
- contenteditable="true"
|
|
|
- v-html="pItem.answer"
|
|
|
- ></div>
|
|
|
+ <Vedit
|
|
|
+ v-model="Bookanswer.input[pItem.hengIndex - 1]"
|
|
|
+ :canEdit="TaskModel == 'ANSWER' ? false : true"
|
|
|
+ />
|
|
|
</template>
|
|
|
<span
|
|
|
v-if="pyPosition == 'bottom'"
|
|
@@ -196,10 +191,24 @@
|
|
|
>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <!-- <input v-model="pItem.answer" class="answer-input" /> -->
|
|
|
- <div class="answer-input" contenteditable="true">
|
|
|
- {{ pItem.answer }}
|
|
|
- </div>
|
|
|
+ <Vedit
|
|
|
+ v-model="Bookanswer.input[pItem.hengIndex - 1]"
|
|
|
+ :canEdit="TaskModel == 'ANSWER' ? false : true"
|
|
|
+ />
|
|
|
+ <!-- <Mcontenteditable
|
|
|
+ :child="{
|
|
|
+ txt: Bookanswer.input[pItem.hengIndex - 1],
|
|
|
+ isEdit: TaskModel == 'ANSWER' ? false : true,
|
|
|
+ }"
|
|
|
+ :hengIndex="pItem.hengIndex - 1"
|
|
|
+ :listIndex="listIndex"
|
|
|
+ @saveAnswer="saveBookanswer"
|
|
|
+ /> -->
|
|
|
+ <!-- <div
|
|
|
+ class="answer-input"
|
|
|
+ contenteditable="true"
|
|
|
+ v-html="Bookanswer[pItem.hengIndex - 1]"
|
|
|
+ ></div> -->
|
|
|
</template>
|
|
|
<span
|
|
|
v-if="pyPosition == 'bottom'"
|
|
@@ -231,9 +240,12 @@
|
|
|
<div class="answer-box">
|
|
|
<div class="input-record" v-if="item.isRecord">
|
|
|
<Soundrecord
|
|
|
- @handleWav="handleWav"
|
|
|
type="normal"
|
|
|
class="normal-box"
|
|
|
+ :TaskModel="TaskModel"
|
|
|
+ :answerRecordList="Bookanswer.recordList[index]"
|
|
|
+ :tmIndex="index"
|
|
|
+ @handleWav="handleWav"
|
|
|
/>
|
|
|
</div>
|
|
|
<template
|
|
@@ -312,10 +324,24 @@
|
|
|
}}</span>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <!-- <input v-model="pItem.answer" class="answer-input" /> -->
|
|
|
- <div class="answer-input" contenteditable="true">
|
|
|
- {{ pItem.answer }}
|
|
|
- </div>
|
|
|
+ <Vedit
|
|
|
+ v-model="Bookanswer.input[pItem.hengIndex - 1]"
|
|
|
+ :canEdit="TaskModel == 'ANSWER' ? false : true"
|
|
|
+ />
|
|
|
+ <!-- <Mcontenteditable
|
|
|
+ :child="{
|
|
|
+ txt: Bookanswer.input[pItem.hengIndex - 1],
|
|
|
+ isEdit: TaskModel == 'ANSWER' ? false : true,
|
|
|
+ }"
|
|
|
+ :hengIndex="pItem.hengIndex - 1"
|
|
|
+ :listIndex="listIndex"
|
|
|
+ @saveAnswer="saveBookanswer"
|
|
|
+ /> -->
|
|
|
+ <!-- <div
|
|
|
+ class="answer-input"
|
|
|
+ contenteditable="true"
|
|
|
+ v-html="Bookanswer[pItem.hengIndex - 1]"
|
|
|
+ ></div> -->
|
|
|
</template>
|
|
|
</div>
|
|
|
<div v-if="item.enwords" class="enwords">
|
|
@@ -326,9 +352,12 @@
|
|
|
<div class="answer-box">
|
|
|
<div class="input-record" v-if="item.isRecord">
|
|
|
<Soundrecord
|
|
|
- @handleWav="handleWav"
|
|
|
type="normal"
|
|
|
class="normal-box"
|
|
|
+ :TaskModel="TaskModel"
|
|
|
+ :answerRecordList="Bookanswer.recordList[index]"
|
|
|
+ :tmIndex="index"
|
|
|
+ @handleWav="handleWav"
|
|
|
/>
|
|
|
</div>
|
|
|
<template
|
|
@@ -379,14 +408,26 @@ import AudioLine from "../AudioLine.vue";
|
|
|
import RoleChs from "./RoleChs.vue";
|
|
|
import RemarkChs from "./RemarkChs.vue";
|
|
|
import Soundrecord from "../Soundrecord.vue";
|
|
|
+// import Mcontenteditable from "../components/Mcontenteditable.vue";
|
|
|
+import Vedit from "../components/Vedit.vue";
|
|
|
export default {
|
|
|
name: "DialogueNormalModelChs",
|
|
|
- props: ["curQue", "pyPosition", "colorBox", "saveBookanswer", "listIndex"],
|
|
|
+ props: [
|
|
|
+ "curQue",
|
|
|
+ "pyPosition",
|
|
|
+ "colorBox",
|
|
|
+ "saveBookanswer",
|
|
|
+ "listIndex",
|
|
|
+ "Bookanswer",
|
|
|
+ "TaskModel",
|
|
|
+ ],
|
|
|
components: {
|
|
|
AudioLine,
|
|
|
RoleChs,
|
|
|
RemarkChs,
|
|
|
Soundrecord,
|
|
|
+ Vedit,
|
|
|
+ // Mcontenteditable,
|
|
|
},
|
|
|
filters: {
|
|
|
handlePinyin(wordsList) {
|
|
@@ -440,15 +481,7 @@ export default {
|
|
|
answer: [],
|
|
|
};
|
|
|
},
|
|
|
- computed: {
|
|
|
- Bookanswer: function () {
|
|
|
- let arr = [];
|
|
|
- this.curQue.detail.forEach((item) => {
|
|
|
- arr.push("");
|
|
|
- });
|
|
|
- return arr;
|
|
|
- },
|
|
|
- },
|
|
|
+ computed: {},
|
|
|
watch: {},
|
|
|
//方法集合
|
|
|
methods: {
|
|
@@ -461,7 +494,10 @@ export default {
|
|
|
_this.saveBookanswer(this.Bookanswer, this.listIndex);
|
|
|
}
|
|
|
},
|
|
|
- handleWav() {},
|
|
|
+ handleWav(list, tmIndex) {
|
|
|
+ tmIndex = tmIndex ? tmIndex : 0;
|
|
|
+ this.$set(this.Bookanswer.recordList, tmIndex, list);
|
|
|
+ },
|
|
|
getCurTime(curTime) {
|
|
|
this.curTime = curTime * 1000;
|
|
|
},
|
|
@@ -643,6 +679,7 @@ export default {
|
|
|
created() {},
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {
|
|
|
+ console.log(this.Bookanswer);
|
|
|
if (this.curQue) {
|
|
|
if (this.curQue.font == "cn" || !this.curQue.font) {
|
|
|
this.handleData();
|
|
@@ -821,7 +858,7 @@ export default {
|
|
|
padding: 0 10px;
|
|
|
box-sizing: border-box;
|
|
|
color: #000000;
|
|
|
- line-height: 27px;
|
|
|
+ line-height: 26px;
|
|
|
}
|
|
|
}
|
|
|
.enwords {
|