From 2cb471ec92e9e35520cb351e05379f648d61bf32 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 30 Nov 2023 13:49:27 +0800 Subject: [PATCH] fix --- src/pages/match/add/index.vue | 39 +++++++++++++--------------- src/pages/match/add/step1.vue | 4 ++- src/pages/match/add/step2.vue | 10 ++++--- src/pages/match/add/step3.vue | 25 +++++++++--------- src/pages/match/manage/index.vue | 39 ++++++++++++++-------------- src/pages/match/manage/matchRank.vue | 16 +++++++----- src/pages/match/preview/index.vue | 2 +- 7 files changed, 69 insertions(+), 66 deletions(-) diff --git a/src/pages/match/add/index.vue b/src/pages/match/add/index.vue index d995a8f..de0f19d 100644 --- a/src/pages/match/add/index.vue +++ b/src/pages/match/add/index.vue @@ -93,12 +93,12 @@ 上一步 - 发布 保存并下一步 + @click="save(0, 2)">保存并下一步 { - this.save(this.step, to.path, next) - }).catch(() => { - next() - }) - } else { - next() - } - }, + // beforeRouteLeave (to, from, next) { + // const { updateTime } = this.$refs['step' + this.step] + // // debugger + // console.log('out', updateTime, this.step) + // if (this.step < 4 && this.$refs['step' + this.step] && updateTime) { + // this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', { + // type: 'warning' + // }).then(() => { + // this.save(this.step, to.path, next) + // }).catch(() => { + // next() + // }) + // } else { + // next() + // } + // }, mounted () { this.getPer() }, @@ -198,9 +200,6 @@ export default { }, // 提交 save (status, next = 0, cb) { - 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) }, // 上一步 @@ -234,7 +233,6 @@ export default { } else if (next === 1) { this.step-- } else { - console.log(99999999) if (typeof setupId === 'function') { setupId() } else if (typeof type === 'function') { @@ -275,7 +273,6 @@ export default { back () { // 更改了信息才需要提示 const { updateTime } = this.$refs['step' + this.step] - console.log("🚀 ~ file: index.vue:278 ~ back ~ updateTime:", updateTime) if (this.step < 4 && this.$refs['step' + this.step] && updateTime) { this.$confirm(`编辑的内容未保存,是否保存?`, '提示', { type: 'warning' diff --git a/src/pages/match/add/step1.vue b/src/pages/match/add/step1.vue index 6223d35..c4b0c72 100644 --- a/src/pages/match/add/step1.vue +++ b/src/pages/match/add/step1.vue @@ -710,11 +710,13 @@ export default { if (form.competitionScope == 2 && (!form.competitionRangeList || !form.competitionRangeList.length)) form.competitionScope = 1 } this.$parent.showLoad() - form.publishStatus = status + delete form.publishStatus + if (status === 1) form.publishStatus = 1 form.ztOpen = status ? 0 : 1 // 保存则禁用,发布则启用 form.releaseType = releaseType form.id = this.$route.query.id + this.updateTime = 0 if (form.id) { this.$post(this.api.editCompetition, form).then(res => { this.updateTime = 0 diff --git a/src/pages/match/add/step2.vue b/src/pages/match/add/step2.vue index bea38ee..1f41212 100644 --- a/src/pages/match/add/step2.vue +++ b/src/pages/match/add/step2.vue @@ -153,7 +153,7 @@ style="width: 120px"> 小时,公布(阶段)比赛成绩。 -
是否公布成绩详情: { this.$parent.hideLoad() diff --git a/src/pages/match/add/step3.vue b/src/pages/match/add/step3.vue index 4881567..08926ee 100644 --- a/src/pages/match/add/step3.vue +++ b/src/pages/match/add/step3.vue @@ -69,7 +69,7 @@ :file-list="item.competitionStageContentSetting.fileList" name="file"> 上传试卷 + type="primary">上传文件 说明 { + this.updateTime = 0 + this.pass = 1 this.$parent.hideLoad() // 新增赛事,并且点的是发布按钮,则发布该赛事 status && this.publish(status) diff --git a/src/pages/match/manage/index.vue b/src/pages/match/manage/index.vue index a55613d..78df934 100644 --- a/src/pages/match/manage/index.vue +++ b/src/pages/match/manage/index.vue @@ -81,25 +81,25 @@ export default { mounted () { Setting.dynamicRoute && this.initTabs() }, - beforeRouteLeave (to, from, next) { - const { detail } = this.$refs - if (detail) { - const step = detail.$refs['step' + detail.step] - if (detail.step < 4 && step && step.updateTime && !step.pass && !this.pass) { - this.$confirm(`编辑的内容未保存,是否保存并且发布?`, '提示.......', { - type: 'warning' - }).then(() => { - detail.save(1, to.path, next) - }).catch(() => { - next() - }) - } else { - next() - } - } else { - next() - } - }, + // beforeRouteLeave (to, from, next) { + // const { detail } = this.$refs + // if (detail) { + // const step = detail.$refs['step' + detail.step] + // if (detail.step < 4 && step && step.updateTime && !step.pass && !this.pass) { + // this.$confirm(`编辑的内容未保存,是否保存并且发布?`, '提示.......', { + // type: 'warning' + // }).then(() => { + // detail.save(1, to.path, next) + // }).catch(() => { + // next() + // }) + // } else { + // next() + // } + // } else { + // next() + // } + // }, methods: { initTabs () { const { btns } = this @@ -154,7 +154,6 @@ export default { }, // 返回列表 backPage () { - console.log(444, this.$store.state) this.pass = 1 this.$router.push(`/match?page=${this.$store.state.match.page}`) }, diff --git a/src/pages/match/manage/matchRank.vue b/src/pages/match/manage/matchRank.vue index d691a56..f4ffaaa 100644 --- a/src/pages/match/manage/matchRank.vue +++ b/src/pages/match/manage/matchRank.vue @@ -148,8 +148,10 @@ :rowspan="item.rowspan">

{{ item.teamScore }}

{{ item.teamCalculationMethodName }}

-

权重:

-

{{ item.pointWeight }}%

+ -

阶段比赛结束后{{ rule.resultAnnouncementTime }}小时,公布阶段比赛成绩。

+

晋级规则: