From 45dcce3ec963b3dd8696b655aa8c22063b01883d Mon Sep 17 00:00:00 2001 From: CaptainB Date: Tue, 12 Apr 2022 14:18:11 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):?= =?UTF-8?q?=20=E7=94=A8=E4=BE=8B=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=95=88=E6=9E=9C=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/track/case/components/TestCaseList.vue | 10 ++++++---- .../components/track/plan/view/TestPlanView.vue | 3 +-- .../comonents/functional/FunctionalTestCaseList.vue | 9 +++++---- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/frontend/src/business/components/track/case/components/TestCaseList.vue b/frontend/src/business/components/track/case/components/TestCaseList.vue index f5d17a3dbe..7dede6ecd8 100644 --- a/frontend/src/business/components/track/case/components/TestCaseList.vue +++ b/frontend/src/business/components/track/case/components/TestCaseList.vue @@ -257,7 +257,7 @@ import { buildBatchParam, deepClone, getCustomFieldBatchEditOption, - getCustomFieldValue, + getCustomFieldValue, getCustomTableHeader, getCustomTableWidth, getLastTableSortField, getPageInfo, @@ -479,7 +479,7 @@ export default { testCaseTemplate: {}, members: [], page: getPageInfo(), - fields: [], + fields: getCustomTableHeader('TRACK_TEST_CASE'), fieldsWidth: getCustomTableWidth('TRACK_TEST_CASE'), memberMap: new Map(), rowCase: {}, @@ -619,6 +619,7 @@ export default { }, methods: { getTemplateField() { + this.page.result.loading = true; let p1 = getProjectMember((data) => { this.members = data; this.members.forEach(item => { @@ -626,7 +627,7 @@ export default { }); }); let p2 = getTestTemplate(); - this.page.result = Promise.all([p1, p2]).then((data) => { + Promise.all([p1, p2]).then((data) => { let template = data[1]; this.testCaseTemplate = template; this.fields = getTableHeaderWithCustomFields('TRACK_TEST_CASE', this.testCaseTemplate.customFields); @@ -636,8 +637,9 @@ export default { this.$nextTick(() => { if (this.$refs.table) { - this.$refs.table.reloadTable(); + this.$refs.table.resetHeader(); } + this.page.result.loading = false; }); }); }, diff --git a/frontend/src/business/components/track/plan/view/TestPlanView.vue b/frontend/src/business/components/track/plan/view/TestPlanView.vue index fe29c2f19a..e6ba10a6f7 100644 --- a/frontend/src/business/components/track/plan/view/TestPlanView.vue +++ b/frontend/src/business/components/track/plan/view/TestPlanView.vue @@ -42,7 +42,6 @@