From 43b59996f36fc7049237b4dc2aa37c67f98213ef Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Tue, 9 Apr 2024 13:47:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=9B=E4=BA=8B=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/match/add/set.vue | 1 + src/views/match/add/step2.vue | 2 +- src/views/match/add/step3.vue | 16 +++++++- src/views/match/manage/matchArchList.vue | 13 +++++-- src/views/match/manage/matchSignup.vue | 47 +++++++++++++----------- 5 files changed, 51 insertions(+), 28 deletions(-) diff --git a/src/views/match/add/set.vue b/src/views/match/add/set.vue index 4460d43..e9074ba 100644 --- a/src/views/match/add/set.vue +++ b/src/views/match/add/set.vue @@ -295,6 +295,7 @@ export default { }, // 返回 back () { + this.$emit('update:form', this.$parent.curOriginForm) this.$emit('hideSet') } } diff --git a/src/views/match/add/step2.vue b/src/views/match/add/step2.vue index 5984e22..61fc0bf 100644 --- a/src/views/match/add/step2.vue +++ b/src/views/match/add/step2.vue @@ -8,7 +8,7 @@ label-width="170px" label-suffix=":" size="small" - :disabled="!editing && id"> + :disabled="!!(!editing && id)"> {{ step1.completeCompetitionSetup.competitionType ? '团队赛(' + step1.completeCompetitionSetup.minTeamSize + '-' + step1.completeCompetitionSetup.maxTeamSize + '人/队)' : '个人赛' }} (如需修改,请返回上一步。) diff --git a/src/views/match/add/step3.vue b/src/views/match/add/step3.vue index cbbb1b0..12d52dc 100644 --- a/src/views/match/add/step3.vue +++ b/src/views/match/add/step3.vue @@ -7,7 +7,7 @@ + :disabled="!!(!editing && id)">
@@ -197,6 +197,7 @@ export default { form: [], setVisible: false, curStep: 0, + curOriginForm: {}, }; }, components: { @@ -278,6 +279,7 @@ export default { }, // 显示设置页面 toSet (i) { + this.curOriginForm = JSON.parse(JSON.stringify(this.form[i])) this.curStep = i this.$parent.showBtns = false this.setVisible = true @@ -355,8 +357,19 @@ export default { publish () { this.competitionId && this.$post(`${this.api.publishCompetition}?competitionId=${this.competitionId}&publishStatus=1`).then(res => { }).catch(err => { }) }, + // 自动分配人员 + autoAllocation () { + this.$confirm('团队赛已发布,是否要自动分配阶段人员?', '提示', { + // confirmButtonText: '确定', + // cancelButtonText: '取消', + type: 'success' + }).then(() => { + + }).catch(() => { }); + }, // 提交 save (status, next = 0) { + // return console.log(this.$parent.$refs.step1.form.completeCompetitionSetup.competitionType) const { form } = this if (!form.length) { this.$parent.hideLoad() @@ -449,6 +462,7 @@ export default { this.$parent.hideLoad() // 新增赛事,并且点的是发布按钮,则发布该赛事 status && this.publish(status) + // this.$parent.$refs.step1.form.completeCompetitionSetup.competitionType && this.autoAllocation() // 团队并且第一次发布才需要弹框询问是否自动分配人员 util.successMsg((status ? '发布' : '保存') + '成功') this.$emit('next', next) }).catch(err => { diff --git a/src/views/match/manage/matchArchList.vue b/src/views/match/manage/matchArchList.vue index b27cddc..ea1d716 100644 --- a/src/views/match/manage/matchArchList.vue +++ b/src/views/match/manage/matchArchList.vue @@ -104,7 +104,11 @@ + align="center"> + +
- 取消上传 - 后台上传 + 停止导入 @@ -517,8 +521,9 @@ export default { // 批量导入 batchImport () { - this.isBackstage = 0 this.importVisible = true + this.uploadList = [] + this.uploadFaild = false }, // 模板下载 download () { @@ -546,12 +551,13 @@ export default { this.uploadTips = '' if (status === 200) { this.init() + const { tip } = data if (data.exportCode) { this.exportCode = data.exportCode this.uploadFaild = true - this.uploadTips = data.tip + this.uploadTips = tip } else { - util.successMsg(data.tip, 3000) + util[tip.includes('5000') ? 'errorMsg' : 'successMsg'](tip, 3000) this.importVisible = false this.keyWord = '' } @@ -560,7 +566,6 @@ export default { } }, uploadError (err, file, fileList) { - console.log("🚀 ~ uploadError ~ err:", err) this.uploading = false this.$message({ message: "上传出错,请重试!", @@ -579,14 +584,11 @@ export default { this.uploadFaild = false }, cancelUpload () { - if (!this.isBackstage) { - this.uploadList = [] - this.$refs.upload.abort() - this.uploading = false - this.init() - this.importVisible = false - this.keyWord = '' - } + this.uploading = false + this.$refs.upload.abort() + this.keyWord = '' + this.init() + this.importVisible = false }, // 后台上传 backstageUpload () { @@ -661,6 +663,7 @@ export default { hrUserAccount: { ...form, id: form.id, + lastTimeInstitutionId: this.originForm.studentAffiliatedInstitutionId }, hrUserInfo: { userId: form.userId,