[update] 选择人员组件全选勾选逻辑修改

This commit is contained in:
lideqin
2024-05-10 10:11:57 +08:00
parent b7e404f6ed
commit bee862d47a
4 changed files with 8 additions and 8 deletions
@@ -106,7 +106,7 @@ export default {
for (const item of arrTwo) {
arrOne.includes(item) ? temp.push(item) : ''
}
if (val.length !== 0 && this.dataSourceRight.length >= this.ipagination.total && temp.length === this.currentQueryAllData.length) {
if (val.length !== 0 && this.currentQueryAllData.length !== 0 && this.dataSourceRight.length >= this.ipagination.total && temp.length === this.currentQueryAllData.length) {
// 选中数据长度等于当前表格总长度
this.isCheckedAll = true
} else {
@@ -125,7 +125,7 @@ export default {
for (const item of arrTwo) {
arrOne.includes(item) ? temp.push(item) : ''
}
if (this.dataSourceRight.length !== 0 && this.dataSourceRight.length >= this.ipagination.total && temp.length === this.currentQueryAllData.length) {
if (this.dataSourceRight.length !== 0 && this.currentQueryAllData.length !== 0 && this.dataSourceRight.length >= this.ipagination.total && temp.length === this.currentQueryAllData.length) {
// 选中数据长度等于当前表格总长度
this.isCheckedAll = true
} else {
@@ -133,7 +133,7 @@ export default {
for (const item of arrTwo) {
arrOne.includes(item) ? temp.push(item) : ''
}
if (val.length !== 0 && this.dataSourceRight.length >= this.ipagination.total && temp.length === this.currentQueryAllData.length) {
if (val.length !== 0 && this.currentQueryAllData.length !== 0 && this.dataSourceRight.length >= this.ipagination.total && temp.length === this.currentQueryAllData.length) {
this.isCheckedAll = true
} else {
this.isCheckedAll = false
@@ -151,7 +151,7 @@ export default {
for (const item of arrTwo) {
arrOne.includes(item) ? temp.push(item) : ''
}
if (this.dataSourceRight.length !== 0 && this.dataSourceRight.length >= this.ipagination.total && temp.length === this.currentQueryAllData.length) {
if (this.dataSourceRight.length !== 0 && this.currentQueryAllData.length !== 0 && this.dataSourceRight.length >= this.ipagination.total && temp.length === this.currentQueryAllData.length) {
// 选中数据长度和表格总数相等或者和上次查询的总数相等
this.isCheckedAll = true
} else {
@@ -159,7 +159,7 @@ export default {
for (const item of arrTwo) {
arrOne.includes(item) ? temp.push(item) : ''
}
if (val.length !== 0 && this.dataSourceRight.length >= this.ipagination.total && temp.length === this.currentQueryAllData.length) {
if (val.length !== 0 && this.currentQueryAllData.length !== 0 && this.dataSourceRight.length >= this.ipagination.total && temp.length === this.currentQueryAllData.length) {
// 选中数据长度等于当前表格总长度
this.isCheckedAll = true
} else {
@@ -178,7 +178,7 @@ export default {
for (const item of arrTwo) {
arrOne.includes(item) ? temp.push(item) : ''
}
if (this.dataSourceRight.length !== 0 && this.dataSourceRight.length >= this.ipagination.total && temp.length === this.currentQueryAllData.length) {
if (this.dataSourceRight.length !== 0 && this.currentQueryAllData.length !== 0 && this.dataSourceRight.length >= this.ipagination.total && temp.length === this.currentQueryAllData.length) {
// 选中数据长度等于当前表格总长度
this.isCheckedAll = true
} else {
+2 -2
View File
@@ -134,7 +134,7 @@ export default {
for (const item of arrTwo) {
arrOne.includes(item) ? temp.push(item) : ''
}
if (val.length !== 0 && this.dataSourceRight.length >= this.ipagination.total && temp.length === this.currentQueryAllData.length) {
if (val.length !== 0 && this.currentQueryAllData.length !== 0 && this.dataSourceRight.length >= this.ipagination.total && temp.length === this.currentQueryAllData.length) {
// 选中数据长度等于当前表格总长度
this.isCheckedAll = true
} else {
@@ -153,7 +153,7 @@ export default {
for (const item of arrTwo) {
arrOne.includes(item) ? temp.push(item) : ''
}
if (this.dataSourceRight.length !== 0 && this.dataSourceRight.length >= this.ipagination.total && temp.length === this.currentQueryAllData.length) {
if (this.dataSourceRight.length !== 0 && this.currentQueryAllData.length !== 0 && this.dataSourceRight.length >= this.ipagination.total && temp.length === this.currentQueryAllData.length) {
// 选中数据长度等于当前表格总长度
this.isCheckedAll = true
} else {