Commit 172d2b29 authored by Damon's avatar Damon

Merge branch 'dev' of https://git.banshouhui.com/lijundan/self-support into dev

parents 2c9e6edd 38fe6c41
......@@ -245,24 +245,26 @@
this.takeStatus = true
},
async closeTake(img) {
const files = img.map(v => v.path)
const value = await this.saveToTask(files)
console.log("value", value)
if(img !==undefined ){
if(img !==undefined){
const files = img.map(v => v.path)
const value = await this.saveToTask(files)
if (!this.currentItemDate.orderImages) this.currentItemDate.orderImages = []
// step1 添加图片
img.forEach(v => {
this.currentItemDate.orderImages.push(v.key)
// 复制一份 用于保存
let saveList = this.currentItemDate.orderImages.concat();
value.map(item =>{
// step1 添加缓存图片 到显示
this.currentItemDate.orderImages.push(item.path)
// 文件key添加保存数组中
saveList.push(item.key)
})
// step2 保存图片
var data={
type : this.currentItemDate.type,
images : Array.from(this.currentItemDate.orderImages),
images : Array.from(saveList),
fieldsName:this.currentItemDate.fieldName
}
this.$u.api.saveImage(data,this.orderId).then((res) => {
if (res.code == 200) {
console.log("===", res.data)
} else {
console.log("保存图片异常",res.data.message)
}
......
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