赛事相关

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`,
TeamDataExportFailure: `${host}competition/competition/registration/exportFailure`,
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`, // 教师端个人报名人员模板
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 || '',
cityId: e.cityId || '',
schoolId: e.schoolId || '',
type: e.schoolId ? 0 : 1
type: e.schoolId ? 0 : (e.cityId ? 1 : 2)
})
})
this.form.competitionRangeList = data

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

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

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

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

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

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

Loading…
Cancel
Save