|
|
|
@ -146,7 +146,7 @@ |
|
|
|
|
<td> |
|
|
|
|
<span v-if="item.score >= 0" |
|
|
|
|
class="m-r-10">分数{{item.score}}</span> |
|
|
|
|
<el-button v-if="form.completeCompetitionSetup.competitionType || (!form.completeCompetitionSetup.competitionType && item.resultsDetails === 0 && item.reportId)" |
|
|
|
|
<el-button v-if="form.completeCompetitionSetup.competitionType || (!form.completeCompetitionSetup.competitionType && item.reportId)" |
|
|
|
|
type="text" |
|
|
|
|
@click="show(item)">查看成绩详情</el-button> |
|
|
|
|
</td> |
|
|
|
@ -268,7 +268,7 @@ |
|
|
|
|
<td>{{ item.timeSum }}min</td> |
|
|
|
|
<td>{{ item.score }}</td> |
|
|
|
|
<td> |
|
|
|
|
<el-button v-if="curRow.resultsDetails === 0 && item.reportId" |
|
|
|
|
<el-button :disabled="!item.reportId" |
|
|
|
|
type="text" |
|
|
|
|
@click="toReport(item)">查看</el-button> |
|
|
|
|
</td> |
|
|
|
@ -278,6 +278,16 @@ |
|
|
|
|
<td colspan="6">暂无数据</td> |
|
|
|
|
</tr> |
|
|
|
|
</table> |
|
|
|
|
<div class="pagination"> |
|
|
|
|
<el-pagination background |
|
|
|
|
layout="total, prev, pager, next" |
|
|
|
|
:total="total" |
|
|
|
|
@current-change="handleCurrentChange" |
|
|
|
|
:current-page="page" |
|
|
|
|
:page-size="pageSize"> |
|
|
|
|
</el-pagination> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<span slot="footer" |
|
|
|
|
class="dialog-footer"> |
|
|
|
|
<el-button size="small" |
|
|
|
@ -289,7 +299,6 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import Setting from "@/setting"; |
|
|
|
|
import Util from "@/libs/util"; |
|
|
|
|
export default { |
|
|
|
|
data () { |
|
|
|
@ -316,6 +325,9 @@ export default { |
|
|
|
|
}, |
|
|
|
|
memberVisible: false, |
|
|
|
|
members: [], |
|
|
|
|
page: 1, |
|
|
|
|
pageSize: 10, |
|
|
|
|
total: 0, |
|
|
|
|
curRow: {}, |
|
|
|
|
teamVisible: false, |
|
|
|
|
teams: [], |
|
|
|
@ -347,17 +359,12 @@ export default { |
|
|
|
|
checkedMember: '', |
|
|
|
|
checkedMembers: [], |
|
|
|
|
chooses: [], |
|
|
|
|
timerList: [], |
|
|
|
|
timer: null |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
mounted () { |
|
|
|
|
this.$once('hook:beforeDestroy', function () { |
|
|
|
|
clearInterval(this.timer) |
|
|
|
|
this.timerList.forEach(n => { |
|
|
|
|
clearTimeout(n) |
|
|
|
|
}) |
|
|
|
|
this.timerList = [] |
|
|
|
|
}) |
|
|
|
|
this.getData() |
|
|
|
|
}, |
|
|
|
@ -400,19 +407,6 @@ export default { |
|
|
|
|
e.participants = participants |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
// 设置定时器,阶段比赛结束后公布成绩,到时间后调本接口 |
|
|
|
|
const now = Date.now() |
|
|
|
|
this.form.competitionStage.map(e => { |
|
|
|
|
// 如果公布成绩详情勾选的是 |
|
|
|
|
if (!e.resultsDetails) { |
|
|
|
|
const endTime = new Date(e.endTime).getTime() + e.resultAnnouncementTime * 3600000 // 阶段结束时间+成绩公布时间(成绩公布时间单位是小时,所以要转化为毫秒) |
|
|
|
|
if (now > endTime) { // 如果到了公布时间 |
|
|
|
|
info.stages.find(n => n.stageId == e.stageId).showDetail = 1 |
|
|
|
|
} else if (endTime - now < 86400000) { // 没有到公布时间,则加定时器,到点后调用 |
|
|
|
|
this.timerList.push(setTimeout(this.getInfo, endTime - now)) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
this.info = info |
|
|
|
|
}).catch(err => { }); |
|
|
|
|
}, |
|
|
|
@ -619,23 +613,27 @@ export default { |
|
|
|
|
this.chooseVisible = false |
|
|
|
|
}).catch(res => { }) |
|
|
|
|
}, |
|
|
|
|
async getMembers () { |
|
|
|
|
try { |
|
|
|
|
const { page } = await this.$post(this.api.stageTeamScoreDetails, { |
|
|
|
|
pageNum: this.page, |
|
|
|
|
pageSize: this.pageSize, |
|
|
|
|
competitionId: this.id, |
|
|
|
|
stageId: this.curRow.stageId, |
|
|
|
|
teamId: this.info.teamId |
|
|
|
|
}) |
|
|
|
|
this.members = page.records |
|
|
|
|
this.total = page.total |
|
|
|
|
} catch (e) { } |
|
|
|
|
}, |
|
|
|
|
// 查看成绩详情 |
|
|
|
|
show (row) { |
|
|
|
|
// 团队展示弹框,个人跳转实验报告 |
|
|
|
|
if (this.form.completeCompetitionSetup.competitionType) { // 团队比赛并且是队长,则展示团队成员成绩详情 |
|
|
|
|
this.curRow = row |
|
|
|
|
this.memberVisible = true |
|
|
|
|
const teamId = this.info.teamId |
|
|
|
|
if (teamId) { |
|
|
|
|
this.$post(this.api.frontOfficeCompetitionRanking, { |
|
|
|
|
pageNum: 1, |
|
|
|
|
pageSize: 1000, |
|
|
|
|
competitionId: this.id, |
|
|
|
|
isOverallRanking: 0, |
|
|
|
|
teamId |
|
|
|
|
}).then(({ list }) => { |
|
|
|
|
this.members = list |
|
|
|
|
}).catch(res => { }) |
|
|
|
|
if (this.info.teamId) { |
|
|
|
|
this.getMembers() |
|
|
|
|
} else { |
|
|
|
|
this.members = [] |
|
|
|
|
} |
|
|
|
@ -643,6 +641,10 @@ export default { |
|
|
|
|
this.toReport(row) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
handleCurrentChange (val) { |
|
|
|
|
this.page = val; |
|
|
|
|
this.getMembers() |
|
|
|
|
}, |
|
|
|
|
// 跳转实验报告 |
|
|
|
|
toReport (row) { |
|
|
|
|
this.$router.push(`/match/report?reportId=${row.reportId}`) |
|
|
|
|