|
|
@ -282,8 +282,8 @@ export default { |
|
|
|
async getData (init) { |
|
|
|
async getData (init) { |
|
|
|
this.loading = true |
|
|
|
this.loading = true |
|
|
|
try { |
|
|
|
try { |
|
|
|
const { userAnswers: outline, report } = await this.$get(`${this.api.reviewTheDetailsReport}?reportId=${this.reportId}&status=${this.curReview}`) |
|
|
|
const { userAnswers: outline, entryInformation: info } = await this.$get(`${this.api.reviewTheDetailsReport}?reportId=${this.reportId}&status=${this.curReview}`) |
|
|
|
this.info = report |
|
|
|
this.info = info |
|
|
|
|
|
|
|
|
|
|
|
// 处理试题信息 |
|
|
|
// 处理试题信息 |
|
|
|
const { questionTypes: types, difficults } = QuesConst |
|
|
|
const { questionTypes: types, difficults } = QuesConst |
|
|
@ -481,7 +481,10 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 判断是否需要弹框提示保存分数 |
|
|
|
// 判断是否需要弹框提示保存分数 |
|
|
|
async handleLeave (cb) { |
|
|
|
async handleLeave (type, cb) { |
|
|
|
|
|
|
|
if (this.readonly) { |
|
|
|
|
|
|
|
cb() |
|
|
|
|
|
|
|
} else { |
|
|
|
const { paper } = this |
|
|
|
const { paper } = this |
|
|
|
let invalid = 0 |
|
|
|
let invalid = 0 |
|
|
|
for (const e of paper) { |
|
|
|
for (const e of paper) { |
|
|
@ -504,12 +507,30 @@ export default { |
|
|
|
cb() |
|
|
|
cb() |
|
|
|
} catch (e) { } |
|
|
|
} catch (e) { } |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
// 如果没有未保存的分数,则判断是否还有未评阅的试题 |
|
|
|
|
|
|
|
const { userAnswers: outline } = await this.$get(`${this.api.reviewTheDetailsReport}?reportId=${this.reportId}&status=0`) |
|
|
|
|
|
|
|
for (const e of outline) { |
|
|
|
|
|
|
|
if (e.userAnswerList.length) { |
|
|
|
|
|
|
|
invalid = 1 |
|
|
|
|
|
|
|
break |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (invalid) { |
|
|
|
|
|
|
|
await this.$confirm(`还有试题未评阅,确定要${!type ? '前往上一个' : type === 1 ? '前往下一个' : '退出'}吗?`, '提示', { |
|
|
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
|
|
type: 'warning', |
|
|
|
|
|
|
|
closeOnClickModal: false, |
|
|
|
|
|
|
|
}) |
|
|
|
cb() |
|
|
|
cb() |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
cb() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 下一个、上一个 |
|
|
|
// 查询上一个下一个id |
|
|
|
async switchRecord (isNext, init) { |
|
|
|
async queryRecord (isNext, init) { |
|
|
|
this.handleLeave(async () => { |
|
|
|
|
|
|
|
const res = await this.$post(this.api.getTheLabReportIdUpAndDown, { |
|
|
|
const res = await this.$post(this.api.getTheLabReportIdUpAndDown, { |
|
|
|
competitionId: this.competitionId, |
|
|
|
competitionId: this.competitionId, |
|
|
|
stageId: this.stageId, |
|
|
|
stageId: this.stageId, |
|
|
@ -526,7 +547,16 @@ export default { |
|
|
|
this.getData() |
|
|
|
this.getData() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 下一个、上一个 |
|
|
|
|
|
|
|
async switchRecord (isNext, init) { |
|
|
|
|
|
|
|
if (init) { |
|
|
|
|
|
|
|
this.queryRecord(isNext, init) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.handleLeave(isNext, async () => { |
|
|
|
|
|
|
|
this.queryRecord(isNext, init) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 一键保存分数 |
|
|
|
// 一键保存分数 |
|
|
|
async saveAll () { |
|
|
|
async saveAll () { |
|
|
@ -552,7 +582,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
close () { |
|
|
|
close () { |
|
|
|
this.handleLeave(window.close) |
|
|
|
this.handleLeave(2, window.close) |
|
|
|
}, |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|