diff --git a/src/views/course/CoursewareAddOrUpdate.vue b/src/views/course/CoursewareAddOrUpdate.vue index 8f2f687..d58ea79 100644 --- a/src/views/course/CoursewareAddOrUpdate.vue +++ b/src/views/course/CoursewareAddOrUpdate.vue @@ -54,11 +54,11 @@
课件学时:  - +

课件学分:  - +

课件大小:  @@ -120,32 +120,6 @@ 添加分类 - - -
课件大小:  @@ -199,15 +173,16 @@ export default { sizeStr: '0', //视频大小 type: '1', videoPath: [], - learnHours:0, - learnScore:0 + // learnHours:0.0, + // learnScore:0.0 }, textForm: { //文本上传表单 + sizeStr: '0', type: '2', // 用于表示tabkey 1-视频上传 2-文本上传 3-视频服务连接 4-第三方连接 videoPath: [], - learnHours:0, - learnScore:0 + // learnHours:0.0, + // learnScore:0.0 }, }, videoServerLink: { @@ -267,6 +242,8 @@ export default { callback(key) { this.fileUpload.videoForm = {}; this.fileUpload.textForm = {}; + console.log("aaaaaaa ",this.fileUpload.videoForm); + console.log("aaaaaaa ",this.fileUpload.textForm); this.videoPath = []; //置空文件 this.successOssFile = this.successOssFile.splice(this.successOssFile.length, 0); //清空数组 @@ -274,7 +251,7 @@ export default { this.fileUpload.tabkey = key; //等于当前的Key // 数据初始化 - this.initialize(key) + // this.initialize(key) }, //获取Tonken @@ -446,6 +423,7 @@ export default { } //给课程ID + this.fileUpload.videoForm.type = "1" this.fileUpload.videoForm.courseId = this.$route.query.courseId; this.fileUpload.videoForm.videoPath = this.videoPath; this.fileUpload.videoForm.ifResources = this.$route.query.ifResources || 0; @@ -463,6 +441,7 @@ export default { } //给课程ID + this.fileUpload.textForm.type = "2" this.fileUpload.textForm.courseId = this.$route.query.courseId; this.fileUpload.textForm.type = this.fileUpload.tabkey; this.fileUpload.textForm.videoPath = this.videoPath; @@ -571,18 +550,18 @@ export default { }, //视频上传和文本上传数据初始化 - initialize(key){ - if(key == 1) { - this.fileUpload.videoForm.sizeStr = 0.0 - this.fileUpload.videoForm.learnHours = 0.0 - this.fileUpload.videoForm.learnScore= 0.0 - } - if(key == 2){ - this.fileUpload.textForm.sizeStr = 0.0 - this.fileUpload.textForm.learnHours = 0.0 - this.fileUpload.textForm.learnScore= 0.0 - } - }, + // initialize(key){ + // if(key == 1) { + // this.fileUpload.videoForm.sizeStr = 0 + // this.fileUpload.videoForm.learnHours == 0 + // this.fileUpload.videoForm.learnScore= 0 + // } + // if(key == 2){ + // this.fileUpload.textForm.sizeStr = 0 + // this.fileUpload.textForm.learnHours = 0 + // this.fileUpload.textForm.learnScore= 0.0 + // } + // }, }, };