Compare commits

..

No commits in common. "1aaa065638629ea2a234556decffddd7463cff4d" and "9b5d6173d8449d648bdac0f649c85513dc18d80a" have entirely different histories.

1 changed files with 23 additions and 70 deletions

View File

@ -247,7 +247,7 @@ export default {
// this.subUserListTemp
tempArray.forEach(e => {
this.subUserListAll.forEach(j => {
if (e.length > 0 && !e.includes(j.idNumber)) {
if (!e.includes(j.idNumber)) {
// this.subUserList.push(j)
tempPersonList.push(JSON.parse(JSON.stringify(j)))
// this.subUserListTemp.push(JSON.parse(JSON.stringify(j)))
@ -309,7 +309,7 @@ export default {
// this.subUserListTemp
tempArray.forEach(e => {
this.subUserListAll.forEach(j => {
if (e.length > 0 && !e.includes(j.idNumber)) {
if (!e.includes(j.idNumber)) {
// this.subUserList.push(j)
tempPersonList.push(JSON.parse(JSON.stringify(j)))
// this.subUserListTemp.push(JSON.parse(JSON.stringify(j)))
@ -333,7 +333,7 @@ export default {
// this.subUserListTemp
tempArray.forEach(e => {
this.subUserListAll.forEach(j => {
if (e.length > 0 && !e.includes(j.idNumber)) {
if (!e.includes(j.idNumber)) {
// this.subUserList.push(j)
tempPersonList.push(JSON.parse(JSON.stringify(j)))
// this.subUserListTemp.push(JSON.parse(JSON.stringify(j)))
@ -361,73 +361,30 @@ export default {
if (this.subUserListTemp.length == 0 && !this.isSearch) {
if (this.personList.length > 0) {
this.subUserListAll.forEach(e => {
if (
this.personList[this.currentIndex].length > 0 &&
this.personList[this.currentIndex].includes(e.idNumber)
) {
if (this.personList[this.currentIndex].includes(e.idNumber)) {
e.isChecked = true
this.subUserListTemp.push(JSON.parse(JSON.stringify(e)))
}
})
let tempArray = this.personList.filter((e, index) => index != this.currentIndex)
let tempPersonList = []
if (tempArray.length > 0) {
this.subUserList = []
// this.subUserListTemp
tempArray.forEach(e => {
this.subUserListAll.forEach(j => {
if (e.length > 0 && e.includes(j.idNumber)) {
// this.subUserList.push(j)
tempPersonList.push(JSON.parse(JSON.stringify(j)))
// this.subUserListTemp.push(JSON.parse(JSON.stringify(j)))
}
})
if (e.length > 1) {
this.subUserListAll.forEach(j => {
if (!e.includes(j.idNumber)) {
// this.subUserList.push(j)
this.subUserList.push(JSON.parse(JSON.stringify(j)))
// this.subUserListTemp.push(JSON.parse(JSON.stringify(j)))
}
})
}
})
if (tempPersonList.length === 0) {
if (this.subUserList.length == 0) {
this.subUserList = JSON.parse(JSON.stringify(this.subUserListAll))
} else {
console.log('进入这里面')
let tempPersonStr = ''
tempPersonList.forEach(e => {
tempPersonStr = tempPersonStr + '@' + e.idNumber
})
this.subUserListAll.forEach(e => {
console.log(tempPersonStr, '---')
if (!tempPersonStr.includes(e.idNumber)) {
this.subUserList.push(e)
}
})
// this.subUserListAll.forEach(e => {
// console.log('')
// tempPersonList.forEach(j => {
// console.log('99999', j)
// if (!j.idNumber.includes(e.idNumber)) {
// this.subUserList.push(e)
// }
// })
// })
}
// tempArray.forEach(e => {
// if (e.length > 0) {
// this.subUserListAll.forEach(j => {
// if (!e.includes(j.idNumber)) {
// // this.subUserList.push(j)
// this.subUserList.push(JSON.parse(JSON.stringify(j)))
// // this.subUserListTemp.push(JSON.parse(JSON.stringify(j)))
// }
// })
// }
// })
// if (this.subUserList.length == 0) {
// this.subUserList = JSON.parse(JSON.stringify(this.subUserListAll))
// }
} else {
this.subUserList = JSON.parse(JSON.stringify(this.subUserListAll))
// this.subUserListTemp = JSON.parse(JSON.stringify(this.subUserListAll))
@ -443,7 +400,7 @@ export default {
// this.subUserListTemp
tempArray.forEach(e => {
this.subUserListAll.forEach(j => {
if (e.length > 0 && !e.includes(j.idNumber)) {
if (!e.includes(j.idNumber)) {
// this.subUserList.push(j)
tempPersonList.push(JSON.parse(JSON.stringify(j)))
// this.subUserListTemp.push(JSON.parse(JSON.stringify(j)))
@ -485,7 +442,7 @@ export default {
// this.subUserListTemp
tempArray.forEach(e => {
this.subUserListAll.forEach(j => {
if (e.length > 0 && !e.includes(j.idNumber)) {
if (!e.includes(j.idNumber)) {
// this.subUserList.push(j)
tempPersonList.push(JSON.parse(JSON.stringify(j)))
// this.subUserListTemp.push(JSON.parse(JSON.stringify(j)))
@ -647,12 +604,8 @@ export default {
//
onCheckBoxChangeAll(isAllChecked) {
console.log(isAllChecked, 'isAllChecked')
this.subUserListTemp = []
this.subUserList.forEach(e => {
e.isChecked = !isAllChecked
if (e.isChecked) {
this.subUserListTemp.push(e)
}
// this.subUserListAll.forEach(j => {
// if (e.idNumber == j.idNumber) {
@ -661,11 +614,11 @@ export default {
// })
})
// if (this.subUserList.every(e => e.isChecked == true)) {
// this.subUserListTemp = JSON.parse(JSON.stringify(this.subUserList))
// } else {
// this.subUserListTemp = []
// }
if (this.subUserList.every(e => e.isChecked == true)) {
this.subUserListTemp = JSON.parse(JSON.stringify(this.subUserList))
} else {
this.subUserListTemp = []
}
// this.subUserListTemp.forEach(e => {
// e.isChecked = !e.isChecked
@ -697,12 +650,12 @@ export default {
// })
// }
return this.subUserList.filter(e => e.isChecked === true).length
if (this.subUserList.length > 0) return this.subUserList.filter(e => e.isChecked == true).length
// return amount
},
isAllChecked() {
let isCheckedAll = false
return this.subUserList.every(e => e.isChecked === true)
if (this.subUserList.length > 0) return this.subUserList.every(e => e.isChecked === true)
// if (this.subUserList.length > 0) {
// isCheckedAll = this.subUserList.every(e => e.isChecked === true)