mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 20:06:44 +08:00
Merge branch 'pingcode-1104' into dev0515
This commit is contained in:
@@ -51,6 +51,9 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<br/>
|
<br/>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="margin-left: 28px;margin-top: 10px;display: flex;">视频时长:
|
||||||
|
<el-input-number style="width:146px;margin-left:5px;" v-model="curriculumData.duration" size="mini" :min="1" :max="999999999" label="描述文字" controls-position="right"></el-input-number>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top:35px;text-align: center"> <el-button type="primary" @click="saveData()" size="mini">保存</el-button> </div>
|
<div style="margin-top:35px;text-align: center"> <el-button type="primary" @click="saveData()" size="mini">保存</el-button> </div>
|
||||||
@@ -77,6 +80,9 @@
|
|||||||
秒</el-radio> -->
|
秒</el-radio> -->
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="margin-left: 28px;margin-top: 10px;display: flex;">音频时长:
|
||||||
|
<el-input-number style="width:146px;margin-left:5px;" v-model="curriculumData.duration" size="mini" :min="1" :max="999999999" label="描述文字" controls-position="right"></el-input-number>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top:35px;text-align: center;"> <el-button type="primary" @click="saveData()" size="mini">保存</el-button> </div>
|
<div style="margin-top:35px;text-align: center;"> <el-button type="primary" @click="saveData()" size="mini">保存</el-button> </div>
|
||||||
</div>
|
</div>
|
||||||
@@ -325,6 +331,7 @@
|
|||||||
completeSetup:0,
|
completeSetup:0,
|
||||||
second:5,
|
second:5,
|
||||||
setupTage:0,
|
setupTage:0,
|
||||||
|
duration: 0,
|
||||||
},
|
},
|
||||||
homework:{courseId: '', name:'', content:'', file:'', deadTime: '', submitMode: 3},
|
homework:{courseId: '', name:'', content:'', file:'', deadTime: '', submitMode: 3},
|
||||||
homeworkChange:{},
|
homeworkChange:{},
|
||||||
@@ -390,6 +397,7 @@
|
|||||||
this.curriculumData =JSON.parse(newVal.content);
|
this.curriculumData =JSON.parse(newVal.content);
|
||||||
}else{
|
}else{
|
||||||
this.curriculumData.url=newVal.content;
|
this.curriculumData.url=newVal.content;
|
||||||
|
this.curriculumData.duration = newVal.duration;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -412,6 +420,7 @@
|
|||||||
completeSetup:0,
|
completeSetup:0,
|
||||||
second:5,
|
second:5,
|
||||||
setupTage:0,
|
setupTage:0,
|
||||||
|
duration: 0,
|
||||||
};
|
};
|
||||||
//this.assess
|
//this.assess
|
||||||
},
|
},
|
||||||
@@ -503,6 +512,10 @@
|
|||||||
this.content.content=JSON.stringify(this.linkInfo);
|
this.content.content=JSON.stringify(this.linkInfo);
|
||||||
}
|
}
|
||||||
} else if(this.content.contentType==10 || this.content.contentType==20) {
|
} else if(this.content.contentType==10 || this.content.contentType==20) {
|
||||||
|
if(!this.curriculumData.duration){
|
||||||
|
this.$message.error("请手动输入课件时长");
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.content.content=JSON.stringify(this.curriculumData);
|
this.content.content=JSON.stringify(this.curriculumData);
|
||||||
}
|
}
|
||||||
let jsonData={
|
let jsonData={
|
||||||
@@ -639,6 +652,7 @@
|
|||||||
this.content.content=cfile.filePath;
|
this.content.content=cfile.filePath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.curriculumData.duration = cfile.duration;
|
||||||
this.content.courseId=this.course.id;
|
this.content.courseId=this.course.id;
|
||||||
this.content.duration=cfile.duration;//时长
|
this.content.duration=cfile.duration;//时长
|
||||||
this.content.sortIndex=1;
|
this.content.sortIndex=1;
|
||||||
|
|||||||
@@ -90,6 +90,7 @@
|
|||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
|
successParams: {},
|
||||||
uploadFileUrl: process.env.VUE_APP_BASE_API + "/xboe/sys/xuploader/file/upload", // 上传的图片服务器地址
|
uploadFileUrl: process.env.VUE_APP_BASE_API + "/xboe/sys/xuploader/file/upload", // 上传的图片服务器地址
|
||||||
data:{
|
data:{
|
||||||
dir:'course'
|
dir:'course'
|
||||||
@@ -172,7 +173,7 @@
|
|||||||
},
|
},
|
||||||
// 上传成功回调
|
// 上传成功回调
|
||||||
handleUploadSuccess(res, file) {
|
handleUploadSuccess(res, file) {
|
||||||
//console.log(res);
|
console.log(res,file,'resfile')
|
||||||
if(res.status == 200) {
|
if(res.status == 200) {
|
||||||
//上传到课件库
|
//上传到课件库
|
||||||
//console.log(res.result);
|
//console.log(res.result);
|
||||||
@@ -186,6 +187,12 @@
|
|||||||
duration:this.duration,
|
duration:this.duration,
|
||||||
remark:'课程中直接上传'
|
remark:'课程中直接上传'
|
||||||
}
|
}
|
||||||
|
if(res.result.fileType == 'mp4'||res.result.fileType == 'mp3'){
|
||||||
|
this.successParams = courseWare
|
||||||
|
this.courseFile = {fileName:res.result.displayName,id: '1',resType:'10'}
|
||||||
|
this.$message({message:"上传成功",type:'success',offset:100});
|
||||||
|
return
|
||||||
|
}
|
||||||
apiCourseFile.saveUpload(courseWare).then(rs=>{
|
apiCourseFile.saveUpload(courseWare).then(rs=>{
|
||||||
if(rs.status==200){
|
if(rs.status==200){
|
||||||
this.courseFile=rs.result;
|
this.courseFile=rs.result;
|
||||||
@@ -249,7 +256,19 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
chooseCourseFile(ccfile){
|
chooseCourseFile(ccfile){
|
||||||
this.$emit('choose', ccfile);
|
if(ccfile.resType == 10){
|
||||||
|
apiCourseFile.saveUpload(this.successParams).then(rs=>{
|
||||||
|
if(rs.status==200){
|
||||||
|
this.$emit('choose', rs.result);
|
||||||
|
}else{
|
||||||
|
this.$message.error(rs.message);
|
||||||
|
}
|
||||||
|
}).catch(err=>{
|
||||||
|
console.log(err,'errrrrr')
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
this.$emit('choose', ccfile);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,6 +75,9 @@
|
|||||||
秒</el-radio> -->
|
秒</el-radio> -->
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="margin-left: 28px;margin-top: 10px;display: flex;">视频时长:
|
||||||
|
<el-input-number style="width:146px;margin-left:5px;" v-model="cware.curriculumData.duration" size="mini" :min="1" :max="999999999" label="描述文字" controls-position="right"></el-input-number>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top:35px;text-align: center;"> <el-button :loading="loading" type="primary" @click="saveContent(1)" size="mini">保存</el-button> </div>
|
<div style="margin-top:35px;text-align: center;"> <el-button :loading="loading" type="primary" @click="saveContent(1)" size="mini">保存</el-button> </div>
|
||||||
@@ -102,6 +105,9 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<br/>
|
<br/>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="margin-left: 28px;margin-top: 10px;display: flex;">音频时长:
|
||||||
|
<el-input-number style="width:146px;margin-left:5px;" v-model="cware.curriculumData.duration" size="mini" :min="1" :max="999999999" label="描述文字" controls-position="right"></el-input-number>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top:35px;text-align: center;"> <el-button :loading="loading" type="primary" @click="saveContent(1)" size="mini">保存</el-button> </div>
|
<div style="margin-top:35px;text-align: center;"> <el-button :loading="loading" type="primary" @click="saveContent(1)" size="mini">保存</el-button> </div>
|
||||||
</div>
|
</div>
|
||||||
@@ -657,6 +663,7 @@
|
|||||||
completeSetup:0,
|
completeSetup:0,
|
||||||
second:5,
|
second:5,
|
||||||
setupTage:0,
|
setupTage:0,
|
||||||
|
duration: 0,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
pdfTip:'',//pdf文件的提示
|
pdfTip:'',//pdf文件的提示
|
||||||
@@ -835,10 +842,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(con.contentType==10 || con.contentType==20){
|
if(con.contentType==10 || con.contentType==20){
|
||||||
|
console.log(con.content,'con.content')
|
||||||
if(con.content.startsWith('\{')){
|
if(con.content.startsWith('\{')){
|
||||||
$this.cware.curriculumData=JSON.parse(con.content);
|
$this.cware.curriculumData=JSON.parse(con.content);
|
||||||
}else{
|
}else{
|
||||||
$this.cware.curriculumData.url=con.content;
|
$this.cware.curriculumData.url=con.content;
|
||||||
|
$this.cware.curriculumData.duration = con.duration;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this.cwareChange = deepClone($this.cware);
|
$this.cwareChange = deepClone($this.cware);
|
||||||
@@ -986,6 +995,7 @@
|
|||||||
this.cware.content.contentName=row.name;
|
this.cware.content.contentName=row.name;
|
||||||
this.cware.content.content=row.filePath;
|
this.cware.content.content=row.filePath;
|
||||||
this.cware.curriculumData.url = row.filePath;
|
this.cware.curriculumData.url = row.filePath;
|
||||||
|
this.cware.curriculumData.duration=row.duration;
|
||||||
this.cware.content.duration=row.duration;//时长
|
this.cware.content.duration=row.duration;//时长
|
||||||
this.cware.findShow=false;
|
this.cware.findShow=false;
|
||||||
if(this.cware.content.contentType==40){
|
if(this.cware.content.contentType==40){
|
||||||
@@ -1067,6 +1077,11 @@
|
|||||||
this.$message.error("请选择课件");
|
this.$message.error("请选择课件");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(!this.cware.curriculumData.duration){
|
||||||
|
this.$message.error("请手动输入课件时长");
|
||||||
|
this.loading=false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
postData.content.content=JSON.stringify(this.cware.curriculumData);
|
postData.content.content=JSON.stringify(this.cware.curriculumData);
|
||||||
this.cwareChange.curriculumData = deepClone(this.cware.curriculumData)
|
this.cwareChange.curriculumData = deepClone(this.cware.curriculumData)
|
||||||
}
|
}
|
||||||
@@ -1216,6 +1231,7 @@
|
|||||||
this.cware.curriculumData.url = cfile.filePath;
|
this.cware.curriculumData.url = cfile.filePath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.cware.curriculumData.duration=cfile.duration;
|
||||||
|
|
||||||
this.cware.content.duration=cfile.duration;//时长
|
this.cware.content.duration=cfile.duration;//时长
|
||||||
this.saveContent(1);
|
this.saveContent(1);
|
||||||
|
|||||||
@@ -224,16 +224,13 @@ export default {
|
|||||||
if(delIdx>-1){
|
if(delIdx>-1){
|
||||||
fileList.splice(delIdx,1);
|
fileList.splice(delIdx,1);
|
||||||
}
|
}
|
||||||
this.$emit("success", res);
|
|
||||||
} else {
|
} else {
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
if(this.limit == 1){
|
//this.fileList = [];
|
||||||
this.fileList = [];
|
|
||||||
}
|
|
||||||
this.$message({message:"上传失败",type:'error',offset:100});
|
this.$message({message:"上传失败",type:'error',offset:100});
|
||||||
}
|
}
|
||||||
|
|
||||||
// this.$emit("success", res);
|
this.$emit("success", res);
|
||||||
},
|
},
|
||||||
// 删除文件
|
// 删除文件
|
||||||
handleDelete(index) {
|
handleDelete(index) {
|
||||||
|
|||||||
Reference in New Issue
Block a user