Commit af8b914a authored by zhangderong's avatar zhangderong

数组为空时判断

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