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 = { ] } -