Commit 16111733 authored by xiaoman's avatar xiaoman

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

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