Commit a00650f4 authored by zhangderong's avatar zhangderong

上传时重复赋值问题

parent af8b914a
...@@ -362,16 +362,11 @@ import {uploadFile} from '../../service/ajax' ...@@ -362,16 +362,11 @@ import {uploadFile} from '../../service/ajax'
}) })
}, },
selectfile (data,name) { selectfile (data,name) {
this.change=true
this.isReplace = data
this.replaceName = name this.replaceName = name
if (data == false) { if (data == false) {
this.newArr = this.replaceArr.filter(item => item !== this.replaceName) this.replaceArr = this.replaceArr.filter(item => item !== this.replaceName)
// if (this.newArr.length==0) {
// this.replaceArr = []
// }
} else { } else {
this.newArr.push(this.replaceName) this.replaceArr.push(this.replaceName)
} }
}, },
handleSuccess (res, files) { handleSuccess (res, files) {
...@@ -446,15 +441,12 @@ import {uploadFile} from '../../service/ajax' ...@@ -446,15 +441,12 @@ import {uploadFile} from '../../service/ajax'
page = typeof(page)=='number'?page:1 page = typeof(page)=='number'?page:1
this.searchInfo.pageIndex = page this.searchInfo.pageIndex = page
this.pageIndex = page this.pageIndex = page
if(this.change==false){
this.newArr = this.replaceArr
}
let parmars={ let parmars={
pageSize:this.searchInfo.pageSize, pageSize:this.searchInfo.pageSize,
pageIndex:this.searchInfo.pageIndex, pageIndex:this.searchInfo.pageIndex,
parameter: { parameter: {
batchNum:this.batchNum, batchNum:this.batchNum,
replaceFileNameList: this.newArr replaceFileNameList: this.replaceArr
} }
} }
serchList(parmars).then(res=>{ serchList(parmars).then(res=>{
......
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