// 比对操作之前与操作之后的,看具体的每一种图片是删除还是添加
$scope.modelChange.forEach(function(item,index){
$scope.pictureShow = []
if(item.key=='pictures'){
var arr1 = JSON.parse(item.before)
var arr2 = JSON.parse(item.after)
for(var i=0;i<arr1.length;i++){
// arr1那个删除
if(arr2.indexOf(arr1[i])==-1) {
$scope.pictureShow.push({
status:1,
imgSrc:arr1[i],
represent: arr1[i].substring(arr1[i].length-8)
})
}
}
for(var j=0;j<arr2.length;j++){
// arr2那个添加
if(arr1.indexOf(arr2[j])==-1) {
$scope.pictureShow.push({
status:2,
imgSrc:arr2[j],
represent: arr2[j].substring(arr2[j].length-8)
})
}
}
}
})