From 982ddf19e20b1af2b886a1cc80b3008d18c2174a Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Thu, 12 Jan 2023 14:46:30 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=B7=A5=E4=BD=9C=E5=8F=B0):=20=20?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E5=8F=B0=E6=88=91=E7=9A=84=E5=BE=85=E5=8A=9E?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E4=BA=86=E5=B7=B2=E5=85=B3=E9=97=AD=E7=9A=84?= =?UTF-8?q?=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1021915 --user=陈建星 [我的工作台]我的待办-缺陷管理中有已关闭状态的缺陷 https://www.tapd.cn/55049933/s/1327005 --- .../src/business/component/IssueTableList.vue | 48 ++++++++++++++----- 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/workstation/frontend/src/business/component/IssueTableList.vue b/workstation/frontend/src/business/component/IssueTableList.vue index 88099e83e8..e53cb82628 100644 --- a/workstation/frontend/src/business/component/IssueTableList.vue +++ b/workstation/frontend/src/business/component/IssueTableList.vue @@ -250,6 +250,9 @@ export default { }, workspaceId() { return getCurrentWorkspaceId(); + }, + isToDo() { + return !this.isFocus && !this.isCreation; } }, created() { @@ -262,8 +265,8 @@ export default { getIssuePartTemplateWithProject((template) => { this.initFields(template); this.page.result.loading = false; + this.getIssues(); }); - this.getIssues(); }); }, methods: { @@ -300,6 +303,9 @@ export default { item.filters = this.columns[item.id].filters; } } + if (this.isToDo && item.id === '状态') { + item.filters = item.filters.filter(i => i.value !== 'closed') + } }); this.fields = fields; @@ -350,17 +356,7 @@ export default { } } else { - if (this.page.condition.filters) { - this.page.condition.filters.status = ["new"]; - } else { - this.page.condition.filters = {status: ["new"]}; - } - this.page.condition.combine = { - creator: { - operator: "current user", - value: "current user", - } - } + this.addDefaultStatusFilter(); } this.page.condition.workspaceId = getCurrentWorkspaceId(); this.page.condition.orders = getLastTableSortField(this.tableHeaderKey); @@ -382,6 +378,34 @@ export default { }); } }, + addDefaultStatusFilter() { + this.page.condition.combine = { + creator: { + operator: "current user", + value: "current user", + } + } + if (this.isToDo) { + let statusFieldId = null; + this.issueTemplate.customFields.forEach(field => { + if (field.name === '状态') { + statusFieldId = field.id; + } + }); + if (statusFieldId) { + this.page.condition.combine.customs = [ + { + id: statusFieldId, + operator: 'not in', + value:[ + 'closed' + ], + type: 'select' + } + ]; + } + } + }, initCustomFieldValue() { if (this.fields.length <= 0) { return;