|
@@ -48,7 +48,6 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="qu-list-wrap scoring-exercise-wrap" ref="mathJaxContainer" v-show="!dataLoading">
|
|
|
- <!-- <vuescroll ref="question-scrool" > -->
|
|
|
<!-- 按题型排序 -->
|
|
|
<div v-show="!isComplete" class="list-view" :key="'group'+ typeIndex" v-for="(typeItem,typeIndex) in groupList">
|
|
|
<p class="type-name">
|
|
@@ -79,15 +78,6 @@
|
|
|
<Icon type="md-remove" />
|
|
|
</span>
|
|
|
</div>
|
|
|
- <!-- 滚动上下题目去掉 -->
|
|
|
- <!-- <div style="display:flex;justify-content: space-evenly;margin-top:5px;display:none;" v-show="showQu">
|
|
|
- <span class="fast-score-tag" :title="$t('learnActivity.score.lastQu')" :style="{'background':'#aeaeae','cursor':(typeIndex + index) == 0 ? 'not-allowed':''}" @click="goToQuestion(getQuIndex(typeIndex,index) - 1)">
|
|
|
- <Icon type="md-arrow-round-back" />
|
|
|
- </span>
|
|
|
- <span class="fast-score-tag" :title="$t('learnActivity.score.nextQu')" :style="{'background':'#aeaeae','cursor':(typeIndex + index + 1) == studentAnswer.scores.legnth ? 'not-allowed':''}" @click="goToQuestion(getQuIndex(typeIndex,index) + 1)">
|
|
|
- <Icon type="md-arrow-round-forward" />
|
|
|
- </span>
|
|
|
- </div> -->
|
|
|
</div>
|
|
|
<div class="qu-info-box">
|
|
|
<!-- 题干部分 -->
|
|
@@ -106,16 +96,23 @@
|
|
|
<p class="answer-title">
|
|
|
<span v-show="!showQu" class="item-question-order">{{$t('learnActivity.score.quIndex1')}} {{ getQuIndex(typeIndex,index)}} .</span>
|
|
|
{{$t('learnActivity.score.stuAns')}}
|
|
|
- <Icon type="md-checkmark" v-show="studentAnswer.scores[item.index] == item.score" />
|
|
|
+ <!-- <Icon type="md-checkmark" v-show="studentAnswer.scores[item.index] == item.score" />
|
|
|
<Icon type="md-close" color="#ed4014" v-show="studentAnswer.scores[item.index] == 0" />
|
|
|
- <Icon custom="iconfont icon-half-right" color="#ff9900" v-show="studentAnswer.scores[item.index] > 0 && studentAnswer.scores[item.index] < item.score" />
|
|
|
+ <Icon custom="iconfont icon-half-right" color="#ff9900" v-show="studentAnswer.scores[item.index] > 0 && studentAnswer.scores[item.index] < item.score" /> -->
|
|
|
+ <Icon custom="iconfont icon-mark" color="#1cc0f3" @click="viewMark(item.index)" v-show="studentAnswer.mark && studentAnswer.mark[item.index].length" style="margin-left:10px" />
|
|
|
</p>
|
|
|
<!--学生作答答案显示区域-->
|
|
|
<div class="stu-answer-box item-explain-details" v-if="studentAnswer.answers && studentAnswer.answers.length">
|
|
|
<!-- 批注 主观题才会有批注功能 -->
|
|
|
- <div class="mark-btn-box" @click="markStuAnswer(item.index)" v-if="item.type !== 'single' && item.type !== 'multiple' && item.type !== 'judge'">
|
|
|
- <Icon type="md-create" />
|
|
|
- <span style="margin-left:5px;">{{$t('learnActivity.score.mark')}}</span>
|
|
|
+ <div class="mark-btn-box" v-if="item.type !== 'single' && item.type !== 'multiple' && item.type !== 'judge'">
|
|
|
+ <span class="mark-action-item" v-show="studentAnswer.mark && studentAnswer.mark[item.index].length" style="background:#19be6b" @click="viewMark(item.index)">
|
|
|
+ <Icon type="md-eye" />
|
|
|
+ <span style="margin-left:5px;">{{$t('learnActivity.score.view')}}</span>
|
|
|
+ </span>
|
|
|
+ <span class="mark-action-item" style="background:#ed4014" @click="markStuAnswer(item.index)">
|
|
|
+ <Icon type="md-create" />
|
|
|
+ <span style="margin-left:5px;">{{$t('learnActivity.score.mark')}}</span>
|
|
|
+ </span>
|
|
|
</div>
|
|
|
<!--多选题答案-->
|
|
|
<div v-if="item.type === 'multiple'" :id="'answer'+ getScoreIndex(typeIndex,index)">
|
|
@@ -205,15 +202,6 @@
|
|
|
<Icon type="md-remove" />
|
|
|
</span>
|
|
|
</div>
|
|
|
- <!-- 滚动上下题目去掉 -->
|
|
|
- <!-- <div style="display:flex;justify-content: space-evenly;margin-top:5px;display:none;" v-show="showQu">
|
|
|
- <span class="fast-score-tag" :title="$t('learnActivity.score.lastQu')" :style="{'background':'#aeaeae','cursor':(typeIndex + index + childIndex) == 0 ? 'not-allowed':''}" @click="goToQuestion((getQuIndex(typeIndex,index) + childIndex) - 1)">
|
|
|
- <Icon type="md-arrow-round-back" />
|
|
|
- </span>
|
|
|
- <span class="fast-score-tag" :title="$t('learnActivity.score.nextQu')" :style="{'background':'#aeaeae','cursor':(typeIndex + index + childIndex + 1) == studentAnswer.scores.length ? 'not-allowed':''}" @click="goToQuestion((getQuIndex(typeIndex,index) + childIndex) + 1)">
|
|
|
- <Icon type="md-arrow-round-forward" />
|
|
|
- </span>
|
|
|
- </div> -->
|
|
|
</div>
|
|
|
<div class="qu-info-box">
|
|
|
<div class="child-item-question child-item-question-flex" v-show="showQu">
|
|
@@ -231,16 +219,23 @@
|
|
|
<p class="answer-title">
|
|
|
<span class="child-item-question-order" v-show="!showQu">{{$t('learnActivity.score.quIndexLabel')}} {{getQuIndex(typeIndex,index)+'-'+ (childIndex + 1) }}{{$t('learnActivity.score.sQuLabel2')}}</span>
|
|
|
{{$t('learnActivity.score.stuAns')}}
|
|
|
- <Icon type="md-checkmark" v-show="studentAnswer.scores[childItem.index] == childItem.score" />
|
|
|
+ <!-- <Icon type="md-checkmark" v-show="studentAnswer.scores[childItem.index] == childItem.score" />
|
|
|
<Icon type="md-close" color="#ed4014" v-show="studentAnswer.scores[childItem.index] == 0" />
|
|
|
- <Icon custom="iconfont icon-half-right" color="#ff9900" v-show="studentAnswer.scores[childItem.index] > 0 && studentAnswer.scores[childItem.index] < childItem.score" />
|
|
|
+ <Icon custom="iconfont icon-half-right" color="#ff9900" v-show="studentAnswer.scores[childItem.index] > 0 && studentAnswer.scores[childItem.index] < childItem.score" /> -->
|
|
|
+ <Icon custom="iconfont icon-mark" color="#1cc0f3" @click="viewMark(childItem.index)" v-show="studentAnswer.mark && studentAnswer.mark[childItem.index].length" style="margin-left:10px" />
|
|
|
</p>
|
|
|
<!--学生作答答案显示区域-->
|
|
|
<div class="stu-answer-box item-explain-details" v-if="studentAnswer.answers && studentAnswer.answers.length">
|
|
|
<!-- 批注 主观题才会有批注功能 -->
|
|
|
- <div class="mark-btn-box" @click="markStuAnswer(childItem.index)" v-if="childItem.type !== 'single' && childItem.type !== 'multiple' && childItem.type !== 'judge'">
|
|
|
- <Icon type="md-create" />
|
|
|
- <span style="margin-left:5px;">{{$t('learnActivity.score.mark')}}</span>
|
|
|
+ <div class="mark-btn-box" v-if="childItem.type !== 'single' && childItem.type !== 'multiple' && childItem.type !== 'judge'">
|
|
|
+ <span v-show="studentAnswer.mark && studentAnswer.mark[childItem.index].length" class="mark-action-item" style="background:#19be6b" @click="viewMark(childItem.index)">
|
|
|
+ <Icon type="md-eye" />
|
|
|
+ <span style="margin-left:5px;">{{$t('learnActivity.score.view')}}</span>
|
|
|
+ </span>
|
|
|
+ <span class="mark-action-item" style="background:#ed4014" @click="markStuAnswer(childItem.index)">
|
|
|
+ <Icon type="md-create" />
|
|
|
+ <span style="margin-left:5px;">{{$t('learnActivity.score.mark')}}</span>
|
|
|
+ </span>
|
|
|
</div>
|
|
|
<!--多选题答案-->
|
|
|
<div v-if="childItem.type === 'multiple'" :id="'answer'+ getScoreIndex(typeIndex,index,childIndex)">
|
|
@@ -296,9 +291,6 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- 默认排序 -->
|
|
|
-
|
|
|
- <!-- </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}}{{$t('learnActivity.score.scoreUnit')}})</p>
|
|
@@ -310,7 +302,12 @@
|
|
|
</Modal>
|
|
|
<!-- 用来单独渲染学生作答数据,提高tocanvas 的效率 -->
|
|
|
<iframe id="answerIframe" :srcdoc="studentAnswer.answers[curAnIndex]" v-if="studentAnswer.answers"></iframe>
|
|
|
-
|
|
|
+ <Modal v-model="viewStatus" title="查看批注" width='600'>
|
|
|
+ <div v-for="(item,index) in viewMarks" :key="index">
|
|
|
+ <p class="mark-label" v-show="viewMarks.length > 1">批注{{index + 1}}:</p>
|
|
|
+ <img :src="item.url" style="width:100%;margin-bottom:20px">
|
|
|
+ </div>
|
|
|
+ </Modal>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -356,6 +353,8 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ viewIndex: 0,
|
|
|
+ viewStatus: false,
|
|
|
isDefOrder: false, //是否默认排序 默认/题型
|
|
|
activeIndex: 0,
|
|
|
curAnIndex: -1,
|
|
@@ -373,10 +372,28 @@ export default {
|
|
|
showQu: false,
|
|
|
showOption: false,
|
|
|
scope: '',
|
|
|
- markBg: undefined
|
|
|
+ markBg: undefined,
|
|
|
+ viewMarks: []
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ viewMark(index) {
|
|
|
+ this.viewIndex = index
|
|
|
+ this.viewStatus = true
|
|
|
+ if (this.studentAnswer.mark && this.studentAnswer.mark[this.viewIndex]) {
|
|
|
+ let sas = this.examScope == 'school' ? this.$store.state.user.schoolProfile.blob_sas : this.$store.state.user.userProfile.blob_sas
|
|
|
+ let blobUrl = this.examScope == 'school' ? JSON.parse(decodeURIComponent(localStorage.school_profile, "utf-8")).blob_uri : JSON.parse(decodeURIComponent(localStorage.user_profile, "utf-8")).blob_uri
|
|
|
+ let d = this._.cloneDeep(this.studentAnswer.mark[this.viewIndex])
|
|
|
+ d.forEach(item => {
|
|
|
+ item.url = blobUrl + '/' + item.mark + '?' + sas
|
|
|
+ })
|
|
|
+ this.viewMarks = d
|
|
|
+ } else {
|
|
|
+ this.viewMarks = []
|
|
|
+ }
|
|
|
+
|
|
|
+ console.log('学生作答数据', this.studentAnswer)
|
|
|
+ },
|
|
|
closeModal() {
|
|
|
this.markStatus = false
|
|
|
this.curAnIndex = -1
|
|
@@ -397,8 +414,9 @@ export default {
|
|
|
let path = `exam/${this.examId}/${this.subjectId}/${this.studentAnswer.id}`
|
|
|
blobTool.upload(markPng, path).then(
|
|
|
res => {
|
|
|
- console.log('保存成功', res)
|
|
|
- this.$set(this.studentAnswer.answers, this.curAnIndex, [img.outerHTML])
|
|
|
+ this.studentAnswer.mark[this.curAnIndex].push({
|
|
|
+ mark: path + '/' + fileName
|
|
|
+ })
|
|
|
this.markStatus = false
|
|
|
//保存批注数据
|
|
|
this.$api.learnActivity.upsertAnswer({
|
|
@@ -456,6 +474,7 @@ export default {
|
|
|
this.markStatus = true
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
},
|
|
|
|
|
|
// 获取题号
|