|
@@ -20,12 +20,12 @@
|
|
|
<div class="btn-wrap">
|
|
|
<span class="action-btn" @click="toggleStatus = !toggleStatus">
|
|
|
<Icon type="md-shuffle" class="action-btn-icon" />
|
|
|
- 切换
|
|
|
+ 切换学生
|
|
|
</span>
|
|
|
- <span class="action-btn">
|
|
|
+ <!-- <span class="action-btn">
|
|
|
<Icon type="md-refresh" class="action-btn-icon" />
|
|
|
回评
|
|
|
- </span>
|
|
|
+ </span> -->
|
|
|
<span class="action-btn">
|
|
|
<Icon custom="iconfont icon-exception" class="action-btn-icon" />
|
|
|
异常申报
|
|
@@ -112,7 +112,7 @@
|
|
|
<!-- 用来单独渲染学生作答数据,提高tocanvas 的效率 -->
|
|
|
<iframe id="markIframe" :srcdoc="curAnswer"></iframe>
|
|
|
<Modal v-model="toggleStatus" title="切换学生" :width="800" footer-hide>
|
|
|
- <StuProg @getStuId="toByStuView" class="light-stu-prog" :total="taskInfo.count" :stusData="stusData"></StuProg>
|
|
|
+ <StuProg @getStuId="toByStuView" class="light-stu-prog" :total="taskInfo.count" :stusData="stusData"></StuProg>
|
|
|
</Modal>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -155,12 +155,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- /**
|
|
|
- * 按人阅卷
|
|
|
- */
|
|
|
- toByStuView(stuId) {
|
|
|
- this.$Message.warning('这里切换学生逻辑暂未处理!')
|
|
|
- },
|
|
|
drawImg(imgIndex) {
|
|
|
// this.activeIcon = imgIndex
|
|
|
// this.curImg = new Image()
|
|
@@ -197,10 +191,6 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- //将图片(答案)绘制到canvas
|
|
|
- imgToCanvas(img) {
|
|
|
- console.log('将图片(答案)绘制到canvas', img)
|
|
|
- },
|
|
|
/** 打分 */
|
|
|
setScore(score) {
|
|
|
this.score = score
|
|
@@ -237,7 +227,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
- console.log('输出', realIndex)
|
|
|
return --realIndex
|
|
|
},
|
|
|
//提交分数
|
|
@@ -269,6 +258,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
nextQuestion() {
|
|
|
+ //首先判断是都已阅完
|
|
|
+ if (!this.stuScore.includes(-1)) {
|
|
|
+ if (this.autoStu) {
|
|
|
+ this.toggleStatus = true
|
|
|
+ } else {
|
|
|
+ this.$Message.warning('当前完成当前学生评分,如果继续评分,请切换学生')
|
|
|
+ }
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
// 当前不是最后一题
|
|
|
if (this.quIndex < this.paperData.item.length - 1) {
|
|
|
//当前题目是综合题
|
|
@@ -352,6 +351,7 @@ export default {
|
|
|
this.$Message.success('已阅完')
|
|
|
if (this.autoStu) {
|
|
|
//TODE 随机获取下一位学生
|
|
|
+ this.toggleStatus = true
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -366,11 +366,85 @@ export default {
|
|
|
name: sessionStorage.getItem('markFrom')
|
|
|
})
|
|
|
},
|
|
|
- uuid() {
|
|
|
- function S4() {
|
|
|
- return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1)
|
|
|
+ /**
|
|
|
+ * 按人阅卷
|
|
|
+ */
|
|
|
+ async toByStuView(stuId) {
|
|
|
+ this.toggleStatus = false
|
|
|
+ // 如果挑选的是当前的学生
|
|
|
+ if (stuId) {
|
|
|
+ let stuInfo = this.stusData.find(item => {
|
|
|
+ return item.stuId == stuId
|
|
|
+ })
|
|
|
+ if (stuInfo && !stuInfo.info.answer) {
|
|
|
+ let sas = this.$store.state.user.schoolProfile.blob_sas //目前只有校本评测安排阅卷任务
|
|
|
+ let blobUrl = JSON.parse(decodeURIComponent(localStorage.school_profile, "utf-8")).blob_uri //目前只有校本评测安排阅卷任务
|
|
|
+ stuInfo.info.answer = stuInfo.info.ans ? JSON.parse(await this.$tools.getFile(`${blobUrl}/exam/${stuInfo.info.ans}?${sas}`)) : []
|
|
|
+ }
|
|
|
+ this.stuAnswer = stuInfo.info.answer
|
|
|
+ this.stuScore = stuInfo.info.score
|
|
|
+ this.stuId = stuId
|
|
|
}
|
|
|
- return (S4() + S4() + '-' + S4() + '-' + S4() + '-' + S4() + '-' + S4() + S4() + S4())
|
|
|
+ // 随机获取一名学生
|
|
|
+ else {
|
|
|
+ if (this.taskInfo.count == this.stusData.length) {
|
|
|
+ let res = this.stusData.filter(item => {
|
|
|
+ return item.info.score.includes(-1)
|
|
|
+ })
|
|
|
+ if (res.length) {
|
|
|
+ this.$Message.warning('已无未阅学生,请挑选进行中的学生继续阅卷。')
|
|
|
+ this.toggleStatus = true
|
|
|
+ } else {
|
|
|
+ this.$Message.success('您已完成阅卷任务')
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.getNextStu()
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 批阅下个学生
|
|
|
+ * @param stuId 如果传了stuid则会获取对应学生的数据,否则随机获取一个学生
|
|
|
+ */
|
|
|
+ getNextStu(stuId) {
|
|
|
+ let requestData = {
|
|
|
+ code: this.markList[this.curTaskIndex].ecode.replace('Exam-', ''),
|
|
|
+ id: this.markList[this.curTaskIndex].id,
|
|
|
+ subjectId: this.markList[this.curTaskIndex].subject,
|
|
|
+ count: this.markList[this.curTaskIndex].count,
|
|
|
+ tmdId: this.$store.state.userInfo.TEAMModelId,
|
|
|
+ stuId
|
|
|
+ }
|
|
|
+ this.$api.mark.FindNextStu(requestData).then(
|
|
|
+ async res => {
|
|
|
+ if (res) {
|
|
|
+ let obj = {
|
|
|
+ stuId: res.stuId,
|
|
|
+ info: {
|
|
|
+ ans: res.ans.ans,
|
|
|
+ score: res.ans.score,
|
|
|
+ mark: res.ans.mark
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let sas = this.$store.state.user.schoolProfile.blob_sas //目前只有校本评测安排阅卷任务
|
|
|
+ let blobUrl = JSON.parse(decodeURIComponent(localStorage.school_profile, "utf-8")).blob_uri //目前只有校本评测安排阅卷任务
|
|
|
+ obj.info.answer = JSON.parse(await this.$tools.getFile(`${blobUrl}/exam/${obj.info.ans}?${sas}`))
|
|
|
+ this.stusData.push(obj)
|
|
|
+
|
|
|
+ this.stuId = res.stuId
|
|
|
+ this.stuAnswer = obj.info.answer
|
|
|
+ this.stuScore = obj.info.score
|
|
|
+ this.toggleStatus = false
|
|
|
+ } else {
|
|
|
+ this.$Message.error('API ERROR')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ err => {
|
|
|
+ this.$Message.error('API ERROR')
|
|
|
+ }
|
|
|
+ )
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
@@ -429,7 +503,7 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
<style scoped lang="less">
|
|
|
-.light-stu-prog{
|
|
|
+.light-stu-prog {
|
|
|
margin-bottom: 15px;
|
|
|
}
|
|
|
.score-setting-wrap {
|
|
@@ -736,29 +810,29 @@ export default {
|
|
|
color: red;
|
|
|
font-weight: 800;
|
|
|
}
|
|
|
-.light-stu-prog .setting-content{
|
|
|
- background: #FFF;
|
|
|
+.light-stu-prog .setting-content {
|
|
|
+ background: #fff;
|
|
|
box-shadow: none;
|
|
|
border-color: #e8eaec;
|
|
|
}
|
|
|
-.light-stu-prog .filter-tab-item{
|
|
|
+.light-stu-prog .filter-tab-item {
|
|
|
border-color: #e8eaec;
|
|
|
}
|
|
|
-.light-stu-prog .filter-tab-item-active{
|
|
|
- background: #FFF !important;
|
|
|
+.light-stu-prog .filter-tab-item-active {
|
|
|
+ background: #fff !important;
|
|
|
color: black;
|
|
|
}
|
|
|
-.light-stu-prog .filter-tab-item{
|
|
|
- background: #EEE;
|
|
|
+.light-stu-prog .filter-tab-item {
|
|
|
+ background: #eee;
|
|
|
}
|
|
|
-.light-stu-prog .no-mark-text .no-mark-count{
|
|
|
+.light-stu-prog .no-mark-text .no-mark-count {
|
|
|
color: #515a6e;
|
|
|
}
|
|
|
-.light-stu-prog .stu-name{
|
|
|
+.light-stu-prog .stu-name {
|
|
|
background: #eee;
|
|
|
color: #515a6e;
|
|
|
}
|
|
|
-.light-stu-prog .stu-name:hover{
|
|
|
+.light-stu-prog .stu-name:hover {
|
|
|
color: #515a6e;
|
|
|
box-shadow: 0px 0px 5px 2px #ccc;
|
|
|
}
|