|
@@ -6,7 +6,7 @@
|
|
|
<span class="quit-marking-text">
|
|
|
<Icon type="ios-arrow-back" class="quit-marking-icon" title="退出阅卷" @click="quit" />
|
|
|
</span>
|
|
|
- <span class="info-label">考试名称123:</span>
|
|
|
+ <span class="info-label">考试名称:</span>
|
|
|
<span class="info-value">{{taskInfo.name}}</span>
|
|
|
<span class="info-label">阅卷方式:</span>
|
|
|
<span class="info-value">按题阅卷</span>
|
|
@@ -62,38 +62,45 @@
|
|
|
<Button size="small" type="error" ghost @click="score = 0">零分</Button>
|
|
|
<Icon :type="isShowNum ? 'md-eye-off' : 'md-eye'" class="toggle-num-status" @click="isShowNum = !isShowNum" />
|
|
|
<div :class="['score-key-box', isShowNum ? '':'hind-key-box']">
|
|
|
- <span v-for="(item,index) in quScoreArr" :key="index" class="score-key" @click="setScore(index)">
|
|
|
- {{item}}
|
|
|
- </span>
|
|
|
+ <vuescroll>
|
|
|
+ <span v-for="(item,index) in quScoreArr" :key="index" class="score-key" @click="setScore(index)">
|
|
|
+ {{item}}
|
|
|
+ </span>
|
|
|
+ </vuescroll>
|
|
|
</div>
|
|
|
</div>
|
|
|
<Button type="success" class="submit-score" @click="submit()">提交分数</Button>
|
|
|
<div class="score-setting-wrap">
|
|
|
<div class="score-setting-item">
|
|
|
- <span>提交分数自动切换题目</span>
|
|
|
- <i-switch v-model="autoQu" size="small" />
|
|
|
+ <span>打分自动切换学生</span>
|
|
|
+ <i-switch v-model="autoStu" size="small" />
|
|
|
</div>
|
|
|
<div class="score-setting-item">
|
|
|
- <span>完成阅卷自动获取新学生</span>
|
|
|
- <i-switch v-model="autoStu" size="small" />
|
|
|
+ <span>完成整题批阅自动弹出切换</span>
|
|
|
+ <i-switch v-model="autoQu" size="small" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 用来单独渲染学生作答数据,提高tocanvas 的效率 -->
|
|
|
<iframe id="markIframe1" :srcdoc="curAnswer" v-if="curAnswer"></iframe>
|
|
|
- <Modal v-model="toggleStatus" title="切换学生">
|
|
|
- 进行中
|
|
|
+ <Modal v-model="toggleStatus" title="切换题目" :width="800" footer-hide>
|
|
|
+ <div class="qu-prog-wrap" style="height:600px">
|
|
|
+ <vuescroll>
|
|
|
+ <QuProg :paperData="paperData" :stusData="stusInfo" :total="taskInfo.count || 1" @getQuIndex="setQuIndex"></QuProg>
|
|
|
+ </vuescroll>
|
|
|
+ </div>
|
|
|
</Modal>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import html2canvas from 'html2canvas';
|
|
|
import MarkCanvas from './MarkCanvas';
|
|
|
+import QuProg from './QuProg';
|
|
|
export default {
|
|
|
name: 'ByStu',
|
|
|
components: {
|
|
|
- MarkCanvas
|
|
|
+ MarkCanvas, QuProg
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -118,6 +125,12 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ setQuIndex(data) {
|
|
|
+ let { quIndex, childIndex } = data
|
|
|
+ this.quIndex = quIndex
|
|
|
+ this.childIndex = childIndex
|
|
|
+ this.toggleStatus = false
|
|
|
+ },
|
|
|
drawImg(imgIndex) {
|
|
|
},
|
|
|
//清除所有批注
|
|
@@ -153,7 +166,10 @@ export default {
|
|
|
setScore(score) {
|
|
|
this.score = score
|
|
|
let index = this.getScoreIndex(this.quIndex, this.childIndex)
|
|
|
- this.stusInfo[this.stuIndex].info.score[index] = score
|
|
|
+ this.$set(this.stusInfo[this.stuIndex].info.score, index, score)
|
|
|
+ if (this.autoStu) {
|
|
|
+ this.submit()
|
|
|
+ }
|
|
|
},
|
|
|
//提交分数
|
|
|
submit() {
|
|
@@ -193,15 +209,26 @@ export default {
|
|
|
* childIndex 小题index 非必传
|
|
|
*/
|
|
|
getScoreIndex(index, childIndex) {
|
|
|
- let realIndex = index
|
|
|
+ let realIndex = 0
|
|
|
this.paperData.item.forEach((item, itemIndex) => {
|
|
|
- if (itemIndex < index && item.children.length) {
|
|
|
- realIndex += item.children.length
|
|
|
- } else if (itemIndex == index && item.children.length) {
|
|
|
- realIndex += childIndex
|
|
|
+ if (itemIndex <= index) {
|
|
|
+ //综合题
|
|
|
+ if (item.children.length) {
|
|
|
+ item.children.forEach((childItem, cIndex) => {
|
|
|
+ if (itemIndex < index) {
|
|
|
+ realIndex++
|
|
|
+ } else if (cIndex <= childIndex) {
|
|
|
+ realIndex++
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ realIndex++
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
- return realIndex
|
|
|
+ console.log('输出', realIndex)
|
|
|
+ return --realIndex
|
|
|
},
|
|
|
//获取批阅学生数据
|
|
|
getDefStu() {
|
|
@@ -218,7 +245,11 @@ export default {
|
|
|
//当前数据没有未评,并且人数==阅卷任务量 —> 说明这道题目已阅完
|
|
|
if (!has && this.stusInfo.length == this.taskInfo.count) {
|
|
|
// 提示当前题目已阅完,切换题目
|
|
|
- this.$Message.warning('当前题目已阅完,请切换题目')
|
|
|
+ if (this.autoQu) {
|
|
|
+ this.toggleStatus = true
|
|
|
+ } else {
|
|
|
+ this.$Message.warning('当前题目已阅完,请切换题目')
|
|
|
+ }
|
|
|
} else if (!has && this.stusInfo.length < this.taskInfo.count) {
|
|
|
//当前学生数据已阅,需要继续随机获取学生进行阅卷
|
|
|
this.getNextStu()
|
|
@@ -239,7 +270,6 @@ export default {
|
|
|
}
|
|
|
this.$api.mark.FindNextStu(requestData).then(
|
|
|
async res => {
|
|
|
- console.log(res)
|
|
|
let sas = this.$store.state.user.schoolProfile.blob_sas //目前只有校本评测安排阅卷任务
|
|
|
let blobUrl = JSON.parse(decodeURIComponent(localStorage.school_profile, "utf-8")).blob_uri //目前只有校本评测安排阅卷任务
|
|
|
this.stusInfo.push({
|
|
@@ -251,7 +281,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
this.stuIndex = this.stusInfo.length - 1
|
|
|
- this.score = res.ans.score[this.getScoreIndex(this.quIndex,this.childIndex)] == -1 ? null : res.ans.score[this.getScoreIndex(this.quIndex,this.childIndex)]
|
|
|
+ this.score = res.ans.score[this.getScoreIndex(this.quIndex, this.childIndex)] == -1 ? null : res.ans.score[this.getScoreIndex(this.quIndex, this.childIndex)]
|
|
|
},
|
|
|
err => {
|
|
|
console.log(err)
|
|
@@ -281,9 +311,12 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
curAnswer() {
|
|
|
+ // console.log('计算作答数据',this.stuIndex, this.quIndex, this.childIndex)
|
|
|
if (this.stusInfo && this.stusInfo[this.stuIndex]) {
|
|
|
- if (this.stusInfo[this.stuIndex].ans) {
|
|
|
- return this.stusInfo[this.stuIndex].answer[this.getScoreIndex(this.quIndex, this.childIndex)]
|
|
|
+ console.log(JSON.stringify(this.stusInfo[this.stuIndex]))
|
|
|
+ console.log(this.stusInfo[this.stuIndex])
|
|
|
+ if (this.stusInfo[this.stuIndex].info.answer) {
|
|
|
+ return this.stusInfo[this.stuIndex].info.answer[this.getScoreIndex(this.quIndex, this.childIndex)]
|
|
|
} else {
|
|
|
return this.stusInfo[this.stuIndex].stuId + '未作答'
|
|
|
}
|
|
@@ -294,6 +327,7 @@ export default {
|
|
|
/**当期题目分数数组 */
|
|
|
quScoreArr() {
|
|
|
let score = 0
|
|
|
+ console.log(this.quIndex, this.childIndex)
|
|
|
if (this.paperData.item) {
|
|
|
if (this.childIndex > -1 && this.paperData.item[this.quIndex] && this.paperData.item[this.quIndex].children) {
|
|
|
score = this.paperData.item[this.quIndex].children[this.childIndex].score
|
|
@@ -307,6 +341,9 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
<style scoped lang="less">
|
|
|
+#container {
|
|
|
+ max-width: 100%;
|
|
|
+}
|
|
|
.score-setting-wrap {
|
|
|
margin-top: 50px;
|
|
|
padding: 0px 5px;
|
|
@@ -604,6 +641,15 @@ export default {
|
|
|
}
|
|
|
</style>
|
|
|
<style>
|
|
|
+.qu-prog-wrap .qu-info-item {
|
|
|
+ border-color: #ccc;
|
|
|
+}
|
|
|
+.qu-prog-wrap .obj-index {
|
|
|
+ color: #c1c1c1;
|
|
|
+}
|
|
|
+.qu-prog-wrap .other-index {
|
|
|
+ color: #606060;
|
|
|
+}
|
|
|
.mark-tools-wrap .ivu-poptip-title::after {
|
|
|
display: none;
|
|
|
}
|