Commit fa6eecbe authored by 黄奎's avatar 黄奎

页面修改

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