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 01/13] =?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 bc64bdc971679b4ed41ebb65f8136153628d744c Mon Sep 17 00:00:00 2001 From: "@fawn-nine" <1271023382@qq.com> Date: Tue, 11 Jun 2024 13:18:09 +0800 Subject: [PATCH 02/13] 1 --- src/views/modules/course/chapter-add-or-update.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/views/modules/course/chapter-add-or-update.vue b/src/views/modules/course/chapter-add-or-update.vue index 0ce95e6..7a48bb2 100644 --- a/src/views/modules/course/chapter-add-or-update.vue +++ b/src/views/modules/course/chapter-add-or-update.vue @@ -91,6 +91,8 @@ > + + 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 03/13] 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 @@ +
添加一项
---> 取消 From 83987414aa682ea82191389a952562a79368615e Mon Sep 17 00:00:00 2001 From: "@fawn-nine" <1271023382@qq.com> Date: Tue, 11 Jun 2024 16:03:10 +0800 Subject: [PATCH 04/13] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=BB=86=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/course/chapter-add-or-update.vue | 90 +++++- src/views/modules/course/courseCatalogue.vue | 25 +- src/views/modules/course/courseList.vue | 29 +- src/views/modules/course/moveCourse.vue | 258 ++++++++++++++++++ 4 files changed, 380 insertions(+), 22 deletions(-) create mode 100644 src/views/modules/course/moveCourse.vue diff --git a/src/views/modules/course/chapter-add-or-update.vue b/src/views/modules/course/chapter-add-or-update.vue index b276006..3629fbd 100644 --- a/src/views/modules/course/chapter-add-or-update.vue +++ b/src/views/modules/course/chapter-add-or-update.vue @@ -66,7 +66,6 @@ :inactive-value="0" active-text="是" inactive-text="否" - > @@ -91,10 +90,44 @@ > - + +
+
视频/音频ID
+
+ +
+
+ + + + + + +
+ + 删除 +
+ +
+ 添加一条音/视频 +
取消 @@ -171,6 +204,18 @@ export default { dictType: "", dictValue: "" }, + typeList: [ + //类型0普通1加密 + + { + dictType: 0, + dictValue: "普通" + }, + { + dictType: 1, + dictValue: "加密" + } + ], gushuList: [], authorList: [], restaurants: [], @@ -187,8 +232,15 @@ export default { title: "", imgUrl: "", content: "", - sort: 1 - }, + sort: 1, + // video_audio_url: [ + // {url:'454545',type:0} + // ] + }, + video_audio_url: [ + {url:'454545',type:0} + ], + obj:{ url: "" ,type:0}, splitsTypeList: [], dataRule: {} }; @@ -199,6 +251,16 @@ export default { created() {}, mounted() {}, methods: { + delItem(index){ + this.video_audio_url.splice(index, 1) + // console.log(this.video_audio_url,'删除后的') + }, + addItem() { + var jj = {...this.obj} + + this.video_audio_url.push({...jj}); + console.log(this.video_audio_url,'this.dataForm.video_audio_url') + }, contentUploadSuccess(res, file) { // console.log(res) let quill = this.$refs.myQuillEditor.quill; @@ -233,6 +295,11 @@ export default { this.dataForm.courseId = courseid ? courseid : ""; this.dataForm.catalogueId = catalogue_id ? catalogue_id : ""; this.visible = true; + if(this.dataForm.video_audio_url && this.dataForm.video_audio_url.length > 0){ + this.video_audio_url = {...this.dataForm.video_audio_url} + }else{ + this.video_audio_url = [] + } if (this.dataForm.imgUrl && this.dataForm.imgUrl != "") { var img = { name: "", @@ -267,6 +334,7 @@ export default { content: this.dataForm.content, sort: this.dataForm.sort, isAudition: this.dataForm.isAudition, + video_audio_url:this.video_audio_url, }) }).then(({ data }) => { if (data && data.code === 0) { @@ -345,3 +413,11 @@ export default { } }; + diff --git a/src/views/modules/course/courseCatalogue.vue b/src/views/modules/course/courseCatalogue.vue index f52bfd0..d15359f 100644 --- a/src/views/modules/course/courseCatalogue.vue +++ b/src/views/modules/course/courseCatalogue.vue @@ -162,6 +162,10 @@ ref="addOrUpdate" @refreshDataList="getDataList" > + + + From 3e8e5cf7e498c934eebb827907872fa9eb3be568 Mon Sep 17 00:00:00 2001 From: "@fawn-nine" <1271023382@qq.com> Date: Wed, 12 Jun 2024 16:41:22 +0800 Subject: [PATCH 05/13] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=BB=86=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/course/chapter-add-or-update.vue | 38 ++++++---- src/views/modules/course/courseCatalogue.vue | 71 ++++++++++-------- src/views/modules/course/courseList.vue | 75 ++++++++++++++++--- src/views/modules/course/moveCourse.vue | 38 +++++++++- src/views/modules/course/sociologyList.vue | 1 + 5 files changed, 163 insertions(+), 60 deletions(-) diff --git a/src/views/modules/course/chapter-add-or-update.vue b/src/views/modules/course/chapter-add-or-update.vue index 3629fbd..31ea3d9 100644 --- a/src/views/modules/course/chapter-add-or-update.vue +++ b/src/views/modules/course/chapter-add-or-update.vue @@ -91,16 +91,18 @@ -
+
-
视频/音频ID
+
视频/音频ID
@@ -125,9 +127,9 @@ 删除
-
+
添加一条音/视频 -
+
取消 @@ -238,11 +240,12 @@ export default { // ] }, video_audio_url: [ - {url:'454545',type:0} + { video: "" ,type:0,id:0} ], - obj:{ url: "" ,type:0}, + obj:{ video: "" ,type:0,id:0}, splitsTypeList: [], - dataRule: {} + dataRule: {}, + chapterId:null, }; }, components: { @@ -256,9 +259,9 @@ export default { // console.log(this.video_audio_url,'删除后的') }, addItem() { - var jj = {...this.obj} - - this.video_audio_url.push({...jj}); + // var jj = {...this.obj} + console.log(this.video_audio_url.length,'this.dataForm.video_audio_url--------') + this.video_audio_url.push({'chapterId':this.chapterId, ...this.obj}); console.log(this.video_audio_url,'this.dataForm.video_audio_url') }, contentUploadSuccess(res, file) { @@ -295,10 +298,11 @@ export default { this.dataForm.courseId = courseid ? courseid : ""; this.dataForm.catalogueId = catalogue_id ? catalogue_id : ""; this.visible = true; - if(this.dataForm.video_audio_url && this.dataForm.video_audio_url.length > 0){ - this.video_audio_url = {...this.dataForm.video_audio_url} + this.chapterId = this.dataForm.id + if(this.dataForm.videoList && this.dataForm.videoList.length > 0){ + this.video_audio_url = [...this.dataForm.videoList] }else{ - this.video_audio_url = [] + // this.video_audio_url = [] } if (this.dataForm.imgUrl && this.dataForm.imgUrl != "") { var img = { @@ -334,10 +338,11 @@ export default { content: this.dataForm.content, sort: this.dataForm.sort, isAudition: this.dataForm.isAudition, - video_audio_url:this.video_audio_url, + videoList:this.video_audio_url, }) }).then(({ data }) => { if (data && data.code === 0) { + // this.video_audio_url = [] this.$message({ message: "操作成功", type: "success", @@ -373,7 +378,8 @@ export default { console.log(file); }, handlereset() { - (this.fileList = []), (this.fileListNovel = []), (this.visible = false); + // this.video_audio_url = [] + (this.fileList = []), (this.fileListNovel = []), (this.visible = false),(this.video_audio_url = []); }, handlePreview(file) { console.log(file); diff --git a/src/views/modules/course/courseCatalogue.vue b/src/views/modules/course/courseCatalogue.vue index d15359f..5884adc 100644 --- a/src/views/modules/course/courseCatalogue.vue +++ b/src/views/modules/course/courseCatalogue.vue @@ -77,7 +77,14 @@ - + + 创建商品 - 迁移本部 @@ -163,8 +169,9 @@ @refreshDataList="getDataList" > { - this.drawerVisible = true + // console.log(item); + + // this.$confirm("您正在进行课程迁移操作, 是否继续?", "提示", { + // confirmButtonText: "确定", + // cancelButtonText: "取消", + // type: "warning" + // }) + // .then(() => { + this.catalogueId = item.id + this.catalogueTitle = item.title + this.drawerVisible = true; this.$nextTick(() => { - this.$refs["moveCourse"].getDataList(); - }); - // this.$message({ - // type: 'success', - // message: '删除成功!' - // }); - }).catch(() => { - - }) + this.$refs["moveCourse"].getDataList(); + }); + // }) + // .catch(() => {}); }, // 每页数 sizeChangeHandle(val) { @@ -294,7 +303,7 @@ export default { }); }, handleCreateProduct(id) { - console.log('id at line 260:', id) + console.log("id at line 260:", id); this.$http .request({ url: this.$http.adornUrl(`${this.urlList.createProduct}`), diff --git a/src/views/modules/course/courseList.vue b/src/views/modules/course/courseList.vue index e00649a..a876920 100644 --- a/src/views/modules/course/courseList.vue +++ b/src/views/modules/course/courseList.vue @@ -70,13 +70,6 @@ @@ -263,7 +256,7 @@ fixed="right" header-align="center" align="center" - width="160" + width="240" label="操作" > @@ -390,7 +424,9 @@ export default { urlList: { medicalList: "/master/courseMedical/getCourseMedicalList", //医学 sociologyList: "/master/courseSociology/getCourseSociologyList" //国学 - } + }, + resList: [], + resListVisible: false }; }, components: { @@ -406,6 +442,27 @@ export default { this.getTreeList(this.urlList.sociologyList, 2); }, methods: { + closeLink() { + this.resListVisible = false; + this.resList = []; + }, + showLinkTags(row) { + + this.$http({ + url: this.$http.adornUrl("/master/course/getCourseLableLinkList"), + method: "post", + data: this.$http.adornData({ + courseId: row.id + }) + }).then(res => { + this.resListVisible = true; + if (res.data.code == 0 && res.data.resList.length > 0) { + this.resList = res.data.resList; + + } + // console.log(row, "row" , res.data.resList,this.resList); + }); + }, handleChange(value) { console.log(value, "989999999"); }, diff --git a/src/views/modules/course/moveCourse.vue b/src/views/modules/course/moveCourse.vue index 84abda9..231c182 100644 --- a/src/views/modules/course/moveCourse.vue +++ b/src/views/modules/course/moveCourse.vue @@ -98,7 +98,9 @@ + \ No newline at end of file From 0ce171f1c0fc51b40e1595dbf1077e0185149942 Mon Sep 17 00:00:00 2001 From: "@fawn-nine" <1271023382@qq.com> Date: Wed, 19 Jun 2024 12:05:34 +0800 Subject: [PATCH 08/13] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/course/medicalLabel.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/views/modules/course/medicalLabel.vue b/src/views/modules/course/medicalLabel.vue index 1d71d53..fa78b41 100644 --- a/src/views/modules/course/medicalLabel.vue +++ b/src/views/modules/course/medicalLabel.vue @@ -116,6 +116,7 @@ :action="baseUrl + '/oss/fileoss'" :on-remove="audioHandleRemove" :on-success="audioUploadSuccess" + :before-upload="onprogress" accept=".mp3" :limit="1" :file-list="audioFileList" @@ -611,6 +612,9 @@ export default { this.getDataList(); }, methods: { + onprogress(){ + this.$message('上传中,请勿关闭或进行其他操作'); + }, audioHandleRemove(file, fileList) { console.log(file, fileList); this.audioFileList = [] @@ -619,6 +623,7 @@ export default { audioUploadSuccess(res, file) { this.audioFileList = [] this.audioFileList.push(file) + this.$message.success('上传成功'); console.log(this.audioFileList,res, "上传成功"); this.addForm.media = res.url From af3572fbecf92415e8a6229ff7ac2e54ac6bddac Mon Sep 17 00:00:00 2001 From: "@fawn-nine" <1271023382@qq.com> Date: Mon, 24 Jun 2024 15:50:42 +0800 Subject: [PATCH 09/13] =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 1 + src/views/modules/user/user.vue | 34 +- src/views/modules/user/userCourse.vue | 453 ++++++++++++++++++++++++++ static/config/index.js | 4 +- 4 files changed, 482 insertions(+), 10 deletions(-) create mode 100644 src/views/modules/user/userCourse.vue diff --git a/src/router/index.js b/src/router/index.js index 4b11c0d..15d4798 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -64,6 +64,7 @@ const mainRoutes = { { path: '/course-courseChapter', component: _import('modules/course/courseChapter'), name: 'course-courseChapter', meta: { title: '课程目录章节列表', isTab: true } }, { path: '/course-courseVideo', component: _import('modules/course/courseVideo'), name: 'course-courseVideo', meta: { title: '课程目录章节视频列表', isTab: true } }, { path: '/course-sociologyList', component: _import('modules/course/sociologyList'), name: 'course-sociologyList', meta: { title: '国学标签列表', isTab: true } }, + { path: '/userCourse', component: _import('modules/user/userCourse'), name: 'userCourse', meta: { title: '用户课程列表', isTab: true } }, ], beforeEnter (to, from, next) { let token = Vue.cookie.get('token') diff --git a/src/views/modules/user/user.vue b/src/views/modules/user/user.vue index 296adb9..6cbd84d 100644 --- a/src/views/modules/user/user.vue +++ b/src/views/modules/user/user.vue @@ -13,10 +13,10 @@ :disabled="dataListSelections.length <= 0">批量删除 --> - - - + - +