提交 a0b6053d 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!221 Fix the bug of selecting train jobs in comparison dashboard

Merge pull request !221 from ougongchang/r0.3
......@@ -162,6 +162,7 @@ export default {
listSelectAll() {
this.operateSelectAll = !this.operateSelectAll;
this.multiSelectedItemNames = {};
this.selectedNumber = 0;
// Setting the status of list items
if (this.operateSelectAll) {
if (this.isLimit) {
......@@ -171,7 +172,7 @@ export default {
break;
}
const listItem = this.checkListArr[i];
if (listItem.show && !listItem.checked) {
if ((listItem.show && !listItem.checked) || listItem.checked) {
listItem.checked = true;
this.multiSelectedItemNames[listItem.label] = true;
this.selectedNumber++;
......@@ -216,14 +217,17 @@ export default {
}
this.valiableSearchInput = this.searchInput;
this.multiSelectedItemNames = {};
this.selectedNumber = 0;
let itemSelectAll = true;
// Filter the tags that do not meet the conditions in the operation bar and hide them
this.checkListArr.forEach((listItem) => {
if (listItem.checked) {
this.multiSelectedItemNames[listItem.label] = true;
this.selectedNumber++;
}
if (reg.test(listItem.label)) {
listItem.show = true;
if (listItem.checked) {
this.multiSelectedItemNames[listItem.label] = true;
} else {
if (!listItem.checked) {
itemSelectAll = false;
}
} else {
......@@ -232,7 +236,7 @@ export default {
});
// Update the selected status of the Select All button
if (this.isLimit && !itemSelectAll) {
itemSelectAll = this.selectedNumber >= this.limitNum;
itemSelectAll = this.selectedNumber >= this.limitNum || this.selectedNumber >= this.checkListArr.length;
}
this.operateSelectAll = itemSelectAll;
this.$emit('selectedChange', this.multiSelectedItemNames);
......@@ -271,7 +275,7 @@ export default {
}
});
if (this.isLimit && !itemSelectAll) {
itemSelectAll = this.selectedNumber >= this.limitNum;
itemSelectAll = this.selectedNumber >= this.limitNum || this.selectedNumber >= this.checkListArr.length;
}
this.operateSelectAll = itemSelectAll;
// Return a dictionary containing selected items.
......@@ -323,7 +327,7 @@ export default {
listItem.show = false;
}
}
if (this.selectedNumber >= this.limitNum) {
if (this.selectedNumber >= this.limitNum || this.selectedNumber >= this.checkListArr.length) {
itemSelectAll = true;
} else {
itemSelectAll = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册