|
|
@ -336,6 +336,7 @@ |
|
|
|
ValSid:[], |
|
|
|
ARRSid:[], |
|
|
|
ImgSid:[], |
|
|
|
getImgsid:[], |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
@ -539,16 +540,22 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
delSid(delSid){ |
|
|
|
console.log(delSid.sid); |
|
|
|
for(var i=0;i<this.ImgSid.length;i++){ |
|
|
|
if(this.ImgSid[i].sid==delSid.sid){ |
|
|
|
for(var i=0;i<this.ImgSid.length;i++){ |
|
|
|
var ARRSid=[] |
|
|
|
ARRSid.push(this.ImgSid[i].sid) |
|
|
|
this.formobj.storeHouseProjectDto.shSids=ARRSid |
|
|
|
} |
|
|
|
} |
|
|
|
// this.ImgSid=arrImg |
|
|
|
let newVarImg=[] |
|
|
|
this.ImgSid.forEach(function check(value) { |
|
|
|
if(value.sid != delSid.sid) { |
|
|
|
newVarImg.push(value); |
|
|
|
} |
|
|
|
}) |
|
|
|
this.ImgSid=newVarImg |
|
|
|
console.log(this.ImgSid); |
|
|
|
var ARRSid=[] |
|
|
|
if(this.ImgSid.length>0){ |
|
|
|
for(var i=0;i<this.ImgSid.length;i++){ |
|
|
|
ARRSid.push(this.ImgSid[i].sid) |
|
|
|
this.formobj.storeHouseProjectDto.shSids=ARRSid |
|
|
|
} |
|
|
|
}else{ |
|
|
|
this.formobj.storeHouseProjectDto.shSids=[] |
|
|
|
} |
|
|
|
}, |
|
|
|
handleReturn(isreload) { |
|
|
@ -584,6 +591,7 @@ |
|
|
|
this.ImgSid=[] |
|
|
|
this.ValSid=[] |
|
|
|
this.ARRSid=[] |
|
|
|
this.getImgsid=[] |
|
|
|
this.title= "【新增】项目信息", |
|
|
|
this.$emit('doback') |
|
|
|
}, |
|
|
@ -627,6 +635,9 @@ |
|
|
|
req.selectStoreHouseSid(row.sid).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.ImgSid=res.data |
|
|
|
for(let i=0;i<this.ImgSid.length;i++){ |
|
|
|
this.getImgsid.push(this.ImgSid[i].sid) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
@ -638,12 +649,20 @@ |
|
|
|
}, |
|
|
|
guanlianSid(){ |
|
|
|
let val=this.ValSid |
|
|
|
this.ImgSid=this.ValSid |
|
|
|
console.log(val); |
|
|
|
for(let i=0;i<val.length;i++){ |
|
|
|
this.ARRSid.push(val[i].sid) |
|
|
|
} |
|
|
|
var newArr = [...new Set(this.ARRSid)]; |
|
|
|
this.formobj.storeHouseProjectDto.shSids=newArr |
|
|
|
var oldArr = [...new Set(this.ARRSid)]; |
|
|
|
if(this.ImgSid){ |
|
|
|
let newArr =this.getImgsid.concat(oldArr); |
|
|
|
let newImg=this.ImgSid.concat(this.ValSid); |
|
|
|
this.ImgSid=[...new Set(newImg)]; |
|
|
|
this.formobj.storeHouseProjectDto.shSids=newArr |
|
|
|
}else{ |
|
|
|
this.ImgSid=[...new Set(this.ValSid )] |
|
|
|
this.formobj.storeHouseProjectDto.shSids=oldArr |
|
|
|
} |
|
|
|
this.drawer=false |
|
|
|
this.$refs.multipleTable.clearSelection(); |
|
|
|
}, |
|
|
|