From bc471a2fe4fb8ec7bc39dde93b62bbe485844e97 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Mon, 3 Apr 2023 14:41:22 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E6=8A=A5=E5=91=8A=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=8C=89=E5=90=8D=E7=A7=B0=E6=8E=92=E5=BA=8F=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E4=B8=8D=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1025040 --user=陈建星 测试跟踪-测试报告-按名称大小排序-未按照名称大小排序 https://www.tapd.cn/55049933/s/1358600 --- .../src/components/table/MsTableColumn.vue | 2 +- .../report/components/TestPlanReportList.vue | 63 ------------------- 2 files changed, 1 insertion(+), 64 deletions(-) diff --git a/framework/sdk-parent/frontend/src/components/table/MsTableColumn.vue b/framework/sdk-parent/frontend/src/components/table/MsTableColumn.vue index eead85bd2d..5711def7a6 100644 --- a/framework/sdk-parent/frontend/src/components/table/MsTableColumn.vue +++ b/framework/sdk-parent/frontend/src/components/table/MsTableColumn.vue @@ -8,7 +8,7 @@ :prop="prop" :column-key="columnKey ? columnKey : prop" :label="label" - :sortable="sortable" + :sortable="sortable ? 'custom' : false" :filter-method="filterMethod" :filtered-value="filteredValue " :render-header="renderHeader" diff --git a/test-track/frontend/src/business/report/components/TestPlanReportList.vue b/test-track/frontend/src/business/report/components/TestPlanReportList.vue index b7fdf8510d..57de9d01cb 100644 --- a/test-track/frontend/src/business/report/components/TestPlanReportList.vue +++ b/test-track/frontend/src/business/report/components/TestPlanReportList.vue @@ -169,18 +169,9 @@ import { TEST_PLAN_REPORT_CONFIGS } from "metersphere-frontend/src/components/se import ReportTriggerModeItem from "metersphere-frontend/src/components/tableItem/ReportTriggerModeItem"; import MsTag from "metersphere-frontend/src/components/MsTag"; import ShowMoreBtn from "metersphere-frontend/src/components/table/ShowMoreBtn"; -import MsTableSelectAll from "metersphere-frontend/src/components/table/MsTableSelectAll"; import { - _filter, - _handleSelect, - _handleSelectAll, - _sort, getLastTableSortField, - getSelectDataCounts, initCondition, - saveLastTableSortField, - setUnSelectIds, - toggleAllSelection, getCustomTableWidth, getCustomTableHeader, } from "metersphere-frontend/src/utils/tableUtils"; @@ -210,7 +201,6 @@ export default { ReportTriggerModeItem, MsTag, ShowMoreBtn, - MsTableSelectAll, MsTableColumn, MsTable, MsRenameReportDialog, @@ -339,24 +329,6 @@ export default { this.tableData = data.listObject; }); }, - handleSelect(selection, row) { - _handleSelect(this, selection, row, this.selectRows); - setUnSelectIds(this.tableData, this.condition, this.selectRows); - this.selectDataCounts = getSelectDataCounts( - this.condition, - this.total, - this.selectRows - ); - }, - handleSelectAll(selection) { - _handleSelectAll(this, selection, this.tableData, this.selectRows); - setUnSelectIds(this.tableData, this.condition, this.selectRows); - this.selectDataCounts = getSelectDataCounts( - this.condition, - this.total, - this.selectRows - ); - }, handleDelete(testPlanReport) { this.$alert( this.$t("report.delete_confirm") + " " + testPlanReport.name + " ?", @@ -401,19 +373,6 @@ export default { let ids = rowArray.map((s) => s.id); return ids; }, - filter(filters) { - _filter(filters, this.condition); - this.initTableData(); - }, - sort(column) { - // 每次只对一个字段排序 - if (this.condition.orders) { - this.condition.orders = []; - } - _sort(column, this.condition); - this.saveSortField(this.tableHeaderKey, this.condition.orders); - this.initTableData(); - }, openReport(report) { if (report.id) { if (report.isNew) { @@ -423,28 +382,6 @@ export default { } } }, - isSelectDataAll(data) { - this.condition.selectAll = data; - //设置勾选 - toggleAllSelection( - this.$refs.testPlanReportTable, - this.tableData, - this.selectRows - ); - //显示隐藏菜单 - _handleSelectAll(this, this.tableData, this.tableData, this.selectRows); - //设置未选择ID(更新) - this.condition.unSelectIds = []; - //更新统计信息 - this.selectDataCounts = getSelectDataCounts( - this.condition, - this.total, - this.selectRows - ); - }, - saveSortField(key, orders) { - saveLastTableSortField(key, JSON.stringify(orders)); - }, openReNameDialog($event) { this.$refs.renameDialog.open($event); },