|
|
@@ -394,18 +394,27 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
fileSelected(list) {
|
|
|
-
|
|
|
if (!list) return;
|
|
|
let tempArry = [];
|
|
|
+ let fileNameList=[]
|
|
|
+ let addFileNameList=[]
|
|
|
+ this.formData.fileList.forEach(x => {
|
|
|
+ let fileObj= JSON.parse(x);
|
|
|
+ fileNameList.push(fileObj.name);
|
|
|
+ })
|
|
|
list.forEach(x => {
|
|
|
- tempArry = tempArry.concat(x.fileList);
|
|
|
+ tempArry.forEach(s => {
|
|
|
+ addFileNameList.push(JSON.parse(s).name);
|
|
|
+ })
|
|
|
+ x.fileList.forEach(y => {
|
|
|
+ let fileObj= JSON.parse(y);
|
|
|
+ if (fileNameList.indexOf(fileObj.name) == -1&&addFileNameList.indexOf(fileObj.name) == -1) {
|
|
|
+ tempArry.push(y);
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
- console.log("tempArry", tempArry, this.formData.fileList);
|
|
|
if (this.formData.fileList) {
|
|
|
- console.log("12312312121212121212121")
|
|
|
this.formFileListDefualtValue = this.formData.fileList.concat(tempArry);
|
|
|
- this.formData.fileList = this.formData.fileList.concat(tempArry);
|
|
|
- console.log("this.formFileListDefualtValue", this.formFileListDefualtValue)
|
|
|
} else {
|
|
|
this.formFileListDefualtValue = tempArry;
|
|
|
}
|