|
@ -27,12 +27,17 @@ |
|
|
</el-radio-group> |
|
|
</el-radio-group> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="附件:" prop="jumpUrl"> |
|
|
<el-form-item label="附件:" prop="jumpUrl"> |
|
|
<el-input v-model="formLabelAlign.jumpUrl" placeholder="附件" /> |
|
|
<!-- <el-input v-model="formLabelAlign.jumpUrl" placeholder="附件" /> --> |
|
|
<el-upload |
|
|
<el-upload |
|
|
class="upload-demo mt-4" |
|
|
class="upload-demo" |
|
|
:action="`${BASE_API}/file/upload`" |
|
|
:action="`${BASE_API}/file/uploadMultiple`" |
|
|
|
|
|
name="files" |
|
|
:on-success="handleJumpUrlSuccess" |
|
|
:on-success="handleJumpUrlSuccess" |
|
|
:show-file-list="false" |
|
|
:on-remove="handleRemove" |
|
|
|
|
|
:before-remove="beforeRemove" |
|
|
|
|
|
:show-file-list="true" |
|
|
|
|
|
:file-list="fileList" |
|
|
|
|
|
multiple |
|
|
> |
|
|
> |
|
|
<el-button size="small" type="primary" class="mr-4">点击上传</el-button> |
|
|
<el-button size="small" type="primary" class="mr-4">点击上传</el-button> |
|
|
</el-upload> |
|
|
</el-upload> |
|
@ -135,14 +140,14 @@ import { Loading } from 'element-ui'; |
|
|
author: '', |
|
|
author: '', |
|
|
editor: '', |
|
|
editor: '', |
|
|
showType: 0, |
|
|
showType: 0, |
|
|
jumpUrl: '', |
|
|
|
|
|
titleUrl: '', |
|
|
titleUrl: '', |
|
|
submitStatus: 1, |
|
|
submitStatus: 1, |
|
|
source: '', |
|
|
source: '', |
|
|
publishTime: '', |
|
|
publishTime: '', |
|
|
content: '', |
|
|
content: '', |
|
|
showPage: ['02','0203'], |
|
|
showPage: ['02','0203'], |
|
|
relationContentIds: [] |
|
|
relationContentIds: [], |
|
|
|
|
|
files: [] |
|
|
}, |
|
|
}, |
|
|
fileList: [], |
|
|
fileList: [], |
|
|
code: '', |
|
|
code: '', |
|
@ -220,11 +225,29 @@ import { Loading } from 'element-ui'; |
|
|
|
|
|
|
|
|
// 上传附件 |
|
|
// 上传附件 |
|
|
handleJumpUrlSuccess(res) { |
|
|
handleJumpUrlSuccess(res) { |
|
|
if (res.data && res.data.path) { |
|
|
if (res.data && res.data.length) { |
|
|
this.formLabelAlign.jumpUrl = res.data.path; |
|
|
this.formLabelAlign.files.push(res.data[0]); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
handleRemove(file, fileList) { |
|
|
|
|
|
if(file.status === 'success'){ |
|
|
|
|
|
this.formLabelAlign.files = [] |
|
|
|
|
|
if(fileList && fileList.length) { |
|
|
|
|
|
fileList.forEach(file => { |
|
|
|
|
|
const item = {} |
|
|
|
|
|
item.name = file.name |
|
|
|
|
|
item.path = file.path |
|
|
|
|
|
this.formLabelAlign.files.push(item) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
beforeRemove(file) { |
|
|
|
|
|
return this.$confirm(`确定移除 ${ file.name }?`); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// 位置选择 |
|
|
// 位置选择 |
|
|
handleChange(value) { |
|
|
handleChange(value) { |
|
|
this.formLabelAlign.showPage = value |
|
|
this.formLabelAlign.showPage = value |
|
@ -324,6 +347,13 @@ import { Loading } from 'element-ui'; |
|
|
this.showLoading = false; |
|
|
this.showLoading = false; |
|
|
if(res.code === 200){ |
|
|
if(res.code === 200){ |
|
|
this.formLabelAlign.content = res.data.content |
|
|
this.formLabelAlign.content = res.data.content |
|
|
|
|
|
this.formLabelAlign.files = res.data.files |
|
|
|
|
|
if(res.data.files && res.data.files.length){ |
|
|
|
|
|
res.data.files.forEach(item => { |
|
|
|
|
|
this.fileList.push(item) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
}else{ |
|
|
}else{ |
|
|
Alert.fail(res.msg || '详情获取失败'); |
|
|
Alert.fail(res.msg || '详情获取失败'); |
|
|
} |
|
|
} |
|
|