|
|
|
@ -171,7 +171,6 @@ export default { |
|
|
|
|
test() { |
|
|
|
|
this.$store.commit("match/setWait", 0); |
|
|
|
|
// console.log(this.$store.state.match.waitIndex) |
|
|
|
|
console.log('testClick') |
|
|
|
|
}, |
|
|
|
|
...mapActions("match", [ |
|
|
|
|
"setMatchId" |
|
|
|
@ -182,7 +181,7 @@ export default { |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning' |
|
|
|
|
}).then(() => { |
|
|
|
|
this.save(1) |
|
|
|
|
this.save(1, false) |
|
|
|
|
EventBus.$emit('tabChangeWait', this.$store.state.match.waitIndex) |
|
|
|
|
}).catch(() => { |
|
|
|
|
this.$message({ |
|
|
|
@ -193,7 +192,7 @@ export default { |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
save(status) { |
|
|
|
|
save(status, judge=true) { |
|
|
|
|
this.touchTime = 0 |
|
|
|
|
this.sponsor = this.sponsorList.filter(d => d).join(); |
|
|
|
|
this.undertaker = this.undertakerList.filter(d => d).join(); |
|
|
|
@ -228,13 +227,17 @@ export default { |
|
|
|
|
if (this.id) { |
|
|
|
|
this.$put(this.api.editContest, data).then(res => { |
|
|
|
|
util.successMsg("修改成功"); |
|
|
|
|
this.$router.back(); |
|
|
|
|
if(judge) { |
|
|
|
|
this.$router.back(); |
|
|
|
|
} |
|
|
|
|
}).catch(err => { |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
this.$post(this.api.addContest, data).then(res => { |
|
|
|
|
util.successMsg("创建成功"); |
|
|
|
|
this.$router.back(); |
|
|
|
|
if(judge) { |
|
|
|
|
this.$router.back(); |
|
|
|
|
} |
|
|
|
|
}).catch(err => { |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|