|
@@ -204,6 +204,23 @@
|
|
|
v-html="sItem.def_str"
|
|
|
></span>
|
|
|
</template>
|
|
|
+ <span v-if="curQue.type == 'NewWord_chs'">
|
|
|
+ <Soundrecord
|
|
|
+ :tmIndex="index"
|
|
|
+ :tmsIndex="sIndex"
|
|
|
+ :TaskModel="TaskModel"
|
|
|
+ @handleWav="handleWav"
|
|
|
+ :modelType="curQue.type"
|
|
|
+ :answerRecordList="
|
|
|
+ judgeAnswer != 'standardAnswer'
|
|
|
+ ? curQue.Bookanswer[index][sIndex].recordList
|
|
|
+ : []
|
|
|
+ "
|
|
|
+ type="mini"
|
|
|
+ class="luyin-box-wordphrase"
|
|
|
+ :style="{ marginLeft: '8px' }"
|
|
|
+ />
|
|
|
+ </span>
|
|
|
<span v-if="curQue.isInfor">
|
|
|
<img
|
|
|
src="../../../assets/NPC/detail-icon.png"
|
|
@@ -237,13 +254,15 @@
|
|
|
//例如:import 《组件名称》from ‘《组件路径》';
|
|
|
import WordPhraseDetail from "./components/WordPhraseDetail.vue";
|
|
|
import AudioLine from "../preview/AudioLine.vue";
|
|
|
+import Soundrecord from "../preview/Soundrecord.vue"; // 录音模板
|
|
|
export default {
|
|
|
//import引入的组件需要注入到对象中才能使用
|
|
|
components: {
|
|
|
WordPhraseDetail,
|
|
|
AudioLine,
|
|
|
+ Soundrecord
|
|
|
},
|
|
|
- props: ["curQue", "themeColor", "currentTreeID", "indexs", "indexss","indexStr"],
|
|
|
+ props: ["curQue", "themeColor", "currentTreeID", "indexs", "indexss","indexStr", "TaskModel", "judgeAnswer"],
|
|
|
data() {
|
|
|
//这里存放数据
|
|
|
return {
|
|
@@ -437,8 +456,10 @@ export default {
|
|
|
let optionRes = [];
|
|
|
let mp3List = [];
|
|
|
let itemNumber = 0;
|
|
|
+ let Bookanswer = []
|
|
|
this.curQue.option.forEach((item, index) => {
|
|
|
optionRes = optionRes.concat(item);
|
|
|
+ Bookanswer.push([])
|
|
|
item.forEach((sItem, sIndex) => {
|
|
|
sItem.mIndex = sIndex;
|
|
|
sItem.sIndex = resIndex;
|
|
@@ -455,10 +476,16 @@ export default {
|
|
|
sItem.ed = _this.curQue.wordTime[itemNumber].ed;
|
|
|
}
|
|
|
itemNumber++;
|
|
|
+ Bookanswer[index].push({
|
|
|
+ recordList: []
|
|
|
+ })
|
|
|
});
|
|
|
});
|
|
|
this.optionRes = JSON.parse(JSON.stringify(optionRes));
|
|
|
this.mp3List = mp3List;
|
|
|
+ if (!this.curQue.Bookanswer) {
|
|
|
+ this.$set(this.curQue, "Bookanswer", Bookanswer);
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
handleChangeTab() {
|
|
@@ -481,6 +508,11 @@ export default {
|
|
|
emptyEd() {
|
|
|
this.ed = null;
|
|
|
},
|
|
|
+ handleWav(list, tmIndex, tmsIndex) {
|
|
|
+ tmIndex = tmIndex ? tmIndex : 0;
|
|
|
+ tmsIndex = tmsIndex ? tmsIndex : 0
|
|
|
+ this.$set(this.curQue.Bookanswer[tmIndex][tmsIndex], "recordList", list);
|
|
|
+ },
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {
|
|
@@ -690,10 +722,11 @@ export default {
|
|
|
border-radius: 0 0 8px 8px;
|
|
|
}
|
|
|
.detail-icon {
|
|
|
- width: 56px;
|
|
|
+ width: 24px;
|
|
|
height: 24px;
|
|
|
display: block;
|
|
|
cursor: pointer;
|
|
|
+ opacity: 0.5;
|
|
|
}
|
|
|
.play-btn {
|
|
|
margin-top: 4px;
|
|
@@ -748,6 +781,9 @@ export default {
|
|
|
transform: rotateZ(0deg);
|
|
|
}
|
|
|
}
|
|
|
+.luyin-box-wordphrase{
|
|
|
+ height: 24px;
|
|
|
+}
|
|
|
</style>
|
|
|
<style lang="scss">
|
|
|
.NPC-zhedie {
|