|
|
|
@ -10,71 +10,226 @@ |
|
|
|
|
<table class="table"> |
|
|
|
|
<tr> |
|
|
|
|
<th width="150">姓名:</th> |
|
|
|
|
<td></td> |
|
|
|
|
<td>{{ info.person.userName }}</td> |
|
|
|
|
</tr> |
|
|
|
|
<tr> |
|
|
|
|
<th>学号:</th> |
|
|
|
|
<td></td> |
|
|
|
|
<td>{{ info.person.workNumber }}</td> |
|
|
|
|
</tr> |
|
|
|
|
<tr> |
|
|
|
|
<th>学校:</th> |
|
|
|
|
<td></td> |
|
|
|
|
<td>{{ info.person.schoolName }}</td> |
|
|
|
|
</tr> |
|
|
|
|
<template v-if="form.completeCompetitionSetup.competitionType"> |
|
|
|
|
<tr> |
|
|
|
|
<th>指导老师:</th> |
|
|
|
|
<td></td> |
|
|
|
|
<th width="150">团队名称:</th> |
|
|
|
|
<td> |
|
|
|
|
<span>{{ info.team.teamName }}</span> |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
<template> |
|
|
|
|
<tr> |
|
|
|
|
<th>队长:</th> |
|
|
|
|
<td>{{ info.caption.userName }}{{ info.caption.schoolName && ',' + info.caption.schoolName }}{{ info.caption.workNumber && ',' + info.caption.workNumber }}</td> |
|
|
|
|
</tr> |
|
|
|
|
<tr> |
|
|
|
|
<th>团队成员:</th> |
|
|
|
|
<td> |
|
|
|
|
<el-tag v-for="(item, i) in info.teamDetail" :key="i" style="margin-right: 5px">{{ item.userName }}</el-tag> |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
<tr> |
|
|
|
|
<th>团队邀请码:</th> |
|
|
|
|
<td> |
|
|
|
|
<span>{{ info.team.invitationCode }}</span> |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
</template> |
|
|
|
|
</template> |
|
|
|
|
<tr> |
|
|
|
|
<th width="130">指导老师:</th> |
|
|
|
|
<td> |
|
|
|
|
<table class="table tc"> |
|
|
|
|
<tr> |
|
|
|
|
<th width="60">姓名</th> |
|
|
|
|
<th width="100">职务</th> |
|
|
|
|
<th width="100">手机号</th> |
|
|
|
|
</tr> |
|
|
|
|
<template v-if="info.teamInstructors.length"> |
|
|
|
|
<tr v-for="(item, i) in info.teamInstructors" :key="i"> |
|
|
|
|
<td width="60">{{ item.name }}</td> |
|
|
|
|
<td width="100">{{ item.position }}</td> |
|
|
|
|
<td width="100">{{ item.phone }}</td> |
|
|
|
|
</tr> |
|
|
|
|
</template> |
|
|
|
|
<tr v-else> |
|
|
|
|
<td colspan="3">暂无数据</td> |
|
|
|
|
</tr> |
|
|
|
|
</table> |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
<tr> |
|
|
|
|
<th>竞赛阶段:</th> |
|
|
|
|
<td> |
|
|
|
|
<table class="table"> |
|
|
|
|
<table class="table tc"> |
|
|
|
|
<tr> |
|
|
|
|
<th width="80">序号</th> |
|
|
|
|
<th>赛项阶段名称</th> |
|
|
|
|
<template v-if="form.completeCompetitionSetup.competitionType"> |
|
|
|
|
<th width="110">参赛人数限制</th> |
|
|
|
|
<th>允许参赛人员</th> |
|
|
|
|
<th v-if="info.team.captain === 0 && form.rule === 0">总分</th> |
|
|
|
|
</template> |
|
|
|
|
<th>竞赛成绩</th> |
|
|
|
|
</tr> |
|
|
|
|
<template v-if="info.stages.length"> |
|
|
|
|
<tr v-for="(item, i) in info.stages" :key="i"> |
|
|
|
|
<td>{{ i + 1 }}</td> |
|
|
|
|
<td>{{ item.stageName }}</td> |
|
|
|
|
<template v-if="form.completeCompetitionSetup.competitionType"> |
|
|
|
|
<td>{{ item.teamNumLimit || '不限制' }}</td> |
|
|
|
|
<td>{{ item.teamParticipantIds || '无' }}</td> |
|
|
|
|
<td v-if="info.team.captain === 0 && form.rule === 0 && !i" :rowspan="info.stages.length">{{ info.totalScore }}</td> |
|
|
|
|
</template> |
|
|
|
|
<td> |
|
|
|
|
<span v-if="item.score" class="m-r-10">分数{{item.score}}</span> |
|
|
|
|
<el-button type="text" :disabled="item.resultsDetails === 1 || (form.completeCompetitionSetup.competitionType && !item.reportId) || (form.completeCompetitionSetup.competitionType === 0 && !item.reportId)" @click="show(item)">查看成绩详情</el-button> |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
</template> |
|
|
|
|
<tr v-else> |
|
|
|
|
<td colspan="6">暂无数据</td> |
|
|
|
|
</tr> |
|
|
|
|
</table> |
|
|
|
|
<el-alert |
|
|
|
|
v-if="form.completeCompetitionSetup.competitionType && info.team.captain === 0" |
|
|
|
|
style="margin-top: 10px;" |
|
|
|
|
:title="'注:请团长(团队创建人)设置各阶段参赛成员,只有被选择的允许参赛成员可进入对应阶段比赛' + (info.teamLimit ? ',每个团队成员只能参加一个赛项阶段' : '') + '!'" |
|
|
|
|
type="warning" |
|
|
|
|
show-icon> |
|
|
|
|
</el-alert> |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
</table> |
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
<el-dialog title="团队得分详情" :visible.sync="memberVisible" width="900px" :close-on-click-modal="false"> |
|
|
|
|
<h6 v-if="members.length" style="margin-bottom: 10px;font-size: 16px;">团队名称:{{ members[0].teamName }} 阶段名称:{{ curRow.stageName }}</h6> |
|
|
|
|
<table class="table tc"> |
|
|
|
|
<tr> |
|
|
|
|
<th width="60">序号</th> |
|
|
|
|
<th width="100">姓名</th> |
|
|
|
|
<th width="100">学校</th> |
|
|
|
|
<th width="100">用时</th> |
|
|
|
|
<th width="100">分数</th> |
|
|
|
|
<th width="100">得分详情</th> |
|
|
|
|
</tr> |
|
|
|
|
<template v-if="members.length"> |
|
|
|
|
<tr v-for="(item, i) in members" :key="i"> |
|
|
|
|
<td>{{ i + 1 }}</td> |
|
|
|
|
<td>{{ item.userName }}</td> |
|
|
|
|
<td>{{ item.schoolName }}</td> |
|
|
|
|
<td>{{ item.timeSum }}min</td> |
|
|
|
|
<td>{{ item.score }}</td> |
|
|
|
|
<td> |
|
|
|
|
<el-button type="text" @click="toReport(item)">查看</el-button> |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
</template> |
|
|
|
|
<tr v-else> |
|
|
|
|
<td colspan="6">暂无数据</td> |
|
|
|
|
</tr> |
|
|
|
|
</table> |
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button size="small" type="primary" @click="memberVisible = false">确定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import Setting from "@/setting"; |
|
|
|
|
import util from "@/libs/util"; |
|
|
|
|
import echarts from "echarts"; |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
id: this.$route.query.id, |
|
|
|
|
stageId: this.$route.query.stageId, |
|
|
|
|
method: this.$route.query.method, |
|
|
|
|
competitionType: this.$route.query.competitionType, |
|
|
|
|
rule: this.$route.query.rule, |
|
|
|
|
info: {}, |
|
|
|
|
|
|
|
|
|
id: +this.$route.query.id, |
|
|
|
|
accountId: +this.$route.query.accountId, |
|
|
|
|
form: { |
|
|
|
|
competitionStage: [], |
|
|
|
|
completeCompetitionSetup: {}, |
|
|
|
|
competitionRegistration: {} |
|
|
|
|
}, |
|
|
|
|
info: { |
|
|
|
|
isCaption: 0, |
|
|
|
|
person: {}, |
|
|
|
|
caption: {}, |
|
|
|
|
team: { |
|
|
|
|
captain: 1, |
|
|
|
|
invitationCode: '' |
|
|
|
|
}, |
|
|
|
|
stages: [], |
|
|
|
|
teamDetail: [], |
|
|
|
|
teamInstructors: [] |
|
|
|
|
}, |
|
|
|
|
memberVisible: false, |
|
|
|
|
members: [], |
|
|
|
|
curRow: {}, |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
// this.getData() |
|
|
|
|
this.getData() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
getData() { |
|
|
|
|
this.$post(`${this.api.stageRaceRanking}?competitionId=${this.id}&stageId=${this.stageId}`).then(({ data }) => { |
|
|
|
|
this.list = data |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
this.$post(`${this.api.getCompetition}?competitionId=${this.id}`).then(({ competition }) => { |
|
|
|
|
this.form = competition |
|
|
|
|
this.getInfo() |
|
|
|
|
}).catch(err => {}) |
|
|
|
|
}, |
|
|
|
|
// 获取竞赛信息 |
|
|
|
|
getInfo() { |
|
|
|
|
this.$post(`${this.api.entryInformation}?competitionId=${this.id}&accountId=${this.accountId}`).then(res => { |
|
|
|
|
const info = res.entryInformation |
|
|
|
|
if (info.personalDetail) { |
|
|
|
|
info.team = {} |
|
|
|
|
info.teamDetail = [] |
|
|
|
|
} else { |
|
|
|
|
info.isCaption = info.team.caption |
|
|
|
|
} |
|
|
|
|
const caption = info.teamDetail.find(e => !e.caption) |
|
|
|
|
info.caption = caption ? caption : {} |
|
|
|
|
info.person = info.personalDetail || info.teamDetail.find(e => e.accountId == info.team.accountId) |
|
|
|
|
this.info = info |
|
|
|
|
}).catch(err => {}); |
|
|
|
|
}, |
|
|
|
|
// 查看成绩报告 |
|
|
|
|
// 查看成绩详情 |
|
|
|
|
show(row) { |
|
|
|
|
// 个人:跳转实验报告,团队:弹框显示成员列表 |
|
|
|
|
if (this.competitionType == 1) { |
|
|
|
|
this.teamVisible = true |
|
|
|
|
// 团队展示弹框,个人跳转实验报告 |
|
|
|
|
if (this.form.completeCompetitionSetup.competitionType && this.info.team.captain === 0) { // 团队比赛并且是队长,则展示团队成员成绩详情 |
|
|
|
|
this.curRow = row |
|
|
|
|
this.memberVisible = true |
|
|
|
|
const teamId = this.form.competitionRegistration.teamId |
|
|
|
|
if (teamId) { |
|
|
|
|
this.$post(this.api.stageGradeManagementList, { |
|
|
|
|
pageNum: 1, |
|
|
|
|
pageSize: 1000, |
|
|
|
|
competitionId: this.id, |
|
|
|
|
stageId: row.stageId, |
|
|
|
|
isNakadai: 0 |
|
|
|
|
}).then(({ page }) => { |
|
|
|
|
this.members = page.records.filter(e => e.teamId === teamId) |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
this.members = [] |
|
|
|
|
} |
|
|
|
|
} else if (row.reportId) { // 团员或者个人比赛,并且有reportId,则进入实验报告 |
|
|
|
|
this.toReport(row) |
|
|
|
|
} |
|
|
|
|
// this.$router.push(`show?reportId=${row.reportId}`) |
|
|
|
|
}, |
|
|
|
|
// 跳转实验报告 |
|
|
|
|
toReport(row) { |
|
|
|
|
this.$router.push(`/matchReport?reportId=${row.reportId}`) |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
@ -88,8 +243,20 @@ export default { |
|
|
|
|
padding: 12px; |
|
|
|
|
border: 1px solid #ebeef5; |
|
|
|
|
} |
|
|
|
|
&.tc { |
|
|
|
|
text-align: center; |
|
|
|
|
} |
|
|
|
|
th { |
|
|
|
|
background-color: #f6f4ff; |
|
|
|
|
text-align: center; |
|
|
|
|
background-color: #f8faff; |
|
|
|
|
} |
|
|
|
|
.line { |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
margin-bottom: 10px; |
|
|
|
|
.el-input { |
|
|
|
|
margin-right: 15px; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</style> |