竞赛修改

master
yujialong 1 year ago
parent b3690d0393
commit 75b9f3fa52
  1. 2
      src/const/match.js
  2. 2
      src/pages/match/list/index.vue
  3. 28
      src/pages/match/manage/index.vue
  4. 12
      src/pages/match/manage/matchInfo.vue
  5. 6
      src/pages/match/preview/index.vue
  6. 8
      src/pages/station/preview/index.vue
  7. 2
      src/setting.js

@ -28,7 +28,7 @@
}, },
{ {
id: 2, id: 2,
name: '线下' name: '其它'
} }
], ],
teamCalculationMethods: [ teamCalculationMethods: [

@ -125,7 +125,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作"
align="center" align="center"
width="170"> width="260">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="scope.row.playingStages && scope.row.playingStages.length" <el-button v-if="scope.row.playingStages && scope.row.playingStages.length"
type="text" type="text"

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

@ -501,17 +501,7 @@ export default {
}, },
// //
transfer () { transfer () {
// this.transferVisible = true
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
}
}
if (!start) this.transferVisible = true
}, },
// //
transferSubmit () { transferSubmit () {

@ -69,16 +69,16 @@
<p v-if="rule.onlineButton">线上地点{{ rule.onlineAddress }}</p> <p v-if="rule.onlineButton">线上地点{{ rule.onlineAddress }}</p>
<p v-if="rule.offlineButton">线下地点{{ rule.offlineAddress }}</p> <p v-if="rule.offlineButton">线下地点{{ rule.offlineAddress }}</p>
<template v-if="rule.method === 2"> <template v-if="rule.method === 2">
<p>线下地点{{ rule.offlineAddress }}</p> <p>比赛地点{{ rule.offlineAddress }}</p>
<p>比赛内容{{ rule.contentDescription }}</p> <p>比赛内容{{ rule.contentDescription }}</p>
<p>评分规则{{ rule.scoreRule }}</p> <p>评分规则{{ rule.scoreRule }}</p>
</template> </template>
<template v-if="form.completeCompetitionSetup.competitionType"> <template v-if="form.completeCompetitionSetup.competitionType">
<p>团队参赛人数限制{{ rule.teamNumLimit || '不限制' }}</p> <p>每个团队参赛人数限制{{ rule.teamNumLimit || '不限制' }}</p>
<p>团队成绩计算方式{{ teamCalculationMethods.find(e => e.id == rule.teamCalculationMethod) && teamCalculationMethods.find(e => e.id == rule.teamCalculationMethod).name }}</p> <p>团队成绩计算方式{{ teamCalculationMethods.find(e => e.id == rule.teamCalculationMethod) && teamCalculationMethods.find(e => e.id == rule.teamCalculationMethod).name }}</p>
</template> </template>
<p>阶段比赛结束后{{ rule.resultAnnouncementTime }}小时公布阶段比赛成绩</p> <p v-if="rule.resultAnnouncementTime != 0">阶段比赛结束后{{ rule.resultAnnouncementTime }}小时公布阶段比赛成绩</p>
<div v-if="form.rule === 1" <div v-if="form.rule === 1"
class="flex"> class="flex">
<p>晋级规则</p> <p>晋级规则</p>

@ -370,6 +370,8 @@
<span class="point">{{ item.highestScore }}</span> <span class="point">{{ item.highestScore }}</span>
</div> </div>
</div> </div>
<p v-else
class="none">暂无数据</p>
</div> </div>
</div> </div>
@ -1331,6 +1333,12 @@ $height: 700px;
font-weight: 600; font-weight: 600;
color: #9278ff; color: #9278ff;
} }
.none {
margin-top: 10px;
text-align: center;
font-size: 12px;
color: #727272;
}
} }
/deep/.project-dia { /deep/.project-dia {
.el-dialog__body { .el-dialog__body {

@ -30,7 +30,7 @@ if (isPro) {
uploadURL = `http://121.37.12.51/` uploadURL = `http://121.37.12.51/`
host = "http://121.37.12.51/"; // 中台测试服 host = "http://121.37.12.51/"; // 中台测试服
// host = 'https://www.occupationlab.com/' // 正式服 // host = 'https://www.occupationlab.com/' // 正式服
host = "http://192.168.31.217:9000/"; // 榕 // host = "http://192.168.31.217:9000/"; // 榕
// host = 'http://192.168.31.51:9000/'; // 赓 // host = 'http://192.168.31.51:9000/'; // 赓
} else if (isSq) { } else if (isSq) {
zcPath = `10.20.100.204:8883` zcPath = `10.20.100.204:8883`

Loading…
Cancel
Save