|
|
@@ -75,7 +75,7 @@
|
|
|
<el-table-column
|
|
|
prop="name"
|
|
|
label="文件名"
|
|
|
- width="260"
|
|
|
+ width="280"
|
|
|
>
|
|
|
<template #default="scope">
|
|
|
<el-icon v-if="scope.row['courseWareVO'].useMethod === 'SCAN'" style="color: #337ecc" class="myicon"><Reading /></el-icon>
|
|
|
@@ -134,6 +134,10 @@
|
|
|
<!-- && isPdfOrPicture(scope.row['courseWareVO'].name) === 'PDF'"-->
|
|
|
<!-- @click="handleDownloadPdfFile(scope.row['courseWareVO'].fileUrl)"-->
|
|
|
<!-- style="color: #67C23A" type="text">下载</el-button>-->
|
|
|
+ <a :href="scope.row['courseWareVO'].fileUrl"
|
|
|
+ v-if="scope.row['courseWareVO'].useMethod === 'ATTACHMENT' && isPdfOrPicture(scope.row['courseWareVO'].name) === 'PICTUREandATTACHMENT'">
|
|
|
+ <el-button style="color: #67C23A" type="text">下载</el-button>
|
|
|
+ </a>
|
|
|
<el-button v-if="Number(scope.row['courseWareVO'].senderId) === Number(this.$store.state.user.id)"
|
|
|
style="color: #F56C6C; margin-left: 10px" type="text"
|
|
|
@click="handleRemoveCourseWare(scope.row['courseWareVO'].id)">删除</el-button>
|
|
|
@@ -403,6 +407,7 @@ export default {
|
|
|
this.newName = null;
|
|
|
this.nameAppend = null;
|
|
|
this.file = null;
|
|
|
+ this.fileType = null;
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
@@ -417,6 +422,11 @@ export default {
|
|
|
this.nameAppend = null;
|
|
|
}
|
|
|
else {
|
|
|
+ this.$message({
|
|
|
+ message: "上传中,请稍候",
|
|
|
+ type: "warning",
|
|
|
+ duration: 5000
|
|
|
+ });
|
|
|
this.$apis.uploadCourseWareFile(this.courseId + "/" + this.file.name, this.file.raw)
|
|
|
.then(res => {
|
|
|
const fileUrl = res.data.data;
|
|
|
@@ -430,7 +440,6 @@ export default {
|
|
|
useMethod: this.form.useMethod,
|
|
|
fileUrl: fileUrl,
|
|
|
}).then(res => {
|
|
|
- //console.log(res.data.data.id);
|
|
|
this.$apis.setCanDownloadById(res.data.data.id, this.downloadValue);
|
|
|
this.$apis.getCourseWaresByCourseId(this.courseId)
|
|
|
.then(res => {
|
|
|
@@ -445,6 +454,7 @@ export default {
|
|
|
this.isNameUnique = false;
|
|
|
this.fileNum = 0;
|
|
|
this.file = null;
|
|
|
+ this.fileType = null;
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
@@ -465,6 +475,7 @@ export default {
|
|
|
this.fileNum = 0;
|
|
|
this.newName = null;
|
|
|
this.nameAppend = null;
|
|
|
+ this.fileType = null;
|
|
|
this.clearForm();
|
|
|
// Zhurui修改,关闭dialog
|
|
|
done();
|