mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 12:26:44 +08:00
Merge branch 'zcwy_0806_paihangb' into dev0515
This commit is contained in:
@@ -194,7 +194,7 @@
|
||||
<span slot="footer">
|
||||
<!-- <el-button type="infor" @click="isVisible(1)">移动端可见</el-button>
|
||||
<el-button type="infor" @click="isVisible(2)">pc端可见</el-button> -->
|
||||
<el-button type="primary" @click="saveUpload()">保存</el-button>
|
||||
<el-button type="primary" @click="saveUpload()" :loading="isTrue">保存</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog v-if="coursewareShow" title="预览课件" :close-on-click-modal="false" width="800px" :visible.sync="coursewareShow" custom-class="g-dialog">
|
||||
@@ -280,6 +280,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isTrue: false,
|
||||
resOwnerListMap: [],
|
||||
//fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||
fileBaseUrl:this.$xpage.constants.fileBaseUrl, //获成动态获取的处理
|
||||
@@ -534,6 +535,7 @@ export default {
|
||||
// }
|
||||
},
|
||||
handleUploadSuccess(rs) {
|
||||
this.isTrue = true;
|
||||
if (rs.status === 200) {
|
||||
let type = toContentType(rs.result.fileType);
|
||||
// ["doc", "xls", "ppt","docx", "xlsx", "pptx","png","txt", "pdf","jpg","gif","bmp","mp4","mp3"]
|
||||
@@ -568,11 +570,14 @@ export default {
|
||||
this.$message.error('上传的视频时长不能为0,请手动编辑时长');
|
||||
}
|
||||
this.fileList.push(res.result);
|
||||
this.isTrue = false;
|
||||
}else{
|
||||
this.$message.error(res.message);
|
||||
this.isTrue = true
|
||||
}
|
||||
}).catch (error=>{
|
||||
console.log(error,'error')
|
||||
this.isTrue = true
|
||||
//this.$message.error(error);
|
||||
});
|
||||
// const { result, status } = coueseFile.saveUpload(data);
|
||||
@@ -605,6 +610,7 @@ export default {
|
||||
this.$message.error('有待保存的上传文件,请执行保存操作');
|
||||
return false;
|
||||
}else{
|
||||
this.isTrue = false
|
||||
return done(true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user