Commit af8b914a authored by zhangderong's avatar zhangderong

数组为空时判断

parent 57933499
......@@ -246,6 +246,7 @@ import {uploadFile} from '../../service/ajax'
},
files: null,
activeT:false,
change:false,
massage:'',
Massage:'',
Code:'',
......@@ -361,10 +362,14 @@ import {uploadFile} from '../../service/ajax'
})
},
selectfile (data,name) {
this.change=true
this.isReplace = data
this.replaceName = name
if (data == false) {
this.newArr = this.replaceArr.filter(item => item !== this.replaceName)
// if (this.newArr.length==0) {
// this.replaceArr = []
// }
} else {
this.newArr.push(this.replaceName)
}
......@@ -441,12 +446,15 @@ import {uploadFile} from '../../service/ajax'
page = typeof(page)=='number'?page:1
this.searchInfo.pageIndex = page
this.pageIndex = page
if(this.change==false){
this.newArr = this.replaceArr
}
let parmars={
pageSize:this.searchInfo.pageSize,
pageIndex:this.searchInfo.pageIndex,
parameter: {
batchNum:this.batchNum,
replaceFileNameList: this.newArr.length==0 ? this.replaceArr : this.newArr
replaceFileNameList: this.newArr
}
}
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