Commit 5cf5d105 authored by xiaoman's avatar xiaoman

修复图片上传失败的问题

parent a8e27e2f
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
:headers="headers" :headers="headers"
:action="uploadPath" :action="uploadPath"
:show-file-list="false" :show-file-list="false"
:on-success="uploadIconUrl" :on-success="uploadCaTableImageUrl"
class="avatar-uploader" class="avatar-uploader"
accept=".jpg,.jpeg,.png,.gif"> accept=".jpg,.jpeg,.png,.gif">
<img v-if="dataForm.caTableImage" :src="dataForm.caTableImage" class="avatar"> <img v-if="dataForm.caTableImage" :src="dataForm.caTableImage" class="avatar">
...@@ -283,7 +283,8 @@ export default { ...@@ -283,7 +283,8 @@ export default {
publisher: '', publisher: '',
parValue: '', parValue: '',
exiQuantity: '', exiQuantity: '',
material: '' material: '',
caTableImage: ''
} }
}, },
handleCreate(row) { handleCreate(row) {
...@@ -291,7 +292,6 @@ export default { ...@@ -291,7 +292,6 @@ export default {
this.dialogStatus = 'create' this.dialogStatus = 'create'
this.dataForm.pid = row.id this.dataForm.pid = row.id
this.dataForm.level = row.level + 1 this.dataForm.level = row.level + 1
console.log(this.dataForm.level)
this.dialogFormVisible = true this.dialogFormVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].clearValidate() this.$refs['dataForm'].clearValidate()
...@@ -329,6 +329,9 @@ export default { ...@@ -329,6 +329,9 @@ export default {
uploadIconUrl: function(response) { uploadIconUrl: function(response) {
this.dataForm.icon = response.data.url this.dataForm.icon = response.data.url
}, },
uploadCaTableImageUrl: function(response) {
this.dataForm.caTableImage = response.data.url
},
updateData() { updateData() {
this.$refs['dataForm'].validate(valid => { this.$refs['dataForm'].validate(valid => {
if (valid) { if (valid) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment