赛事修复

master
yujialong 6 months ago
parent 9182de09ec
commit db25648ed2
  1. 2
      src/api/index.js
  2. 2
      src/pages/achievement/show/index.vue
  3. 7
      src/pages/match/add/step1.vue
  4. 8
      src/pages/match/add/step3.vue
  5. 2
      src/pages/match/manage/abnormalTeam.vue
  6. 11
      src/pages/match/manage/matchInfo.vue
  7. 16
      src/pages/match/manage/matchSignup.vue
  8. 4
      src/pages/station/preview/index.vue

@ -229,8 +229,10 @@ export default {
TeamDataExportFailure: `${host}competition/competition/registration/exportFailure`,
batchDeleteApplicants: `competition/competition/registration/batchDeleteApplicants`,
deleteAllData: `competition/competition/registration/deleteAllData`,
whetherThereIsReport: `competition/competitionAutomaticAllocationRecord/whetherThereIsReport`,
competionPersonTemplate: `https://huoran.oss-cn-shenzhen.aliyuncs.com/%E6%95%99%E5%B8%88%E7%AB%AF%E4%B8%AA%E4%BA%BA%E8%B5%9B%E6%8A%A5%E5%90%8D%E4%BA%BA%E5%91%98%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx`, // 教师端个人报名人员模板
competionTeamTemplate: `https://huoran.oss-cn-shenzhen.aliyuncs.com/%E6%95%99%E5%B8%88%E7%AB%AF%E5%9B%A2%E9%98%9F%E8%B5%9B%E6%8A%A5%E5%90%8D%E4%BA%BA%E5%91%98%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx`, // 教师端团队报名人员导入模板
exportAbnormalData: `${host}competition/teamAbnormalInformation/exportAbnormalData`,
// 赛事公告
addAnnouncement: `competition/competition/announcement/addAnnouncement`,

@ -219,7 +219,7 @@ export default {
}
})
e.lcStudentAnswer.map((n, i) => {
e.answer += `${i + 1}.${n.userAnswer};`
e.answer += `${i + 1}.${n.userAnswer || '未填写'};`
})
})
} else { // pythonuserScores

@ -290,7 +290,8 @@ export default {
},
submiting: false,
updateTime: 0,
quillShow: true
quillShow: true,
originSignUpEndTime: '',
};
},
components: {
@ -384,6 +385,7 @@ export default {
})
this.rangeName = range.join(',')
}
this.originSignUpEndTime = competition.signUpEndTime
this.form = competition
this.$parent.resumeData()
this.$nextTick(() => {
@ -625,11 +627,12 @@ export default {
const now = await Util.getNow()
//
if (this.originSignUpEndTime && signUpEndTime !== this.originSignUpEndTime && new Date(signUpEndTime) < now) {
if (this.originSignUpEndTime && signUpEndTime !== this.originSignUpEndTime && (new Date(signUpEndTime) < now || (new Date(this.originSignUpEndTime) < now && new Date(signUpEndTime) > now))) {
await this.$post(this.api.updateEventAllocationRecord, {
competitionId: id,
whetherToModifyTheRule: 1,
})
this.originSignUpEndTime = signUpEndTime
}
}
},

@ -311,7 +311,7 @@ export default {
//
async autoAllocationConfirm (next) {
const { data } = await this.$post(`${this.api.viewEventAllocationInformation}?competitionId=${this.competitionId}`)
if (data.assignOrNot === undefined || !this.form[0].contentId) {
if (!data || data.assignOrNot === undefined || !this.form[0].contentId) {
// or
this.$confirm('<p>团队赛发布成功,是否要自动分配阶段参赛人员?</p><p style="margin-top: 10px;color: #a9a9a9;">(点击“是”将会在报名结束后给报名的团队自动分配阶段参赛人员</p>', '提示', {
confirmButtonText: '是',
@ -324,11 +324,6 @@ export default {
}).catch(() => {
this.automaticAllocation(0, next)
})
} else {
const now = await Util.getNow()
// >
if (new Date(this.$parent.$refs.step1.form.signUpEndTime) > now) {
this.$emit('next', next)
} else {
//
const res = await this.$post(`${this.api.editWhetherPopUpsAppear}?competitionId=${this.competitionId}`)
@ -351,7 +346,6 @@ export default {
this.$emit('next', next)
}
}
}
},
//
save (status, next = 0, releaseType, cb) {

@ -561,7 +561,7 @@ export default {
this.exporting = false
})
} else {
axios.get(`${this.api.excelExport}?competitionId=${this.id}`, {
axios.get(`${this.api.exportAbnormalData}?competitionId=${this.id}`, {
headers: {
token: this.token
},

@ -6,7 +6,7 @@
</div>
</el-card>
<el-card shadow="hover" class="m-b-20">
<el-card shadow="hover" class="m-b-20" v-loading="loading">
<div style="display: flex;align-items: center">
<table v-if="form.completeCompetitionSetup.competitionType" class="table m-b-20 m-r-10">
<tr>
@ -110,7 +110,7 @@
</template>
<span v-else class="m-r-5"></span>
<i class="el-icon-edit icon" @click="selectPar(item)"></i>
<el-tooltip v-if="stageTip.length && stageTip[i]" effect="dark" :content="stageTip[i]"
<el-tooltip v-if="stageTip && stageTip[i + 1]" effect="dark" :content="stageTip[i + 1]"
placement="bottom">
<el-tag type="danger" class="m-l-5">异常</el-tag>
</el-tooltip>
@ -230,6 +230,7 @@ export default {
return {
id: +this.$route.query.id,
accountId: +this.$route.query.accountId,
loading: false,
status: 5,
form: {
competitionStage: [],
@ -297,6 +298,7 @@ export default {
},
methods: {
getData () {
this.loading = true
this.$post(`${this.api.getCompetition}?competitionId=${this.id}`).then(({ competition }) => {
this.form = competition
this.timer = setInterval(this.handleStatus, 1000)
@ -336,6 +338,7 @@ export default {
})
this.info = info
this.form.completeCompetitionSetup.competitionType && this.getErrorInfo()
this.loading = false
}).catch(err => { });
},
//
@ -345,7 +348,7 @@ export default {
teamId: this.info.teamId
})
this.teamErrors = res.teamTip.split(';').filter(e => e)
if (Object.keys(res.stageTip)) {
if (Object.keys(res.stageTip).length) {
this.stageTip = res.stageTip
}
},
@ -530,7 +533,7 @@ export default {
this.chooses = this.info.teamDetail
}
this.curRow = row
this.checkedMembers = row.participants.map(e => e.id)
this.checkedMembers = row.participants ? row.participants.map(e => e.id) : []
this.chooseVisible = true
}
},

@ -18,7 +18,8 @@
</ul>
<div>
<el-button v-if="loaded && info.completeCompetitionSetup.competitionType" type="primary" round
:loading="allocating" @click="autoAllocationConfirm">{{ !notBeginSign && allocated ? '取消' : ''
:disabled="hasReport" :loading="allocating" @click="autoAllocationConfirm">{{ !notBeginSign && allocated ?
'取消' : ''
}}自动分配阶段成员</el-button>
<el-button type="primary" round @click="batchImport">导入</el-button>
<el-button type="primary" round @click="add" v-auth="'/match/list:管理:报名人员:新增'">新增</el-button>
@ -287,6 +288,7 @@ export default {
now: '',
notBeginSign: true,
allocated: true,
hasReport: false,
allocating: false,
loaded: 0,
};
@ -359,21 +361,27 @@ export default {
//
if (this.info.completeCompetitionSetup.competitionType) {
this.getAutomaticAllocation()
this.notBeginSign = this.now > new Date(this.info.signUpEndTime) //
// /
clearInterval(this.timer)
this.now = await Util.getNow()
this.notBeginSign = this.now > new Date(this.info.signUpEndTime) //
this.getAutomaticAllocation()
this.timer = setInterval(() => {
this.now = new Date(this.now.setSeconds(this.now.getSeconds() + 1))
this.notBeginSign = this.now > new Date(this.info.signUpEndTime) //
}, 1000)
}
},
//
//
async getAutomaticAllocation () {
//
const res = await this.$post(`${this.api.viewEventAllocationInformation}?competitionId=${this.id}`)
this.allocated = res.data && res.data.assignOrNot
//
const res1 = await this.$post(`${this.api.whetherThereIsReport}?competitionId=${this.id}`)
this.hasReport = res1.hasReport
this.allocating = false
this.loaded = 1
},

@ -978,8 +978,8 @@ $height: 700px;
.entry {
width: 100%;
height: 50px;
font-size: 18px;
height: 34px;
font-size: 17px;
}
.types {

Loading…
Cancel
Save