[update] 选择人员组件全选勾选逻辑修改
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user