Commit 2eed62b1 authored by Damon's avatar Damon

fix: 修复完工图片不回显

parent 9d504117
......@@ -246,16 +246,17 @@
},
async closeTake(img) {
if(img !==undefined){
// 复制一份 用于保存
if (!this.currentItemDate.orderImages) this.currentItemDate.orderImages = []
let saveList = JSON.parse(JSON.stringify(this.currentItemDate.orderImages))
const files = img.map(v => v.path)
const value = await this.saveToTask(files)
if (!this.currentItemDate.orderImages) this.currentItemDate.orderImages = []
// 复制一份 用于保存
let saveList = this.currentItemDate.orderImages.concat();
value.map(item =>{
// step1 添加缓存图片 到显示
this.currentItemDate.orderImages.push(item.path)
// 文件key添加保存数组中
saveList.push(item.key)
// step1 添加缓存图片 到显示
this.currentItemDate.orderImages.push(item.path)
})
// step2 保存图片
var data={
......@@ -263,6 +264,7 @@
images : Array.from(saveList),
fieldsName:this.currentItemDate.fieldName
}
console.log("data", data)
this.$u.api.saveImage(data,this.orderId).then((res) => {
if (res.code == 200) {
} else {
......
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