From 254b2983c2c4a72da44de00485244334a7af02b7 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Sat, 28 Jan 2023 17:11:37 +0800 Subject: [PATCH] fix --- src/setting.js | 4 +- src/utils/api.js | 1 + src/views/match/add/set.vue | 13 +- src/views/match/add/step1.vue | 16 +- src/views/match/add/step2.vue | 25 ++- src/views/match/add/step3.vue | 43 ++++- src/views/match/list/index.vue | 37 ++-- src/views/match/manage/matchArch.vue | 5 +- src/views/match/manage/matchInfo.vue | 223 +++++++++++++++++++++---- src/views/match/manage/matchRank.vue | 18 +- src/views/match/manage/matchSignup.vue | 12 +- src/views/serve/projectAdd.vue | 2 +- 12 files changed, 313 insertions(+), 86 deletions(-) diff --git a/src/setting.js b/src/setting.js index 9a83c3b..a0e935e 100644 --- a/src/setting.js +++ b/src/setting.js @@ -11,8 +11,8 @@ if (isDev) { jumpPath = 'http://192.168.31.125:8087/' // 本地调试-需要启动本地判分点系统 host = 'http://121.37.12.51/' // host = 'https://huorantech.cn/' - // host = 'http://192.168.31.51:9000/'// 榕 - host = 'http://192.168.31.116:9000/'// 赓 + host = 'http://192.168.31.51:9000/'// 榕 + // host = 'http://192.168.31.116:9000/'// 赓 } else if (isPro) { jumpPath = 'https://www.huorantech.cn/judgmentPoint/' } diff --git a/src/utils/api.js b/src/utils/api.js index f6eb6e4..2e421dd 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -306,6 +306,7 @@ export default { getProjectAssessmentByCompetition: `occupationlab/occupationlab/projectManage/getProjectAssessmentByCompetition`, publishCompetition: `competition/competition/management/publishCompetition`, detailsOfCompetitionStage: `${host1}competition/competition/management/detailsOfCompetitionStage`, + entryInformation: `competition/competition/team/entryInformation`, // 赛事内容 addCompetitionContent: `competition/competition/content/addCompetitionContent`, diff --git a/src/views/match/add/set.vue b/src/views/match/add/set.vue index 87c7924..e66f997 100644 --- a/src/views/match/add/set.vue +++ b/src/views/match/add/set.vue @@ -1,13 +1,5 @@ diff --git a/src/views/match/add/step1.vue b/src/views/match/add/step1.vue index 884cfa7..e8aeaca 100644 --- a/src/views/match/add/step1.vue +++ b/src/views/match/add/step1.vue @@ -113,19 +113,19 @@
- 人 +
@@ -595,12 +595,18 @@ export default { // if (signUpStartTime && now > signUpStartTime) return util.warningMsg("报名时间不能早于当前时间"); if (!form.playStartTime) return util.warningMsg("请选择竞赛时间"); if (playStartTime && playStartTime < signUpEndTime) return util.warningMsg("竞赛时间不能早于报名结束时间"); - const { competitionType, minTeamSize, maxTeamSize, isNeedCode, invitationCode } = form.completeCompetitionSetup + const { competitionType, quantityLimit, minTeamSize, maxTeamSize, isNeedCode, invitationCode } = form.completeCompetitionSetup // 团队 if (competitionType) { + if (quantityLimit === '') return util.warningMsg('请填写报名团队数上限') + if (quantityLimit < 0) return util.warningMsg('报名团队数上限不得小于0') if (minTeamSize === '') return util.warningMsg('请填写团队人数下限') + if (minTeamSize < 2) return util.warningMsg('团队人数下限不得小于2') if (maxTeamSize === '') return util.warningMsg('请填写团队人数上限') if (minTeamSize > maxTeamSize) return util.warningMsg('团队人数上限不得小于下限') + } else { // 个人 + if (quantityLimit === '') return util.warningMsg('请填写报名人数上限') + if (quantityLimit < 0) return util.warningMsg('报名人数上限不得小于0') } if (isNeedCode && (!invitationCode || invitationCode.length !== 4)) return util.warningMsg('请填写四位数邀请码') if (!form.description) return util.warningMsg("请填写竞赛详情"); diff --git a/src/views/match/add/step2.vue b/src/views/match/add/step2.vue index 6a98df4..5891a10 100644 --- a/src/views/match/add/step2.vue +++ b/src/views/match/add/step2.vue @@ -92,7 +92,7 @@ * 成绩公布时间: (阶段)比赛结束后 - + 小时,公布(阶段)比赛成绩。
@@ -124,7 +124,7 @@ (阶段)比赛结束后 - + 小时,公布(阶段)比赛成绩。 @@ -309,17 +309,30 @@ export default { invalid = 1 util.errorMsg('请输入团队参数人数限制') break + } else if (e.teamNumLimit < 0) { + invalid = 1 + util.errorMsg('团队参数人数不得小于0') + break } else if (e.teamNumLimit > maxTeamSize) { invalid = 1 util.errorMsg('团队参数人数不得大于团队人数上限') break } } - if (!e.resultsDetails && e.resultAnnouncementTime === '') { - invalid = 1 - util.errorMsg('请填写成绩公布时间') - break + if (!e.resultsDetails) { + e.resultAnnouncementTime = +e.resultAnnouncementTime + if (e.resultAnnouncementTime === '') { + invalid = 1 + util.errorMsg('请填写成绩公布时间') + break + } + if (e.resultAnnouncementTime < 0) { + invalid = 1 + util.errorMsg('成绩公布时间不得小于0') + break + } } + } if (invalid) return if (form.resultCalculationMethod == 0 && !rule && pointWeight > 0 && pointWeight !== 100) return util.errorMsg('权重须等于100,请重新输入') diff --git a/src/views/match/add/step3.vue b/src/views/match/add/step3.vue index 16ac1b4..8e294e7 100644 --- a/src/views/match/add/step3.vue +++ b/src/views/match/add/step3.vue @@ -32,24 +32,24 @@