|
|
|
@ -96,8 +96,8 @@ |
|
|
|
|
:close-on-click-modal="false"> |
|
|
|
|
<el-form ref="form" :model="sectionForm" label-width="80px" @submit.native.prevent> |
|
|
|
|
<el-form-item label="资源添加"> |
|
|
|
|
<Upload :max-size="100000" :file-list="uploadList" :on-remove="handleRemove" @beforeUpload="beforeUpload" |
|
|
|
|
@onSuccess="uploadSuccess"> |
|
|
|
|
<Upload :max-size="100000" :limit="10000" :file-list="uploadList" :on-remove="handleRemove" |
|
|
|
|
@beforeUpload="beforeUpload" @onSuccess="uploadSuccess"> |
|
|
|
|
<template slot="tip"> |
|
|
|
|
<p>视频请上传MP4格式,大小不超过150M;office文件大小不要超过10M</p> |
|
|
|
|
</template> |
|
|
|
@ -117,8 +117,8 @@ |
|
|
|
|
<el-dialog title="更换文件" :visible.sync="switchVisible" width="540px" :close-on-click-modal="false" |
|
|
|
|
@close="closeSwitch"> |
|
|
|
|
<div style="text-align: center"> |
|
|
|
|
<Upload :max-size="100000" :file-list="uploadList" :on-remove="handleRemove" @beforeUpload="beforeUpload" |
|
|
|
|
@onSuccess="uploadSuccess"> |
|
|
|
|
<Upload :max-size="100000" :limit="10000" :file-list="uploadList" :on-remove="handleRemove" |
|
|
|
|
@beforeUpload="beforeUpload" @onSuccess="uploadSuccess"> |
|
|
|
|
<div slot="tip"></div> |
|
|
|
|
</Upload> |
|
|
|
|
</div> |
|
|
|
@ -389,6 +389,10 @@ export default { |
|
|
|
|
this.fileType = file.format |
|
|
|
|
this.fileUrl = file.url |
|
|
|
|
this.fileName = file.name |
|
|
|
|
this.uploadList = [{ |
|
|
|
|
name: file.name, |
|
|
|
|
url: file.url, |
|
|
|
|
}] |
|
|
|
|
}, |
|
|
|
|
uploadError (err, file, fileList) { |
|
|
|
|
this.$message({ |
|
|
|
@ -586,9 +590,13 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 本地上传编辑资源 |
|
|
|
|
editSection () { |
|
|
|
|
this.sectionForm.sectionName = this.curSection.name |
|
|
|
|
const row = this.curSection |
|
|
|
|
this.sectionForm.sectionName = row.name |
|
|
|
|
this.fileUrl = '' |
|
|
|
|
this.uploadList = [] |
|
|
|
|
this.uploadList = [{ |
|
|
|
|
name: row.originalFileName, |
|
|
|
|
url: row.fileUrl, |
|
|
|
|
}] |
|
|
|
|
this.isAddSection = false |
|
|
|
|
this.sectionVisible = true |
|
|
|
|
}, |
|
|
|
|