|
|
|
@ -17,12 +17,23 @@ |
|
|
|
|
:class="{active: index == active}" |
|
|
|
|
@click="tabChange(index)">{{ item }}</a> |
|
|
|
|
</div> |
|
|
|
|
<MatchDetail v-if="active == 'tab1'" |
|
|
|
|
ref="detail" /> |
|
|
|
|
<MatchArch v-if="active == 'tab2'" /> |
|
|
|
|
<MatchProgress v-else-if="active == 'tab3'" /> |
|
|
|
|
<notice v-else-if="active == 'tab4'" /> |
|
|
|
|
<MatchSignup v-else-if="active == 'tab5'" /> |
|
|
|
|
|
|
|
|
|
<template v-if="active"> |
|
|
|
|
<MatchDetail v-if="active == 'tab1'" |
|
|
|
|
ref="detail" /> |
|
|
|
|
<MatchArch v-if="active == 'tab2'" /> |
|
|
|
|
<MatchProgress v-else-if="active == 'tab3'" /> |
|
|
|
|
<notice v-else-if="active == 'tab4'" /> |
|
|
|
|
<MatchSignup v-else-if="active == 'tab5'" /> |
|
|
|
|
</template> |
|
|
|
|
<div class="empty" |
|
|
|
|
v-else> |
|
|
|
|
<div> |
|
|
|
|
<img src="@/assets/img/none.png" |
|
|
|
|
alt=""> |
|
|
|
|
<p>暂无数据</p> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
@ -41,7 +52,7 @@ export default { |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
|
name: this.$route.query.name, |
|
|
|
|
active: this.$route.query.tab || "tab1", |
|
|
|
|
active: this.$route.query.tab || '', |
|
|
|
|
tabs: { |
|
|
|
|
tab1: "大赛详情", |
|
|
|
|
tab2: "大赛成绩管理", |
|
|
|
@ -92,7 +103,6 @@ export default { |
|
|
|
|
methods: { |
|
|
|
|
initTabs () { |
|
|
|
|
const { btns } = this |
|
|
|
|
console.log("🚀 ~ file: index.vue:67 ~ initTabs ~ btns", btns) |
|
|
|
|
const tab1 = btns.includes('/match/list:管理:大赛详情') |
|
|
|
|
const tab2 = btns.includes('/match/list:管理:大赛成绩管理') |
|
|
|
|
const tab3 = btns.includes('/match/list:管理:竞赛进展') |
|
|
|
@ -106,7 +116,7 @@ export default { |
|
|
|
|
tab5 || this.$delete(this.tabs, 'tab5') |
|
|
|
|
const type = this.$route.query.tab |
|
|
|
|
const keys = Object.keys(this.tabs) |
|
|
|
|
this.active = keys.includes(type) ? type : keys[0] |
|
|
|
|
if (keys.length) this.active = keys.includes(type) ? type : keys[0] |
|
|
|
|
}, |
|
|
|
|
// 移除成绩管理 |
|
|
|
|
hideArch () { |
|
|
|
|