Merge branch 'dev-sy-10-10'
This commit is contained in:
commit
1aaa065638
|
|
@ -247,7 +247,7 @@ export default {
|
|||
// this.subUserListTemp
|
||||
tempArray.forEach(e => {
|
||||
this.subUserListAll.forEach(j => {
|
||||
if (!e.includes(j.idNumber)) {
|
||||
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)))
|
||||
|
|
@ -309,7 +309,7 @@ export default {
|
|||
// this.subUserListTemp
|
||||
tempArray.forEach(e => {
|
||||
this.subUserListAll.forEach(j => {
|
||||
if (!e.includes(j.idNumber)) {
|
||||
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)))
|
||||
|
|
@ -333,7 +333,7 @@ export default {
|
|||
// this.subUserListTemp
|
||||
tempArray.forEach(e => {
|
||||
this.subUserListAll.forEach(j => {
|
||||
if (!e.includes(j.idNumber)) {
|
||||
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)))
|
||||
|
|
@ -361,30 +361,73 @@ export default {
|
|||
if (this.subUserListTemp.length == 0 && !this.isSearch) {
|
||||
if (this.personList.length > 0) {
|
||||
this.subUserListAll.forEach(e => {
|
||||
if (this.personList[this.currentIndex].includes(e.idNumber)) {
|
||||
if (
|
||||
this.personList[this.currentIndex].length > 0 &&
|
||||
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 => {
|
||||
if (e.length > 1) {
|
||||
this.subUserListAll.forEach(j => {
|
||||
if (!e.includes(j.idNumber)) {
|
||||
if (e.length > 0 && e.includes(j.idNumber)) {
|
||||
// this.subUserList.push(j)
|
||||
this.subUserList.push(JSON.parse(JSON.stringify(j)))
|
||||
tempPersonList.push(JSON.parse(JSON.stringify(j)))
|
||||
// this.subUserListTemp.push(JSON.parse(JSON.stringify(j)))
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
if (tempPersonList.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)
|
||||
}
|
||||
})
|
||||
|
||||
if (this.subUserList.length == 0) {
|
||||
this.subUserList = JSON.parse(JSON.stringify(this.subUserListAll))
|
||||
// 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))
|
||||
|
|
@ -400,7 +443,7 @@ export default {
|
|||
// this.subUserListTemp
|
||||
tempArray.forEach(e => {
|
||||
this.subUserListAll.forEach(j => {
|
||||
if (!e.includes(j.idNumber)) {
|
||||
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)))
|
||||
|
|
@ -442,7 +485,7 @@ export default {
|
|||
// this.subUserListTemp
|
||||
tempArray.forEach(e => {
|
||||
this.subUserListAll.forEach(j => {
|
||||
if (!e.includes(j.idNumber)) {
|
||||
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)))
|
||||
|
|
@ -604,8 +647,12 @@ 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) {
|
||||
|
|
@ -614,11 +661,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
|
||||
|
|
@ -650,12 +697,12 @@ export default {
|
|||
// })
|
||||
// }
|
||||
|
||||
if (this.subUserList.length > 0) return this.subUserList.filter(e => e.isChecked == true).length
|
||||
return this.subUserList.filter(e => e.isChecked === true).length
|
||||
// return amount
|
||||
},
|
||||
isAllChecked() {
|
||||
let isCheckedAll = false
|
||||
if (this.subUserList.length > 0) return this.subUserList.every(e => e.isChecked === true)
|
||||
return this.subUserList.every(e => e.isChecked === true)
|
||||
// if (this.subUserList.length > 0) {
|
||||
// isCheckedAll = this.subUserList.every(e => e.isChecked === true)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue