赛事相关

master
yujialong 7 months ago
parent 830a76b15f
commit 8bef91baa6
  1. 1
      src/api/index.js
  2. 2
      src/pages/match/add/step1.vue
  3. 5
      src/pages/match/add/step2.vue
  4. 2
      src/pages/match/list/index.vue
  5. 1
      src/pages/match/manage/matchArch.vue
  6. 24
      src/pages/match/manage/matchArchList.vue
  7. 61
      src/pages/match/manage/matchRank.vue
  8. 70
      src/pages/match/manage/matchSignup.vue
  9. 3
      src/pages/project/add/index.vue

@ -221,6 +221,7 @@ export default {
batchImportTeamData: `${host}competition/competition/registration/batchImportTeamData`, batchImportTeamData: `${host}competition/competition/registration/batchImportTeamData`,
TeamDataExportFailure: `${host}competition/competition/registration/exportFailure`, TeamDataExportFailure: `${host}competition/competition/registration/exportFailure`,
batchDeleteApplicants: `competition/competition/registration/batchDeleteApplicants`, batchDeleteApplicants: `competition/competition/registration/batchDeleteApplicants`,
deleteAllData: `competition/competition/registration/deleteAllData`,
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`, // 教师端个人报名人员模板 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`, // 教师端团队报名人员导入模板 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`, // 教师端团队报名人员导入模板

@ -568,7 +568,7 @@ export default {
provinceId: e.provinceId || '', provinceId: e.provinceId || '',
cityId: e.cityId || '', cityId: e.cityId || '',
schoolId: e.schoolId || '', schoolId: e.schoolId || '',
type: e.schoolId ? 0 : 1 type: e.schoolId ? 0 : (e.cityId ? 1 : 2)
}) })
}) })
this.form.competitionRangeList = data this.form.competitionRangeList = data

@ -223,8 +223,8 @@
<script> <script>
import util from "@/libs/util"; import util from "@/libs/util";
import quill from "@/components/quill";
import Const from '@/const/match' import Const from '@/const/match'
import _ from 'lodash'
export default { export default {
props: ['setupId', 'editing'], props: ['setupId', 'editing'],
data () { data () {
@ -376,7 +376,7 @@ export default {
}, },
// //
save (status, next = 0, releaseType, cb) { save (status, next = 0, releaseType, cb) {
let { form } = this const form = _.cloneDeep(this.form)
const { rule } = form const { rule } = form
let invalid = 0 let invalid = 0
let pointWeight = 0 let pointWeight = 0
@ -455,6 +455,7 @@ export default {
e.resultAnnouncementTime = +e.resultAnnouncementTime e.resultAnnouncementTime = +e.resultAnnouncementTime
} }
if (e.teamNumLimit && e.customNumber) customNumber += e.customNumber // if (e.teamNumLimit && e.customNumber) customNumber += e.customNumber //
if (!e.teamNumLimit) e.customNumber = ''
} }
if (invalid) return if (invalid) return
if (form.teamLimit && competitionType) { if (form.teamLimit && competitionType) {

@ -97,7 +97,7 @@
width="90" width="90"
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.setup ? (scope.row.setup.competitionType ? '团队赛' : '个人赛') : '' }} {{ scope.row.competitionType ? '团队赛' : '个人赛' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="applicantNum" <el-table-column prop="applicantNum"

@ -36,6 +36,7 @@
label="状态" label="状态"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column label="竞赛起止时间" <el-table-column label="竞赛起止时间"
width="290"
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.startTime + ' ~ ' + scope.row.endTime }} {{ scope.row.startTime + ' ~ ' + scope.row.endTime }}

@ -453,30 +453,28 @@ export default {
}); });
}, },
delAllData () { // delAllData () { //
if (this.multipleSelection.length) { const list = this.multipleSelection
this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", { this.$confirm(list.length ? '该项目下的所有成绩报告将会删除,是否继续?' : '是否确定删除列表所有成绩数据?', "提示", {
type: "warning" type: "warning"
}).then(async () => { }).then(async () => {
let ids = this.multipleSelection.map(item => { let ids = []
if (list.length) {
ids = list.map(item => {
return this.method == 2 ? item.scoreId : item.reportId return this.method == 2 ? item.scoreId : item.reportId
}); });
ids = ids.filter(e => e) ids = ids.filter(e => e)
if (ids.length) { }
await this.$post(this.api.batchDeleteContestGrade, { const data = {
ids,
competitionId: this.id, competitionId: this.id,
stageId: this.stageId stageId: this.stageId
}) }
if (list.length) data.ids = ids
await this.$post(this.api.batchDeleteContestGrade, data)
this.multipleSelection = []; this.multipleSelection = [];
this.$refs.table.clearSelection(); this.$refs.table.clearSelection();
util.successMsg("删除成功"); util.successMsg("删除成功");
this.getData(); this.getData();
} }).catch(() => { });
}).catch(() => {
});
} else {
util.errorMsg("请先选择数据 !");
}
}, },
handleSelectionChange (val) { // handleSelectionChange (val) { //
this.multipleSelection = val; this.multipleSelection = val;

@ -46,7 +46,7 @@
type="primary" type="primary"
@click="cancelPublish(1)">发布排名</el-button> @click="cancelPublish(1)">发布排名</el-button>
<template v-else> <template v-else>
<span style="margin-right: 10px">{{ publishTime }}发布排名</span> <span style="margin-right: 10px;white-space: nowrap;">{{ publishTime }}发布排名</span>
<el-button type="primary" <el-button type="primary"
@click="cancelPublish(0)">取消发布</el-button> @click="cancelPublish(0)">取消发布</el-button>
</template> </template>
@ -606,42 +606,15 @@ export default {
}).catch(res => { }) }).catch(res => { })
}, },
// //
publishSubmit () { async publishSubmit () {
if (this.type) { // await this.$post(this.api.publishRanking, {
this.$post(this.api.batchRelease, this.list.map(e => e.id)).then(res => { competitionId: this.id,
// this.getData() isOverallRanking: this.active ? 0 : 1,
// util.successMsg('') publicationType: this.type,
}).catch(res => { }) releaseTime: util.formatDate("yyyy-MM-dd hh:mm:ss", this.publishTime),
} else { stageId: this.active || this.stageId,
let data = [] // data
if (!this.type) { //
//
const { list, id } = this
const isOverall = this.active ? 0 : 1
if (list.length) {
const isPerson = this.competitionType == 0
list.map(e => {
e.competitionId = id
e.isOverallRanking = isOverall
e.stageId = this.stageId
// if (isOverall) delete e.stageId
if (isPerson) e.teamId = null // teamIdnull
})
data = list
}
}
data.forEach(e => {
e.publicationType = this.type
}) })
const ids = this.grades.map(e => e.stageId)
ids.pop()
//
this.$post(this.api.publishRanking, data).then(res => {
this.uploadData = [] this.uploadData = []
// this.getData()
// util.successMsg('')
}).catch(res => { })
}
}, },
// //
publish () { publish () {
@ -680,13 +653,13 @@ export default {
if (Date.now() <= new Date(endTime)) return util.errorMsg('当前阶段还在进行中,请在本阶段结束后再发布!') if (Date.now() <= new Date(endTime)) return util.errorMsg('当前阶段还在进行中,请在本阶段结束后再发布!')
this.publishSubmit() this.publishSubmit()
await this.$post(this.api.addCompetitionStageRankingTime, { // await this.$post(this.api.addCompetitionStageRankingTime, {
competitionId: this.id, // competitionId: this.id,
isOverallRanking: this.active ? 0 : 1, // isOverallRanking: this.active ? 0 : 1,
publicationType: this.type, // publicationType: this.type,
stageId: this.active || this.stageId, // stageId: this.active || this.stageId,
releaseTime: util.formatDate("yyyy-MM-dd hh:mm:ss", this.publishTime) // releaseTime: util.formatDate("yyyy-MM-dd hh:mm:ss", this.publishTime)
}) // })
util.successMsg('发布成功') util.successMsg('发布成功')
this.getData() this.getData()
@ -717,7 +690,7 @@ export default {
// if (this.timeId) { // if (this.timeId) {
// await this.$post(`${this.api.cancelCompetitionStageRankingTime}?competitionId=${this.id}&releaseId=${this.timeId}&isOverallRanking=${this.active ? 0 : 1}&stageId=${this.active || this.stageId}`) // await this.$post(`${this.api.cancelCompetitionStageRankingTime}?competitionId=${this.id}&releaseId=${this.timeId}&isOverallRanking=${this.active ? 0 : 1}&stageId=${this.active || this.stageId}`)
// } else { // } else {
await this.$post(`${this.api.cancelRanking}?competitionId=${this.id}&isOverallRanking=${this.active ? 0 : 1}&${this.active ? 'stageIds=' + this.active : query.join('&')}&releaseId=${this.timeId}`) await this.$post(`${this.api.cancelRanking}?competitionId=${this.id}&isOverallRanking=${this.active ? 0 : 1}&${this.active ? 'stageIds=' + this.active : query.join('&')}&releaseId=${this.timeId}&publicationType=${this.type}`)
// } // }
this.publishTime = '' this.publishTime = ''
this.sourceType = '' this.sourceType = ''
@ -782,7 +755,7 @@ export default {
}, },
async beforeUpload (file) { async beforeUpload (file) {
this.uploading = true this.uploading = true
if (this.list.length) await this.$post(`${this.api.cancelRanking}?competitionId=${this.id}&isOverallRanking=${this.active ? 0 : 1}&${this.active ? 'stageIds=' + this.active : query.join('&')}&releaseId=${this.timeId}`) if (this.list.length) await this.$post(`${this.api.cancelRanking}?competitionId=${this.id}&isOverallRanking=${this.active ? 0 : 1}&${this.active ? 'stageIds=' + this.active : query.join('&')}&releaseId=${this.timeId}&publicationType=${this.type}`)
}, },
beforeRemove (file, fileList) { beforeRemove (file, fileList) {
return this.$confirm(`确定移除 ${file.name}`) return this.$confirm(`确定移除 ${file.name}`)

@ -71,23 +71,11 @@
label="学生账号归属" label="学生账号归属"
sortable="custom" sortable="custom"
min-width="180" min-width="180"
align="center"> align="center"></el-table-column>
<template slot-scope="scope">
{{ scope.row.school }}
<span v-if="scope.row.schoolStatus"
style="color: #f00">(已删除)</span>
</template>
</el-table-column>
<el-table-column prop="realSchool" <el-table-column prop="realSchool"
label="学生所属院校" label="学生所属院校"
min-width="180" min-width="180"
align="center"> align="center"></el-table-column>
<template slot-scope="scope">
{{ scope.row.realSchool }}
<span v-if="scope.row.realSchoolStatus"
style="color: #f00">(已删除)</span>
</template>
</el-table-column>
<el-table-column v-if="info.completeCompetitionSetup.competitionType" <el-table-column v-if="info.completeCompetitionSetup.competitionType"
prop="teamName" prop="teamName"
label="团队名称" label="团队名称"
@ -151,7 +139,7 @@
v-auth="'/match/list:管理:报名人员:参赛信息与成绩'">参赛信息与成绩</el-button> v-auth="'/match/list:管理:报名人员:参赛信息与成绩'">参赛信息与成绩</el-button>
<el-switch v-auth="'/match/list:管理:报名人员:禁用'" <el-switch v-auth="'/match/list:管理:报名人员:禁用'"
v-model="scope.row.isDisable" v-model="scope.row.isDisable"
:active-text="scope.row.isDisable ? '关' : '开'" :active-text="scope.row.isDisable ? '禁用' : '启用'"
:active-value="0" :active-value="0"
:inactive-value="1" :inactive-value="1"
style="margin: 0 10px 0 5px" style="margin: 0 10px 0 5px"
@ -199,7 +187,7 @@
<el-select v-model="form.studentAffiliatedInstitutionId" <el-select v-model="form.studentAffiliatedInstitutionId"
filterable filterable
style="width: 100%"> style="width: 100%">
<el-option v-for="(item, i) in clients" <el-option v-for="(item, i) in schools"
:key="i" :key="i"
:label="item.schoolName" :label="item.schoolName"
:value="item.schoolId"></el-option> :value="item.schoolId"></el-option>
@ -379,6 +367,7 @@ export default {
schoolOrder: '', schoolOrder: '',
teamOrder: '', teamOrder: '',
clients: [], clients: [],
schools: [],
addVisible: false, addVisible: false,
formEnable: true, formEnable: true,
isAdd: false, isAdd: false,
@ -477,10 +466,10 @@ export default {
e.teachers = JSON.parse(e.teacherDetails) e.teachers = JSON.parse(e.teacherDetails)
} }
}) })
this.loading = false
this.listData = list this.listData = list
this.total = data.total; this.total = data.total;
this.$refs.table.clearSelection(); this.$refs.table.clearSelection();
this.loading = false
}, },
// //
getInfo () { getInfo () {
@ -771,16 +760,31 @@ export default {
this.teamVisible = true this.teamVisible = true
}, },
// //
getClient () { async getClient () {
if (this.info.competitionScope === 2) { // if (this.info.competitionScope === 2) {
//
this.$get(`${this.api.schoolsInCompetitionArea}?competitionId=${this.id}`).then(({ schools }) => { this.$get(`${this.api.schoolsInCompetitionArea}?competitionId=${this.id}`).then(({ schools }) => {
this.clients = schools this.clients = schools
}).catch(res => { }) }).catch(res => { })
} else { // } else {
this.$get(this.api.querySchoolData).then(({ list }) => { //
this.$post(this.api.queryCustomer, {
customerType: '',
page: 1,
size: 10000,
supplierId: ''
}).then(res => {
const { list } = res.message
list.map(e => {
e.schoolName = e.customerName
})
this.clients = list this.clients = list
}).catch(res => { }) }).catch(res => { })
} }
//
this.$get(this.api.querySchoolData).then(({ list }) => {
this.schools = list
}).catch(res => { })
}, },
// //
getTeam () { getTeam () {
@ -845,23 +849,21 @@ export default {
} }
}, },
// //
batchDel () { async batchDel () {
const list = this.multipleSelection const list = this.multipleSelection
if (list.length) { const tips = list.length ? (this.info.completeCompetitionSetup.competitionType && list.find(e => e.captain === '是') ? '删除队长后,该团队下所有成员都会同步移除报名,是否确认删除?' : '此删除操作不可逆,是否确认删除选中项?') : '是否确定删除全部报名人员?'
this.$confirm(this.info.completeCompetitionSetup.competitionType && list.find(e => e.captain === '是') ? '删除队长后,该团队下所有成员都会同步移除报名,是否确认删除?' : '此删除操作不可逆,是否确认删除选中项?', "提示", { this.$confirm(tips, "提示", {
type: "warning" type: "warning"
}).then(() => { }).then(async () => {
this.$post(this.api.batchDeleteApplicants, { registrationVOS: list }).then(res => { if (list.length) {
this.init() await this.$post(this.api.batchDeleteApplicants, { registrationVOS: list })
this.$message.success("删除成功");
this.$refs.table.clearSelection()
}).catch(err => {
});
}).catch(() => {
});
} else { } else {
this.$message.warning("请先选择数据 !"); await this.$post(`${this.api.deleteAllData}?competitionId=${this.id}`)
} }
this.init()
util.successMsg('删除成功')
this.$refs.table.clearSelection()
}).catch(() => { });
}, },
} }
}; };

@ -740,10 +740,9 @@ export default {
}, },
addJudgment () { // addJudgment () { //
if (this.selectedJudgment.length) { if (this.selectedJudgment.length) {
// console.log(this.selectedJudgment, "queren");
this.dialogVisible = false; this.dialogVisible = false;
let tempArr = this.selectedJudgment.map(i => { let tempArr = this.selectedJudgment.map(i => {
i.score = 0; this.$set(i, 'score', 0)
return i; return i;
}); });
this.projectJudgmentData = this.projectJudgmentData.concat(tempArr); this.projectJudgmentData = this.projectJudgmentData.concat(tempArr);

Loading…
Cancel
Save