Commit 16111733 authored by xiaoman's avatar xiaoman

bugfix: 日期格式不一致,el-upload上传时图片抖动

parent 609889a7
...@@ -78,14 +78,13 @@ ...@@ -78,14 +78,13 @@
ref="goodsUploader" ref="goodsUploader"
:headers="headers" :headers="headers"
:action="uploadPath" :action="uploadPath"
:show-file-list="true"
:file-list="fileList" :file-list="fileList"
:on-preview="handlePictureCardPreview" :on-preview="handlePictureCardPreview"
:on-success="uploadIconUrl" :on-success="uploadIconUrl"
:on-remove="handleRemove" :on-remove="handleRemove"
:on-exceed="uploadOverrun" :on-exceed="uploadOverrun"
:multiple="true"
:limit="5" :limit="5"
multiple
style="width:400px" style="width:400px"
list-type="picture-card" list-type="picture-card"
class="avatar-uploader" class="avatar-uploader"
...@@ -149,7 +148,7 @@ export default { ...@@ -149,7 +148,7 @@ export default {
filterTime(val) { filterTime(val) {
let time = '' let time = ''
if (val) { if (val) {
time = moment((val - 0) * 1000).format('YYYY-MM-DD HH-mm-ss') time = moment((val - 0) * 1000).format('YYYY-MM-DD HH:mm:ss')
} }
return time return time
} }
...@@ -250,7 +249,8 @@ export default { ...@@ -250,7 +249,8 @@ export default {
name: undefined, name: undefined,
sort: 'create_time', sort: 'create_time',
order: 'desc' order: 'desc'
} },
fileList: []
} }
}, },
computed: { computed: {
...@@ -258,15 +258,6 @@ export default { ...@@ -258,15 +258,6 @@ export default {
return { return {
'X-Dts-Admin-Token': getToken() 'X-Dts-Admin-Token': getToken()
} }
},
fileList() {
if (!this.dataForm.images) return []
return this.dataForm.images.map(function(item, index) {
return {
name: `${index}.jpg`,
url: item
}
})
} }
}, },
created() { created() {
...@@ -401,9 +392,16 @@ export default { ...@@ -401,9 +392,16 @@ export default {
this.dialogStatus = 'edit' this.dialogStatus = 'edit'
this.dialogFormVisible = true this.dialogFormVisible = true
getDealRecordDetail({ id: row.id }).then(res => { getDealRecordDetail({ id: row.id }).then(res => {
res.data.data.images = res.data.data.images.split(';') const data = res.data.data
res.data.data.bidTime = res.data.data.bidTime * 1000 data.images = data.images.split(';')
this.dataForm = res.data.data data.bidTime = data.bidTime * 1000
this.dataForm = data
this.fileList = data.images.map(function(item, index) {
return {
name: `${index}.jpg`,
url: item
}
})
}) })
}, },
handleEdit() { handleEdit() {
......
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