|
|
|
@ -14,6 +14,7 @@
|
|
|
|
:before-upload="beforeUpload"
|
|
|
|
:before-upload="beforeUpload"
|
|
|
|
:on-success="onSuccess"
|
|
|
|
:on-success="onSuccess"
|
|
|
|
:on-remove="onRemove"
|
|
|
|
:on-remove="onRemove"
|
|
|
|
|
|
|
|
multiple
|
|
|
|
:on-error="onError">
|
|
|
|
:on-error="onError">
|
|
|
|
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
|
|
|
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
|
|
|
<el-button style="margin-left: 10px;" size="small" type="success" @click="$refs['upload'].submit()">上传到服务器</el-button>
|
|
|
|
<el-button style="margin-left: 10px;" size="small" type="success" @click="$refs['upload'].submit()">上传到服务器</el-button>
|
|
|
|
@ -83,7 +84,13 @@ export default {
|
|
|
|
watch: {
|
|
|
|
watch: {
|
|
|
|
'form.id_material_fujian_uploads_material_id_relation': {
|
|
|
|
'form.id_material_fujian_uploads_material_id_relation': {
|
|
|
|
handler (newVal) {
|
|
|
|
handler (newVal) {
|
|
|
|
this.fileList = newVal
|
|
|
|
this.fileList = newVal.map(i => {
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
name: i?.original_name,
|
|
|
|
|
|
|
|
url: i?.url,
|
|
|
|
|
|
|
|
response: i,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
deep: true
|
|
|
|
deep: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|