dev_202412
yujialong 6 months ago
parent 50ecd7e2f1
commit 82b2f701ad
  1. 2
      src/pages/match/details/index.vue
  2. 5
      src/pages/match/list/index.vue
  3. 45
      src/pages/match/theoryExam/index.vue

@ -966,7 +966,7 @@ export default {
} else { } else {
info.isCaption = info.team.caption info.isCaption = info.team.caption
} }
const caption = info.teamDetail.find(e => !e.caption) const caption = info.teamDetail.find(e => !e.captain)
info.caption = caption ? caption : {} info.caption = caption ? caption : {}
info.person = info.personalDetail || info.teamDetail.find(e => e.accountId == info.team.accountId) info.person = info.personalDetail || info.teamDetail.find(e => e.accountId == info.team.accountId)
if (info.person) this.curRealSchoolId = info.person.realSchoolId if (info.person) this.curRealSchoolId = info.person.realSchoolId

@ -816,8 +816,9 @@ export default {
initOss () { async initOss () {
this.client = new OSS(OssConfig.config) const o = await OssConfig()
this.client = new OSS(o.config)
}, },
// //
beforeUpload (file) { beforeUpload (file) {

@ -240,10 +240,7 @@ export default {
// //
if (now >= endTime) { if (now >= endTime) {
this.loading = false this.loading = false
this.$alert('竞赛时间已到,系统已自动交卷', '提示', { this.submit(1, 1)
confirmButtonText: '确定'
})
this.submit(1)
} else { // } else { //
this.countVal = (endTime - now) / 1000 this.countVal = (endTime - now) / 1000
load && this.getPaper(now) load && this.getPaper(now)
@ -390,11 +387,7 @@ export default {
if (counterTime <= 0) { if (counterTime <= 0) {
if (this.per) { // / if (this.per) { // /
clearInterval(this.counterTimer) clearInterval(this.counterTimer)
this.$alert(`${this.per == 2 ? '竞赛' : '考核'}时间已到,系统已自动交卷`, '提示', { this.submit(1, 1)
confirmButtonText: '确定',
type: 'warning'
})
this.submit(1)
} else { } else {
this.handleCounter(counterTime, 1) this.handleCounter(counterTime, 1)
} }
@ -620,7 +613,7 @@ export default {
} catch (e) { } } catch (e) { }
}, },
// //
async submit (isSubmit) { async submit (isSubmit, autoSubmit) {
if (isSubmit && this.submiting) return false if (isSubmit && this.submiting) return false
try { try {
if (isSubmit) this.submiting = true if (isSubmit) this.submiting = true
@ -663,13 +656,11 @@ export default {
paperId: curStage.paperId, paperId: curStage.paperId,
examSubmitJudgeList: ques, examSubmitJudgeList: ques,
} }
// if (isSubmit) {
const now = isSubmit ? await Util.getNow() : new Date() const now = isSubmit ? await Util.getNow() : new Date()
const submitTime = Util.formatDate('yyyy-MM-dd hh:mm:ss', now) const submitTime = Util.formatDate('yyyy-MM-dd hh:mm:ss', now)
data.endTime = this.per ? curStage.endTime : submitTime data.endTime = this.per ? curStage.endTime : submitTime
data.submitTime = submitTime data.submitTime = submitTime
data.timeSum = Math.ceil((now - entryTime) / 60000) // data.timeSum = Math.ceil((now - entryTime) / 60000) //
// }
// //
await this.$post(this.api[isSubmit ? 'submitTheExamPaper' : 'examPaperRecordCache'], data) await this.$post(this.api[isSubmit ? 'submitTheExamPaper' : 'examPaperRecordCache'], data)
@ -679,20 +670,32 @@ export default {
clearInterval(this.counterTimer) clearInterval(this.counterTimer)
this.submiting = false this.submiting = false
this.submited = true this.submited = true
//
if (this.id) { //
const time = curStage.resultAnnouncementTime if (autoSubmit) {
const msg = this.$alert(`${this.per == 2 ? '竞赛' : '考核'}时间已到,系统已自动交卷`, '提示', {
time === 0 ? '提交成功!成绩将在比赛结束后公布,请前往参赛信息模块查看' : time > 0 ? `提交成功!成绩将在比赛结束后${time}小时公布,请前往参赛信息模块查看` : '提交成功';
this.$alert(msg, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
type: 'success', type: 'warning',
callback: () => { callback: _ => {
this.close() this.close()
} }
}) })
} else { } else {
this.$message.success('提交成功!') //
if (this.id) {
const time = curStage.resultAnnouncementTime
const msg =
time === 0 ? '提交成功!成绩将在比赛结束后公布,请前往参赛信息模块查看' : time > 0 ? `提交成功!成绩将在比赛结束后${time}小时公布,请前往参赛信息模块查看` : '提交成功';
this.$alert(msg, '提示', {
confirmButtonText: '确定',
type: 'success',
callback: () => {
this.close()
}
})
} else {
this.$message.success('提交成功!')
}
} }
} }
} catch (e) { } catch (e) {

Loading…
Cancel
Save