|
@@ -5,12 +5,12 @@
|
|
|
<span class="quit-marking-text">
|
|
|
<Icon type="ios-arrow-back" class="quit-marking-icon" :title="$t('learnActivity.mark.quit')" @click="quit" />
|
|
|
</span>
|
|
|
- <span class="info-label">{{$t('learnActivity.mark.examName')}}</span>
|
|
|
- <span class="info-value">{{taskInfo.name}}</span>
|
|
|
- <span class="info-label">{{$t('learnActivity.mark.stuId')}}</span>
|
|
|
- <span class="info-value stu-id-info">{{stuId}}</span>
|
|
|
+ <!-- <span class="info-label">{{$t('learnActivity.mark.examName')}}</span>
|
|
|
+ <span class="info-value">{{taskInfo.name}}</span> -->
|
|
|
+ <span class="info-label">{{$t('learnActivity.mark.stuId')}}: </span>
|
|
|
+ <span class="info-value stu-id-info">{{stuInfo.stuId}}</span>
|
|
|
<span class="info-label">{{$t('learnActivity.mark.curQu')}}</span>
|
|
|
- <span class="info-value cur-qu-index">{{'--'}}</span>
|
|
|
+ <span class="info-value cur-qu-index">{{stuInfo.arbQus[arbIndex].label}}</span>
|
|
|
</div>
|
|
|
<div class="mark-main">
|
|
|
<!-- 工具条 -->
|
|
@@ -31,18 +31,43 @@
|
|
|
</div>
|
|
|
<div class="mark-stage">
|
|
|
<MarkCanvas ref="markCanvas" @getImg="saveMark" :status="mouseStatus" :bgImg="ansImg" :drawImgData="drawImgData" style="padding-bottom:85px"></MarkCanvas>
|
|
|
+ <!-- 题号显示部分 -->
|
|
|
+ <div class="qu-index-box">
|
|
|
+ <div class="qu-tips-box">
|
|
|
+ <span class="qu-tips-tag">
|
|
|
+ {{$t('learnActivity.mark.marked')}}
|
|
|
+ </span>
|
|
|
+ <span class="qu-tips-tag">
|
|
|
+ {{$t('learnActivity.mark.unmark')}}
|
|
|
+ </span>
|
|
|
+ <!-- <span class="qu-tips-tag">
|
|
|
+ {{$t('learnActivity.mark.exTag')}}
|
|
|
+ </span> -->
|
|
|
+ <!-- <span class="objective-tips">
|
|
|
+ {{$t('learnActivity.mark.scoreTips')}}
|
|
|
+ </span> -->
|
|
|
+ </div>
|
|
|
+ <!-- 异常信息 -->
|
|
|
+ <div>
|
|
|
+ <span v-for="(item,index) in stuInfo.arbQus" :key="index">
|
|
|
+ <span :class="['qu-index',stuScore[index] > -1 ? 'right-qu' : '']" @click="toQu(index)">
|
|
|
+ {{item.label}}
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<!-- 打分部分 -->
|
|
|
<div class="score-wrap">
|
|
|
<div class="quick-score-box score-input-box">
|
|
|
<span>阅卷评分1:</span>
|
|
|
- <span class="score-num">10</span>
|
|
|
- <span class="view-mark">查看批注</span>
|
|
|
+ <span class="score-num" v-if="curQuMarkScore[0]">{{curQuMarkScore[0].sc}}分</span>
|
|
|
+ <span class="view-mark" v-if="curQuMarkScore[0] && curQuMarkScore[0].mark">查看批注</span>
|
|
|
</div>
|
|
|
<div class="quick-score-box score-input-box">
|
|
|
<span>阅卷评分2:</span>
|
|
|
- <span class="score-num">20</span>
|
|
|
- <span class="view-mark">查看批注</span>
|
|
|
+ <span class="score-num" v-if="curQuMarkScore[1]">{{curQuMarkScore[1].sc}}分</span>
|
|
|
+ <span class="view-mark" v-if="curQuMarkScore[1] && curQuMarkScore[1].mark">查看批注</span>
|
|
|
</div>
|
|
|
<div class="quick-score-box score-input-box">
|
|
|
<span>仲裁分数:</span>
|
|
@@ -58,7 +83,7 @@
|
|
|
<Icon :type="isShowNum ? 'md-eye-off' : 'md-eye'" class="toggle-num-status" @click="isShowNum = !isShowNum" />
|
|
|
<div :class="['score-key-box', isShowNum ? '':'hind-key-box']">
|
|
|
<vuescroll>
|
|
|
- <span v-for="(item,index) in quScoreArr" :key="index" :class="['score-key', stuScore[quIndex] == index ? 'score-key-active':'']" @click="setScore(index)">
|
|
|
+ <span v-for="(item,index) in quScoreArr" :key="index" :class="['score-key', score == item ? 'score-key-active':'']" @click="setScore(item)">
|
|
|
{{item}}
|
|
|
</span>
|
|
|
</vuescroll>
|
|
@@ -84,14 +109,13 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- quScoreArr:[],
|
|
|
score: null,
|
|
|
mouseStatus: 'move',
|
|
|
drawImgData: '',
|
|
|
ansImg: '',
|
|
|
imgs: [],
|
|
|
isShowNum: true,
|
|
|
- quIndex: 0,
|
|
|
+ // quIndex: 0,
|
|
|
stuData: {
|
|
|
name: '',
|
|
|
id: '',
|
|
@@ -105,9 +129,31 @@ export default {
|
|
|
stusData: [],
|
|
|
stuId: '',
|
|
|
markImg: undefined,
|
|
|
+ quNoList: [],
|
|
|
+ stuInfo: {},
|
|
|
+ stuAnswerData: [],
|
|
|
+ arbQuList: [],
|
|
|
+ arbIndex: 0,
|
|
|
+ taskInfo: {}
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ toQu(index) {
|
|
|
+ this.arbIndex = index
|
|
|
+ this.ansToImg()
|
|
|
+ },
|
|
|
+ async getStuAnswerData() {
|
|
|
+ let sas = this.$store.state.user.schoolProfile.blob_sas //目前只有校本评测安排阅卷任务
|
|
|
+ let blobUrl = JSON.parse(decodeURIComponent(localStorage.school_profile, "utf-8")).blob_uri //目前只有校本评测安排阅卷任务
|
|
|
+ let ansBlob = this.stuInfo.blob
|
|
|
+ try {
|
|
|
+ this.stuAnswerData = JSON.parse(await this.$tools.getFile(`${blobUrl}/exam/${ansBlob}?${sas}`) || '[]')
|
|
|
+ console.log('学生作答shuju ', this.stuAnswerData)
|
|
|
+ this.ansToImg()
|
|
|
+ } catch (e) {
|
|
|
+ console.log('获取学生作答数据失败')
|
|
|
+ }
|
|
|
+ },
|
|
|
//保存批注
|
|
|
saveMark(data) {
|
|
|
this.markImg = data.base64
|
|
@@ -126,6 +172,7 @@ export default {
|
|
|
},
|
|
|
/**将答案绘制到canvas上 */
|
|
|
ansToImg() {
|
|
|
+ console.log('当前答案', this.curAnswer)
|
|
|
let answerIframe = document.getElementById('markIframe')
|
|
|
answerIframe.onload = () => {
|
|
|
answerIframe.style.width = '850px'
|
|
@@ -154,31 +201,30 @@ export default {
|
|
|
//提交分数
|
|
|
submit() {
|
|
|
if (this.score > -1 && this.score != null) {
|
|
|
- //保存批注
|
|
|
- let mark
|
|
|
- if (this.markImg) {
|
|
|
- let img = document.createElement('img')
|
|
|
- img.src = this.markImg
|
|
|
- this.stuAnswer[this.quIndex] = img.outerHTML
|
|
|
- mark = this.stuAnswer
|
|
|
- this.markImg = undefined
|
|
|
- }
|
|
|
+ //保存批注(暂无处理仲裁批注)
|
|
|
+ // let mark
|
|
|
+ // if (this.markImg) {
|
|
|
+ // let img = document.createElement('img')
|
|
|
+ // img.src = this.markImg
|
|
|
+ // this.stuAnswer[this.quIndex] = img.outerHTML
|
|
|
+ // mark = this.stuAnswer
|
|
|
+ // this.markImg = undefined
|
|
|
+ // }
|
|
|
let requstData = {
|
|
|
- id: this.taskInfo.cid,
|
|
|
- stuId: this.stuId,
|
|
|
- subjectId: this.taskInfo.subject,
|
|
|
- tmdId: this.$store.state.userInfo.TEAMModelId,
|
|
|
- score: this.stuScore,
|
|
|
- count: this.taskInfo.count,
|
|
|
- code: this.taskInfo.ecode.replace('Exam-', ''),
|
|
|
- qu: this.taskInfo.qu,
|
|
|
- mark
|
|
|
+ id: this.stuInfo.id,
|
|
|
+ stuId: this.stuInfo.stuId,
|
|
|
+ index: this.quIndex,
|
|
|
+ score: this.score,
|
|
|
+ code: this.taskInfo.ecode.replace('Exam-', '')
|
|
|
}
|
|
|
- this.$api.mark.saveScore(requstData).then(
|
|
|
+ this.$api.mark.saveArb(requstData).then(
|
|
|
res => {
|
|
|
// 按人阅卷自动跳转下一题
|
|
|
- this.nextQuestion()
|
|
|
+ if (this.arbIndex < this.stuInfo.arbQus.length - 1) {
|
|
|
+ this.arbIndex++
|
|
|
+ }
|
|
|
this.ansToImg()
|
|
|
+ this.$Message.success('分数保存成功')
|
|
|
},
|
|
|
err => {
|
|
|
this.$Message.error(this.$t('learnActivity.mark.saveErr'))
|
|
@@ -195,17 +241,58 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ quIndex() {
|
|
|
+ if (this.stuInfo && this.stuInfo.arbQus) {
|
|
|
+ console.log('切换题号')
|
|
|
+ return this.stuInfo.arbQus[this.arbIndex].value
|
|
|
+ } else {
|
|
|
+ return 0
|
|
|
+ }
|
|
|
+ },
|
|
|
+ curAnswer() {
|
|
|
+ if (this.stuAnswerData && this.stuAnswerData.length) {
|
|
|
+ console.log('更新答案', this.stuAnswerData, this.quIndex)
|
|
|
+ let answer = this.stuAnswerData[this.quIndex]
|
|
|
+ return answer || '未作答'
|
|
|
+ } else {
|
|
|
+ return ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ curQuMarkScore() {
|
|
|
+ if (this.stuInfo && this.stuInfo.items && this.stuInfo.items[this.arbIndex]) {
|
|
|
+ return this.stuInfo.items[this.arbIndex].scores
|
|
|
+ } else {
|
|
|
+ return []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ quScoreArr() {
|
|
|
+ if (this.stuInfo && this.stuInfo.items && this.stuInfo.items[this.arbIndex]) {
|
|
|
+ return this.stuInfo.items[this.arbIndex].ssc
|
|
|
+ } else {
|
|
|
+ return 15
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
mounted() {
|
|
|
},
|
|
|
created() {
|
|
|
- },
|
|
|
- computed: {
|
|
|
-
|
|
|
+ let routeData = this.$route.params
|
|
|
+ this.paperData = routeData.paperInfo
|
|
|
+ this.quNoList = routeData.quNoList
|
|
|
+ this.stuInfo = routeData.stuInfo
|
|
|
+ this.taskInfo = routeData.taskInfo
|
|
|
+ console.log(routeData)
|
|
|
+ if (this.paperData && this.quNoList && this.stuInfo && this.arbQuList && this.taskInfo) {
|
|
|
+ this.getStuAnswerData()
|
|
|
+ } else {
|
|
|
+ this.quit()
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
<style scoped lang="less">
|
|
|
-.view-mark{
|
|
|
+.view-mark {
|
|
|
color: white;
|
|
|
font-size: 12px;
|
|
|
padding: 1px 5px;
|
|
@@ -214,7 +301,7 @@ export default {
|
|
|
cursor: pointer;
|
|
|
background: #2db7f5;
|
|
|
}
|
|
|
-.score-num{
|
|
|
+.score-num {
|
|
|
font-size: 18px;
|
|
|
color: #ed4014;
|
|
|
font-weight: 800;
|
|
@@ -382,6 +469,77 @@ export default {
|
|
|
border-color: transparent;
|
|
|
}
|
|
|
}
|
|
|
+.qu-index-box {
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0px;
|
|
|
+ background: #fafafa;
|
|
|
+ width: 100%;
|
|
|
+ left: 0px;
|
|
|
+ height: fit-content;
|
|
|
+ text-align: left;
|
|
|
+ max-height: 180px;
|
|
|
+ padding: 10px 10px 20px 10px;
|
|
|
+ box-shadow: 0 -2px 20px -12px #595959;
|
|
|
+ p {
|
|
|
+ width: fit-content;
|
|
|
+ }
|
|
|
+}
|
|
|
+.qu-tips-box {
|
|
|
+ & :nth-child(1)::before {
|
|
|
+ background: #19be6b;
|
|
|
+ }
|
|
|
+ & :nth-child(2)::before {
|
|
|
+ background: #e1e1e1;
|
|
|
+ }
|
|
|
+ & :nth-child(3)::before {
|
|
|
+ background: #ed4014;
|
|
|
+ }
|
|
|
+ & :nth-child(4)::before {
|
|
|
+ background: #e1e1e1;
|
|
|
+ }
|
|
|
+}
|
|
|
+.qu-tips-tag {
|
|
|
+ display: inline-block;
|
|
|
+ margin-right: 15px;
|
|
|
+ color: #909090;
|
|
|
+ font-size: 12px;
|
|
|
+ &::before {
|
|
|
+ content: "";
|
|
|
+ width: 15px;
|
|
|
+ height: 10px;
|
|
|
+ display: inline-block;
|
|
|
+ border-radius: 3px;
|
|
|
+ vertical-align: baseline;
|
|
|
+ }
|
|
|
+}
|
|
|
+.qu-index {
|
|
|
+ padding: 0px 3px;
|
|
|
+ height: 22px;
|
|
|
+ border-radius: 5px;
|
|
|
+ display: inline-block;
|
|
|
+ border: 1px solid #e1e1e1;
|
|
|
+ line-height: 22px;
|
|
|
+ text-align: center;
|
|
|
+ margin-bottom: 5px;
|
|
|
+ margin-top: 5px;
|
|
|
+ margin-right: 5px;
|
|
|
+ cursor: pointer;
|
|
|
+ background: #f1f1f1;
|
|
|
+ &:hover {
|
|
|
+ // background: white;
|
|
|
+ box-shadow: 0px 0px 4px rgba(70, 43, 43, 0.3);
|
|
|
+ }
|
|
|
+}
|
|
|
+.right-qu {
|
|
|
+ color: #fff;
|
|
|
+ border-color: #19be6b;
|
|
|
+ background: #19be6b;
|
|
|
+}
|
|
|
+.err-qu {
|
|
|
+ color: #fff;
|
|
|
+ border-color: #ed4014;
|
|
|
+ background: #ed4014;
|
|
|
+}
|
|
|
</style>
|
|
|
<style>
|
|
|
.mark-tools-wrap .ivu-poptip-title::after {
|