From 71d4b2782cd08d6352e182d590e5ec159502f2a1 Mon Sep 17 00:00:00 2001 From: "@fawn-nine" <1271023382@qq.com> Date: Tue, 11 Jun 2024 13:12:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/course/chapter-add-or-update.vue | 6 +- src/views/modules/course/courseCatalogue.vue | 23 +++++++ src/views/modules/course/courseVideo.vue | 69 ++++++++++++++++++- 3 files changed, 94 insertions(+), 4 deletions(-) diff --git a/src/views/modules/course/chapter-add-or-update.vue b/src/views/modules/course/chapter-add-or-update.vue index 0ce95e6..9089a73 100644 --- a/src/views/modules/course/chapter-add-or-update.vue +++ b/src/views/modules/course/chapter-add-or-update.vue @@ -91,8 +91,10 @@ > - - + 取消 diff --git a/src/views/modules/course/courseCatalogue.vue b/src/views/modules/course/courseCatalogue.vue index 9d60ff2..f52bfd0 100644 --- a/src/views/modules/course/courseCatalogue.vue +++ b/src/views/modules/course/courseCatalogue.vue @@ -142,6 +142,10 @@ @click.native="handleCreateProduct(scope.row.id)" >创建商品 + 迁移本部 @@ -234,6 +238,25 @@ export default { this.dataListLoading = false; }); }, + migrate(item){ + // 课程迁移 + console.log(item) + this.$confirm('您正在进行课程迁移操作, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + // this.$message({ + // type: 'success', + // message: '删除成功!' + // }); + }).catch(() => { + // this.$message({ + // type: 'info', + // message: '已取消删除' + // }); + }) + }, // 每页数 sizeChangeHandle(val) { this.pageSize = val; diff --git a/src/views/modules/course/courseVideo.vue b/src/views/modules/course/courseVideo.vue index 915f8c1..a9294c8 100644 --- a/src/views/modules/course/courseVideo.vue +++ b/src/views/modules/course/courseVideo.vue @@ -17,7 +17,7 @@ 普通 - + @@ -25,6 +25,23 @@ --> + + + @@ -71,7 +88,8 @@ export default { totalPage: 0, dataListLoading: false, dataListSelections: [], - addOrUpdateVisible: false + addOrUpdateVisible: false, + oldSort:0, } }, components: { @@ -90,6 +108,43 @@ export default { this.getDataList() }, methods: { + cancelBtn(row){ + row.isEdit = false + this.oldSort = 0 + if(row.sort == ""){row.sort = 0} + }, + changeSort(row){ // 确认排序 + if(this.oldSort == row.sort) {return} + if(row.sort == ""){row.sort = 0} + row.isEdit = false + // console.log(row) + // return false + + this.$http({ + url: this.$http.adornUrl('/master/course/editCourseCatalogueChapterVideo'), + method: 'post', + data: this.$http.adornData({ + "id": row.id, + 'chapterId': row.chapterId, + 'type': row.type, + "video": row.video, + // "content": this.dataForm.content, + "sort": row.sort, + }) + }) + .then(({ data }) => { + if(data.code == 0 && data.msg == "success"){ + this.getDataList() + this.oldSort = 0 + // console.log(this.oldSort,'复原') + } + }); + }, + myDbClick(row){ // 双击修改排序 + this.oldSort = row.sort + console.log(this.oldSort,88888888) + row.isEdit = true + }, // 获取数据列表 getDataList() { this.dataListLoading = true @@ -107,6 +162,10 @@ export default { }) }).then(({ data }) => { if (data && data.code === 0 && data.page && data.page.records) { + var list = data.page.records + list.forEach(item => { + item.isEdit = false + }); this.dataList = data.page.records this.totalPage = data.page.total } else { @@ -255,3 +314,9 @@ export default { } } + \ No newline at end of file From 2620d1bbbb03217b46db4fbaf9a6cba98f611bc0 Mon Sep 17 00:00:00 2001 From: "@fawn-nine" <1271023382@qq.com> Date: Tue, 11 Jun 2024 13:19:59 +0800 Subject: [PATCH 2/2] 13.19 --- src/views/modules/course/chapter-add-or-update.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/modules/course/chapter-add-or-update.vue b/src/views/modules/course/chapter-add-or-update.vue index 9089a73..b276006 100644 --- a/src/views/modules/course/chapter-add-or-update.vue +++ b/src/views/modules/course/chapter-add-or-update.vue @@ -94,7 +94,7 @@ +
添加一项
---> 取消