|
|
|
@ -1,27 +1,35 @@ |
|
|
|
|
<template> |
|
|
|
|
<div style="padding: 0 100px;"> |
|
|
|
|
<el-card shadow="hover" class="m-b-20 head-card"> |
|
|
|
|
<el-card shadow="hover" |
|
|
|
|
class="m-b-20 head-card"> |
|
|
|
|
<div class="flex-between"> |
|
|
|
|
<el-page-header @back="$router.back()" content="参赛信息与成绩"></el-page-header> |
|
|
|
|
<el-page-header @back="$router.back()" |
|
|
|
|
content="参赛信息与成绩"></el-page-header> |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" class="m-b-20"> |
|
|
|
|
<el-card shadow="hover" |
|
|
|
|
class="m-b-20"> |
|
|
|
|
<div style="display: flex;align-items: center"> |
|
|
|
|
<table v-if="form.completeCompetitionSetup.competitionType" class="table m-b-20 m-r-10"> |
|
|
|
|
<table v-if="form.completeCompetitionSetup.competitionType" |
|
|
|
|
class="table m-b-20 m-r-10"> |
|
|
|
|
<tr> |
|
|
|
|
<th width="150">团队名称:</th> |
|
|
|
|
<td> |
|
|
|
|
<el-input :disabled="!editing" v-model="info.team.teamName"></el-input> |
|
|
|
|
<el-input :disabled="!editing" |
|
|
|
|
v-model="info.team.teamName"></el-input> |
|
|
|
|
</td> |
|
|
|
|
<th width="150">团队邀请码:</th> |
|
|
|
|
<td> |
|
|
|
|
<el-input :disabled="!editing" v-model="info.team.invitationCode"></el-input> |
|
|
|
|
<el-input :disabled="!editing" |
|
|
|
|
v-model="info.team.invitationCode"></el-input> |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
</table> |
|
|
|
|
<div v-if="form.completeCompetitionSetup.competitionType && status < 4" class="m-b-20 text-center"> |
|
|
|
|
<el-button type="primary" @click="edit(1)">{{ editing ? '保存' : '编辑' }}</el-button> |
|
|
|
|
<div v-if="form.completeCompetitionSetup.competitionType && status < 4" |
|
|
|
|
class="m-b-20 text-center"> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
@click="edit(1)">{{ editing ? '保存' : '编辑' }}</el-button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<table class="table"> |
|
|
|
@ -48,7 +56,9 @@ |
|
|
|
|
<tr> |
|
|
|
|
<th>团队成员:</th> |
|
|
|
|
<td> |
|
|
|
|
<el-tag v-for="(item, i) in info.teamDetail" :key="i" style="margin-right: 5px">{{ item.userName }}</el-tag> |
|
|
|
|
<el-tag v-for="(item, i) in info.teamDetail" |
|
|
|
|
:key="i" |
|
|
|
|
style="margin-right: 5px">{{ item.userName }}</el-tag> |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
</template> |
|
|
|
@ -56,17 +66,40 @@ |
|
|
|
|
<tr> |
|
|
|
|
<th width="130">指导老师:</th> |
|
|
|
|
<td> |
|
|
|
|
<div v-if="status < 5" class="plus"> |
|
|
|
|
<i class="el-icon-circle-plus-outline icon" @click="addAdvisor"></i> |
|
|
|
|
<div v-if="status < 5" |
|
|
|
|
class="plus"> |
|
|
|
|
<i class="el-icon-circle-plus-outline icon" |
|
|
|
|
@click="addAdvisor"></i> |
|
|
|
|
</div> |
|
|
|
|
<div v-for="(item, i) in info.teamInstructors" :key="i" class="line"> |
|
|
|
|
<el-input placeholder="请输入姓名" v-model="item.name" clearable size="mini" :disabled="!item.edit"></el-input> |
|
|
|
|
<el-input placeholder="请输入职务" maxlength="10" v-model="item.position" clearable size="mini" :disabled="!item.edit"></el-input> |
|
|
|
|
<el-input placeholder="请输入手机号" maxlength="11" v-model="item.phone" clearable size="mini" :disabled="!item.edit"></el-input> |
|
|
|
|
<div v-for="(item, i) in info.teamInstructors" |
|
|
|
|
:key="i" |
|
|
|
|
class="line"> |
|
|
|
|
<el-input placeholder="请输入姓名" |
|
|
|
|
v-model="item.name" |
|
|
|
|
clearable |
|
|
|
|
size="mini" |
|
|
|
|
:disabled="!item.edit"></el-input> |
|
|
|
|
<el-input placeholder="请输入职务" |
|
|
|
|
maxlength="10" |
|
|
|
|
v-model="item.position" |
|
|
|
|
clearable |
|
|
|
|
size="mini" |
|
|
|
|
:disabled="!item.edit"></el-input> |
|
|
|
|
<el-input placeholder="请输入手机号" |
|
|
|
|
maxlength="11" |
|
|
|
|
v-model="item.phone" |
|
|
|
|
clearable |
|
|
|
|
size="mini" |
|
|
|
|
:disabled="!item.edit"></el-input> |
|
|
|
|
<template v-if="status < 5"> |
|
|
|
|
<i v-if="item.edit" class="el-icon-check icon" @click="submitAdvisor(item)"></i> |
|
|
|
|
<i v-else class="el-icon-edit icon" @click="editAdvisor(item)"></i> |
|
|
|
|
<i class="el-icon-delete icon" @click="delAdvisor(item, i)"></i> |
|
|
|
|
<i v-if="item.edit" |
|
|
|
|
class="el-icon-check icon" |
|
|
|
|
@click="submitAdvisor(item)"></i> |
|
|
|
|
<i v-else |
|
|
|
|
class="el-icon-edit icon" |
|
|
|
|
@click="editAdvisor(item)"></i> |
|
|
|
|
<i class="el-icon-delete icon" |
|
|
|
|
@click="delAdvisor(item, i)"></i> |
|
|
|
|
</template> |
|
|
|
|
</div> |
|
|
|
|
</td> |
|
|
|
@ -86,15 +119,15 @@ |
|
|
|
|
<th>竞赛成绩</th> |
|
|
|
|
</tr> |
|
|
|
|
<template v-if="info.stages.length"> |
|
|
|
|
<tr v-for="(item, i) in info.stages" :key="i"> |
|
|
|
|
<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> |
|
|
|
|
<template v-if="item.participants"> |
|
|
|
|
<el-tag |
|
|
|
|
v-for="tag in item.participants" |
|
|
|
|
<el-tag v-for="tag in item.participants" |
|
|
|
|
:key="tag.name" |
|
|
|
|
class="m-r-5" |
|
|
|
|
closable |
|
|
|
@ -102,14 +135,20 @@ |
|
|
|
|
{{tag.name}} |
|
|
|
|
</el-tag> |
|
|
|
|
</template> |
|
|
|
|
<span v-else class="m-r-5">无</span> |
|
|
|
|
<i class="el-icon-edit icon" @click="selectPar(item)"></i> |
|
|
|
|
<span v-else |
|
|
|
|
class="m-r-5">无</span> |
|
|
|
|
<i class="el-icon-edit icon" |
|
|
|
|
@click="selectPar(item)"></i> |
|
|
|
|
</td> |
|
|
|
|
</template> |
|
|
|
|
<td v-if="form.rule === 0 && !i" :rowspan="info.stages.length">{{ info.totalScore }}</td> |
|
|
|
|
<td v-if="form.rule === 0 && !i" |
|
|
|
|
:rowspan="info.stages.length">{{ info.totalScore }}</td> |
|
|
|
|
<td> |
|
|
|
|
<span v-if="item.score >= 0" 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> |
|
|
|
|
<span v-if="item.score >= 0" |
|
|
|
|
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> |
|
|
|
@ -117,8 +156,7 @@ |
|
|
|
|
<td colspan="6">暂无数据</td> |
|
|
|
|
</tr> |
|
|
|
|
</table> |
|
|
|
|
<el-alert |
|
|
|
|
v-if="form.completeCompetitionSetup.competitionType" |
|
|
|
|
<el-alert v-if="form.completeCompetitionSetup.competitionType" |
|
|
|
|
style="margin-top: 10px;" |
|
|
|
|
:title="'注:请团长(团队创建人)设置各阶段参赛成员,只有被选择的允许参赛成员可进入对应阶段比赛' + (info.teamLimit ? ',每个团队成员只能参加一个赛项阶段' : '') + '!'" |
|
|
|
|
type="warning" |
|
|
|
@ -132,43 +170,86 @@ |
|
|
|
|
<div class="l-title m-t-20">团队成员</div> |
|
|
|
|
<div class="flex-center"> |
|
|
|
|
<p>队长:{{ info.caption.userName }}</p> |
|
|
|
|
<el-button type="primary" @click="transfer">转让队长</el-button> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
@click="transfer">转让队长</el-button> |
|
|
|
|
</div> |
|
|
|
|
<el-table :data="info.teamDetail" stripe header-align="center"> |
|
|
|
|
<el-table-column prop="userName" label="成员姓名" min-width="100" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="schoolName" label="学校" min-width="100" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="workNumber" label="学号" min-width="100" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="createTime" label="加入时间" width="180" align="center"></el-table-column> |
|
|
|
|
<el-table-column label="操作" align="center" width="160"> |
|
|
|
|
<el-table :data="info.teamDetail" |
|
|
|
|
stripe |
|
|
|
|
header-align="center"> |
|
|
|
|
<el-table-column prop="userName" |
|
|
|
|
label="成员姓名" |
|
|
|
|
min-width="100" |
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="schoolName" |
|
|
|
|
label="学校" |
|
|
|
|
min-width="100" |
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="workNumber" |
|
|
|
|
label="学号" |
|
|
|
|
min-width="100" |
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="createTime" |
|
|
|
|
label="加入时间" |
|
|
|
|
width="180" |
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
<el-table-column label="操作" |
|
|
|
|
align="center" |
|
|
|
|
width="160"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-button v-if="scope.row.captain" type="text" @click="removeLine(scope.row)">踢出团队</el-button> |
|
|
|
|
<el-button v-if="scope.row.captain" |
|
|
|
|
type="text" |
|
|
|
|
@click="removeLine(scope.row)">踢出团队</el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
</template> |
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
<el-dialog title="选择参赛成员" :visible.sync="transferVisible" :close-on-click-modal="false" width="400px"> |
|
|
|
|
<el-dialog title="选择参赛成员" |
|
|
|
|
:visible.sync="transferVisible" |
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
width="400px"> |
|
|
|
|
<template v-for="(item, i) in info.teamDetail"> |
|
|
|
|
<el-radio v-if="item.captain" :key="i" v-model="checkedPlayer" :label="item.teamId">{{ item.userName }}</el-radio> |
|
|
|
|
<el-radio v-if="item.captain" |
|
|
|
|
:key="i" |
|
|
|
|
v-model="checkedPlayer" |
|
|
|
|
:label="item.teamId">{{ item.userName }}</el-radio> |
|
|
|
|
</template> |
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button size="small" type="primary" @click="transferSubmit">确定</el-button> |
|
|
|
|
<el-button size="small" @click="transferVisible = false">取消</el-button> |
|
|
|
|
<span slot="footer" |
|
|
|
|
class="dialog-footer"> |
|
|
|
|
<el-button size="small" |
|
|
|
|
type="primary" |
|
|
|
|
@click="transferSubmit">确定</el-button> |
|
|
|
|
<el-button size="small" |
|
|
|
|
@click="transferVisible = false">取消</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
<el-dialog title="选择参赛成员" :visible.sync="chooseVisible" :close-on-click-modal="false" width="400px"> |
|
|
|
|
<el-dialog title="选择参赛成员" |
|
|
|
|
:visible.sync="chooseVisible" |
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
width="400px"> |
|
|
|
|
<el-checkbox-group v-model="checkedMembers"> |
|
|
|
|
<el-checkbox v-for="(item, i) in chooses" :key="i" :label="item.accountId">{{ item.userName }}</el-checkbox> |
|
|
|
|
<el-checkbox v-for="(item, i) in chooses" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.accountId">{{ item.userName }}</el-checkbox> |
|
|
|
|
</el-checkbox-group> |
|
|
|
|
<p v-if="info.teamLimit && curRow.teamNumLimit" style="margin-top: 15px;font-size: 12px;">注:当前阶段限制{{ curRow.teamNumLimit }}人参赛,且此竞赛每个成员只能参加一个阶段赛项。</p> |
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button size="small" type="primary" @click="chooseSubmit">确定</el-button> |
|
|
|
|
<el-button size="small" @click="chooseVisible = false">取消</el-button> |
|
|
|
|
<p v-if="info.teamLimit && curRow.teamNumLimit" |
|
|
|
|
style="margin-top: 15px;font-size: 12px;">注:当前阶段限制{{ curRow.teamNumLimit }}人参赛,且此竞赛每个成员只能参加一个阶段赛项。</p> |
|
|
|
|
<span slot="footer" |
|
|
|
|
class="dialog-footer"> |
|
|
|
|
<el-button size="small" |
|
|
|
|
type="primary" |
|
|
|
|
@click="chooseSubmit">确定</el-button> |
|
|
|
|
<el-button size="small" |
|
|
|
|
@click="chooseVisible = false">取消</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
<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> |
|
|
|
|
<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> |
|
|
|
@ -179,14 +260,16 @@ |
|
|
|
|
<th width="100">得分详情</th> |
|
|
|
|
</tr> |
|
|
|
|
<template v-if="members.length"> |
|
|
|
|
<tr v-for="(item, i) in members" :key="i"> |
|
|
|
|
<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> |
|
|
|
|
<el-button type="text" |
|
|
|
|
@click="toReport(item)">查看</el-button> |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
</template> |
|
|
|
@ -194,8 +277,11 @@ |
|
|
|
|
<td colspan="6">暂无数据</td> |
|
|
|
|
</tr> |
|
|
|
|
</table> |
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button size="small" type="primary" @click="memberVisible = false">确定</el-button> |
|
|
|
|
<span slot="footer" |
|
|
|
|
class="dialog-footer"> |
|
|
|
|
<el-button size="small" |
|
|
|
|
type="primary" |
|
|
|
|
@click="memberVisible = false">确定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
</div> |
|
|
|
@ -444,13 +530,13 @@ export default { |
|
|
|
|
// 取每个阶段的开始结束时间,有任何阶段开始了都不能转让队长和踢出队员 |
|
|
|
|
const now = new Date() |
|
|
|
|
let start = 0 |
|
|
|
|
for (const e of this.form.competitionStage) { |
|
|
|
|
if (now >= new Date(e.startTime) && now <= new Date(e.endTime)) { |
|
|
|
|
util.errorMsg('比赛已经开始,无法踢出成员!') |
|
|
|
|
start = 1 |
|
|
|
|
break |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// for (const e of this.form.competitionStage) { |
|
|
|
|
// if (now >= new Date(e.startTime) && now <= new Date(e.endTime)) { |
|
|
|
|
// util.errorMsg('比赛已经开始,无法踢出成员!') |
|
|
|
|
// start = 1 |
|
|
|
|
// break |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
if (!start) { |
|
|
|
|
let include |
|
|
|
|
for (const e of this.info.stages) { |
|
|
|
@ -582,7 +668,8 @@ export default { |
|
|
|
|
.table { |
|
|
|
|
width: 100%; |
|
|
|
|
border-collapse: collapse; |
|
|
|
|
th, td { |
|
|
|
|
th, |
|
|
|
|
td { |
|
|
|
|
padding: 12px; |
|
|
|
|
border: 1px solid #ebeef5; |
|
|
|
|
} |
|
|
|
@ -599,7 +686,7 @@ export default { |
|
|
|
|
color: #7a7a7a; |
|
|
|
|
cursor: pointer; |
|
|
|
|
&:hover { |
|
|
|
|
color: #007EFF; |
|
|
|
|
color: #007eff; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.plus { |
|
|
|
|