|
|
@ -1,21 +1,53 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<!-- 报名人员 --> |
|
|
|
<!-- 报名人员 --> |
|
|
|
<div class="page-content" style="padding: 24px"> |
|
|
|
<div class="page-content" |
|
|
|
<el-collapse v-model="curStep"> |
|
|
|
style="padding: 24px"> |
|
|
|
<el-collapse-item v-for="(item, i) in list" :key="i" :title="item.stageName" :name="item.stageId"> |
|
|
|
<el-table ref="table" |
|
|
|
<div class="line"> |
|
|
|
:data="list" |
|
|
|
<span>比赛方式:{{ item.methodName }}</span> |
|
|
|
class="table" |
|
|
|
<span>比赛形式:{{ item.competitionType ? '团队赛' : '个人赛' }}</span> |
|
|
|
stripe |
|
|
|
<span>赛制:{{ item.ruleName }}</span> |
|
|
|
header-align="center" |
|
|
|
<span>状态:{{ item.status }}</span> |
|
|
|
row-key="stageId"> |
|
|
|
<span>竞赛起止时间:{{ item.startTime + ' ~ ' + item.endTime }}</span> |
|
|
|
<el-table-column type="index" |
|
|
|
<div> |
|
|
|
width="60" |
|
|
|
<el-button type="primary" @click="toRank(item, i)">排名</el-button> |
|
|
|
label="序号" |
|
|
|
<el-button @click="toArch(item)">成绩管理</el-button> |
|
|
|
align="center"> |
|
|
|
</div> |
|
|
|
<template slot-scope="scope"> |
|
|
|
</div> |
|
|
|
{{ scope.$index + 1 }} |
|
|
|
</el-collapse-item> |
|
|
|
</template> |
|
|
|
</el-collapse> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="methodName" |
|
|
|
|
|
|
|
label="比赛方式" |
|
|
|
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="founderName" |
|
|
|
|
|
|
|
label="比赛形式" |
|
|
|
|
|
|
|
align="center"> |
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
{{ scope.row.competitionType ? '团队赛' : '个人赛' }} |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="ruleName" |
|
|
|
|
|
|
|
label="赛制" |
|
|
|
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="status" |
|
|
|
|
|
|
|
label="状态" |
|
|
|
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column label="竞赛起止时间" |
|
|
|
|
|
|
|
align="center"> |
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
{{ scope.row.startTime + ' ~ ' + scope.row.endTime }} |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column label="操作" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
width="260"> |
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
<el-button type="primary" |
|
|
|
|
|
|
|
@click="toRank(scope.row, scope.$index)">排名</el-button> |
|
|
|
|
|
|
|
<el-button @click="toArch(scope.row)">成绩管理</el-button> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
@ -24,7 +56,7 @@ import util from "@/libs/util"; |
|
|
|
import Const from '@/const/match' |
|
|
|
import Const from '@/const/match' |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
name: "matchArch", |
|
|
|
name: "matchArch", |
|
|
|
data() { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
return { |
|
|
|
id: +this.$route.query.id, |
|
|
|
id: +this.$route.query.id, |
|
|
|
list: [], |
|
|
|
list: [], |
|
|
@ -33,21 +65,21 @@ export default { |
|
|
|
curStep: [], |
|
|
|
curStep: [], |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
mounted () { |
|
|
|
this.$once('hook:beforeDestroy', function() { |
|
|
|
this.$once('hook:beforeDestroy', function () { |
|
|
|
clearInterval(this.timer) |
|
|
|
clearInterval(this.timer) |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.getData() |
|
|
|
this.getData() |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
getData() { |
|
|
|
getData () { |
|
|
|
this.$post(`${this.api.getCompetition}?competitionId=${this.id}`).then(({ competition }) => { |
|
|
|
this.$post(`${this.api.getCompetition}?competitionId=${this.id}`).then(({ competition }) => { |
|
|
|
this.form = competition |
|
|
|
this.form = competition |
|
|
|
this.timer = setInterval(this.handleStatus, 1000) |
|
|
|
this.timer = setInterval(this.handleStatus, 1000) |
|
|
|
this.getArch() |
|
|
|
this.getArch() |
|
|
|
}).catch(err => {}) |
|
|
|
}).catch(err => { }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
getArch() { |
|
|
|
getArch () { |
|
|
|
this.$post(this.api.detailsOfCompetitionStage, { |
|
|
|
this.$post(this.api.detailsOfCompetitionStage, { |
|
|
|
pageNum: 1, |
|
|
|
pageNum: 1, |
|
|
|
pageSize: 100, |
|
|
|
pageSize: 100, |
|
|
@ -60,10 +92,10 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.curStep = list.map(e => e.stageId) |
|
|
|
this.curStep = list.map(e => e.stageId) |
|
|
|
this.list = list |
|
|
|
this.list = list |
|
|
|
}).catch(res => {}); |
|
|
|
}).catch(res => { }); |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 报名时间、比赛时间、状态处理 |
|
|
|
// 报名时间、比赛时间、状态处理 |
|
|
|
handleStatus() { |
|
|
|
handleStatus () { |
|
|
|
const now = new Date() |
|
|
|
const now = new Date() |
|
|
|
this.form.competitionStage.map(e => { |
|
|
|
this.form.competitionStage.map(e => { |
|
|
|
const startTime = new Date(e.startTime) |
|
|
|
const startTime = new Date(e.startTime) |
|
|
@ -82,11 +114,11 @@ export default { |
|
|
|
console.log("🚀 ~ file: matchArch.vue:87 ~ handleStatus ~ this.status", this.list) |
|
|
|
console.log("🚀 ~ file: matchArch.vue:87 ~ handleStatus ~ this.status", this.list) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 排名 |
|
|
|
// 排名 |
|
|
|
toRank(row, i) { |
|
|
|
toRank (row, i) { |
|
|
|
this.$router.push(`/matchRank?id=${this.id}&stageId=${row.stageId}&index=${i}&method=${row.method}&competitionType=${row.competitionType}&rule=${row.rule}`) |
|
|
|
this.$router.push(`/matchRank?id=${this.id}&stageId=${row.stageId}&index=${i}&method=${row.method}&competitionType=${row.competitionType}&rule=${row.rule}`) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 成绩管理 |
|
|
|
// 成绩管理 |
|
|
|
toArch(row) { |
|
|
|
toArch (row) { |
|
|
|
this.$router.push(`/matchArchList?id=${this.id}&stageId=${row.stageId}&method=${row.method}&competitionType=${row.competitionType}`) |
|
|
|
this.$router.push(`/matchArchList?id=${this.id}&stageId=${row.stageId}&method=${row.method}&competitionType=${row.competitionType}`) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|