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] =?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 @@