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