|
|
|
@ -147,14 +147,11 @@ |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="file" |
|
|
|
|
label="文件上传"> |
|
|
|
|
<el-upload :before-upload="fileBeforeUpload" |
|
|
|
|
:on-remove="handleRemove" |
|
|
|
|
:on-success="uploadSuccessFile" |
|
|
|
|
:action="this.api.fileUploadNakadai" |
|
|
|
|
:file-list="form.fileList" |
|
|
|
|
:headers="headers"> |
|
|
|
|
<el-button>上传</el-button> |
|
|
|
|
</el-upload> |
|
|
|
|
<Upload :limit="20" |
|
|
|
|
:changeFileList="false" |
|
|
|
|
:file-list.sync="form.fileList" |
|
|
|
|
:on-remove="handleRemove" |
|
|
|
|
@onSuccess="uploadSuccessFile" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<div class="btns"> |
|
|
|
@ -294,10 +291,11 @@ import Setting from '@/setting' |
|
|
|
|
import Util from '@/libs/util' |
|
|
|
|
import { mapState } from 'vuex' |
|
|
|
|
import Editor from '@tinymce/tinymce-vue' |
|
|
|
|
// import t from "tinymce-plugin/plugins/tpImportword/plugin.js"; |
|
|
|
|
import editorConfig from '@/utils/editor' |
|
|
|
|
import Cropper from '@/components/img-upload/Cropper' |
|
|
|
|
import Axios from 'axios' |
|
|
|
|
import Upload from '@/components/upload'; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
@ -357,7 +355,8 @@ export default { |
|
|
|
|
}, |
|
|
|
|
components: { |
|
|
|
|
Editor, |
|
|
|
|
Cropper |
|
|
|
|
Cropper, |
|
|
|
|
Upload |
|
|
|
|
}, |
|
|
|
|
watch: { |
|
|
|
|
// 监听信息是否有更改,有的话页面离开的时候要询问是否要保存 |
|
|
|
@ -641,29 +640,29 @@ export default { |
|
|
|
|
this.uploading++ |
|
|
|
|
}, |
|
|
|
|
// 附件上传成功 |
|
|
|
|
uploadSuccessFile (res) { |
|
|
|
|
const { originalFileName, fileUrl } = res.filesResult |
|
|
|
|
uploadSuccessFile (file) { |
|
|
|
|
const { name, url } = file |
|
|
|
|
this.uploading-- |
|
|
|
|
this.form.id ? |
|
|
|
|
this.$post(this.api.saveParnerFile, { |
|
|
|
|
contentId: this.form.id, |
|
|
|
|
id: '', |
|
|
|
|
fileName: originalFileName, |
|
|
|
|
filePath: fileUrl |
|
|
|
|
fileName: name, |
|
|
|
|
filePath: url |
|
|
|
|
}).then(({ data }) => { |
|
|
|
|
this.form.fileList.push({ |
|
|
|
|
fileName: originalFileName, |
|
|
|
|
filePath: fileUrl, |
|
|
|
|
name: originalFileName, |
|
|
|
|
url: fileUrl, |
|
|
|
|
fileName: name, |
|
|
|
|
filePath: url, |
|
|
|
|
name: name, |
|
|
|
|
url, |
|
|
|
|
id: data |
|
|
|
|
}) |
|
|
|
|
}).catch(res => { }) : |
|
|
|
|
this.form.fileList.push({ |
|
|
|
|
fileName: originalFileName, |
|
|
|
|
filePath: fileUrl, |
|
|
|
|
name: originalFileName, |
|
|
|
|
url: fileUrl |
|
|
|
|
fileName: name, |
|
|
|
|
filePath: url, |
|
|
|
|
name: name, |
|
|
|
|
url |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 预览 |
|
|
|
|