Commit fa6eecbe authored by 黄奎's avatar 黄奎

页面修改

parent ea2f0220
......@@ -66,31 +66,25 @@
</tbody>
<tfoot v-if="isShowAnswer">
<tr>
<td>
答案:{{data.Answer}}
<td colspan="2" style="font-weight:bold">
答案: {{data.QuestionAnswerList[index].SubAnswer}}
</td>
</tr>
</tfoot>
</table>
<table class="common_TiTable" v-if="isShowAnswer">
<tfoot>
<tr>
<td colspan="2">答案:{{data.Answer}}</td>
</tr>
<tr v-if="isShowStudentAnswer">
<td colspan="2">
<span style="font-weight:bold;">考生答案:</span>
<span style="font-weight:bold;">
{{data.StundetAnswer}}
</span>
<td v-if="isShowStudentAnswer" colspan="2" style="font-weight:bold">
考生答案: {{data.AnswerList[index].SubAnswer}}
</td>
</tr>
<tr v-if="isShowStudentAnswer">
<td colspan="2">
<q-input standout="bg-primary text-white" v-model="data.StudentScore" label="得分:" maxlength="20"
<q-input standout="bg-primary text-white" v-model="data.AnswerList[index].StudentScore" label="得分:" maxlength="20"
@input="getQuestionScore" />
</td>
</tr>
</tfoot>
</table>
<table class="common_TiTable" v-if="isShowAnswer">
<tfoot>
<tr>
<td colspan="2">解析:<span v-html="data.AnswerParse"></span></td>
</tr>
......
......@@ -85,7 +85,7 @@
</tr>
<tr v-if="isShowStudentAnswer">
<td colspan="3">
<q-input standout="bg-primary text-white" v-model="data.StundetScore" label="得分:" maxlength="20"
<q-input standout="bg-primary text-white" v-model="data.StudentScore" label="得分:" maxlength="20"
@input="getQuestionScore" />
</td>
</tr>
......
......@@ -53,12 +53,7 @@
<tr v-for="(subItem,subIndex) in item.SubAnwser" :key="subIndex">
<td style="width:40px;text-align:center;">
<template v-if="item.QuestionKey=='single'|| item.QuestionKey=='single-number'">
<template v-if="isShowAnswer">
<div class="Answer_List2" :class="{'Is_Answer':subItem.IsAnswer }">
{{subItem.Name}}
</div>
</template>
<template v-else-if="isOperate">
<template v-if="isOperate">
<div class="Answer_List2" style="cursor:pointer;" @click="ChangeItem(item,subItem)"
:class="{'Is_Answer':subItem.IsAnswer }">
{{subItem.Name}}
......@@ -71,12 +66,7 @@
</template>
</template>
<template v-else-if="item.QuestionKey=='multiple'">
<template v-if="isShowAnswer">
<div class="Answer_List" :class="{'Is_Answer':subItem.IsAnswer}">
{{subItem.Name}}
</div>
</template>
<template v-else-if="isOperate">
<template v-if="isOperate">
<div class="Answer_List" style="cursor:pointer;" @click="changeMutile(subItem)"
:class="{'Is_Answer':subItem.IsAnswer}">
{{subItem.Name}}
......@@ -94,29 +84,25 @@
</div>
</td>
</tr>
<tr v-if="isShowAnswer">
<td colspan="2">
答案: {{data.QuestionAnswerList[index].SubAnswer}}
</td>
</tr>
<tr v-if="isShowStudentAnswer">
<td>
学生答案: {{data.AnswerList[index].Content}}
<td colspan="2">
学生答案: {{data.AnswerList[index].SubAnswer}}
</td>
<td>
<q-input standout="bg-primary text-white" v-model="item.StudentScore" label="得分:" maxlength="20"
@input="getQuestionScore" />
</tr>
<tr v-if="isShowStudentAnswer">
<td colspan="2">
<q-input standout="bg-primary text-white" v-model="data.AnswerList[index].StudentScore" label="得分:"
maxlength="20" @input="getQuestionScore" />
</td>
</tr>
</template>
<!--填空题-->
<template v-if="item.QuestionKey=='fill-in'">
<template v-if="isShowAnswer">
<tr v-for="(subItem,subIndex) in item.SubAnwser" :key="subIndex">
<td style="width:70px;text-align:center;padding-top:8px;">
{{subIndex+1}}
</td>
<td>
<div class="InpDIV" v-html="subItem.Content" style="border:0;margin-top:-2px;">
</div>
</td>
</tr>
</template>
<template v-if="isOperate">
<tr v-for="(subItem,subIndex) in item.SubAnwser" :key="subIndex">
<td style="width:50px;text-align:center;padding-top:8px;">
......@@ -127,75 +113,89 @@
</td>
</tr>
</template>
<tr v-if="isShowAnswer">
<td colspan="2">
答案: {{data.QuestionAnswerList[index].SubAnswer}}
</td>
</tr>
<tr v-if="isShowStudentAnswer">
<td>
学生答案: {{data.AnswerList[index].Content}}
<td colspan="2">
学生答案: {{data.AnswerList[index].SubAnswer}}
</td>
<td>
<q-input standout="bg-primary text-white" v-model="item.StudentScore" label="得分:" maxlength="20"
@input="getQuestionScore" />
</tr>
<tr v-if="isShowStudentAnswer">
<td colspan="2">
<q-input standout="bg-primary text-white" v-model="data.AnswerList[index].StudentScore" label="得分:"
maxlength="20" @input="getQuestionScore" />
</td>
</tr>
</template>
<!--判断题-->
<template v-if="item.QuestionKey=='judge'">
<template v-if="isShowAnswer">
<template v-if="isOperate">
<tr v-for="(subItem,subIndex) in item.SubAnwser" :key="subIndex">
<td style="width:50px;">
<div class="Answer_List2" :class="{'Is_Answer':subItem.IsAnswer&&isShowAnswer}">
<div class="Answer_List" @click="ChangeItem(item,subItem)" :class="{'Is_Answer':subItem.IsAnswer}">
{{subItem.Name}}
</div>
</td>
<td style="text-align:left;vertical-align:middle;">
<td colspan="2" style="text-align:left;vertical-align:middle;">
{{subItem.Content}}
</td>
</tr>
</template>
<template v-if="isOperate">
<template v-else>
<tr v-for="(subItem,subIndex) in item.SubAnwser" :key="subIndex">
<td style="width:50px;">
<div class="Answer_List" @click="ChangeItem(item,subItem)" :class="{'Is_Answer':subItem.IsAnswer}">
<div class="Answer_List2">
{{subItem.Name}}
</div>
</td>
<td colspan="2" style="text-align:left;vertical-align:middle;">
<td style="text-align:left;vertical-align:middle;">
{{subItem.Content}}
</td>
</tr>
</template>
<tr v-if="isShowAnswer">
<td colspan="2">
答案: {{data.QuestionAnswerList[index].SubAnswer}}
</td>
</tr>
<tr v-if="isShowStudentAnswer">
<td>
学生答案: {{data.AnswerList[index].Content}}
<td colspan="2">
学生答案: {{data.AnswerList[index].SubAnswer}}
</td>
<td>
<q-input standout="bg-primary text-white" v-model="item.StudentScore" label="得分:" maxlength="20"
@input="getQuestionScore" />
</tr>
<tr v-if="isShowStudentAnswer">
<td colspan="2">
<q-input standout="bg-primary text-white" v-model="data.AnswerList[index].StudentScore" label="得分:"
maxlength="20" @input="getQuestionScore" />
</td>
</tr>
</template>
<!--简答题-->
<template v-if="item.QuestionKey=='short-answer'">
<template v-if="isShowAnswer">
<template v-if="isOperate">
<tr v-for="(subItem,subIndex) in item.SubAnwser" :key="subIndex">
<td colspan="2">
答案: <div v-html="subItem.Content"></div>
<el-input v-model="subItem.Content" :placeholder="'请填写第简答题答案'"> </el-input>
</td>
</tr>
</template>
<template v-if="isOperate">
<tr v-for="(subItem,subIndex) in item.SubAnwser" :key="subIndex">
<tr v-if="isShowAnswer">
<td colspan="2">
<el-input v-model="subItem.Content" :placeholder="'请填写第简答题答案'"> </el-input>
答案: {{data.QuestionAnswerList[index].SubAnswer}}
</td>
</tr>
</template>
<tr v-if="isShowStudentAnswer">
<td>
学生答案: {{data.AnswerList[index].Content}}
<td colspan="2">
学生答案: {{data.AnswerList[index].SubAnswer}}
</td>
<td>
<q-input standout="bg-primary text-white" v-model="item.StudentScore" label="得分:" maxlength="20"
@input="getQuestionScore" />
</tr>
<tr v-if="isShowStudentAnswer">
<td colspan="2">
<q-input standout="bg-primary text-white" v-model="data.AnswerList[index].StudentScore" label="得分:"
maxlength="20" @input="getQuestionScore" />
</td>
</tr>
</template>
......
......@@ -470,8 +470,16 @@
if (x.DetailsList && x.DetailsList.length > 0) {
this.examNum += x.DetailsList.length;
x.DetailsList.forEach(y => {
if (y.Score) {
this.examScore += Number(y.Score);
if (y.QuestionTypeKey == "cloze") {
var clozeScore = 0;
if (y.AnswerList && y.AnswerList.length > 0) {
y.AnswerList.forEach(qItem => {
clozeScore += Number(qItem.StudentScore);
})
}
this.studentScore += Number(clozeScore)
} else {
this.studentScore += Number(y.StudentScore)
}
})
......
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