Merge branch 'zcwy_0806_paihangb' into dev0515

This commit is contained in:
zhangsir
2024-10-28 16:52:31 +08:00

View File

@@ -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);
}