From 1d800d91b28d8c5c2083f06f949ca211367c5f4c Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Fri, 20 Dec 2024 16:47:58 +0800 Subject: [PATCH] fix --- src/views/course/content/source.vue | 31 ++++--- src/views/course/detail.vue | 129 +++++++++++++++++----------- src/views/match/add/set.vue | 31 ++++--- src/views/shop/add.vue | 22 ++--- 4 files changed, 128 insertions(+), 85 deletions(-) diff --git a/src/views/course/content/source.vue b/src/views/course/content/source.vue index d469533..2ab7cb4 100644 --- a/src/views/course/content/source.vue +++ b/src/views/course/content/source.vue @@ -34,18 +34,17 @@
- - - - - - - - {{ - section.name - }} + + + + + + + + + {{ section.name }}
@@ -376,6 +375,10 @@ export default { .check { margin: 0 10px; + + img { + vertical-align: middle; + } } .cover { @@ -391,7 +394,7 @@ export default { } .chapters { - padding-left: 21px; + padding-left: 26px; margin-top: 10px; .line { @@ -405,7 +408,7 @@ export default { } .sections { - padding-left: 26px; + padding-left: 43px; } } diff --git a/src/views/course/detail.vue b/src/views/course/detail.vue index a031472..8af03dd 100644 --- a/src/views/course/detail.vue +++ b/src/views/course/detail.vue @@ -41,7 +41,7 @@ -
+
@@ -222,7 +222,8 @@
- +
@@ -267,37 +268,39 @@

已选择项目({{ checkeds.length }}个)
- - - - - - - - - - - - - - - +
+ + + + + + + + + + + + + + +
- +
取 消 确 定 - - +
+
@@ -382,7 +385,6 @@ export default { multiplePractice: [], submiting: false, // 新增编辑防抖标识 - loadIns: null, updateTime: 0, systems: [], systemsAll: [], @@ -442,6 +444,7 @@ export default { methods: { getInfoData () { this.$post(`${this.api.curriculumDetail}?cid=${this.cid}`).then(({ data }) => { + if (!data.coverUrl) data.coverUrl = 'https://izhixinyun.com/images/course-cover.png' if (data.supplier) data.supplier = data.supplier.split(',').map(e => +e) this.form = data this.$nextTick(() => { @@ -807,17 +810,17 @@ export default { this.step-- }, async save (next) { + if (this.submiting) return false const { step, cid } = this // 第一步 if (step === 1) { this.$refs.form.validate(async (valid) => { if (valid) { - if (this.submiting) return false const form = JSON.parse(JSON.stringify(this.form)) form.supplier = form.supplier.join() form.platformId = Setting.platformId this.submiting = true - this.loadIns = this.$loading({ + const load = this.$loading({ lock: true, text: 'Loading', spinner: 'el-icon-loading', @@ -825,7 +828,6 @@ export default { }) try { const res = await this.$post(this.api[cid ? 'modifyCourse' : 'createCurriculum'], form) - this.loadIns.close() if (next) { this.step = 2 if (!cid) { @@ -837,7 +839,7 @@ export default { } } finally { this.submiting = false - this.loadIns.close() + load.close() } } }) @@ -846,6 +848,13 @@ export default { if (!this.practiceData.length) { return this.$message.warning("请添加练习项目配置") } else { + this.submiting = true + const load = this.$loading({ + lock: true, + text: 'Loading', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }) const list = this.practiceData.map(i => { let obj = { isShow: i.isShow, @@ -857,14 +866,19 @@ export default { return obj }); list.sort((a, b) => a.sort - b.sort) - await this.$post(this.api.configureCourseProject, { - cid: this.cid, - systemIdByPractice: list - }) - if (next) { - this.step = 3 - } else { - this.back() + try { + await this.$post(this.api.configureCourseProject, { + cid: this.cid, + systemIdByPractice: list + }) + if (next) { + this.step = 3 + } else { + this.back() + } + } finally { + this.submiting = false + load.close() } } } else if (step === 3) { @@ -872,6 +886,13 @@ export default { if (!this.assessmentData.length) { return this.$message.warning("请添加考核项目配置") } else { + this.submiting = true + const load = this.$loading({ + lock: true, + text: 'Loading', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }) const list = this.assessmentData.map(i => { let obj = { isShow: i.isShow, @@ -883,11 +904,16 @@ export default { return obj; }); list.sort((a, b) => a.sort - b.sort) - await this.$post(this.api.configureCourseProject, { - cid: this.cid, - systemIdByAssessment: list - }) - this.step = 4 + try { + await this.$post(this.api.configureCourseProject, { + cid: this.cid, + systemIdByAssessment: list + }) + this.step = 4 + } finally { + this.submiting = false + load.close() + } } } }, @@ -1068,8 +1094,16 @@ export default { } /deep/.config-dia { + .el-drawer__header { + padding-bottom: 20px; + margin-bottom: 0; + border-bottom: 1px solid #eee; + } + .config-wrap { display: flex; + padding: 15px; + gap: 20px; } .title-wrap { @@ -1078,9 +1112,8 @@ export default { .item { width: 250px; - max-height: 600px; + height: calc(100vh - 161px); padding: 10px; - margin-right: 20px; overflow: hidden; } @@ -1089,8 +1122,8 @@ export default { } .systems { + max-height: calc(100vh - 230px); margin-top: 10px; - max-height: 520px; overflow: auto; li { diff --git a/src/views/match/add/set.vue b/src/views/match/add/set.vue index e4b678f..449c0f9 100644 --- a/src/views/match/add/set.vue +++ b/src/views/match/add/set.vue @@ -25,21 +25,25 @@
- -