|
|
@ -1,27 +1,35 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div style="padding: 0 100px;"> |
|
|
|
<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"> |
|
|
|
<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> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</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"> |
|
|
|
<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> |
|
|
|
<tr> |
|
|
|
<th width="150">团队名称:</th> |
|
|
|
<th width="150">团队名称:</th> |
|
|
|
<td> |
|
|
|
<td> |
|
|
|
<el-input :disabled="!editing" v-model="info.team.teamName"></el-input> |
|
|
|
<el-input :disabled="!editing" |
|
|
|
|
|
|
|
v-model="info.team.teamName"></el-input> |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
<th width="150">团队邀请码:</th> |
|
|
|
<th width="150">团队邀请码:</th> |
|
|
|
<td> |
|
|
|
<td> |
|
|
|
<el-input :disabled="!editing" v-model="info.team.invitationCode"></el-input> |
|
|
|
<el-input :disabled="!editing" |
|
|
|
|
|
|
|
v-model="info.team.invitationCode"></el-input> |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
</table> |
|
|
|
<div v-if="form.completeCompetitionSetup.competitionType && status < 4" class="m-b-20 text-center"> |
|
|
|
<div v-if="form.completeCompetitionSetup.competitionType && status < 4" |
|
|
|
<el-button type="primary" @click="edit(1)">{{ editing ? '保存' : '编辑' }}</el-button> |
|
|
|
class="m-b-20 text-center"> |
|
|
|
|
|
|
|
<el-button type="primary" |
|
|
|
|
|
|
|
@click="edit(1)">{{ editing ? '保存' : '编辑' }}</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<table class="table"> |
|
|
|
<table class="table"> |
|
|
@ -48,7 +56,9 @@ |
|
|
|
<tr> |
|
|
|
<tr> |
|
|
|
<th>团队成员:</th> |
|
|
|
<th>团队成员:</th> |
|
|
|
<td> |
|
|
|
<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> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
</template> |
|
|
|
</template> |
|
|
@ -56,17 +66,40 @@ |
|
|
|
<tr> |
|
|
|
<tr> |
|
|
|
<th width="130">指导老师:</th> |
|
|
|
<th width="130">指导老师:</th> |
|
|
|
<td> |
|
|
|
<td> |
|
|
|
<div v-if="status < 5" class="plus"> |
|
|
|
<div v-if="status < 5" |
|
|
|
<i class="el-icon-circle-plus-outline icon" @click="addAdvisor"></i> |
|
|
|
class="plus"> |
|
|
|
|
|
|
|
<i class="el-icon-circle-plus-outline icon" |
|
|
|
|
|
|
|
@click="addAdvisor"></i> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-for="(item, i) in info.teamInstructors" :key="i" class="line"> |
|
|
|
<div v-for="(item, i) in info.teamInstructors" |
|
|
|
<el-input placeholder="请输入姓名" v-model="item.name" clearable size="mini" :disabled="!item.edit"></el-input> |
|
|
|
:key="i" |
|
|
|
<el-input placeholder="请输入职务" maxlength="10" v-model="item.position" clearable size="mini" :disabled="!item.edit"></el-input> |
|
|
|
class="line"> |
|
|
|
<el-input placeholder="请输入手机号" maxlength="11" v-model="item.phone" clearable size="mini" :disabled="!item.edit"></el-input> |
|
|
|
<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"> |
|
|
|
<template v-if="status < 5"> |
|
|
|
<i v-if="item.edit" class="el-icon-check icon" @click="submitAdvisor(item)"></i> |
|
|
|
<i v-if="item.edit" |
|
|
|
<i v-else class="el-icon-edit icon" @click="editAdvisor(item)"></i> |
|
|
|
class="el-icon-check icon" |
|
|
|
<i class="el-icon-delete icon" @click="delAdvisor(item, i)"></i> |
|
|
|
@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> |
|
|
|
</template> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</td> |
|
|
|
</td> |
|
|
@ -86,15 +119,15 @@ |
|
|
|
<th>竞赛成绩</th> |
|
|
|
<th>竞赛成绩</th> |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
<template v-if="info.stages.length"> |
|
|
|
<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>{{ i + 1 }}</td> |
|
|
|
<td>{{ item.stageName }}</td> |
|
|
|
<td>{{ item.stageName }}</td> |
|
|
|
<template v-if="form.completeCompetitionSetup.competitionType"> |
|
|
|
<template v-if="form.completeCompetitionSetup.competitionType"> |
|
|
|
<td>{{ item.teamNumLimit || '不限制' }}</td> |
|
|
|
<td>{{ item.teamNumLimit || '不限制' }}</td> |
|
|
|
<td> |
|
|
|
<td> |
|
|
|
<template v-if="item.participants"> |
|
|
|
<template v-if="item.participants"> |
|
|
|
<el-tag |
|
|
|
<el-tag v-for="tag in item.participants" |
|
|
|
v-for="tag in item.participants" |
|
|
|
|
|
|
|
:key="tag.name" |
|
|
|
:key="tag.name" |
|
|
|
class="m-r-5" |
|
|
|
class="m-r-5" |
|
|
|
closable |
|
|
|
closable |
|
|
@ -102,14 +135,20 @@ |
|
|
|
{{tag.name}} |
|
|
|
{{tag.name}} |
|
|
|
</el-tag> |
|
|
|
</el-tag> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<span v-else class="m-r-5">无</span> |
|
|
|
<span v-else |
|
|
|
<i class="el-icon-edit icon" @click="selectPar(item)"></i> |
|
|
|
class="m-r-5">无</span> |
|
|
|
|
|
|
|
<i class="el-icon-edit icon" |
|
|
|
|
|
|
|
@click="selectPar(item)"></i> |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
</template> |
|
|
|
</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> |
|
|
|
<td> |
|
|
|
<span v-if="item.score >= 0" class="m-r-10">分数{{item.score}}</span> |
|
|
|
<span v-if="item.score >= 0" |
|
|
|
<el-button type="text" :disabled="item.resultsDetails === 1 || (form.completeCompetitionSetup.competitionType && !item.reportId) || (form.completeCompetitionSetup.competitionType === 0 && !item.reportId)" @click="show(item)">查看成绩详情</el-button> |
|
|
|
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> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
</template> |
|
|
|
</template> |
|
|
@ -117,8 +156,7 @@ |
|
|
|
<td colspan="6">暂无数据</td> |
|
|
|
<td colspan="6">暂无数据</td> |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
</table> |
|
|
|
<el-alert |
|
|
|
<el-alert v-if="form.completeCompetitionSetup.competitionType" |
|
|
|
v-if="form.completeCompetitionSetup.competitionType" |
|
|
|
|
|
|
|
style="margin-top: 10px;" |
|
|
|
style="margin-top: 10px;" |
|
|
|
:title="'注:请团长(团队创建人)设置各阶段参赛成员,只有被选择的允许参赛成员可进入对应阶段比赛' + (info.teamLimit ? ',每个团队成员只能参加一个赛项阶段' : '') + '!'" |
|
|
|
:title="'注:请团长(团队创建人)设置各阶段参赛成员,只有被选择的允许参赛成员可进入对应阶段比赛' + (info.teamLimit ? ',每个团队成员只能参加一个赛项阶段' : '') + '!'" |
|
|
|
type="warning" |
|
|
|
type="warning" |
|
|
@ -132,43 +170,86 @@ |
|
|
|
<div class="l-title m-t-20">团队成员</div> |
|
|
|
<div class="l-title m-t-20">团队成员</div> |
|
|
|
<div class="flex-center"> |
|
|
|
<div class="flex-center"> |
|
|
|
<p>队长:{{ info.caption.userName }}</p> |
|
|
|
<p>队长:{{ info.caption.userName }}</p> |
|
|
|
<el-button type="primary" @click="transfer">转让队长</el-button> |
|
|
|
<el-button type="primary" |
|
|
|
|
|
|
|
@click="transfer">转让队长</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-table :data="info.teamDetail" stripe header-align="center"> |
|
|
|
<el-table :data="info.teamDetail" |
|
|
|
<el-table-column prop="userName" label="成员姓名" min-width="100" align="center"></el-table-column> |
|
|
|
stripe |
|
|
|
<el-table-column prop="schoolName" label="学校" min-width="100" align="center"></el-table-column> |
|
|
|
header-align="center"> |
|
|
|
<el-table-column prop="workNumber" label="学号" min-width="100" align="center"></el-table-column> |
|
|
|
<el-table-column prop="userName" |
|
|
|
<el-table-column prop="createTime" label="加入时间" width="180" align="center"></el-table-column> |
|
|
|
label="成员姓名" |
|
|
|
<el-table-column label="操作" align="center" width="160"> |
|
|
|
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"> |
|
|
|
<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> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-card> |
|
|
|
</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"> |
|
|
|
<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> |
|
|
|
</template> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<span slot="footer" |
|
|
|
<el-button size="small" type="primary" @click="transferSubmit">确定</el-button> |
|
|
|
class="dialog-footer"> |
|
|
|
<el-button size="small" @click="transferVisible = false">取消</el-button> |
|
|
|
<el-button size="small" |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
@click="transferSubmit">确定</el-button> |
|
|
|
|
|
|
|
<el-button size="small" |
|
|
|
|
|
|
|
@click="transferVisible = false">取消</el-button> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</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-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> |
|
|
|
</el-checkbox-group> |
|
|
|
<p v-if="info.teamLimit && curRow.teamNumLimit" style="margin-top: 15px;font-size: 12px;">注:当前阶段限制{{ curRow.teamNumLimit }}人参赛,且此竞赛每个成员只能参加一个阶段赛项。</p> |
|
|
|
<p v-if="info.teamLimit && curRow.teamNumLimit" |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
style="margin-top: 15px;font-size: 12px;">注:当前阶段限制{{ curRow.teamNumLimit }}人参赛,且此竞赛每个成员只能参加一个阶段赛项。</p> |
|
|
|
<el-button size="small" type="primary" @click="chooseSubmit">确定</el-button> |
|
|
|
<span slot="footer" |
|
|
|
<el-button size="small" @click="chooseVisible = false">取消</el-button> |
|
|
|
class="dialog-footer"> |
|
|
|
|
|
|
|
<el-button size="small" |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
@click="chooseSubmit">确定</el-button> |
|
|
|
|
|
|
|
<el-button size="small" |
|
|
|
|
|
|
|
@click="chooseVisible = false">取消</el-button> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
<el-dialog title="团队得分详情" :visible.sync="memberVisible" width="900px" :close-on-click-modal="false"> |
|
|
|
<el-dialog title="团队得分详情" |
|
|
|
<h6 v-if="members.length" style="margin-bottom: 10px;font-size: 16px;">团队名称:{{ members[0].teamName }} 阶段名称:{{ curRow.stageName }}</h6> |
|
|
|
: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"> |
|
|
|
<table class="table tc"> |
|
|
|
<tr> |
|
|
|
<tr> |
|
|
|
<th width="60">序号</th> |
|
|
|
<th width="60">序号</th> |
|
|
@ -179,14 +260,16 @@ |
|
|
|
<th width="100">得分详情</th> |
|
|
|
<th width="100">得分详情</th> |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
<template v-if="members.length"> |
|
|
|
<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>{{ i + 1 }}</td> |
|
|
|
<td>{{ item.userName }}</td> |
|
|
|
<td>{{ item.userName }}</td> |
|
|
|
<td>{{ item.schoolName }}</td> |
|
|
|
<td>{{ item.schoolName }}</td> |
|
|
|
<td>{{ item.timeSum }}min</td> |
|
|
|
<td>{{ item.timeSum }}min</td> |
|
|
|
<td>{{ item.score }}</td> |
|
|
|
<td>{{ item.score }}</td> |
|
|
|
<td> |
|
|
|
<td> |
|
|
|
<el-button type="text" @click="toReport(item)">查看</el-button> |
|
|
|
<el-button type="text" |
|
|
|
|
|
|
|
@click="toReport(item)">查看</el-button> |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
</template> |
|
|
|
</template> |
|
|
@ -194,8 +277,11 @@ |
|
|
|
<td colspan="6">暂无数据</td> |
|
|
|
<td colspan="6">暂无数据</td> |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
</table> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<span slot="footer" |
|
|
|
<el-button size="small" type="primary" @click="memberVisible = false">确定</el-button> |
|
|
|
class="dialog-footer"> |
|
|
|
|
|
|
|
<el-button size="small" |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
@click="memberVisible = false">确定</el-button> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -205,7 +291,7 @@ |
|
|
|
import Setting from "@/setting"; |
|
|
|
import Setting from "@/setting"; |
|
|
|
import util from "@/libs/util"; |
|
|
|
import util from "@/libs/util"; |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
return { |
|
|
|
id: +this.$route.query.id, |
|
|
|
id: +this.$route.query.id, |
|
|
|
accountId: +this.$route.query.accountId, |
|
|
|
accountId: +this.$route.query.accountId, |
|
|
@ -263,8 +349,8 @@ export default { |
|
|
|
timer: null |
|
|
|
timer: null |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
mounted () { |
|
|
|
this.$once('hook:beforeDestroy', function() { |
|
|
|
this.$once('hook:beforeDestroy', function () { |
|
|
|
clearInterval(this.timer) |
|
|
|
clearInterval(this.timer) |
|
|
|
this.timerList.forEach(n => { |
|
|
|
this.timerList.forEach(n => { |
|
|
|
clearTimeout(n) |
|
|
|
clearTimeout(n) |
|
|
@ -274,15 +360,15 @@ export default { |
|
|
|
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.getInfo() |
|
|
|
this.getInfo() |
|
|
|
}).catch(err => {}) |
|
|
|
}).catch(err => { }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 获取竞赛信息 |
|
|
|
// 获取竞赛信息 |
|
|
|
getInfo() { |
|
|
|
getInfo () { |
|
|
|
this.$post(`${this.api.entryInformation}?competitionId=${this.id}&accountId=${this.accountId}`).then(res => { |
|
|
|
this.$post(`${this.api.entryInformation}?competitionId=${this.id}&accountId=${this.accountId}`).then(res => { |
|
|
|
const info = res.entryInformation |
|
|
|
const info = res.entryInformation |
|
|
|
// 如果是队长,并且没有指导老师,默认添加一个空的 |
|
|
|
// 如果是队长,并且没有指导老师,默认添加一个空的 |
|
|
@ -326,10 +412,10 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.info = info |
|
|
|
this.info = info |
|
|
|
}).catch(err => {}); |
|
|
|
}).catch(err => { }); |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 报名时间、比赛时间、状态处理 |
|
|
|
// 报名时间、比赛时间、状态处理 |
|
|
|
handleStatus() { |
|
|
|
handleStatus () { |
|
|
|
let status |
|
|
|
let status |
|
|
|
const n = this.form |
|
|
|
const n = this.form |
|
|
|
let now = new Date().getTime(); |
|
|
|
let now = new Date().getTime(); |
|
|
@ -351,7 +437,7 @@ export default { |
|
|
|
this.status = status |
|
|
|
this.status = status |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 编辑保存 |
|
|
|
// 编辑保存 |
|
|
|
edit(showMsg) { |
|
|
|
edit (showMsg) { |
|
|
|
if (this.editing || !showMsg) { |
|
|
|
if (this.editing || !showMsg) { |
|
|
|
const { teamId, teamName, invitationCode } = this.info.team |
|
|
|
const { teamId, teamName, invitationCode } = this.info.team |
|
|
|
this.$post(this.api.editCompetitionTeam, { |
|
|
|
this.$post(this.api.editCompetitionTeam, { |
|
|
@ -366,13 +452,13 @@ export default { |
|
|
|
this.editing = false |
|
|
|
this.editing = false |
|
|
|
this.getInfo() |
|
|
|
this.getInfo() |
|
|
|
showMsg && util.successMsg('保存成功') |
|
|
|
showMsg && util.successMsg('保存成功') |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => { }) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.editing = !this.editing |
|
|
|
this.editing = !this.editing |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 删除指导老师 |
|
|
|
// 删除指导老师 |
|
|
|
delAdvisor(row, i) { |
|
|
|
delAdvisor (row, i) { |
|
|
|
if (row.id) { |
|
|
|
if (row.id) { |
|
|
|
this.$confirm('确定要删除吗?', '提示', { |
|
|
|
this.$confirm('确定要删除吗?', '提示', { |
|
|
|
type: 'warning' |
|
|
|
type: 'warning' |
|
|
@ -380,23 +466,23 @@ export default { |
|
|
|
this.$post(`${this.api.deleteAnAdvisor}?id=${row.id}`).then(res => { |
|
|
|
this.$post(`${this.api.deleteAnAdvisor}?id=${row.id}`).then(res => { |
|
|
|
util.successMsg('删除成功') |
|
|
|
util.successMsg('删除成功') |
|
|
|
this.getInfo() |
|
|
|
this.getInfo() |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => { }) |
|
|
|
}).catch(() => {}) |
|
|
|
}).catch(() => { }) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.info.teamInstructors.splice(i, 1) |
|
|
|
this.info.teamInstructors.splice(i, 1) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 添加指导老师 |
|
|
|
// 添加指导老师 |
|
|
|
addAdvisor() { |
|
|
|
addAdvisor () { |
|
|
|
if (this.info.teamInstructors.length > 4) return util.errorMsg('指导老师仅限添加5个!') |
|
|
|
if (this.info.teamInstructors.length > 4) return util.errorMsg('指导老师仅限添加5个!') |
|
|
|
this.info.teamInstructors.push(JSON.parse(JSON.stringify(this.originIns))) |
|
|
|
this.info.teamInstructors.push(JSON.parse(JSON.stringify(this.originIns))) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 编辑导老师 |
|
|
|
// 编辑导老师 |
|
|
|
editAdvisor(row) { |
|
|
|
editAdvisor (row) { |
|
|
|
this.$set(row, 'edit', 1) |
|
|
|
this.$set(row, 'edit', 1) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 提交指导老师 |
|
|
|
// 提交指导老师 |
|
|
|
submitAdvisor(row) { |
|
|
|
submitAdvisor (row) { |
|
|
|
if (!row.name) return util.errorMsg('请输入姓名') |
|
|
|
if (!row.name) return util.errorMsg('请输入姓名') |
|
|
|
const { phone } = row |
|
|
|
const { phone } = row |
|
|
|
if (phone && !/^1[3456789]\d{9}$/.test(phone)) return util.errorMsg('请输入正确手机号格式') |
|
|
|
if (phone && !/^1[3456789]\d{9}$/.test(phone)) return util.errorMsg('请输入正确手机号格式') |
|
|
@ -410,10 +496,10 @@ export default { |
|
|
|
}).then(res => { |
|
|
|
}).then(res => { |
|
|
|
util.successMsg((row.id ? '修改' : '新增') + '成功') |
|
|
|
util.successMsg((row.id ? '修改' : '新增') + '成功') |
|
|
|
this.getInfo() |
|
|
|
this.getInfo() |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => { }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 显示转让队长 |
|
|
|
// 显示转让队长 |
|
|
|
transfer() { |
|
|
|
transfer () { |
|
|
|
// 取每个阶段的开始结束时间,有任何阶段开始了都不能转让队长和踢出队员 |
|
|
|
// 取每个阶段的开始结束时间,有任何阶段开始了都不能转让队长和踢出队员 |
|
|
|
const now = new Date() |
|
|
|
const now = new Date() |
|
|
|
let start = 0 |
|
|
|
let start = 0 |
|
|
@ -427,7 +513,7 @@ export default { |
|
|
|
if (!start) this.transferVisible = true |
|
|
|
if (!start) this.transferVisible = true |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 转让队长提交 |
|
|
|
// 转让队长提交 |
|
|
|
transferSubmit() { |
|
|
|
transferSubmit () { |
|
|
|
if (!this.checkedPlayer) return util.errorMsg('请选择成员') |
|
|
|
if (!this.checkedPlayer) return util.errorMsg('请选择成员') |
|
|
|
this.$post(this.api.captainOfTransfer, { |
|
|
|
this.$post(this.api.captainOfTransfer, { |
|
|
|
captainId: this.info.caption.teamId, |
|
|
|
captainId: this.info.caption.teamId, |
|
|
@ -437,20 +523,20 @@ export default { |
|
|
|
util.successMsg('转让成功') |
|
|
|
util.successMsg('转让成功') |
|
|
|
this.transferVisible = false |
|
|
|
this.transferVisible = false |
|
|
|
this.getInfo() |
|
|
|
this.getInfo() |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => { }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 踢出团队 |
|
|
|
// 踢出团队 |
|
|
|
removeLine(row) { |
|
|
|
removeLine (row) { |
|
|
|
// 取每个阶段的开始结束时间,有任何阶段开始了都不能转让队长和踢出队员 |
|
|
|
// 取每个阶段的开始结束时间,有任何阶段开始了都不能转让队长和踢出队员 |
|
|
|
const now = new Date() |
|
|
|
const now = new Date() |
|
|
|
let start = 0 |
|
|
|
let start = 0 |
|
|
|
for (const e of this.form.competitionStage) { |
|
|
|
// for (const e of this.form.competitionStage) { |
|
|
|
if (now >= new Date(e.startTime) && now <= new Date(e.endTime)) { |
|
|
|
// if (now >= new Date(e.startTime) && now <= new Date(e.endTime)) { |
|
|
|
util.errorMsg('比赛已经开始,无法踢出成员!') |
|
|
|
// util.errorMsg('比赛已经开始,无法踢出成员!') |
|
|
|
start = 1 |
|
|
|
// start = 1 |
|
|
|
break |
|
|
|
// break |
|
|
|
} |
|
|
|
// } |
|
|
|
} |
|
|
|
// } |
|
|
|
if (!start) { |
|
|
|
if (!start) { |
|
|
|
let include |
|
|
|
let include |
|
|
|
for (const e of this.info.stages) { |
|
|
|
for (const e of this.info.stages) { |
|
|
@ -468,12 +554,12 @@ export default { |
|
|
|
this.$post(`${this.api.removeTheLine}?teamId=${this.info.teamId}&competitionId=${this.id}&accountId=${row.accountId}`).then(res => { |
|
|
|
this.$post(`${this.api.removeTheLine}?teamId=${this.info.teamId}&competitionId=${this.id}&accountId=${row.accountId}`).then(res => { |
|
|
|
util.successMsg('移除成功') |
|
|
|
util.successMsg('移除成功') |
|
|
|
this.getInfo() |
|
|
|
this.getInfo() |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => { }) |
|
|
|
}).catch(() => {}) |
|
|
|
}).catch(() => { }) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 移除参赛人员 |
|
|
|
// 移除参赛人员 |
|
|
|
removePar(e, stage) { |
|
|
|
removePar (e, stage) { |
|
|
|
this.$confirm('确定要移除该成员吗?', '提示', { |
|
|
|
this.$confirm('确定要移除该成员吗?', '提示', { |
|
|
|
type: 'warning' |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
}).then(() => { |
|
|
@ -485,11 +571,11 @@ export default { |
|
|
|
}).then(res => { |
|
|
|
}).then(res => { |
|
|
|
util.successMsg('移除成功') |
|
|
|
util.successMsg('移除成功') |
|
|
|
this.getInfo() |
|
|
|
this.getInfo() |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => { }) |
|
|
|
}).catch(() => {}) |
|
|
|
}).catch(() => { }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 选择参赛人员 |
|
|
|
// 选择参赛人员 |
|
|
|
selectPar(row) { |
|
|
|
selectPar (row) { |
|
|
|
const item = this.form.competitionStage.find(e => e.stageId == row.stageId) |
|
|
|
const item = this.form.competitionStage.find(e => e.stageId == row.stageId) |
|
|
|
if (item) { |
|
|
|
if (item) { |
|
|
|
// 该阶段已经开始比赛则不能修改 |
|
|
|
// 该阶段已经开始比赛则不能修改 |
|
|
@ -522,7 +608,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 选择参赛人员提交 |
|
|
|
// 选择参赛人员提交 |
|
|
|
chooseSubmit() { |
|
|
|
chooseSubmit () { |
|
|
|
const accountIds = this.checkedMembers |
|
|
|
const accountIds = this.checkedMembers |
|
|
|
if (!accountIds.length) return util.errorMsg('请选择参赛成员!') |
|
|
|
if (!accountIds.length) return util.errorMsg('请选择参赛成员!') |
|
|
|
const limit = this.curRow.teamNumLimit // 参赛人数限制 |
|
|
|
const limit = this.curRow.teamNumLimit // 参赛人数限制 |
|
|
@ -537,10 +623,10 @@ export default { |
|
|
|
util.successMsg('修改成功') |
|
|
|
util.successMsg('修改成功') |
|
|
|
this.getInfo() |
|
|
|
this.getInfo() |
|
|
|
this.chooseVisible = false |
|
|
|
this.chooseVisible = false |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => { }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 查看成绩详情 |
|
|
|
// 查看成绩详情 |
|
|
|
show(row) { |
|
|
|
show (row) { |
|
|
|
// 团队展示弹框,个人跳转实验报告 |
|
|
|
// 团队展示弹框,个人跳转实验报告 |
|
|
|
if (this.form.completeCompetitionSetup.competitionType) { // 团队比赛并且是队长,则展示团队成员成绩详情 |
|
|
|
if (this.form.completeCompetitionSetup.competitionType) { // 团队比赛并且是队长,则展示团队成员成绩详情 |
|
|
|
this.curRow = row |
|
|
|
this.curRow = row |
|
|
@ -555,7 +641,7 @@ export default { |
|
|
|
teamId |
|
|
|
teamId |
|
|
|
}).then(({ list }) => { |
|
|
|
}).then(({ list }) => { |
|
|
|
this.members = list |
|
|
|
this.members = list |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => { }) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.members = [] |
|
|
|
this.members = [] |
|
|
|
} |
|
|
|
} |
|
|
@ -564,7 +650,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 跳转实验报告 |
|
|
|
// 跳转实验报告 |
|
|
|
toReport(row) { |
|
|
|
toReport (row) { |
|
|
|
this.$router.push(`/matchReport?reportId=${row.reportId}`) |
|
|
|
this.$router.push(`/matchReport?reportId=${row.reportId}`) |
|
|
|
}, |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
@ -582,7 +668,8 @@ export default { |
|
|
|
.table { |
|
|
|
.table { |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
border-collapse: collapse; |
|
|
|
border-collapse: collapse; |
|
|
|
th, td { |
|
|
|
th, |
|
|
|
|
|
|
|
td { |
|
|
|
padding: 12px; |
|
|
|
padding: 12px; |
|
|
|
border: 1px solid #ebeef5; |
|
|
|
border: 1px solid #ebeef5; |
|
|
|
} |
|
|
|
} |
|
|
@ -599,7 +686,7 @@ export default { |
|
|
|
color: #7a7a7a; |
|
|
|
color: #7a7a7a; |
|
|
|
cursor: pointer; |
|
|
|
cursor: pointer; |
|
|
|
&:hover { |
|
|
|
&:hover { |
|
|
|
color: #007EFF; |
|
|
|
color: #007eff; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.plus { |
|
|
|
.plus { |
|
|
|