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 {
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.person = info.personalDetail || info.teamDetail.find(e => e.accountId == info.team.accountId)
if (info.person) this.curRealSchoolId = info.person.realSchoolId

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

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

Loading…
Cancel
Save