|
@@ -60,12 +60,12 @@
|
|
|
<div class="evaluation-detail-bar">
|
|
|
<span :class="curBarIndex == 0 ? 'evalustion-bar-item line-bottom-active line-bottom':'evalustion-bar-item line-bottom'" @click="selectBar(0)">评测数据</span>
|
|
|
<span :class="curBarIndex == 1 ? 'evalustion-bar-item line-bottom-active line-bottom':'evalustion-bar-item line-bottom'" @click="selectBar(1)">评测试卷</span>
|
|
|
- <div style="float:right;">
|
|
|
+ <div style="float:right;" v-if="$access.ability('admin','mock-eva').validateAll">
|
|
|
<Tooltip content="此功能仅用于展示情景快速模拟学生作答数据,且学生作答为随机生成,仅供参考!!!" :max-width="240">
|
|
|
- <Button type="success" size="small" class="mock-stu-answer" @click="mockAnswer">一键作答</Button>
|
|
|
+ <Button type="success" size="small" :loading="answerLoading" class="mock-stu-answer" @click="mockAnswer">一键作答</Button>
|
|
|
</Tooltip>
|
|
|
<Tooltip content="此功能仅用于展示情景快速模拟教师评分数据,且分数为随机生成,仅供参考!!!" :max-width="240">
|
|
|
- <Button type="warning" size="small" class="mock-tea-scoring" @click="mockScoring">一键评分</Button>
|
|
|
+ <Button type="warning" size="small" :loading="scoreLoading" class="mock-tea-scoring" @click="mockScoring">一键评分</Button>
|
|
|
</Tooltip>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -109,8 +109,11 @@ export default {
|
|
|
TestPaper,
|
|
|
Scoring
|
|
|
},
|
|
|
+ inject:['reload'],
|
|
|
data() {
|
|
|
return {
|
|
|
+ answerLoading: false,
|
|
|
+ scoreLoading: false,
|
|
|
split1: 0.2,
|
|
|
scope: '',//school 校本 private 个人
|
|
|
showBack: false,
|
|
@@ -146,16 +149,46 @@ export default {
|
|
|
methods: {
|
|
|
// 模拟教师评分数据
|
|
|
mockScoring() {
|
|
|
+ this.scoreLoading = true
|
|
|
this.$api.learnActivity.mockScoring({
|
|
|
id: this.evaListShow[this.curEvaIndex].id,
|
|
|
code: this.evaListShow[this.curEvaIndex].code.replace('Exam-', '')
|
|
|
+ }).then(
|
|
|
+ res => {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$Message.success('模拟成功')
|
|
|
+ }, 500)
|
|
|
+ },
|
|
|
+ err => {
|
|
|
+ this.$Message.error('模拟失败')
|
|
|
+ }
|
|
|
+ ).finally(() => {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.scoreLoading = false
|
|
|
+ this.reload()
|
|
|
+ }, 500)
|
|
|
})
|
|
|
},
|
|
|
// 模拟学生作答数据
|
|
|
mockAnswer() {
|
|
|
+ this.answerLoading = true
|
|
|
this.$api.learnActivity.mockAnswer({
|
|
|
id: this.evaListShow[this.curEvaIndex].id,
|
|
|
code: this.evaListShow[this.curEvaIndex].code.replace('Exam-', '')
|
|
|
+ }).then(
|
|
|
+ res => {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$Message.success('模拟成功')
|
|
|
+ }, 500)
|
|
|
+ },
|
|
|
+ err => {
|
|
|
+ this.$Message.error('模拟失败')
|
|
|
+ }
|
|
|
+ ).finally(() => {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.answerLoading = false
|
|
|
+ this.reload()
|
|
|
+ }, 500)
|
|
|
})
|
|
|
},
|
|
|
handleEnd(index) {
|