fix(工作台): 修复接口定义以及接口用例在切换待完成时过滤条件不清空问题

--bug=1021803 --user=郭雨琦
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001021803
This commit is contained in:
guoyuqi 2023-01-16 18:09:50 +08:00 committed by xiaomeinvG
parent 1db9a9d071
commit da5438e42c
2 changed files with 5 additions and 10 deletions

View File

@ -591,11 +591,7 @@ export default {
} else { } else {
this.batchButtons = this.commonButtons; this.batchButtons = this.commonButtons;
} }
if (this.condition.filters) {
this.condition.filters.case_status = ["Prepare", "Underway"];
} else {
this.condition.filters = {case_status: ["Prepare", "Underway"]}; this.condition.filters = {case_status: ["Prepare", "Underway"]};
}
this.condition.combine = {creator: {operator: "current user", value: "current user",}} this.condition.combine = {creator: {operator: "current user", value: "current user",}}
if (this.condition.toUpdate) { if (this.condition.toUpdate) {
delete this.condition.toUpdate delete this.condition.toUpdate

View File

@ -603,6 +603,7 @@ export default {
if (!this.projectName || this.projectName === "") { if (!this.projectName || this.projectName === "") {
this.getProjectName(); this.getProjectName();
} }
console.log("clearFilter")
/*this.condition.orders = getLastTableSortField(this.tableHeaderKey);*/ /*this.condition.orders = getLastTableSortField(this.tableHeaderKey);*/
if (this.isFocus) { if (this.isFocus) {
if (this.condition.filters) { if (this.condition.filters) {
@ -671,6 +672,8 @@ export default {
this.condition.toBeUpdated = !this.isFinish; this.condition.toBeUpdated = !this.isFinish;
if (!this.isFinish) { if (!this.isFinish) {
this.condition.filters = {status: ["Prepare", "Underway", "Completed"]}; this.condition.filters = {status: ["Prepare", "Underway", "Completed"]};
} else {
this.condition.filters = {status: ["Prepare", "Underway", "NO"]};
} }
this.initTable(); this.initTable();
}, },
@ -678,11 +681,7 @@ export default {
methods: { methods: {
changeTabState(name) { changeTabState(name) {
this.$refs.apiTable.clearFilter(); this.$refs.apiTable.clearFilter();
if (name === 'update') { this.isFinish = name !== 'update';
this.isFinish = false;
} else {
this.isFinish = true;
}
}, },
getProjectName() { getProjectName() {
getProject(this.projectId).then(response => { getProject(this.projectId).then(response => {