From db16e04b8e1e09478eb272ba2e91e9c212b4e4a1 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Sat, 18 Jun 2022 16:00:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=87=AA=E5=AE=9A=E4=B9=89=E8=A1=A8=E5=A4=B4?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E6=8B=96=E6=8B=BD=E6=8E=92=E5=BA=8F=E5=A4=B1?= =?UTF-8?q?=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1014223 --user=陈建星 【测试跟踪】表头显示字段增加/减少后用例拖拽失效,刷新后正常 https://www.tapd.cn/55049933/s/1185871 --- .../common/components/table/MsTable.vue | 7 +----- .../track/case/components/TestCaseList.vue | 22 +++++++++++-------- .../src/common/js/default-table-header.js | 20 +++++++++++++---- 3 files changed, 30 insertions(+), 19 deletions(-) diff --git a/frontend/src/business/components/common/components/table/MsTable.vue b/frontend/src/business/components/common/components/table/MsTable.vue index 5742b38f51..d5978db781 100644 --- a/frontend/src/business/components/common/components/table/MsTable.vue +++ b/frontend/src/business/components/common/components/table/MsTable.vue @@ -19,7 +19,6 @@ @header-dragend="headerDragend" @cell-mouse-enter="showPopover" @row-click="handleRowClick" - :key="tableActive" ref="table"> { this.doLayout(); - this.tableActive = true; }); }, addPaddingColClass({column}) { diff --git a/frontend/src/business/components/track/case/components/TestCaseList.vue b/frontend/src/business/components/track/case/components/TestCaseList.vue index a08df3dd1c..769851e67f 100644 --- a/frontend/src/business/components/track/case/components/TestCaseList.vue +++ b/frontend/src/business/components/track/case/components/TestCaseList.vue @@ -48,14 +48,6 @@ :label="$t('commons.delete_user')" min-width="120"/> - - - + + + { let template = data[1]; this.testCaseTemplate = template; - this.fields = getTableHeaderWithCustomFields('TRACK_TEST_CASE', this.testCaseTemplate.customFields, this.members); + this.fields = getTableHeaderWithCustomFields(this.tableHeaderKey, this.testCaseTemplate.customFields, this.members); // todo 处理高级搜索自定义字段部分 this.condition.components = this.condition.components.filter(item => item.custom !== true); let comp = getAdvSearchCustomField(this.condition, this.testCaseTemplate.customFields); diff --git a/frontend/src/common/js/default-table-header.js b/frontend/src/common/js/default-table-header.js index 315a6f11ac..e4b26356c2 100644 --- a/frontend/src/common/js/default-table-header.js +++ b/frontend/src/common/js/default-table-header.js @@ -32,7 +32,7 @@ export let CUSTOM_TABLE_HEADER = { {id: 'createTime', key: '6', label: 'commons.create_time'}, {id: 'updateTime', key: '7', label: 'commons.update_time'}, ], -//接口定义 + //接口定义 API_DEFINITION: [ {id: 'num', key: '1', label: "ID"}, {id: 'name', key: '2', label: 'api_test.definition.api_name'}, @@ -49,7 +49,7 @@ export let CUSTOM_TABLE_HEADER = { {id: 'createTime', key: 'c', label: 'commons.create_time'}, {id: 'description', key: 'e', label: 'commons.description'}, ], -//接口用例 + //接口用例 API_CASE: [ {id: 'num', key: '1', label: "ID"}, {id: 'name', key: '2', label: 'test_track.case.name'}, @@ -215,7 +215,20 @@ export let CUSTOM_TABLE_HEADER = { {id: 'desc', key: '9', label: 'test_track.case.case_desc'}, {id: 'lastExecResult', key: '0', label: 'test_track.plan_view.execute_result'}, ], - + // 公共用例库 + TRACK_PUBLIC_TEST_CASE: [ + {id: 'num', key: '1', label: 'commons.id'}, + {id: 'name', key: '2', label: 'commons.name'}, + {id: 'reviewStatus', key: '3', label: 'test_track.case.status'}, + {id: 'tags', key: '4', label: 'commons.tag'}, + {id: 'versionId', key: 'b', label: 'project.version.name', xpack: true}, + {id: 'projectName', key: '5', label: 'test_track.case.project'}, + {id: 'updateTime', key: '6', label: 'commons.update_time'}, + {id: 'createName', key: '7', label: 'commons.create_user'}, + {id: 'createTime', key: '8', label: 'commons.create_time'}, + {id: 'desc', key: '9', label: 'test_track.case.case_desc'}, + {id: 'lastExecResult', key: '0', label: 'test_track.plan_view.execute_result'}, + ], // 测试报告 TRACK_REPORT_TABLE: [ {id: 'name', key: '1', label: 'test_track.report.list.name'}, @@ -306,4 +319,3 @@ export let CUSTOM_TABLE_HEADER = { ] } -