mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 11:26:43 +08:00
课件上传分钟
This commit is contained in:
@@ -305,10 +305,8 @@ export default {
|
||||
{ value: 10, label: '视频' },
|
||||
{ value: 20, label: '音频' },
|
||||
{ value: 30, label: '图片' },
|
||||
{ value: 40, label: '文档' }
|
||||
// { value: 41, label: "图文" },
|
||||
// { value: 50, label: "scrom包" },
|
||||
// { value: 90, label: "其他" }
|
||||
{ value: 40, label: '文档' },
|
||||
{ value: 50, label: "scrom" }
|
||||
],
|
||||
form: {
|
||||
id:'',
|
||||
@@ -532,6 +530,10 @@ export default {
|
||||
if (status === 200) {
|
||||
result.device1 = true;
|
||||
result.device2 = true;
|
||||
result.minute='';
|
||||
if(result.duration){
|
||||
result.minute=Math.round(result.duration/60); //四舍五入
|
||||
}
|
||||
|
||||
this.fileList.push(result);
|
||||
} else {
|
||||
@@ -555,6 +557,10 @@ export default {
|
||||
} else if (item.device2 === true) {
|
||||
item.device = 2;
|
||||
}
|
||||
//转化为秒
|
||||
if(item.minute){
|
||||
result.duration=parseFloat(result.minute)*60;
|
||||
}
|
||||
|
||||
});
|
||||
this.loading = true;
|
||||
@@ -578,7 +584,7 @@ export default {
|
||||
const { result, error, status } = await coueseFile.pageList(this.params, this.page);
|
||||
if (status === 200) {
|
||||
result.list.forEach(item=>{
|
||||
item.minute=item.duration/60;
|
||||
item.minute=Math.round(item.duration/60);//转化为分钟
|
||||
})
|
||||
this.tableData = result.list;
|
||||
this.page.count = result.count;
|
||||
@@ -593,22 +599,27 @@ export default {
|
||||
editFile(row) {
|
||||
coueseFile.detail(row.id).then(res=>{
|
||||
if(res.status == 200) {
|
||||
this.form = res.result;
|
||||
if (res.result.resOwner3 == '') {
|
||||
this.projectOwnership1 = [res.result.resOwner1, res.result.resOwner2];
|
||||
} else {
|
||||
this.projectOwnership1 = [res.result.resOwner1, res.result.resOwner2, res.result.resOwner3];
|
||||
}
|
||||
if (res.result.device === 1) {
|
||||
this.form.device1 = true;
|
||||
} else if (res.result.device === 2) {
|
||||
this.form.device2 = true;
|
||||
} else if (res.result.device === 3) {
|
||||
this.form.device1 = true;
|
||||
this.form.device2 = true;
|
||||
}
|
||||
this.form = res.result;
|
||||
if(this.form.duration){
|
||||
this.form.minute=Math.round(res.result.duration/60);//转化为分钟
|
||||
}else{
|
||||
this.form.minute=0;
|
||||
}
|
||||
})
|
||||
if (res.result.resOwner3 == '') {
|
||||
this.projectOwnership1 = [res.result.resOwner1, res.result.resOwner2];
|
||||
} else {
|
||||
this.projectOwnership1 = [res.result.resOwner1, res.result.resOwner2, res.result.resOwner3];
|
||||
}
|
||||
if (res.result.device === 1) {
|
||||
this.form.device1 = true;
|
||||
} else if (res.result.device === 2) {
|
||||
this.form.device2 = true;
|
||||
} else if (res.result.device === 3) {
|
||||
this.form.device1 = true;
|
||||
this.form.device2 = true;
|
||||
}
|
||||
}
|
||||
})
|
||||
this.editCoursewareShow = true;
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
|
||||
Reference in New Issue
Block a user