Commit 8363c6e1 authored by zhengke's avatar zhengke

修改

parent 9896c845
......@@ -24,7 +24,7 @@
<swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item
v-for="(item1, index1) in data.DetailsList"
:key="item1.id"
:key="index1"
>
<view class="item1">
<view class="flex flex_start_center">
......@@ -36,6 +36,7 @@
type="text"
v-model="item1.Answer"
class="input textarea"
@input="sendData"
placeholder="请填写答案"
placeholder-style="textarea-placeholder"
:maxlength="-1"
......@@ -107,6 +108,9 @@ export default {
this.$emit("getBeforeTopic");
}
},
sendData(){
context.emit("answerChange", data.data);
}
};
onMounted(() => {
if (props.isLast) {
......
......@@ -114,6 +114,7 @@ export default {
x.IsAnswer = false;
});
item.IsAnswer = !item.IsAnswer;
context.emit("answerChange", data.data);
this.$forceUpdate();
},
};
......
......@@ -24,7 +24,7 @@
<swiper-item></swiper-item>
<swiper-item
v-for="(item1, index1) in data.DetailsList"
:key="item1.id"
:key="index1"
>
<view class="item1">
<view class="flex flex_start_center">
......@@ -41,6 +41,7 @@
<input
type="text"
v-model="item2.Content"
@input="sendData()"
:placeholder="'请填写第 ' + (index2 + 1) + ' 空答案'"
class="input"
/>
......@@ -109,6 +110,9 @@ export default {
this.$emit("getBeforeTopic");
}
},
sendData() {
context.emit("answerChange", data.data);
},
};
onMounted(() => {
if (props.isLast) {
......
......@@ -40,7 +40,7 @@
v-model="item2.Content"
class="input"
:placeholder="'请填写第 ' + (index2 + 1) + ' 空答案'"
@input="input($event, item2)"
@input="sendData()"
/>
</view>
</view>
......@@ -90,6 +90,11 @@ export default {
data.current = props.startIndex;
data.ExamIndex = props.startIndex;
}
watch(data.data, (newVal, oldVal) => {
if(newVal){
context.emit("answerChange", newVal);
}
});
let methods = {
changeNumToHan,
jumpPage() {
......@@ -110,8 +115,8 @@ export default {
this.$emit("getBeforeTopic");
}
},
input(e, i) {
console.log(i);
sendData() {
context.emit("answerChange", data.data);
},
};
onMounted(() => {
......
......@@ -24,7 +24,7 @@
<swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item
v-for="(item1, index1) in data.DetailsList"
:key="item1.id"
:key="index1"
>
<view class="item1">
<view class="flex flex_start_center">
......@@ -34,9 +34,10 @@
<view class="chooseName">
<textarea
type="text"
v-model="item1.myAnswer"
v-model="item1.Answer"
class="input textarea"
placeholder="请填写答案"
@input="sendData"
placeholder-style="textarea-placeholder"
:maxlength="-1"
/>
......@@ -72,9 +73,6 @@ export default {
},
setup(props, context) {
let { ctx } = getCurrentInstance();
props.paperData.DetailsList.forEach((item, index) => {
item.myAnswer = "";
});
let data = reactive({
data: props.paperData,
autoplay: false,
......@@ -107,6 +105,9 @@ export default {
this.$emit("getBeforeTopic");
}
},
sendData() {
context.emit("answerChange", data.data);
},
};
onMounted(() => {
if (props.isLast) {
......@@ -132,6 +133,10 @@ export default {
align-items: center;
justify-content: space-between;
}
.Exam_Total {
font-size: 25rpx;
color: gray;
}
.ExamIndex_Box{
margin-right:20px;
}
......
......@@ -112,7 +112,6 @@
alertMenu(item){
item.isShow=true;
this.$forceUpdate();
console.log(item,'item');
},
//点击背景隐藏
hideVan(item){
......@@ -122,6 +121,7 @@
onSelect(e,item3){
item3.isShow = false;
item3.Name = e.detail.name;
context.emit("answerChange", data.data);
},
getSelect(item){
let Array=[]
......
......@@ -104,6 +104,7 @@ export default {
},
//选题
change(item1, item2) {
context.emit("answerChange", data.data);
item1.QuestionContentObj.map((e) => {
if (e.Name == item2.Name) {
e.IsAnswer = true;
......
......@@ -24,7 +24,7 @@
<swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item
v-for="(item1, index1) in data.DetailsList"
:key="item1.id"
:key="index1"
>
<view class="item1">
<view class="flex flex_start_center">
......@@ -127,6 +127,11 @@ export default {
data.current = props.startIndex;
data.ExamIndex = props.startIndex;
}
watch(data.data, (newVal, oldVal) => {
if(newVal){
context.emit("answerChange", newVal);
}
});
let methods = {
changeNumToHan,
jumpPage() {
......
......@@ -23,7 +23,7 @@
<swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item
v-for="(item1, index1) in data.DetailsList"
:key="item1.id"
:key="index1"
>
<view class="item1">
<view class="flex flex_start_center">
......@@ -33,9 +33,10 @@
<view class="chooseName">
<textarea
type="text"
v-model="item1.myAnswer"
v-model="item1.Answer"
class="input textarea"
placeholder="请填写答案"
@input="sendData"
placeholder-style="textarea-placeholder"
:maxlength="-1"
/>
......@@ -71,9 +72,6 @@ export default {
},
setup(props, context) {
let { ctx } = getCurrentInstance();
props.paperData.DetailsList.forEach((item, index) => {
item.myAnswer = "";
});
let data = reactive({
data: props.paperData,
autoplay: false,
......@@ -106,6 +104,9 @@ export default {
this.$emit("getBeforeTopic");
}
},
sendData() {
context.emit("answerChange", data.data);
},
};
onMounted(() => {
if (props.isLast) {
......@@ -131,6 +132,10 @@ export default {
align-items: center;
justify-content: space-between;
}
.Exam_Total {
font-size: 25rpx;
color: gray;
}
.ExamIndex_Box{
margin-right:20px;
}
......
......@@ -24,7 +24,7 @@
<swiper-item></swiper-item>
<swiper-item
v-for="(item1, index1) in data.DetailsList"
:key="item1.id"
:key="index1"
>
<view class="item1">
<view class="flex flex_start_center">
......@@ -36,6 +36,7 @@
type="text"
v-model="item1.Answer"
class="input textarea"
@input="sendData"
placeholder="请填写答案"
placeholder-style="textarea-placeholder"
:maxlength="-1"
......@@ -107,6 +108,9 @@ export default {
this.$emit("getBeforeTopic");
}
},
sendData(){
context.emit("answerChange", data.data);
}
};
onMounted(() => {
if (props.isLast) {
......
......@@ -33,6 +33,7 @@
type="text"
v-model="item1.Answer"
class="input textarea"
@input="sendData"
placeholder="请填写答案"
placeholder-style="textarea-placeholder"
:maxlength="-1"
......@@ -104,6 +105,9 @@ export default {
this.$emit("getBeforeTopic");
}
},
sendData(){
context.emit("answerChange", data.data);
}
};
onMounted(() => {
if (props.isLast) {
......
......@@ -36,6 +36,7 @@
:paperData="item"
@getBeforeTopic="getBeforeTopic()"
@getAfterTopic="getAfterTopic()"
@answerChange="getAnswerChange($event, index)"
:sort="index"
:sortTotal="peaperDetail.Paper.GroupList.length"
:isLast="isLast"
......@@ -142,9 +143,8 @@
:sortTotal="peaperDetail.Paper.GroupList.length"
@getAfterTopic="getAfterTopic()"
@getBeforeTopic="getBeforeTopic()"
v-if="
item.QuestionTypeKey === 'noun-explanation' && index === changeIndex
"
@answerChange="getAnswerChange($event, index)"
v-if="item.QuestionTypeKey === 'noun-explanation' && index === changeIndex"
/>
<!-- 论述题 -->
<easyQuestion
......@@ -155,9 +155,8 @@
:sortTotal="peaperDetail.Paper.GroupList.length"
@getAfterTopic="getAfterTopic()"
@getBeforeTopic="getBeforeTopic()"
v-if="
item.QuestionTypeKey === 'essay-question' && index === changeIndex
"
@answerChange="getAnswerChange($event, index)"
v-if="item.QuestionTypeKey === 'essay-question' && index === changeIndex"
/>
<!-- 计算题 -->
<Calculation
......@@ -168,6 +167,7 @@
:sortTotal="peaperDetail.Paper.GroupList.length"
@getAfterTopic="getAfterTopic()"
@getBeforeTopic="getBeforeTopic()"
@answerChange="getAnswerChange($event, index)"
v-if="item.QuestionTypeKey === 'calculation' && index === changeIndex"
/>
<!-- 分录题 -->
......@@ -179,9 +179,8 @@
:sortTotal="peaperDetail.Paper.GroupList.length"
@getAfterTopic="getAfterTopic()"
@getBeforeTopic="getBeforeTopic()"
v-if="
item.QuestionTypeKey === 'entry-problem' && index === changeIndex
"
@answerChange="getAnswerChange($event, index)"
v-if="item.QuestionTypeKey === 'entry-problem' && index === changeIndex"
/>
<!-- 口语题 -->
<Spoken
......@@ -192,6 +191,7 @@
:sortTotal="peaperDetail.Paper.GroupList.length"
@getAfterTopic="getAfterTopic()"
@getBeforeTopic="getBeforeTopic()"
@answerChange="getAnswerChange($event, index)"
v-if="item.QuestionTypeKey === 'spoken' && index === changeIndex"
/>
<!-- 其他 -->
......@@ -203,6 +203,7 @@
:sortTotal="peaperDetail.Paper.GroupList.length"
@getAfterTopic="getAfterTopic()"
@getBeforeTopic="getBeforeTopic()"
@answerChange="getAnswerChange($event, index)"
v-if="item.QuestionTypeKey === 'other' && index === changeIndex"
/>
<!-- 完型填空 -->
......@@ -214,6 +215,7 @@
:sortTotal="peaperDetail.Paper.GroupList.length"
@getAfterTopic="getAfterTopic()"
@getBeforeTopic="getBeforeTopic()"
@answerChange="getAnswerChange($event, index)"
v-if="item.QuestionTypeKey === 'cloze' && index === changeIndex"
/>
<!-- 资料题 -->
......@@ -225,9 +227,8 @@
:sortTotal="peaperDetail.Paper.GroupList.length"
@getAfterTopic="getAfterTopic()"
@getBeforeTopic="getBeforeTopic()"
v-if="
item.QuestionTypeKey === 'data-question' && index === changeIndex
"
@answerChange="getAnswerChange($event, index)"
v-if="item.QuestionTypeKey === 'data-question' && index === changeIndex"
/>
<!-- 公用选择题 -->
<SharingChoose
......@@ -238,9 +239,8 @@
:sortTotal="peaperDetail.Paper.GroupList.length"
@getAfterTopic="getAfterTopic()"
@getBeforeTopic="getBeforeTopic()"
v-if="
item.QuestionTypeKey === 'sharing-choose' && index === changeIndex
"
@answerChange="getAnswerChange($event, index)"
v-if="item.QuestionTypeKey === 'sharing-choose' && index === changeIndex"
/>
<!-- 排序题 -->
<SortingProblem
......@@ -251,9 +251,8 @@
:sortTotal="peaperDetail.Paper.GroupList.length"
@getAfterTopic="getAfterTopic()"
@getBeforeTopic="getBeforeTopic()"
v-if="
item.QuestionTypeKey === 'sorting-problem' && index === changeIndex
"
@answerChange="getAnswerChange($event, index)"
v-if="item.QuestionTypeKey === 'sorting-problem' && index === changeIndex"
/>
<!-- 连线题待完善 -->
<Connect
......@@ -264,6 +263,7 @@
:sortTotal="peaperDetail.Paper.GroupList.length"
@getAfterTopic="getAfterTopic()"
@getBeforeTopic="getBeforeTopic()"
@answerChange="getAnswerChange($event, index)"
v-if="item.QuestionTypeKey === 'matching' && index === changeIndex"
/>
</view>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment