diff --git a/src/components/selection/UserSelectByContactModal.vue b/src/components/selection/UserSelectByContactModal.vue index eb0af599..2d94b6b3 100644 --- a/src/components/selection/UserSelectByContactModal.vue +++ b/src/components/selection/UserSelectByContactModal.vue @@ -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 { diff --git a/src/components/selection/UserSelectByContactNoMergeModal.vue b/src/components/selection/UserSelectByContactNoMergeModal.vue index f0fc1e84..2cbfc257 100644 --- a/src/components/selection/UserSelectByContactNoMergeModal.vue +++ b/src/components/selection/UserSelectByContactNoMergeModal.vue @@ -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 { diff --git a/src/components/selection/UserSelectByWorkGroupModal.vue b/src/components/selection/UserSelectByWorkGroupModal.vue index dcdd0d63..e50c3e76 100644 --- a/src/components/selection/UserSelectByWorkGroupModal.vue +++ b/src/components/selection/UserSelectByWorkGroupModal.vue @@ -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 { diff --git a/src/components/selection/UserSelectModal.vue b/src/components/selection/UserSelectModal.vue index e8dd29f5..aadb959a 100644 --- a/src/components/selection/UserSelectModal.vue +++ b/src/components/selection/UserSelectModal.vue @@ -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 {