|
|
@ -106,6 +106,21 @@ export default { |
|
|
|
step3, |
|
|
|
step3, |
|
|
|
step4 |
|
|
|
step4 |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 离开的时候判断是否有保存更改的信息,没有则拦截并提示 |
|
|
|
|
|
|
|
beforeRouteLeave(to, from, next) { |
|
|
|
|
|
|
|
const { updateTime } = this.$refs['step' + this.step] |
|
|
|
|
|
|
|
if(updateTime){ |
|
|
|
|
|
|
|
this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', { |
|
|
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
|
|
this.save(this.step,to.path,next) |
|
|
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
|
|
next() |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
next() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
mounted() { |
|
|
|
this.getPer() |
|
|
|
this.getPer() |
|
|
|
}, |
|
|
|
}, |
|
|
@ -134,8 +149,11 @@ export default { |
|
|
|
this.loadIns.close() |
|
|
|
this.loadIns.close() |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 提交 |
|
|
|
// 提交 |
|
|
|
save(status, next = 0) { |
|
|
|
save(status, next = 0,cb) { |
|
|
|
this.$refs['step' + this.step].save(status, next, this.releaseType) |
|
|
|
console.log('status=>',status) |
|
|
|
|
|
|
|
console.log('cb=>',cb) |
|
|
|
|
|
|
|
console.log('this.step=>',this.step) |
|
|
|
|
|
|
|
this.$refs['step' + this.step].save(status, next, this.releaseType,cb) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 上一步 |
|
|
|
// 上一步 |
|
|
|
prev() { |
|
|
|
prev() { |
|
|
@ -154,7 +172,10 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 发布后的逻辑 |
|
|
|
// 发布后的逻辑 |
|
|
|
next(next, setupId, competitionId) { |
|
|
|
next(next, setupId, competitionId,type) { |
|
|
|
|
|
|
|
console.log('next==>',next) |
|
|
|
|
|
|
|
console.log('setupId==>',setupId) |
|
|
|
|
|
|
|
console.log('competitionId==>',competitionId) |
|
|
|
if (!next) { |
|
|
|
if (!next) { |
|
|
|
this.$router.push(`/match?page=${this.$store.state.matchPage}`) |
|
|
|
this.$router.push(`/match?page=${this.$store.state.matchPage}`) |
|
|
|
} else if (next === 2) { |
|
|
|
} else if (next === 2) { |
|
|
@ -167,6 +188,13 @@ export default { |
|
|
|
this.step++ |
|
|
|
this.step++ |
|
|
|
} else if (next === 1) { |
|
|
|
} else if (next === 1) { |
|
|
|
this.step-- |
|
|
|
this.step-- |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
console.log(99999999) |
|
|
|
|
|
|
|
if(typeof setupId === 'function') { |
|
|
|
|
|
|
|
setupId() |
|
|
|
|
|
|
|
}else if(typeof type === 'function') { |
|
|
|
|
|
|
|
type() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 点击步骤条跳转 |
|
|
|
// 点击步骤条跳转 |
|
|
|