From edacc494669a722857b959e02262fd29fc6bdf8b Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Fri, 9 Dec 2022 16:45:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E8=B5=9B=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/css/main.css | 3 + src/utils/api.js | 3 +- src/views/course/AddCurriculum.vue | 98 ++++++++++++++++--- src/views/match/add/index.vue | 74 ++++++++------ src/views/match/add/set.vue | 47 +++++++-- src/views/match/add/step1.vue | 79 +++++++++------ src/views/match/add/step2.vue | 64 ++++++++---- src/views/match/add/step3.vue | 6 +- src/views/match/add/step4.vue | 53 ++++++++++ src/views/match/manage/index.vue | 36 +++---- src/views/match/manage/matchArch.vue | 118 +++++++++++++++++++++++ src/views/match/manage/matchProgress.vue | 16 +-- src/views/match/manage/matchSignup.vue | 39 ++++++-- src/views/match/manage/notice.vue | 6 +- src/views/match/manage/noticeDetail.vue | 2 +- 15 files changed, 508 insertions(+), 136 deletions(-) create mode 100644 src/views/match/add/step4.vue create mode 100644 src/views/match/manage/matchArch.vue diff --git a/src/assets/css/main.css b/src/assets/css/main.css index 5678e7e..bc79aa0 100644 --- a/src/assets/css/main.css +++ b/src/assets/css/main.css @@ -338,6 +338,9 @@ li { font-weight: normal; } +.el-input__inner[type=number] { + padding-right: 0; +} /*flex*/ .flex-center{ display: flex; diff --git a/src/utils/api.js b/src/utils/api.js index e738c95..14b8dec 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -303,6 +303,7 @@ export default { editCompetition: `competition/competition/management/editCompetition`, getCompetition: `competition/competition/management/getCompetition`, disabledEventsCompetition: `competition/competition/management/disabledEvents`, + getProjectAssessmentByCompetition: `occupationlab/occupationlab/projectManage/getProjectAssessmentByCompetition`, // 赛事内容 addCompetitionContent: `competition/competition/content/addCompetitionContent`, @@ -336,6 +337,6 @@ export default { amendmentAnnouncement: `competition/competition/announcement/amendmentAnnouncement`, deleteAnnouncement: `competition/competition/announcement/deleteAnnouncement`, disableAnnouncement: `competition/competition/announcement/disableAnnouncement`, - queryAnnouncementByContestId: `competition/competition/announcement/queryAnnouncementByContestId`, + queryAnnouncementByCompetitionId: `competition/competition/announcement/queryAnnouncementByCompetitionId`, queryAnnouncementDetails: `competition/competition/announcement/queryAnnouncementDetails`, }; \ No newline at end of file diff --git a/src/views/course/AddCurriculum.vue b/src/views/course/AddCurriculum.vue index 08bad9e..83af732 100644 --- a/src/views/course/AddCurriculum.vue +++ b/src/views/course/AddCurriculum.vue @@ -267,6 +267,56 @@ + + + +
+
+

+ 竞赛配置 +
+
+ 批量移除 + +
+
+
+ +
+ + + + + + + + + + + + + + + + + +
+
@@ -441,6 +491,8 @@ export default { assessmentData: [], assessmentTotal: 0, + matches: [], + matcheTotal: 0, multipleAssessment: [], submiting: false, // 新增编辑防抖标识 loadIns: null, @@ -535,7 +587,6 @@ export default { // 获取供应厂商 getSupplier() { const sid = this.$store.state.dataPer.find(e => e.permissionName === '课程管理') - console.log("🚀 ~ file: AddCurriculum.vue ~ line 523 ~ getSupplier ~ sid", sid) this.$get(this.api.getSupplierListByRole, { permissionId: sid.permissionId }).then(res => { @@ -544,7 +595,11 @@ export default { }, // 获取系统 getSystem() { - const checked = this.permissions ? this.assessmentData : this.practiceData + const checked = this[!this.permissions ? + 'practiceData' : + this.permissions == 1 ? + 'assessmentData' : + 'matches'] const sid = this.$store.state.dataPer.find(e => e.permissionName === '课程管理') this.$post(this.api.queryServiceConfig, { systemName: '', @@ -650,7 +705,11 @@ export default { }, // 获取系统 getConfig() { - const checked = this.permissions ? this.assessmentData : this.practiceData + const checked = this[!this.permissions ? + 'practiceData' : + this.permissions == 1 ? + 'assessmentData' : + 'matches'] const sid = this.$store.state.dataPer.find(e => e.permissionName === '课程管理') this.$post(this.api.queryServiceConfig, { systemName: this.systemKeyword, @@ -791,12 +850,15 @@ export default { e.isShow = 0; // isShow是否展示(默认0:展示 1:不展示) e.sort = i + 1; // 排序 }); - if (this.permissions) { - this.assessmentData = JSON.parse(JSON.stringify(list)) - this.assessmentTotal = this.assessmentData.length; - } else { - this.practiceData = JSON.parse(JSON.stringify(list)) - this.practiceTotal = this.practiceData.length; + if (!this.permissions) { + this.practiceData = JSON.parse(JSON.stringify(list)) + this.practiceTotal = this.practiceData.length; + } else if (this.permissions == 1) { + this.assessmentData = JSON.parse(JSON.stringify(list)) + this.assessmentTotal = this.assessmentData.length; + } else if (this.permissions == 2) { + this.matches = JSON.parse(JSON.stringify(list)) + this.matchTotal = this.matches.length; } } }, @@ -813,12 +875,15 @@ export default { this.multipleAssessment = val; }, handleBatchDelete(type) { // 批量移除 - if (type && !this.multipleAssessment.length) { + if (type == 1 && !this.multipleAssessment.length) { this.$message.warning("请勾选考核项目!"); return; } else if (!type && !this.multiplePractice.length) { this.$message.warning("请勾选练习项目!"); return; + } else if (type == 2 && !this.multiplePractice.length) { + this.$message.warning("请勾选竞赛项目!"); + return; } this.$confirm("此操作将批量移除项目, 是否继续?", "提示", { type: "warning" @@ -874,7 +939,6 @@ export default { if(+businessProportion + +manufacturerProportion !== 100) return this.$message.warning('比例分成总和须为100%,请重新修改') } form.supplier = form.supplier.join() - debugger if (!form.coverUrl) { this.$message.warning("请上传课程封面"); return; @@ -909,6 +973,18 @@ export default { }); form.systemIdByAssessment.sort((a, b) => a.sort - b.sort) } + // 竞赛配置 + form.systemIdByCompetition = this.matches.map(i => { + let obj = { + isShow: i.isShow, + projectId: i.projectId, + sort: Number(i.sort), + systemId: i.systemId + }; + return obj; + }); + form.systemIdByCompetition.sort((a, b) => a.sort - b.sort) + this.submiting = true this.loadIns = this.$loading({ lock: true, diff --git a/src/views/match/add/index.vue b/src/views/match/add/index.vue index 442eac5..21fdbc3 100644 --- a/src/views/match/add/index.vue +++ b/src/views/match/add/index.vue @@ -1,39 +1,46 @@