|
@@ -1,6 +1,10 @@
|
|
|
<!-- -->
|
|
|
<template>
|
|
|
- <div class="dialogue-answer-view NPC-zhedie" v-if="isShowTemp">
|
|
|
+ <div
|
|
|
+ class="dialogue-answer-view NPC-zhedie"
|
|
|
+ :class="[isPhone ? 'dialogue-answer-view-phone' : '']"
|
|
|
+ v-if="isShowTemp"
|
|
|
+ >
|
|
|
<!-- 标题 -->
|
|
|
<template v-if="curQue.title">
|
|
|
<div class="topTitle">
|
|
@@ -34,46 +38,54 @@
|
|
|
curQue.option[index].detail.length > 0
|
|
|
? 'hasoption'
|
|
|
: '',
|
|
|
- index == curQue.list.length - 1 ? 'haspadding' : '',
|
|
|
+ index == curQue.list.length - 1 ? 'haspadding' : ''
|
|
|
]"
|
|
|
v-for="(item, index) in curQue.list"
|
|
|
:key="'list' + index"
|
|
|
>
|
|
|
- <span class="number" v-if="item.number">{{ item.number }}</span>
|
|
|
- <div
|
|
|
- class="dialogue-img"
|
|
|
- v-if="item.img_list && item.img_list.length > 0"
|
|
|
- >
|
|
|
- <el-image
|
|
|
- style="width: 196px; height: 164px"
|
|
|
- :src="item.img_list[0].id"
|
|
|
- fit="scale-down"
|
|
|
- ></el-image>
|
|
|
- </div>
|
|
|
- <div class="dialogue-answer-model">
|
|
|
- <AnswerModel
|
|
|
- :curQue="item"
|
|
|
- :Bookanswer="curQue.Bookanswer[index]"
|
|
|
- :pyPosition="curQue.pyPosition"
|
|
|
- :enPosition="curQue.enPosition"
|
|
|
- :colorBox="colorBox"
|
|
|
- :TaskModel="TaskModel"
|
|
|
- :listIndex="index"
|
|
|
- :judgeAnswer="judgeAnswer"
|
|
|
- :audioWidth="item.number?592:620"
|
|
|
- />
|
|
|
+ <span class="number" v-if="item.number && !isPhone">{{
|
|
|
+ item.number
|
|
|
+ }}</span>
|
|
|
+ <div class="dialogue-item">
|
|
|
+ <div
|
|
|
+ class="dialogue-img"
|
|
|
+ v-if="item.img_list && item.img_list.length > 0"
|
|
|
+ >
|
|
|
+ <el-image
|
|
|
+ :style="{
|
|
|
+ width: isPhone ? '110px' : '196px',
|
|
|
+ height: isPhone ? '120px' : '164px'
|
|
|
+ }"
|
|
|
+ :src="item.img_list[0].id"
|
|
|
+ fit="scale-down"
|
|
|
+ :preview-src-list="[item.img_list[0].id]"
|
|
|
+ ></el-image>
|
|
|
+ </div>
|
|
|
+ <div class="dialogue-answer-model">
|
|
|
+ <AnswerModel
|
|
|
+ :curQue="item"
|
|
|
+ :Bookanswer="curQue.Bookanswer[index]"
|
|
|
+ :pyPosition="curQue.pyPosition"
|
|
|
+ :enPosition="curQue.enPosition"
|
|
|
+ :colorBox="colorBox"
|
|
|
+ :TaskModel="TaskModel"
|
|
|
+ :listIndex="index"
|
|
|
+ :judgeAnswer="judgeAnswer"
|
|
|
+ :audioWidth="item.number ? 592 : 620"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <template
|
|
|
+ v-if="
|
|
|
+ curQue.option &&
|
|
|
+ curQue.option.length > 0 &&
|
|
|
+ curQue.option[index] &&
|
|
|
+ curQue.option[index].detail &&
|
|
|
+ curQue.option[index].detail.length > 0
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <OptionModel :curOption="curQue.option[index]" :index="index" />
|
|
|
+ </template>
|
|
|
</div>
|
|
|
- <template
|
|
|
- v-if="
|
|
|
- curQue.option &&
|
|
|
- curQue.option.length > 0 &&
|
|
|
- curQue.option[index] &&
|
|
|
- curQue.option[index].detail &&
|
|
|
- curQue.option[index].detail.length > 0
|
|
|
- "
|
|
|
- >
|
|
|
- <OptionModel :curOption="curQue.option[index]" :index="index" />
|
|
|
- </template>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-collapse-transition>
|
|
@@ -88,53 +100,59 @@
|
|
|
>
|
|
|
<template v-if="isShowQue(index)">
|
|
|
<span class="number" v-if="item.number">{{ item.number }}</span>
|
|
|
- <div
|
|
|
- class="dialogue-img"
|
|
|
- v-if="item.img_list && item.img_list.length > 0"
|
|
|
- >
|
|
|
- <el-image
|
|
|
- style="width: 196px; height: 164px"
|
|
|
- :src="item.img_list[0].id"
|
|
|
- fit="scale-down"
|
|
|
- ></el-image>
|
|
|
+ <div class="dialogue-item">
|
|
|
+ <div
|
|
|
+ class="dialogue-img"
|
|
|
+ v-if="item.img_list && item.img_list.length > 0"
|
|
|
+ >
|
|
|
+ <el-image
|
|
|
+ :style="{
|
|
|
+ width: isPhone ? '110px' : '196px',
|
|
|
+ height: isPhone ? '120px' : '164px'
|
|
|
+ }"
|
|
|
+ :src="item.img_list[0].id"
|
|
|
+ fit="scale-down"
|
|
|
+ :preview-src-list="[item.img_list[0].id]"
|
|
|
+ ></el-image>
|
|
|
+ </div>
|
|
|
+ <div class="dialogue-answer-model">
|
|
|
+ <AnswerModel
|
|
|
+ :curQue="item"
|
|
|
+ :Bookanswer="curQue.Bookanswer[index]"
|
|
|
+ :pyPosition="curQue.pyPosition"
|
|
|
+ :enPosition="curQue.enPosition"
|
|
|
+ :colorBox="colorBox"
|
|
|
+ :listIndex="index"
|
|
|
+ :TaskModel="TaskModel"
|
|
|
+ :judgeAnswer="judgeAnswer"
|
|
|
+ :audioWidth="item.number ? 592 : 620"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <template
|
|
|
+ v-if="
|
|
|
+ curQue.option &&
|
|
|
+ curQue.option.length > 0 &&
|
|
|
+ curQue.option[index] &&
|
|
|
+ curQue.option[index].detail &&
|
|
|
+ curQue.option[index].detail.length > 0
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <OptionModel :curOption="curQue.option[index]" :index="index" />
|
|
|
+ </template>
|
|
|
+ <template
|
|
|
+ v-if="
|
|
|
+ curQue.wordcard &&
|
|
|
+ curQue.wordcard.length > 0 &&
|
|
|
+ curQue.wordcard[index]
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <WordcardModel
|
|
|
+ :curWordcard="curQue.wordcard[index]"
|
|
|
+ :index="index"
|
|
|
+ :pyPosition="curQue.pyPosition"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
</div>
|
|
|
- <div class="dialogue-answer-model">
|
|
|
- <AnswerModel
|
|
|
- :curQue="item"
|
|
|
- :Bookanswer="curQue.Bookanswer[index]"
|
|
|
- :pyPosition="curQue.pyPosition"
|
|
|
- :enPosition="curQue.enPosition"
|
|
|
- :colorBox="colorBox"
|
|
|
- :listIndex="index"
|
|
|
- :TaskModel="TaskModel"
|
|
|
- :judgeAnswer="judgeAnswer"
|
|
|
- :audioWidth="item.number?592:620"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <template
|
|
|
- v-if="
|
|
|
- curQue.option &&
|
|
|
- curQue.option.length > 0 &&
|
|
|
- curQue.option[index] &&
|
|
|
- curQue.option[index].detail &&
|
|
|
- curQue.option[index].detail.length > 0
|
|
|
- "
|
|
|
- >
|
|
|
- <OptionModel :curOption="curQue.option[index]" :index="index" />
|
|
|
- </template>
|
|
|
- <template
|
|
|
- v-if="
|
|
|
- curQue.wordcard &&
|
|
|
- curQue.wordcard.length > 0 &&
|
|
|
- curQue.wordcard[index]
|
|
|
- "
|
|
|
- >
|
|
|
- <WordcardModel
|
|
|
- :curWordcard="curQue.wordcard[index]"
|
|
|
- :index="index"
|
|
|
- :pyPosition="curQue.pyPosition"
|
|
|
- />
|
|
|
- </template>
|
|
|
</template>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -160,9 +178,9 @@ export default {
|
|
|
Soundrecord,
|
|
|
AnswerModel,
|
|
|
OptionModel,
|
|
|
- WordcardModel,
|
|
|
+ WordcardModel
|
|
|
},
|
|
|
- props: ["curQue", "colorBox", "TaskModel", "judgeAnswer"],
|
|
|
+ props: ["curQue", "colorBox", "TaskModel", "judgeAnswer", "isPhone"],
|
|
|
data() {
|
|
|
return {
|
|
|
wordShow: true,
|
|
@@ -170,10 +188,10 @@ export default {
|
|
|
userAnswer: {
|
|
|
recordList: [],
|
|
|
input: [],
|
|
|
- judge: [],
|
|
|
+ judge: []
|
|
|
},
|
|
|
judgeAnswersList: [],
|
|
|
- userErrorNumberTotal: 0,
|
|
|
+ userErrorNumberTotal: 0
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -194,7 +212,7 @@ export default {
|
|
|
return bool;
|
|
|
},
|
|
|
isShowQue() {
|
|
|
- return function (index) {
|
|
|
+ return function(index) {
|
|
|
let _this = this;
|
|
|
let bool = false;
|
|
|
let userErrorNumberTotal = 0;
|
|
@@ -213,7 +231,7 @@ export default {
|
|
|
}
|
|
|
return bool;
|
|
|
};
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
watch: {},
|
|
|
//方法集合
|
|
@@ -223,7 +241,7 @@ export default {
|
|
|
},
|
|
|
handleData() {
|
|
|
let list = JSON.parse(JSON.stringify(this.curQue.list));
|
|
|
- list.forEach((item) => {
|
|
|
+ list.forEach(item => {
|
|
|
let answerArr = [];
|
|
|
if (item.answer) {
|
|
|
answerArr = item.answer.split("\n");
|
|
@@ -254,7 +272,7 @@ export default {
|
|
|
answerArr[aIndex] != "??" &&
|
|
|
answerArr[aIndex] != "??"
|
|
|
? "[JUDGE##F##JUDGE]"
|
|
|
- : "",
|
|
|
+ : ""
|
|
|
};
|
|
|
userAnswer.input.push(JSON.parse(JSON.stringify(re)));
|
|
|
});
|
|
@@ -274,7 +292,7 @@ export default {
|
|
|
userAnswerJudge:
|
|
|
item.judge[i].isJudge && item.judge[i].judge
|
|
|
? "[JUDGE##F##JUDGE]"
|
|
|
- : "",
|
|
|
+ : ""
|
|
|
};
|
|
|
userAnswer.judge.push(JSON.parse(JSON.stringify(judge_obj)));
|
|
|
}
|
|
@@ -292,7 +310,7 @@ export default {
|
|
|
userErrorNumberTotal = errorArr.length;
|
|
|
}
|
|
|
return userErrorNumberTotal;
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {},
|
|
@@ -317,10 +335,10 @@ export default {
|
|
|
updated() {}, //生命周期 - 更新之后
|
|
|
beforeDestroy() {}, //生命周期 - 销毁之前
|
|
|
destroyed() {}, //生命周期 - 销毁完成
|
|
|
- activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
+ activated() {} //如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
};
|
|
|
</script>
|
|
|
-<style lang='scss' scoped>
|
|
|
+<style lang="scss" scoped>
|
|
|
//@import url(); 引入公共css类
|
|
|
.dialogue-answer-view {
|
|
|
width: 100%;
|
|
@@ -396,6 +414,25 @@ export default {
|
|
|
width: 100%;
|
|
|
}
|
|
|
}
|
|
|
+ &-phone {
|
|
|
+ .dialogue-answer-content {
|
|
|
+ padding: 0;
|
|
|
+ }
|
|
|
+ .dialogue-answer-inner {
|
|
|
+ display: block;
|
|
|
+ .dialogue-item {
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-start;
|
|
|
+ align-items: flex-start;
|
|
|
+ .dialogue-img {
|
|
|
+ margin-left: 0;
|
|
|
+ width: 120px;
|
|
|
+ height: 130px;
|
|
|
+ padding: 5px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
.NPC-Big-Book-preview-green {
|
|
|
.dialogue-answer-view {
|
|
@@ -411,4 +448,9 @@ export default {
|
|
|
}
|
|
|
</style>
|
|
|
<style lang="scss">
|
|
|
-</style>
|
|
|
+.dialogue-answer-view-phone {
|
|
|
+ .article-content {
|
|
|
+ padding-right: 0 !important;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|