yujialong 2 years ago
parent bdb3ffba43
commit 9e3d4f40db
  1. 1
      src/api/index.js
  2. 16
      src/layouts/home/index.vue
  3. 271
      src/pages/match/details/index.vue
  4. 48
      src/pages/match/list/index.vue
  5. 44
      src/pages/touristMatch/list/index.vue
  6. 2
      src/setting.js
  7. 6
      src/store/modules/match.js

@ -101,6 +101,7 @@ export default {
getCustomerBySchoolId: `nakadai/nakadai/customer/getCustomerBySchoolId`, getCustomerBySchoolId: `nakadai/nakadai/customer/getCustomerBySchoolId`,
isParticipant: `competition/competition/management/isParticipant`, isParticipant: `competition/competition/management/isParticipant`,
editCompetitionTeam: `competition/competition/team/editCompetitionTeam`, editCompetitionTeam: `competition/competition/team/editCompetitionTeam`,
promptRemoval: `competition/competition/team/promptRemoval`,
frontDeskOverallRanking: `${host1}competition/competition/rank/frontDeskOverallRanking`, frontDeskOverallRanking: `${host1}competition/competition/rank/frontDeskOverallRanking`,
frontOfficeCompetitionRanking: `${host1}competition/competition/rank/frontOfficeCompetitionRanking`, frontOfficeCompetitionRanking: `${host1}competition/competition/rank/frontOfficeCompetitionRanking`,
stageGradeManagementList: `${host1}competition/competition/performance/stageGradeManagementList`, stageGradeManagementList: `${host1}competition/competition/performance/stageGradeManagementList`,

@ -77,19 +77,33 @@ export default {
computed: { computed: {
...mapState("user", [ ...mapState("user", [
'logView' 'logView'
]),
...mapState("match", [
'noticed'
]) ])
}, },
mounted() { mounted() {
this.autoLogout(); this.autoLogout()
// this.noticed || this.getMatchStatus() // 0
this.logView || this.getLogStatus() // logViewfalse this.logView || this.getLogStatus() // logViewfalse
}, },
methods: { methods: {
...mapMutations("user", [ ...mapMutations("user", [
'SET_LOG' 'SET_LOG'
]), ]),
...mapMutations("match", [
'SET_NOTICE'
]),
...mapActions("user", [ ...mapActions("user", [
"logout" "logout"
]), ]),
// ()
getMatchStatus() {
util.local.get(Setting.tokenKey) && this.$post(this.api.promptRemoval).then(({ prompt }) => {
this.SET_NOTICE()
prompt && util.errorMsg(prompt)
}).catch(res => {})
},
// //
getLog() { getLog() {
this.$get(`${this.api.platformLogList}?platformId=${Setting.platformId}&port=1&versionName=`).then(({ logList }) => { this.$get(`${this.api.platformLogList}?platformId=${Setting.platformId}&port=1&versionName=`).then(({ logList }) => {

@ -5,7 +5,7 @@
<div class="center-wrap"> <div class="center-wrap">
<breadcrumb ref="breadcrumb" :data="'全部赛事/' + form.name"></breadcrumb> <breadcrumb ref="breadcrumb" :data="'全部赛事/' + form.name"></breadcrumb>
<div class="content"> <div class="content">
<div class="tool flex-between"> <div class="tool flex-between">{{status}}
<el-tabs v-model="curType" @tab-click="typeChange"> <el-tabs v-model="curType" @tab-click="typeChange">
<el-tab-pane v-for="(item, index) in typeList" :key="index" :label="item.name" :name="item.id"></el-tab-pane> <el-tab-pane v-for="(item, index) in typeList" :key="index" :label="item.name" :name="item.id"></el-tab-pane>
</el-tabs> </el-tabs>
@ -23,7 +23,7 @@
<div class="meta">最近编辑时间{{ form.updateTime }}</div> <div class="meta">最近编辑时间{{ form.updateTime }}</div>
</div> </div>
<div v-show="curType != 4 && curType != 5"> <div v-show="curType < 4">
<div class="l-title" id="part1"><img src="@/assets/img/label.png" alt=""> 竞赛信息</div> <div class="l-title" id="part1"><img src="@/assets/img/label.png" alt=""> 竞赛信息</div>
<div v-if="form.description" class="texts ql-editor" v-html="form.description"></div> <div v-if="form.description" class="texts ql-editor" v-html="form.description"></div>
<template v-if="form.contestAnnexList"> <template v-if="form.contestAnnexList">
@ -45,17 +45,27 @@
<p>比赛时间{{ rule.startTime && rule.startTime + ' ~ ' + rule.endTime }}</p> <p>比赛时间{{ rule.startTime && rule.startTime + ' ~ ' + rule.endTime }}</p>
<p>比赛方式{{ methods.find(e => e.id == rule.method) && methods.find(e => e.id == rule.method).name }}</p> <p>比赛方式{{ methods.find(e => e.id == rule.method) && methods.find(e => e.id == rule.method).name }}</p>
<p v-if="!rule.method">课程系统{{ rule.systemName }}</p> <p v-if="!rule.method">课程系统{{ rule.systemName }}</p>
<p v-if="rule.onlineButton">线上地点{{ rule.onlineAddress }}</p>
<p v-if="rule.offlineButton">线下地点{{ rule.offlineAddress }}</p>
<template v-if="rule.method === 2"> <template v-if="rule.method === 2">
<p>比赛内容</p> <p>线下地点{{ rule.offlineAddress }}</p>
<div v-html="form.description"></div> <p>比赛内容{{ rule.contentDescription }}</p>
<p class="m-t-10">评分规则专家打分</p> <p class="m-t-10">评分规则{{ 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>阶段比赛结束后{{ rule.resultAnnouncementTime }}小时公布阶段比赛成绩</p>
<div v-if="form.rule === 1" class="flex">
<p>晋级规则</p>
<div>
<p v-if="rule.peopleLimit">本阶段成绩排名前{{ rule.peopleLimit }}可晋级下一阶段比赛</p>
<p v-if="rule.percentageLimit">本阶段成绩排名前{{ rule.percentageLimit }}%可晋级下一阶段比赛</p>
<p v-if="rule.scoreLimit">本阶段成绩{{ rule.scoreLimit }}可晋级下一阶段比赛</p>
</div>
</div>
</div> </div>
<!-- 进展 --> <!-- 进展 -->
@ -118,6 +128,21 @@
<template v-if="curType == 5"> <template v-if="curType == 5">
<div class="l-title m-t-20"><img src="@/assets/img/label.png" alt=""> 参赛信息</div> <div class="l-title m-t-20"><img src="@/assets/img/label.png" alt=""> 参赛信息</div>
<table v-if="form.completeCompetitionSetup.competitionType && info.team.captain === 0" class="table m-b-20">
<tr>
<th width="150">团队名称</th>
<td>
<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>
</td>
</tr>
</table>
<div v-if="form.completeCompetitionSetup.competitionType && info.team.captain === 0 && status < 4" class="m-b-20 text-center">
<el-button type="primary" @click="edit(1)">{{ editing ? '保存' : '编辑' }}</el-button>
</div>
<table class="table"> <table class="table">
<template v-if="!form.completeCompetitionSetup.competitionType || info.team.captain"> <template v-if="!form.completeCompetitionSetup.competitionType || info.team.captain">
<tr> <tr>
@ -134,11 +159,10 @@
</tr> </tr>
</template> </template>
<template v-if="form.completeCompetitionSetup.competitionType"> <template v-if="form.completeCompetitionSetup.competitionType">
<tr> <tr v-if="info.team.captain">
<th width="150">团队名称</th> <th width="150">团队名称</th>
<td> <td>
<el-input v-if="info.team.captain === 0" :disabled="!editing" v-model="info.team.teamName"></el-input> <span>{{ info.team.teamName }}</span>
<span v-else>{{ info.team.teamName }}</span>
</td> </td>
</tr> </tr>
<template v-if="info.team.captain"> <template v-if="info.team.captain">
@ -152,31 +176,49 @@
<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>
<tr v-if="info.team.captain">
<th>团队邀请码</th>
<td>
<span>{{ info.team.invitationCode }}</span>
</td>
</tr>
</template> </template>
</template> </template>
<tr> <tr>
<th>指导老师</th> <th width="130">指导老师</th>
<td v-if="info.team.captain === 0 || !form.completeCompetitionSetup.competitionType"> <td v-if="info.team.captain === 0 || !form.completeCompetitionSetup.competitionType">
<div class="plus"> <div class="plus">
<i class="el-icon-circle-plus-outline icon" @click="addAdvisor"></i> <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" :key="i" class="line">
<el-input placeholder="请输入姓名" v-model="item.name" clearable size="mini"></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"></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"></el-input> <el-input placeholder="请输入手机号" maxlength="11" v-model="item.phone" clearable size="mini" :disabled="!item.edit"></el-input>
<i class="el-icon-check icon" @click="submitAdvisor(item)"></i> <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 class="el-icon-delete icon" @click="delAdvisor(item, i)"></i>
</template>
</div> </div>
</td> </td>
<td v-else> <td v-else>
{{ info.teamInstructors.map(e => e.name).join(',')}} <table class="table tc">
</td> <tr>
<th width="60">姓名</th>
<th width="100">职务</th>
<th width="100">手机号</th>
</tr> </tr>
<tr v-if="form.completeCompetitionSetup.competitionType"> <template v-if="info.teamInstructors.length">
<th>团队邀请码</th> <tr v-for="(item, i) in info.teamInstructors" :key="i">
<td> <td width="60">{{ item.name }}</td>
<el-input v-if="info.team.captain === 0" :disabled="!editing" v-model="info.team.invitationCode"></el-input> <td width="100">{{ item.position }}</td>
<span v-else>{{ info.team.invitationCode }}</span> <td width="100">{{ item.phone }}</td>
</tr>
</template>
<tr v-else>
<td colspan="3">暂无数据</td>
</tr>
</table>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -198,16 +240,16 @@
<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 || 0 }}</td> <td>{{ item.teamNumLimit || '不限制' }}</td>
<td> <td>
<span class="m-r-5">{{ item.teamParticipantIds }}</span> <span class="m-r-5">{{ item.teamParticipantIds || '无' }}</span>
<el-button type="danger" size="mini" @click="selectPar(item)">修改</el-button> <el-button v-if="info.team.captain === 0" type="danger" size="mini" @click="selectPar(item)">修改</el-button>
</td> </td>
<td v-if="info.team.captain === 0 && form.rule === 0 && !i" :rowspan="info.stages.length">{{ info.totalScore }}</td> <td v-if="info.team.captain === 0 && form.rule === 0 && !i" :rowspan="info.stages.length">{{ info.totalScore }}</td>
</template> </template>
<td> <td>
<span v-if="item.score" class="m-r-10">分数{{item.score}}</span> <span v-if="item.score" class="m-r-10">分数{{item.score}}</span>
<el-button type="text" :disabled="item.resultsDetails === 1" @click="show(item)">查看成绩详情</el-button> <el-button type="text" :disabled="item.showDetail && 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>
@ -218,16 +260,13 @@
<el-alert <el-alert
v-if="form.completeCompetitionSetup.competitionType && info.team.captain === 0" v-if="form.completeCompetitionSetup.competitionType && info.team.captain === 0"
style="margin-top: 10px;" style="margin-top: 10px;"
title="注:请团长(团队创建人)设置各阶段参赛成员,只有被选择的允许参赛成员可进入对应阶段比赛,每个团队成员只能参加一个赛项阶段!" :title="'注:请团长(团队创建人)设置各阶段参赛成员,只有被选择的允许参赛成员可进入对应阶段比赛' + (info.teamLimit ? ',每个团队成员只能参加一个赛项阶段' : '') + ''"
type="warning" type="warning"
show-icon> show-icon>
</el-alert> </el-alert>
</td> </td>
</tr> </tr>
</table> </table>
<div v-if="form.completeCompetitionSetup.competitionType && info.team.captain === 0" class="m-t-20 text-center">
<el-button type="primary" @click="edit">{{ editing ? '保存' : '编辑' }}</el-button>
</div>
<template v-if="form.completeCompetitionSetup.competitionType && info.team.captain === 0"> <template v-if="form.completeCompetitionSetup.competitionType && info.team.captain === 0">
<div class="l-title m-t-20">团队成员</div> <div class="l-title m-t-20">团队成员</div>
@ -256,7 +295,7 @@
<el-form class="dia-form"> <el-form class="dia-form">
<p style="margin-bottom: 5px">请选择要加入的团队</p> <p style="margin-bottom: 5px">请选择要加入的团队</p>
<el-form-item> <el-form-item>
<el-select class="w-100" v-model="enterForm.teamId"> <el-select class="w-100" v-model="enterForm.teamId" filterable>
<el-option v-for="(item, i) in teams" :key="i" :label="item.teamName" :value="item.teamId"></el-option> <el-option v-for="(item, i) in teams" :key="i" :label="item.teamName" :value="item.teamId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -303,11 +342,11 @@
</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">
<template v-if="info.teamLimit"> <!-- <template v-if="curRow.teamNumLimit === 1">
<el-radio v-for="(item, i) in info.teamDetail" :key="i" v-model="checkedMember" :label="item.accountId">{{ item.userName }}</el-radio> <el-radio v-for="(item, i) in info.teamDetail" :key="i" v-model="checkedMember" :label="item.accountId">{{ item.userName }}</el-radio>
</template> </template> -->
<el-checkbox-group v-else v-model="checkedMembers"> <el-checkbox-group v-model="checkedMembers">
<el-checkbox v-for="(item, i) in info.teamDetail" :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" style="margin-top: 15px;font-size: 12px;">当前阶段限制1人参赛且此竞赛每个成员只能参加一个阶段赛项</p> <p v-if="info.teamLimit" style="margin-top: 15px;font-size: 12px;">当前阶段限制1人参赛且此竞赛每个成员只能参加一个阶段赛项</p>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -367,6 +406,7 @@ export default {
rules: Const.rules, rules: Const.rules,
methods: Const.methods, methods: Const.methods,
teamCalculationMethods: Const.teamCalculationMethods, teamCalculationMethods: Const.teamCalculationMethods,
timerList: [],
form: { form: {
name: '', name: '',
coverUrl: '', coverUrl: '',
@ -397,10 +437,6 @@ export default {
id: '4', id: '4',
name: '竞赛排名' name: '竞赛排名'
}, },
{
id: '5',
name: '参赛信息'
}
], ],
progress: [], progress: [],
timer: null, timer: null,
@ -430,6 +466,7 @@ export default {
whetherSignUp: 1 whetherSignUp: 1
}, },
curStage: null, curStage: null,
originInfo: {},
info: { info: {
isCaption: 0, isCaption: 0,
person: {}, person: {},
@ -455,7 +492,9 @@ export default {
curRow: {}, curRow: {},
chooseVisible: false, chooseVisible: false,
checkedMember: '', checkedMember: '',
checkedMembers: [] checkedMembers: [],
chooses: [],
lastType: 1
}; };
}, },
components: { components: {
@ -465,16 +504,15 @@ export default {
countdown: { countdown: {
bind: function(el, binding, vnode) { bind: function(el, binding, vnode) {
let that = vnode.context let that = vnode.context
clearInterval(that.timer)
const { form } = that const { form } = that
let time = '' let time = ''
let second = 1000;
let minute = second * 60;
let hour = minute * 60;
let now = new Date().getTime();
let signUpStartTime = new Date(that.core.dateCompatible(form.signUpStartTime)).getTime(); // let signUpStartTime = new Date(that.core.dateCompatible(form.signUpStartTime)).getTime(); //
let signUpEndTime = new Date(that.core.dateCompatible(form.signUpEndTime)).getTime(); // let signUpEndTime = new Date(that.core.dateCompatible(form.signUpEndTime)).getTime(); //
let playStartTime = new Date(that.core.dateCompatible(form.playStartTime)).getTime(); // let playStartTime = new Date(that.core.dateCompatible(form.playStartTime)).getTime(); //
let playEndTime = new Date(that.core.dateCompatible(form.playEndTime)).getTime(); // let playEndTime = new Date(that.core.dateCompatible(form.playEndTime)).getTime(); //
that.timer = setInterval(() => {
let now = new Date().getTime();
switch (that.status) { switch (that.status) {
// statusgetData // statusgetData
case 0: case 0:
@ -513,25 +551,32 @@ export default {
} }
break; break;
} }
time = `${Math.floor(time / hour)}:${Math.floor(time % hour / minute)}:${Math.floor(time % hour % minute / second)}`; let total = time / 1000
that.timer = setInterval(() => { if (total > 86400) { //
let timeList = time.split(":"); clearInterval(that.timer)
let total = Number.parseInt(timeList[0] * 60 * 60) + Number.parseInt(timeList[1] * 60) + Number.parseInt(timeList[2]); that.end = Math.floor(total / 86400)
if (total > 0) { } else if (total > 0) {
--total; --total;
let hours = Math.floor(total / (60 * 60)); let hours = Math.floor(total / (60 * 60));
let minutes = Math.floor(total % (60 * 60) / 60); let minutes = Math.floor(total % (60 * 60) / 60);
let seconds = Math.floor(total % (60 * 60) % 60); let seconds = Math.floor(total % (60 * 60) % 60);
time = `${that.core.formateTime(hours)}:${that.core.formateTime(minutes)}:${that.core.formateTime(seconds)}`; time = `${that.core.formateTime(hours)}:${that.core.formateTime(minutes)}:${that.core.formateTime(seconds)}`;
} else { } else if (that.status === 5) { //
clearInterval(that.timer); clearInterval(that.timer);
} }
el.innerHTML = time; if (total > 0) el.innerHTML = time
}, 1000) }, 1000)
} }
} }
}, },
mounted() { mounted() {
this.$once('hook:beforeDestroy', function() {
clearInterval(this.timer)
this.timerList.forEach(n => {
clearInterval(n)
})
this.timerList = []
})
this.getData() this.getData()
this.getProgress() this.getProgress()
this.getNotice() this.getNotice()
@ -562,11 +607,16 @@ export default {
arches.map(e => e.stageId = e.stageId + '') arches.map(e => e.stageId = e.stageId + '')
this.arches = arches this.arches = arches
this.form = competition this.form = competition
const type = competition.completeCompetitionSetup.competitionType
const reg = competition.competitionRegistration const reg = competition.competitionRegistration
reg || this.typeList.pop() //
if (!type || (type && reg)) this.getInfo() if (reg) {
reg && reg.teamId && this.getRank() this.typeList.push({
id: '5',
name: '参赛信息'
})
this.getInfo()
reg.teamId && this.getRank()
}
this.$refs.breadcrumb.update('全部赛事/' + competition.name) this.$refs.breadcrumb.update('全部赛事/' + competition.name)
}).catch(err => {}) }).catch(err => {})
}, },
@ -612,14 +662,15 @@ export default {
if (total > 0) { if (total > 0) {
const day = Math.floor(total / (60 * 60 * 1000 * 24)) const day = Math.floor(total / (60 * 60 * 1000 * 24))
const time = `${this.core.formateTime(Math.floor(total / hour))}:${this.core.formateTime(Math.floor(total % hour / minute))}:${this.core.formateTime(Math.floor(total % hour % minute / second))}` const time = `${this.core.formateTime(Math.floor(total / hour))}:${this.core.formateTime(Math.floor(total % hour / minute))}:${this.core.formateTime(Math.floor(total % hour % minute / second))}`
this.end = day ? day + '天' : time this.end = day || time
} }
}, },
// //
getInfo() { getInfo() {
this.$post(`${this.api.entryInformation}?competitionId=${this.id}`).then(res => { this.$post(`${this.api.entryInformation}?competitionId=${this.id}`).then(res => {
const info = res.entryInformation const info = res.entryInformation
if (!info.teamInstructors.length) info.teamInstructors.push(JSON.parse(JSON.stringify(this.originIns))) //
if (!info.team.captain && !info.teamInstructors.length) info.teamInstructors.push(JSON.parse(JSON.stringify(this.originIns)))
if (info.personalDetail) { if (info.personalDetail) {
info.team = {} info.team = {}
info.teamDetail = [] info.teamDetail = []
@ -629,12 +680,27 @@ export default {
const caption = info.teamDetail.find(e => !e.caption) const caption = info.teamDetail.find(e => !e.caption)
info.caption = caption ? caption : {} info.caption = caption ? caption : {}
info.person = info.personalDetail || info.teamDetail.find(e => e.accountId == info.team.accountId) info.person = info.personalDetail || info.teamDetail.find(e => e.accountId == info.team.accountId)
this.originInfo = JSON.parse(JSON.stringify(info))
//
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 { //
this.timerList.push(setTimeout(this.getInfo, endTime - now))
}
}
})
this.info = info this.info = info
}).catch(err => {}); }).catch(err => {});
}, },
// //
edit() { edit(showMsg) {
if (this.editing) { 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, {
competitionId: this.id, competitionId: this.id,
@ -644,7 +710,7 @@ export default {
whetherSignUp: 0 whetherSignUp: 0
}).then(res => { }).then(res => {
this.getInfo() this.getInfo()
util.successMsg('保存成功') showMsg && util.successMsg('保存成功')
}).catch(res => {}) }).catch(res => {})
} else { } else {
this.editing = !this.editing this.editing = !this.editing
@ -677,15 +743,49 @@ export default {
download(item) { download(item) {
util.downloadFile(item.fileName, item.filePath) util.downloadFile(item.fileName, item.filePath)
}, },
// tab // tab
typeChange() { typeChange() {
//
const type = +this.curType const type = +this.curType
if (type > 3) { // ()
this.editing = false if (this.lastType == 5) {
const { team, teamInstructors } = this.info
const { originInfo } = this
let notSave = 0
//
if (team.teamName !== originInfo.team.teamName || team.invitationCode !== originInfo.team.invitationCode) {
notSave = 1
} else if (JSON.stringify(teamInstructors) !== JSON.stringify(originInfo.teamInstructors)) {
notSave = 2
}
if (notSave) {
this.$confirm('所填写内容暂未保存,是否保存?', "提示", {
type: "warning"
}).then(() => {
//
if (notSave === 1) {
this.edit()
} else { //
teamInstructors.map(e => {
e.name && this.$post(this.api.addAnAdvisor, {
name: e.name,
competitionId: this.id,
id: e.id,
teamId: this.form.competitionRegistration ? this.form.competitionRegistration.teamId : '',
phone: e.phone,
position: e.position,
}).then(res => {}).catch(res => {})
})
}
}).catch(() => {})
} else {
type < 4 && document.querySelector(`#part${type}`).scrollIntoView()
}
} else { } else {
document.querySelector(`#part${type}`).scrollIntoView() type == 5 && this.getInfo()
type < 4 && document.querySelector(`#part${type}`).scrollIntoView()
} }
this.editing = false
this.lastType = type
}, },
// //
toNotice(item) { toNotice(item) {
@ -735,6 +835,10 @@ export default {
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) {
this.$set(row, 'edit', 1)
},
// //
submitAdvisor(row) { submitAdvisor(row) {
if (!row.name) return util.errorMsg('请输入姓名') if (!row.name) return util.errorMsg('请输入姓名')
@ -763,6 +867,7 @@ export default {
captainId: this.info.caption.teamId, captainId: this.info.caption.teamId,
playerId: this.checkedPlayer playerId: this.checkedPlayer
}).then(res => { }).then(res => {
this.checkedPlayer = ''
util.successMsg('转让成功') util.successMsg('转让成功')
this.transferVisible = false this.transferVisible = false
this.getInfo() this.getInfo()
@ -770,7 +875,7 @@ export default {
}, },
// //
removeLine(row) { removeLine(row) {
this.$post(`${this.api.removeTheLine}?teamId=${row.teamId}`).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 => {})
@ -784,6 +889,24 @@ export default {
if (now >= new Date(item.startTime) && now <= new Date(item.endTime)) { if (now >= new Date(item.startTime) && now <= new Date(item.endTime)) {
return util.errorMsg('该阶段比赛已经开始,无法修改允许参赛人员!') return util.errorMsg('该阶段比赛已经开始,无法修改允许参赛人员!')
} else { } else {
const { teamLimit, stages, teamDetail } = this.info
// teamLimit=truestagesparticipantAccountIdsaccountId
if (teamLimit) {
const chooses = []
let ids = []
// accountId
stages.map(e => {
const id = e.participantAccountIds
id && ids.push(...id.split(',').map(n => +n))
})
ids = [...new Set(ids)]
teamDetail.map(e => {
ids.includes(e.accountId) || chooses.push(e) //
})
this.chooses = chooses
} else {
this.chooses = this.info.teamDetail
}
this.curRow = row this.curRow = row
this.chooseVisible = true this.chooseVisible = true
} }
@ -791,12 +914,17 @@ export default {
}, },
// //
chooseSubmit() { chooseSubmit() {
const accountIds = this.checkedMembers
if (!accountIds.length) return util.errorMsg('请选择参赛成员!')
const limit = this.curRow.teamNumLimit //
if (accountIds.length > limit) return util.errorMsg(`请选择${limit}个以下参赛成员!`) //
this.$post(this.api.stageSelectParticipants, { this.$post(this.api.stageSelectParticipants, {
accountIds: this.info.teamLimit ? [this.checkedMember] : this.checkedMembers, accountIds,
competitionId: this.id, competitionId: this.id,
stageId: this.curRow.stageId, stageId: this.curRow.stageId,
teamId: this.form.competitionRegistration.teamId teamId: this.info.teamId
}).then(res => { }).then(res => {
this.checkedMembers = []
util.successMsg('修改成功') util.successMsg('修改成功')
this.getInfo() this.getInfo()
this.chooseVisible = false this.chooseVisible = false
@ -805,7 +933,7 @@ export default {
// //
show(row) { show(row) {
// //
if (this.form.completeCompetitionSetup.competitionType && this.info.team.captain === 0) { // if (this.form.completeCompetitionSetup.competitionType && this.info.team.captain === 0) { //
this.curRow = row this.curRow = row
this.memberVisible = true this.memberVisible = true
const teamId = this.form.competitionRegistration.teamId const teamId = this.form.competitionRegistration.teamId
@ -976,6 +1104,9 @@ export default {
util.cookies.set('competitionId', this.form.id) util.cookies.set('competitionId', this.form.id)
util.cookies.set('stageId', form.stageId) util.cookies.set('stageId', form.stageId)
util.cookies.set('teamId', this.form.competitionRegistration.teamId) util.cookies.set('teamId', this.form.competitionRegistration.teamId)
util.cookies.set('stopTime', form.endTime)
util.cookies.set('resultsDetails', form.resultsDetails)
util.cookies.set('resultAnnouncementTime', form.resultAnnouncementTime)
util.cookies.set('fromManager', '', -1) util.cookies.set('fromManager', '', -1)
// 8pythoncookiesystemId // 8pythoncookiesystemId
location.href = process.env.NODE_ENV === 'development' ? location.href = process.env.NODE_ENV === 'development' ?
@ -1039,6 +1170,9 @@ export default {
color: #6e6e6e; color: #6e6e6e;
} }
} }
/deep/.el-tabs__item {
box-shadow: none !important;
}
.content{ .content{
position: relative; position: relative;
padding: 20px 40px; padding: 20px 40px;
@ -1052,6 +1186,7 @@ export default {
color: #0B1D30; color: #0B1D30;
} }
.tool { .tool {
z-index: 100;
position: sticky; position: sticky;
top: 64px; top: 64px;
margin-bottom: 20px; margin-bottom: 20px;

@ -136,15 +136,15 @@
<el-form class="dia-form"> <el-form class="dia-form">
<p style="margin-bottom: 5px">请选择要加入的团队</p> <p style="margin-bottom: 5px">请选择要加入的团队</p>
<el-form-item> <el-form-item>
<el-select class="w-100" v-model="enterForm.teamId"> <el-select class="w-100" v-model="enterForm.teamId" filterable>
<el-option v-for="(item, i) in teams" :key="i" :label="item.teamName" :value="item.teamId"></el-option> <el-option v-for="(item, i) in teams" :key="i" :label="item.teamName" :value="item.teamId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-input placeholder="请输入团队邀请码" maxlength="6" v-model="enterForm.invitationCode"></el-input> <el-input placeholder="请输入6位数团队邀请码" maxlength="6" v-model="enterForm.invitationCode"></el-input>
</el-form-item> </el-form-item>
<el-form-item v-if="curItem.isNeedCode"> <el-form-item v-if="curItem.setup.isNeedCode">
<el-input placeholder="请输入大赛邀请码" maxlength="6" v-model="enterForm.registrationInvitationCode"></el-input> <el-input placeholder="请输入4位数大赛邀请码" maxlength="4" v-model="enterForm.registrationInvitationCode"></el-input>
</el-form-item> </el-form-item>
<p class="tips"> <p class="tips">
查找不到团队点击 <el-link :underline="false" type="primary" @click="toTeam">创建团队</el-link> 查找不到团队点击 <el-link :underline="false" type="primary" @click="toTeam">创建团队</el-link>
@ -161,10 +161,10 @@
<el-input placeholder="请输入团队名称" maxlength="10" v-model="teamForm.teamName"></el-input> <el-input placeholder="请输入团队名称" maxlength="10" v-model="teamForm.teamName"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-input placeholder="请设置团队邀请码" maxlength="6" v-model="teamForm.invitationCode"></el-input> <el-input placeholder="请输入6位数团队邀请码" maxlength="6" v-model="teamForm.invitationCode"></el-input>
</el-form-item> </el-form-item>
<el-form-item v-if="curItem.isNeedCode"> <el-form-item v-if="curItem.setup.isNeedCode">
<el-input placeholder="请输入大赛邀请码" maxlength="6" v-model="teamForm.registrationInvitationCode"></el-input> <el-input placeholder="请输入4位数大赛邀请码" maxlength="4" v-model="teamForm.registrationInvitationCode"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -286,7 +286,9 @@ export default {
invitationCode: '', invitationCode: '',
whetherSignUp: 1 whetherSignUp: 1
}, },
curItem: {} curItem: {
setup: {}
}
}; };
}, },
directives: { directives: {
@ -295,15 +297,12 @@ export default {
let that = vnode.context; let that = vnode.context;
let item = that.listData[binding.value]; let item = that.listData[binding.value];
let time = '' let time = ''
let second = 1000;
let minute = second * 60;
let hour = minute * 60;
let now = new Date().getTime();
let signUpStartTime = new Date(that.core.dateCompatible(item.signUpStartTime)).getTime(); // let signUpStartTime = new Date(that.core.dateCompatible(item.signUpStartTime)).getTime(); //
let signUpEndTime = new Date(that.core.dateCompatible(item.signUpEndTime)).getTime(); // let signUpEndTime = new Date(that.core.dateCompatible(item.signUpEndTime)).getTime(); //
let playStartTime = new Date(that.core.dateCompatible(item.playStartTime)).getTime(); // let playStartTime = new Date(that.core.dateCompatible(item.playStartTime)).getTime(); //
let playEndTime = new Date(that.core.dateCompatible(item.playEndTime)).getTime(); // let playEndTime = new Date(that.core.dateCompatible(item.playEndTime)).getTime(); //
let timer = setInterval(() => {
let now = new Date().getTime();
switch (item.status) { switch (item.status) {
// statusgetData // statusgetData
case 0: case 0:
@ -342,20 +341,20 @@ export default {
} }
break; break;
} }
time = `${Math.floor(time / hour)}:${Math.floor(time % hour / minute)}:${Math.floor(time % hour % minute / second)}`; let total = time / 1000
let timer = setInterval(() => { if (total > 86400) { //
let timeList = time.split(":"); clearInterval(timer)
let total = Number.parseInt(timeList[0] * 60 * 60) + Number.parseInt(timeList[1] * 60) + Number.parseInt(timeList[2]); item.end = Math.floor(total / 86400)
if (total > 0) { } else if (total > 0) {
--total; --total;
let hours = Math.floor(total / (60 * 60)); let hours = Math.floor(total / (60 * 60));
let minutes = Math.floor(total % (60 * 60) / 60); let minutes = Math.floor(total % (60 * 60) / 60);
let seconds = Math.floor(total % (60 * 60) % 60); let seconds = Math.floor(total % (60 * 60) % 60);
time = `${that.core.formateTime(hours)}:${that.core.formateTime(minutes)}:${that.core.formateTime(seconds)}`; time = `${that.core.formateTime(hours)}:${that.core.formateTime(minutes)}:${that.core.formateTime(seconds)}`;
} else { } else if (that.status === 5) {
clearInterval(timer); clearInterval(timer);
} }
el.innerHTML = time; if (total > 0) el.innerHTML = time;
}, 1000); }, 1000);
that.timerList.push(timer); that.timerList.push(timer);
} }
@ -451,7 +450,7 @@ export default {
if (total > 0) { if (total > 0) {
const day = Math.floor(total / (60 * 60 * 1000 * 24)) const day = Math.floor(total / (60 * 60 * 1000 * 24))
const time = `${this.core.formateTime(Math.floor(total / hour))}:${this.core.formateTime(Math.floor(total % hour / minute))}:${this.core.formateTime(Math.floor(total % hour % minute / second))}` const time = `${this.core.formateTime(Math.floor(total / hour))}:${this.core.formateTime(Math.floor(total % hour / minute))}:${this.core.formateTime(Math.floor(total % hour % minute / second))}`
n.end = day ? day + '天' : time n.end = day || time
} }
// //
@ -535,7 +534,7 @@ export default {
const form = this.enterForm const form = this.enterForm
if (!form.teamId) return util.errorMsg('请选择团队') if (!form.teamId) return util.errorMsg('请选择团队')
if (!form.invitationCode) return util.errorMsg('请输入团队邀请码') if (!form.invitationCode) return util.errorMsg('请输入团队邀请码')
if (this.curItem.isNeedCode && !form.registrationInvitationCode) return util.errorMsg('请输入大赛邀请码') if (this.curItem.setup.isNeedCode && !form.registrationInvitationCode) return util.errorMsg('请输入大赛邀请码')
this.$post(this.api.joinCompetitionTeam, form).then(res => { this.$post(this.api.joinCompetitionTeam, form).then(res => {
this.enterVisible = false this.enterVisible = false
this.getData() this.getData()
@ -570,7 +569,7 @@ export default {
if (!form.teamName) return util.errorMsg('请输入团队名称') if (!form.teamName) return util.errorMsg('请输入团队名称')
if (this.teamNameRepeat) return util.errorMsg('团队名称重复,请重新输入') if (this.teamNameRepeat) return util.errorMsg('团队名称重复,请重新输入')
if (form.invitationCode.length !== 6) return util.errorMsg('请输入6位数团队邀请码') if (form.invitationCode.length !== 6) return util.errorMsg('请输入6位数团队邀请码')
if (this.curItem.isNeedCode && !form.registrationInvitationCode) return util.errorMsg('请输入大赛邀请码') if (this.curItem.setup.isNeedCode && !form.registrationInvitationCode) return util.errorMsg('请输入大赛邀请码')
this.$post(this.api.addCompetitionTeam, form).then(res => { this.$post(this.api.addCompetitionTeam, form).then(res => {
this.teamVisible = false this.teamVisible = false
this.enterVisible = false this.enterVisible = false
@ -669,6 +668,9 @@ export default {
util.cookies.set('competitionId', this.curItem.id) util.cookies.set('competitionId', this.curItem.id)
util.cookies.set('stageId', form.stageId) util.cookies.set('stageId', form.stageId)
util.cookies.set('teamId', this.curItem.teamId) util.cookies.set('teamId', this.curItem.teamId)
util.cookies.set('stopTime', form.endTime)
util.cookies.set('resultsDetails', form.resultsDetails)
util.cookies.set('resultAnnouncementTime', form.resultAnnouncementTime)
util.cookies.set('fromManager', '', -1) util.cookies.set('fromManager', '', -1)
// 8pythoncookiesystemId // 8pythoncookiesystemId
location.href = process.env.NODE_ENV === 'development' ? location.href = process.env.NODE_ENV === 'development' ?

@ -120,15 +120,15 @@
<el-form class="dia-form"> <el-form class="dia-form">
<p style="margin-bottom: 5px">请选择要加入的团队</p> <p style="margin-bottom: 5px">请选择要加入的团队</p>
<el-form-item> <el-form-item>
<el-select class="w-100" v-model="enterForm.teamId"> <el-select class="w-100" v-model="enterForm.teamId" filterable>
<el-option v-for="(item, i) in teams" :key="i" :label="item.teamName" :value="item.teamId"></el-option> <el-option v-for="(item, i) in teams" :key="i" :label="item.teamName" :value="item.teamId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-input placeholder="请输入团队邀请码" maxlength="6" v-model="enterForm.invitationCode"></el-input> <el-input placeholder="请输入6位数团队邀请码" maxlength="6" v-model="enterForm.invitationCode"></el-input>
</el-form-item> </el-form-item>
<el-form-item v-if="curItem.isNeedCode"> <el-form-item v-if="curItem.setup.isNeedCode">
<el-input placeholder="请输入大赛邀请码" maxlength="6" v-model="enterForm.registrationInvitationCode"></el-input> <el-input placeholder="请输入4位数大赛邀请码" maxlength="4" v-model="enterForm.registrationInvitationCode"></el-input>
</el-form-item> </el-form-item>
<p class="tips"> <p class="tips">
查找不到团队点击 <el-link :underline="false" type="primary" @click="toTeam">创建团队</el-link> 查找不到团队点击 <el-link :underline="false" type="primary" @click="toTeam">创建团队</el-link>
@ -145,10 +145,10 @@
<el-input placeholder="请输入团队名称" maxlength="10" v-model="teamForm.teamName"></el-input> <el-input placeholder="请输入团队名称" maxlength="10" v-model="teamForm.teamName"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-input placeholder="请设置团队邀请码" maxlength="6" v-model="teamForm.invitationCode"></el-input> <el-input placeholder="请输入6位数团队邀请码" maxlength="6" v-model="teamForm.invitationCode"></el-input>
</el-form-item> </el-form-item>
<el-form-item v-if="curItem.isNeedCode"> <el-form-item v-if="curItem.setup.isNeedCode">
<el-input placeholder="请输入大赛邀请码" maxlength="6" v-model="teamForm.registrationInvitationCode"></el-input> <el-input placeholder="请输入4位数大赛邀请码" maxlength="4" v-model="teamForm.registrationInvitationCode"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -251,7 +251,9 @@ export default {
invitationCode: '', invitationCode: '',
whetherSignUp: 1 whetherSignUp: 1
}, },
curItem: {} curItem: {
setup: {}
}
}; };
}, },
directives: { directives: {
@ -260,15 +262,12 @@ export default {
let that = vnode.context; let that = vnode.context;
let item = that.listData[binding.value]; let item = that.listData[binding.value];
let time = '' let time = ''
let second = 1000;
let minute = second * 60;
let hour = minute * 60;
let now = new Date().getTime();
let signUpStartTime = new Date(that.core.dateCompatible(item.signUpStartTime)).getTime(); // let signUpStartTime = new Date(that.core.dateCompatible(item.signUpStartTime)).getTime(); //
let signUpEndTime = new Date(that.core.dateCompatible(item.signUpEndTime)).getTime(); // let signUpEndTime = new Date(that.core.dateCompatible(item.signUpEndTime)).getTime(); //
let playStartTime = new Date(that.core.dateCompatible(item.playStartTime)).getTime(); // let playStartTime = new Date(that.core.dateCompatible(item.playStartTime)).getTime(); //
let playEndTime = new Date(that.core.dateCompatible(item.playEndTime)).getTime(); // let playEndTime = new Date(that.core.dateCompatible(item.playEndTime)).getTime(); //
let timer = setInterval(() => {
let now = new Date().getTime();
switch (item.status) { switch (item.status) {
// statusgetData // statusgetData
case 0: case 0:
@ -307,20 +306,20 @@ export default {
} }
break; break;
} }
time = `${Math.floor(time / hour)}:${Math.floor(time % hour / minute)}:${Math.floor(time % hour % minute / second)}`; let total = time / 1000
let timer = setInterval(() => { if (total > 86400) { //
let timeList = time.split(":"); clearInterval(timer)
let total = Number.parseInt(timeList[0] * 60 * 60) + Number.parseInt(timeList[1] * 60) + Number.parseInt(timeList[2]); item.end = Math.floor(total / 86400)
if (total > 0) { } else if (total > 0) {
--total; --total;
let hours = Math.floor(total / (60 * 60)); let hours = Math.floor(total / (60 * 60));
let minutes = Math.floor(total % (60 * 60) / 60); let minutes = Math.floor(total % (60 * 60) / 60);
let seconds = Math.floor(total % (60 * 60) % 60); let seconds = Math.floor(total % (60 * 60) % 60);
time = `${that.core.formateTime(hours)}:${that.core.formateTime(minutes)}:${that.core.formateTime(seconds)}`; time = `${that.core.formateTime(hours)}:${that.core.formateTime(minutes)}:${that.core.formateTime(seconds)}`;
} else { } else if (that.status === 5) {
clearInterval(timer); clearInterval(timer);
} }
el.innerHTML = time; if (total > 0) el.innerHTML = time;
}, 1000); }, 1000);
that.timerList.push(timer); that.timerList.push(timer);
} }
@ -500,7 +499,7 @@ export default {
const form = this.enterForm const form = this.enterForm
if (!form.teamId) return util.errorMsg('请选择团队') if (!form.teamId) return util.errorMsg('请选择团队')
if (!form.invitationCode) return util.errorMsg('请输入团队邀请码') if (!form.invitationCode) return util.errorMsg('请输入团队邀请码')
if (this.curItem.isNeedCode && !form.registrationInvitationCode) return util.errorMsg('请输入大赛邀请码') if (this.curItem.setup.isNeedCode && !form.registrationInvitationCode) return util.errorMsg('请输入大赛邀请码')
this.$post(this.api.joinCompetitionTeam, form).then(res => { this.$post(this.api.joinCompetitionTeam, form).then(res => {
this.enterVisible = false this.enterVisible = false
this.getData() this.getData()
@ -535,7 +534,7 @@ export default {
if (!form.teamName) return util.errorMsg('请输入团队名称') if (!form.teamName) return util.errorMsg('请输入团队名称')
if (this.teamNameRepeat) return util.errorMsg('团队名称重复,请重新输入') if (this.teamNameRepeat) return util.errorMsg('团队名称重复,请重新输入')
if (form.invitationCode.length !== 6) return util.errorMsg('请输入6位数团队邀请码') if (form.invitationCode.length !== 6) return util.errorMsg('请输入6位数团队邀请码')
if (this.curItem.isNeedCode && !form.registrationInvitationCode) return util.errorMsg('请输入大赛邀请码') if (this.curItem.setup.isNeedCode && !form.registrationInvitationCode) return util.errorMsg('请输入大赛邀请码')
this.$post(this.api.addCompetitionTeam, form).then(res => { this.$post(this.api.addCompetitionTeam, form).then(res => {
this.teamVisible = false this.teamVisible = false
this.enterVisible = false this.enterVisible = false
@ -634,6 +633,7 @@ export default {
util.cookies.set('competitionId', this.curItem.id) util.cookies.set('competitionId', this.curItem.id)
util.cookies.set('stageId', form.stageId) util.cookies.set('stageId', form.stageId)
util.cookies.set('teamId', this.curItem.teamId) util.cookies.set('teamId', this.curItem.teamId)
util.cookies.set('stopTime', form.endTime)
util.cookies.set('fromManager', '', -1) util.cookies.set('fromManager', '', -1)
// 8pythoncookiesystemId // 8pythoncookiesystemId
location.href = process.env.NODE_ENV === 'development' ? location.href = process.env.NODE_ENV === 'development' ?

@ -29,7 +29,7 @@ if (isPro) {
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.51:9000/"; // 榕 host = "http://192.168.31.51:9000/"; // 榕
host = "http://192.168.31.116:9000/"; // 赓 // host = "http://192.168.31.116:9000/"; // 赓
} }
const Setting = { const Setting = {

@ -5,7 +5,8 @@ export default {
namespaced: true, namespaced: true,
state: { state: {
toMatch: '', toMatch: '',
eventType: 2 // 赛事类型 eventType: 2, // 赛事类型
noticed: 0 // 登录后会调一个接口提示是否有取消的赛事,提示完后置为1
}, },
mutations: { mutations: {
SET_SOURCE: (state, id) => { SET_SOURCE: (state, id) => {
@ -13,6 +14,9 @@ export default {
}, },
SET_TYPE: (state, eventType) => { SET_TYPE: (state, eventType) => {
state.eventType = eventType state.eventType = eventType
},
SET_NOTICE: (state) => {
state.noticed = 1
} }
}, },
actions: { actions: {

Loading…
Cancel
Save