|
@@ -3,12 +3,24 @@
|
|
<!-- 题目列表部分 -->
|
|
<!-- 题目列表部分 -->
|
|
<Loading :top="200" type="1" style="text-align:center" v-if="dataLoading"></Loading>
|
|
<Loading :top="200" type="1" style="text-align:center" v-if="dataLoading"></Loading>
|
|
<div class="scoring-paper-header">
|
|
<div class="scoring-paper-header">
|
|
- <span class="base-info-item">学生姓名:<span class="analysis-info">{{studentAnswer.name}}</span></span>
|
|
|
|
- <span class="base-info-item">总分:<span class="analysis-info">{{scoreTotal}}</span></span>
|
|
|
|
- <span class="base-info-item">已评:<span class="analysis-info">{{scoreTotal}}</span></span>
|
|
|
|
- <span class="base-info-item">未评:<span class="analysis-info">{{scoreTotal}}</span></span>
|
|
|
|
-
|
|
|
|
- <span class="base-info-btn" type="success" @click="savePaper">
|
|
|
|
|
|
+ <span class="base-info-item">
|
|
|
|
+ 学生姓名:
|
|
|
|
+ <span class="analysis-info">{{studentAnswer.name}}</span>
|
|
|
|
+ <!-- <span class="stu-status-tag">未作答</span> -->
|
|
|
|
+ </span>
|
|
|
|
+ <span class="base-info-item">总分:<span class="analysis-info">{{scoreTotal}}分</span></span>
|
|
|
|
+ <div style="display:inline-block;" v-if="studentAnswer.scores">
|
|
|
|
+ <span class="base-info-item">题号:</span>
|
|
|
|
+ <span @click="goToQuestion(index)" v-for="(groupItem,groupIndex) in paperInfo.item" :key="groupIndex">
|
|
|
|
+ <span :class="studentAnswer.scores[groupIndex] >= 0 ? 'qu-order-tag':'qu-order-tag-def'" v-if="!groupItem.children.length" @click="goToQuestion(groupIndex)">
|
|
|
|
+ {{(groupIndex + 1)}}
|
|
|
|
+ </span>
|
|
|
|
+ <span @click="goToQuestion(groupIndex + index)" v-for="(item,index) in groupItem.children" :key="index" :class="studentAnswer.scores[groupIndex + index] >= 0 ? 'qu-order-tag':'qu-order-tag-def'">
|
|
|
|
+ {{(groupIndex + 1) + '-' + (index + 1)}}
|
|
|
|
+ </span>
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+ <span class="base-info-btn" type="success" @click="saveScore">
|
|
<Icon type="ios-albums-outline" />
|
|
<Icon type="ios-albums-outline" />
|
|
保存打分
|
|
保存打分
|
|
</span>
|
|
</span>
|
|
@@ -25,7 +37,7 @@
|
|
{{ showQu ? '隐藏题干' : '显示题干'}}
|
|
{{ showQu ? '隐藏题干' : '显示题干'}}
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
- <vuescroll ref="que">
|
|
|
|
|
|
+ <vuescroll ref="question-scrool" v-show="!isComplete">
|
|
<div class="qu-list-wrap scoring-exercise-wrap" ref="mathJaxContainer" v-if="!dataLoading">
|
|
<div class="qu-list-wrap scoring-exercise-wrap" ref="mathJaxContainer" v-if="!dataLoading">
|
|
<div class="list-view" :key="'group'+ typeIndex" v-for="(typeItem,typeIndex) in groupList">
|
|
<div class="list-view" :key="'group'+ typeIndex" v-for="(typeItem,typeIndex) in groupList">
|
|
<p class="type-name">
|
|
<p class="type-name">
|
|
@@ -35,9 +47,27 @@
|
|
</p>
|
|
</p>
|
|
<div ref="ques" v-for="(item,index) of typeItem.list" :key="'qu'+ index" :class='["exercise-item",isError(item.id) ? "exercise-item-error":""]'>
|
|
<div ref="ques" v-for="(item,index) of typeItem.list" :key="'qu'+ index" :class='["exercise-item",isError(item.id) ? "exercise-item-error":""]'>
|
|
<!-- 非综合题-->
|
|
<!-- 非综合题-->
|
|
- <div v-if="item.type != 'compose'" style="display:flex;width:100%;" class="not-compose-box">
|
|
|
|
- <div class="scoring-input-box" @click.stop v-if="studentAnswer.scores && studentAnswer.scores.length" v-model="studentAnswer.scores[typeIndex + index]">
|
|
|
|
- <InputNumber size="small" :formatter="value => value < 0 ? 0 : value" :min="0" :max="10" placeholder="0" class="score-input" />
|
|
|
|
|
|
+ <div v-if="item.type != 'compose'" style="display:flex;width:100%;" class="not-compose-box" :id="'qustion'+ (typeIndex + index)">
|
|
|
|
+ <div class="scoring-input-box" @click.stop v-if="studentAnswer.scores && studentAnswer.scores.length">
|
|
|
|
+ <InputNumber v-model="studentAnswer.scores[typeIndex + index]" size="small" :formatter="value => value < 0 ? '' : `${value}分`" :parser="value => value.replace('分', '')" :min="0" :max="item.score" placeholder="0分" class="score-input" />
|
|
|
|
+ <div style="display:flex;justify-content: space-evenly;margin-top:5px;">
|
|
|
|
+ <span class="fast-score-tag" title="满分" @click="fastSetScore((typeIndex + index),item.score)">
|
|
|
|
+ <!-- 题目分数 -->{{item.score}}
|
|
|
|
+ </span>
|
|
|
|
+ <span class="fast-score-tag" title="零分" @click="fastSetScore((typeIndex + index),0)">
|
|
|
|
+ 0
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+ <div style="display:flex;justify-content: space-evenly;margin-top:5px;" v-show="showQu">
|
|
|
|
+ <span class="fast-score-tag" title="上一题" :style="{'background':'#aeaeae','cursor':(typeIndex + index) == 0 ? 'not-allowed':''}" @click="goToQuestion((typeIndex + index) - 1)">
|
|
|
|
+ <!-- 上一题-->
|
|
|
|
+ <Icon type="md-arrow-round-back" />
|
|
|
|
+ </span>
|
|
|
|
+ <span class="fast-score-tag" title="下一题" :style="{'background':'#aeaeae','cursor':(typeIndex + index + 1) == studentAnswer.scores.legnth ? 'not-allowed':''}" @click="goToQuestion((typeIndex + index) + 1)">
|
|
|
|
+ <!-- 下一题 -->
|
|
|
|
+ <Icon type="md-arrow-round-forward" />
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<div class="qu-info-box">
|
|
<div class="qu-info-box">
|
|
<!-- 题干部分 -->
|
|
<!-- 题干部分 -->
|
|
@@ -57,6 +87,9 @@
|
|
<p class="answer-title">
|
|
<p class="answer-title">
|
|
<span v-show="!showQu" class="item-question-order">题号 {{ index + 1 }} .</span>
|
|
<span v-show="!showQu" class="item-question-order">题号 {{ index + 1 }} .</span>
|
|
【学 生 作 答】
|
|
【学 生 作 答】
|
|
|
|
+ <Icon type="md-checkmark" v-if="studentAnswer.scores[typeIndex + index] == item.score" />
|
|
|
|
+ <Icon type="md-close" color="#ed4014" v-else-if="studentAnswer.scores[typeIndex + index] == 0" />
|
|
|
|
+ <Icon custom="iconfont icon-half-right" color="#ff9900" v-else-if="studentAnswer.scores[typeIndex + index] != -1" />
|
|
</p>
|
|
</p>
|
|
<!--学生作答答案显示区域-->
|
|
<!--学生作答答案显示区域-->
|
|
<div class="stu-answer-box item-explain-details" v-if="studentAnswer.answers && studentAnswer.answers.length">
|
|
<div class="stu-answer-box item-explain-details" v-if="studentAnswer.answers && studentAnswer.answers.length">
|
|
@@ -65,27 +98,18 @@
|
|
<Icon type="md-create" />
|
|
<Icon type="md-create" />
|
|
<span style="margin-left:5px;">批注</span>
|
|
<span style="margin-left:5px;">批注</span>
|
|
</div>
|
|
</div>
|
|
- <!-- <BaseMyCanvas></BaseMyCanvas> -->
|
|
|
|
- <!--问答题答案-->
|
|
|
|
- <div v-if="item.type === 'subjective'" :id="'answer'+ (typeIndex + index)">
|
|
|
|
- <div v-for="(answerItem,answerIndex) in studentAnswer.answers[typeIndex + index]" :key="'an'+ answerIndex">
|
|
|
|
- <span v-html="(answerItem && answerItem.length) > 0 ? answerItem : '暂未作答'"></span><br />
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
<!--填空题答案-->
|
|
<!--填空题答案-->
|
|
- <div v-else-if="item.type === 'complete'" :id="'answer'+ (typeIndex + index)">
|
|
|
|
|
|
+ <div v-if="item.type === 'complete'" :id="'answer'+ (typeIndex + index)">
|
|
<div v-for="(answerItem,answerIndex) in studentAnswer.answers[typeIndex + index]" :key="'an'+ index">
|
|
<div v-for="(answerItem,answerIndex) in studentAnswer.answers[typeIndex + index]" :key="'an'+ index">
|
|
- <div :class="[ item.type === 'complete' ? 'item-answer-items':'']">
|
|
|
|
|
|
+ <div class="item-answer-items">
|
|
<p style="margin-bottom:5px;">{{answerIndex+1}}、<span v-html="answerItem" style="display:inline-block;"></span></p>
|
|
<p style="margin-bottom:5px;">{{answerIndex+1}}、<span v-html="answerItem" style="display:inline-block;"></span></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!--其余题型答案-->
|
|
<!--其余题型答案-->
|
|
<div v-else :id="'answer'+ (typeIndex + index)">
|
|
<div v-else :id="'answer'+ (typeIndex + index)">
|
|
- <div style="display:flex;margin-left:5px">
|
|
|
|
- <span style="margin-left:5px" v-for="(answerItem,answerIndex) in studentAnswer.answers[typeIndex + index]" :key="index">
|
|
|
|
- {{answerItem.length > 0 ? answerItem : "暂未作答"}}
|
|
|
|
- </span>
|
|
|
|
|
|
+ <div>
|
|
|
|
+ <span v-html="studentAnswer.answers[typeIndex + index]"></span><br />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -137,16 +161,33 @@
|
|
</transition>
|
|
</transition>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
<!-- 综合题 -->
|
|
<!-- 综合题 -->
|
|
<div v-else style="width:100%;" class="compose-box">
|
|
<div v-else style="width:100%;" class="compose-box">
|
|
<div class="item-question" style="margin-left:90px; margin-bottom:10px;" v-show="showQu">
|
|
<div class="item-question" style="margin-left:90px; margin-bottom:10px;" v-show="showQu">
|
|
<div class="item-question-order">{{ index + 1 }} .</div>
|
|
<div class="item-question-order">{{ index + 1 }} .</div>
|
|
<div class="item-question-text" v-html="item.question"></div>
|
|
<div class="item-question-text" v-html="item.question"></div>
|
|
</div>
|
|
</div>
|
|
- <div class="child-item" v-for="(childItem,childIndex) in item.children" :key="childIndex">
|
|
|
|
- <div class="scoring-input-box" @click.stop v-if="item.type == 'compose' && studentAnswer.scores && studentAnswer.scores.length" v-model="studentAnswer.scores[typeIndex + index + childIndex]">
|
|
|
|
- <InputNumber size="small" :formatter="value => value < 0 ? 0 : value" :min="0" :max="10" placeholder="0" class="score-input" />
|
|
|
|
|
|
+ <div class="child-item" v-for="(childItem,childIndex) in item.children" :key="childIndex" :id="'qustion'+(typeIndex + index + childIndex)">
|
|
|
|
+ <div class="scoring-input-box" @click.stop v-if="item.type == 'compose' && studentAnswer.scores && studentAnswer.scores.length">
|
|
|
|
+ <InputNumber v-model="studentAnswer.scores[typeIndex + index + childIndex]" size="small" :formatter="value => value < 0 ? '' : `${value}分`" :parser="value => value.replace('分', '')" :min="0" :max="childItem.score" placeholder="0分" class="score-input" />
|
|
|
|
+ <div style="display:flex;justify-content: space-evenly;margin-top:5px;">
|
|
|
|
+ <span class="fast-score-tag" title="满分" @click="fastSetScore((typeIndex + index + childIndex),childItem.score)">
|
|
|
|
+ <!-- 题目分数 -->{{childItem.score}}
|
|
|
|
+ </span>
|
|
|
|
+ <span class="fast-score-tag" title="零分" @click="fastSetScore((typeIndex + index + childIndex),0)">
|
|
|
|
+ 0
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+ <div style="display:flex;justify-content: space-evenly;margin-top:5px;" v-show="showQu">
|
|
|
|
+ <span class="fast-score-tag" title="上一题" :style="{'background':'#aeaeae','cursor':(typeIndex + index + childIndex) == 0 ? 'not-allowed':''}" @click="goToQuestion((typeIndex + index + childIndex) - 1)">
|
|
|
|
+ <!-- 上一题-->
|
|
|
|
+ <Icon type="md-arrow-round-back" />
|
|
|
|
+ </span>
|
|
|
|
+ <span class="fast-score-tag" title="下一题" :style="{'background':'#aeaeae','cursor':(typeIndex + index + childIndex + 1) == studentAnswer.scores.length ? 'not-allowed':''}" @click="goToQuestion((typeIndex + index + childIndex) + 1)">
|
|
|
|
+ <!-- 下一题 -->
|
|
|
|
+ <Icon type="md-arrow-round-forward" />
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<div class="qu-info-box">
|
|
<div class="qu-info-box">
|
|
<div class="child-item-question" v-show="showQu">
|
|
<div class="child-item-question" v-show="showQu">
|
|
@@ -162,8 +203,11 @@
|
|
</div>
|
|
</div>
|
|
<div class="stu-answer-detail">
|
|
<div class="stu-answer-detail">
|
|
<p class="answer-title">
|
|
<p class="answer-title">
|
|
- <span class="child-item-question-order" v-show="!showQu">{{ index + 1 }} .【小题{{ childIndex + 1 }}】</span>
|
|
|
|
|
|
+ <span class="child-item-question-order" v-show="!showQu">【题号 {{(index + 1)+'-'+ (childIndex + 1) }}】</span>
|
|
【学 生 作 答】
|
|
【学 生 作 答】
|
|
|
|
+ <Icon type="md-checkmark" v-if="studentAnswer.scores[typeIndex + index + childIndex] == childItem.score" />
|
|
|
|
+ <Icon type="md-close" color="#ed4014" v-else-if="studentAnswer.scores[typeIndex + index + childIndex] == 0" />
|
|
|
|
+ <Icon custom="iconfont icon-half-right" color="#ff9900" v-else-if="studentAnswer.scores[typeIndex + index + childIndex] != -1" />
|
|
</p>
|
|
</p>
|
|
<!--学生作答答案显示区域-->
|
|
<!--学生作答答案显示区域-->
|
|
<div class="stu-answer-box item-explain-details" v-if="studentAnswer.answers && studentAnswer.answers.length">
|
|
<div class="stu-answer-box item-explain-details" v-if="studentAnswer.answers && studentAnswer.answers.length">
|
|
@@ -172,15 +216,8 @@
|
|
<Icon type="md-create" />
|
|
<Icon type="md-create" />
|
|
<span style="margin-left:5px;">批注</span>
|
|
<span style="margin-left:5px;">批注</span>
|
|
</div>
|
|
</div>
|
|
- <!-- <BaseMyCanvas></BaseMyCanvas> -->
|
|
|
|
- <!--问答题答案-->
|
|
|
|
- <div v-if="item.type === 'subjective'" :id="'answer'+ (typeIndex + index)">
|
|
|
|
- <div v-for="(answerItem,answerIndex) in studentAnswer.answers[typeIndex + index + childIndex]" :key="'an'+ answerIndex">
|
|
|
|
- <span v-html="(answerItem && answerItem.length) > 0 ? answerItem : '暂未作答'"></span><br />
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
<!--填空题答案-->
|
|
<!--填空题答案-->
|
|
- <div v-else-if="item.type === 'complete'" :id="'answer'+ (typeIndex + index)">
|
|
|
|
|
|
+ <div v-if="item.type === 'complete'" :id="'answer'+ (typeIndex + index)">
|
|
<div v-for="(answerItem,answerIndex) in studentAnswer.answers[typeIndex + index + childIndex]" :key="'an'+ index">
|
|
<div v-for="(answerItem,answerIndex) in studentAnswer.answers[typeIndex + index + childIndex]" :key="'an'+ index">
|
|
<div :class="[ item.type === 'complete' ? 'item-answer-items':'']">
|
|
<div :class="[ item.type === 'complete' ? 'item-answer-items':'']">
|
|
<p style="margin-bottom:5px;">{{answerIndex+1}}、<span v-html="answerItem" style="display:inline-block;"></span></p>
|
|
<p style="margin-bottom:5px;">{{answerIndex+1}}、<span v-html="answerItem" style="display:inline-block;"></span></p>
|
|
@@ -189,8 +226,8 @@
|
|
</div>
|
|
</div>
|
|
<!--其余题型答案-->
|
|
<!--其余题型答案-->
|
|
<div v-else :id="'answer'+ (typeIndex + index)">
|
|
<div v-else :id="'answer'+ (typeIndex + index)">
|
|
- <div v-for="(answerItem,answerIndex) in studentAnswer.answers[typeIndex + index + childIndex]" :key="'an'+ answerIndex">
|
|
|
|
- <span v-html="(answerItem && answerItem.length) > 0 ? answerItem : '暂未作答'"></span><br />
|
|
|
|
|
|
+ <div>
|
|
|
|
+ <span v-html="studentAnswer.answers[typeIndex + index]"></span><br />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -200,17 +237,13 @@
|
|
<span class="explain-title">【答ㅤ案】</span>
|
|
<span class="explain-title">【答ㅤ案】</span>
|
|
<div class="item-explain-details">
|
|
<div class="item-explain-details">
|
|
<!-- 问答题答案 -->
|
|
<!-- 问答题答案 -->
|
|
- <div v-if="item.type === 'subjective'">
|
|
|
|
|
|
+ <div v-if="item.type === 'subjective' || item.type === 'complete'">
|
|
<span v-for="(answer,index) in childItem.answer" :key="index" v-html="childItem.answer.length ? answer : '未设置答案'"></span>
|
|
<span v-for="(answer,index) in childItem.answer" :key="index" v-html="childItem.answer.length ? answer : '未设置答案'"></span>
|
|
</div>
|
|
</div>
|
|
<!-- 问答题答案 -->
|
|
<!-- 问答题答案 -->
|
|
<div v-else-if="item.type === 'judge'">
|
|
<div v-else-if="item.type === 'judge'">
|
|
<span>{{ childItem.answer.length ? (childItem.answer[0] === 'A' ? '正确' : '错误') : '未设置答案' }}</span>
|
|
<span>{{ childItem.answer.length ? (childItem.answer[0] === 'A' ? '正确' : '错误') : '未设置答案' }}</span>
|
|
</div>
|
|
</div>
|
|
- <!-- 填空题答案 -->
|
|
|
|
- <div v-else-if="item.type === 'complete'">
|
|
|
|
- <span :class="[ childItem.type === 'complete' ? 'item-answer-item':'']" v-for="(answer,index) in childItem.answer" :key="index" v-html="answer"></span>
|
|
|
|
- </div>
|
|
|
|
<!-- 其余题型答案 -->
|
|
<!-- 其余题型答案 -->
|
|
<div v-else>
|
|
<div v-else>
|
|
<span :class="[ item.type === 'complete' ? 'item-answer-item':'']" v-for="(answer,index) in childItem.answer" :key="index" v-html="answer"></span>
|
|
<span :class="[ item.type === 'complete' ? 'item-answer-item':'']" v-for="(answer,index) in childItem.answer" :key="index" v-html="answer"></span>
|
|
@@ -237,22 +270,31 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</vuescroll>
|
|
</vuescroll>
|
|
|
|
+ <div v-show="isComplete" class="complete-score-box">
|
|
|
|
+ <Icon class="complete-icon" type="md-checkmark-circle" />
|
|
|
|
+ <p class="complete-stu-info">{{studentAnswer.name}} ({{scoreTotal}}分)</p>
|
|
|
|
+ <p class="complete-next" @click="nextStu">下一位学生>>></p>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
import html2canvas from 'html2canvas';
|
|
import html2canvas from 'html2canvas';
|
|
|
|
+import BlobTool from '@/utils/blobTool.js';
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
},
|
|
},
|
|
props: {
|
|
props: {
|
|
|
|
+ examId: {
|
|
|
|
+ type: String,
|
|
|
|
+ default: '',
|
|
|
|
+ required: true
|
|
|
|
+ },
|
|
paper: {
|
|
paper: {
|
|
type: Object,
|
|
type: Object,
|
|
default: () => { }
|
|
default: () => { }
|
|
@@ -264,6 +306,7 @@ export default {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ isComplete: false,
|
|
isAllOpen: true,
|
|
isAllOpen: true,
|
|
paperInfo: {},
|
|
paperInfo: {},
|
|
dataLoading: false,
|
|
dataLoading: false,
|
|
@@ -280,7 +323,6 @@ export default {
|
|
groupList: [],
|
|
groupList: [],
|
|
typeList: ['single', 'multiple', 'judge', 'complete', 'subjective', 'compose'],
|
|
typeList: ['single', 'multiple', 'judge', 'complete', 'subjective', 'compose'],
|
|
errorList: [],
|
|
errorList: [],
|
|
- scoreTotal: 0,
|
|
|
|
showAnswer: false,
|
|
showAnswer: false,
|
|
showQu: true,
|
|
showQu: true,
|
|
showOption: false
|
|
showOption: false
|
|
@@ -288,6 +330,24 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ //点评下一位学生
|
|
|
|
+ nextStu() {
|
|
|
|
+ // this.isComplete = false
|
|
|
|
+ this.$emit('nextStu')
|
|
|
|
+ },
|
|
|
|
+ //快速定位题目
|
|
|
|
+ goToQuestion(index) {
|
|
|
|
+ console.log(index)
|
|
|
|
+ this.$refs["question-scrool"].scrollIntoView('#qustion' + index, 500)
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ //快速打分
|
|
|
|
+ fastSetScore(index, score) {
|
|
|
|
+ console.log(index, score)
|
|
|
|
+ // this.studentAnswer.scores[index] = score
|
|
|
|
+ this.$set(this.studentAnswer.scores, index, score)
|
|
|
|
+ console.log(this.studentAnswer)
|
|
|
|
+ },
|
|
// 批注学生作答数据
|
|
// 批注学生作答数据
|
|
markStuAnswer(index) {
|
|
markStuAnswer(index) {
|
|
this.$Message.warning('暂未处理批注功能!')
|
|
this.$Message.warning('暂未处理批注功能!')
|
|
@@ -315,40 +375,26 @@ export default {
|
|
context.stroke();
|
|
context.stroke();
|
|
},
|
|
},
|
|
//保存学生作答信息
|
|
//保存学生作答信息
|
|
- savePaper() {
|
|
|
|
- //if (this.paperInfo.papers.item.length !== 0) {
|
|
|
|
- // let point = []
|
|
|
|
- // let config = 0 //已评审题目数量
|
|
|
|
- // for (let i = 0; i < this.paperInfo.papers.item.length; i++) {
|
|
|
|
- // if (this.paperInfo.papers.item[i].stuScore !== null && Number(this.paperInfo.papers.item[i].stuScore) !== -1) {
|
|
|
|
- // point.push(this.paperInfo.papers.item[i].stuScore)
|
|
|
|
- // config++
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // if (config == this.paperInfo.papers.item.length) {
|
|
|
|
- // let requestData = {
|
|
|
|
- // "id": this.paperInfo.id,
|
|
|
|
- // "code": this.paperInfo.code,
|
|
|
|
- // "point": point,
|
|
|
|
- // "studentId": this.studentInfo.id,
|
|
|
|
- // "classId": this.studentInfo.classId,
|
|
|
|
- // "school": this.paperInfo.papers.code,
|
|
|
|
- // "subjectId": this.paperInfo.papers.subjectId
|
|
|
|
- // }
|
|
|
|
- // this.$api.learnActivity.UpsertAllRecord(requestData).then(res => {
|
|
|
|
- // if (res.error == null) {
|
|
|
|
- // this.$Message.success('成绩保存成功!')
|
|
|
|
- // this.$emit('closeTest', '1')
|
|
|
|
- // this.getAllStudentData()
|
|
|
|
- // } else {
|
|
|
|
- // this.$Message.error('成绩保存失败!')
|
|
|
|
- // }
|
|
|
|
- // })
|
|
|
|
- // } else {
|
|
|
|
- // this.$Message.warning('请完善学生评分信息!')
|
|
|
|
- // }
|
|
|
|
- //}
|
|
|
|
- console.log(this.studentAnswer)
|
|
|
|
|
|
+ saveScore() {
|
|
|
|
+ let requestData = {
|
|
|
|
+ "id": this.examId,
|
|
|
|
+ "code": this.paperInfo.code,
|
|
|
|
+ "point": this.studentAnswer.scores,
|
|
|
|
+ "studentId": this.studentAnswer.id,
|
|
|
|
+ "classId": this.studentAnswer.classId,
|
|
|
|
+ "school": this.paperInfo.code,
|
|
|
|
+ "subjectId": this.paperInfo.subjectId
|
|
|
|
+ }
|
|
|
|
+ this.$api.learnActivity.UpsertAllRecord(requestData).then(res => {
|
|
|
|
+ if (res.error == null) {
|
|
|
|
+ this.$Message.success('成绩保存成功!')
|
|
|
|
+ this.isComplete = true
|
|
|
|
+ } else {
|
|
|
|
+ this.$Message.error('成绩保存失败!')
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ console.log('保存打分', this.studentAnswer)
|
|
|
|
+ console.log('试卷信息', this.paperInfo)
|
|
},
|
|
},
|
|
openAnswer() {
|
|
openAnswer() {
|
|
this.$refs.exPaper.onHandleToggles(this.isAllOpen)
|
|
this.$refs.exPaper.onHandleToggles(this.isAllOpen)
|
|
@@ -400,6 +446,7 @@ export default {
|
|
paper: {
|
|
paper: {
|
|
handler(newValue, oldValue) {
|
|
handler(newValue, oldValue) {
|
|
this.paperInfo = newValue
|
|
this.paperInfo = newValue
|
|
|
|
+ console.log('paperInfo', this.paperInfo)
|
|
},
|
|
},
|
|
deep: true
|
|
deep: true
|
|
},
|
|
},
|
|
@@ -428,6 +475,7 @@ export default {
|
|
})
|
|
})
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+ console.log('groupList', this.groupList)
|
|
this.dataLoading = false
|
|
this.dataLoading = false
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
window.MathJax.Hub.Queue(["Typeset", MathJax.Hub, this.$refs.mathJaxContainer]);
|
|
window.MathJax.Hub.Queue(["Typeset", MathJax.Hub, this.$refs.mathJaxContainer]);
|
|
@@ -437,8 +485,31 @@ export default {
|
|
deep: true
|
|
deep: true
|
|
},
|
|
},
|
|
studentAnswer: {
|
|
studentAnswer: {
|
|
- handler(newValue, oldValue) {
|
|
|
|
|
|
+ async handler(newValue, oldValue) {
|
|
console.log('学生作答数据', newValue)
|
|
console.log('学生作答数据', newValue)
|
|
|
|
+ if (!this.studentAnswer.status) {
|
|
|
|
+ if (newValue.answers.length) {
|
|
|
|
+ try {
|
|
|
|
+ let a = await this.$tools.getFile(newValue.answers[0] + this.$store.state.schoolSas.sas)
|
|
|
|
+ console.log('a', a)
|
|
|
|
+ if (a) {
|
|
|
|
+ this.$set(this.studentAnswer, 'answers', JSON.parse(a))
|
|
|
|
+ } else {
|
|
|
|
+ this.$set(this.studentAnswer, 'answers', [])
|
|
|
|
+ }
|
|
|
|
+ console.log(this.studentAnswer)
|
|
|
|
+ } catch (e) {
|
|
|
|
+ console.log('error', e)
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ let a = newValue.scores.map(item => {
|
|
|
|
+ return '暂未作答'
|
|
|
|
+ })
|
|
|
|
+ console.log('a', a)
|
|
|
|
+ this.$set(this.studentAnswer, 'answers', a)
|
|
|
|
+ }
|
|
|
|
+ this.studentAnswer.status = true
|
|
|
|
+ }
|
|
},
|
|
},
|
|
deep: true
|
|
deep: true
|
|
}
|
|
}
|
|
@@ -448,6 +519,18 @@ export default {
|
|
return id => {
|
|
return id => {
|
|
return this.errorList.length && this.errorList.map(i => i.id).indexOf(id) > -1
|
|
return this.errorList.length && this.errorList.map(i => i.id).indexOf(id) > -1
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ scoreTotal() {
|
|
|
|
+ console.log('score', this.studentAnswer)
|
|
|
|
+ if (this.studentAnswer && this.studentAnswer.scores) {
|
|
|
|
+ let s = this.studentAnswer.scores.reduce((prev, cur) => {
|
|
|
|
+ cur = cur < 0 ? 0 : cur
|
|
|
|
+ return prev + cur
|
|
|
|
+ }, 0)
|
|
|
|
+ console.log(s)
|
|
|
|
+ return s
|
|
|
|
+ }
|
|
|
|
+ return 0
|
|
}
|
|
}
|
|
},
|
|
},
|
|
}
|
|
}
|
|
@@ -456,6 +539,9 @@ export default {
|
|
<style scoped lang="less">
|
|
<style scoped lang="less">
|
|
@import "./PaperScore.less";
|
|
@import "./PaperScore.less";
|
|
</style>
|
|
</style>
|
|
-<style scoped lang="less">
|
|
|
|
|
|
+<style lang="less">
|
|
|
|
+.scoring-input-box .ivu-input-number-handler-wrap {
|
|
|
|
+ display: none;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|
|
|
|
|