mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-03 12:39:12 +08:00
fix(测试跟踪): 测试计划报告列表按名称排序结果不对
--bug=1025040 --user=陈建星 测试跟踪-测试报告-按名称大小排序-未按照名称大小排序 https://www.tapd.cn/55049933/s/1358600
This commit is contained in:
parent
7951607be9
commit
2db3a6abef
@ -8,7 +8,7 @@
|
|||||||
:prop="prop"
|
:prop="prop"
|
||||||
:column-key="columnKey ? columnKey : prop"
|
:column-key="columnKey ? columnKey : prop"
|
||||||
:label="label"
|
:label="label"
|
||||||
:sortable="sortable"
|
:sortable="sortable ? 'custom' : false"
|
||||||
:filter-method="filterMethod"
|
:filter-method="filterMethod"
|
||||||
:filtered-value="filteredValue "
|
:filtered-value="filteredValue "
|
||||||
:render-header="renderHeader"
|
:render-header="renderHeader"
|
||||||
|
@ -173,18 +173,9 @@ import { TEST_PLAN_REPORT_CONFIGS } from "metersphere-frontend/src/components/se
|
|||||||
import ReportTriggerModeItem from "metersphere-frontend/src/components/tableItem/ReportTriggerModeItem";
|
import ReportTriggerModeItem from "metersphere-frontend/src/components/tableItem/ReportTriggerModeItem";
|
||||||
import MsTag from "metersphere-frontend/src/components/MsTag";
|
import MsTag from "metersphere-frontend/src/components/MsTag";
|
||||||
import ShowMoreBtn from "metersphere-frontend/src/components/table/ShowMoreBtn";
|
import ShowMoreBtn from "metersphere-frontend/src/components/table/ShowMoreBtn";
|
||||||
import MsTableSelectAll from "metersphere-frontend/src/components/table/MsTableSelectAll";
|
|
||||||
import {
|
import {
|
||||||
_filter,
|
|
||||||
_handleSelect,
|
|
||||||
_handleSelectAll,
|
|
||||||
_sort,
|
|
||||||
getLastTableSortField,
|
getLastTableSortField,
|
||||||
getSelectDataCounts,
|
|
||||||
initCondition,
|
initCondition,
|
||||||
saveLastTableSortField,
|
|
||||||
setUnSelectIds,
|
|
||||||
toggleAllSelection,
|
|
||||||
getCustomTableWidth,
|
getCustomTableWidth,
|
||||||
getCustomTableHeader,
|
getCustomTableHeader,
|
||||||
} from "metersphere-frontend/src/utils/tableUtils";
|
} from "metersphere-frontend/src/utils/tableUtils";
|
||||||
@ -214,7 +205,6 @@ export default {
|
|||||||
ReportTriggerModeItem,
|
ReportTriggerModeItem,
|
||||||
MsTag,
|
MsTag,
|
||||||
ShowMoreBtn,
|
ShowMoreBtn,
|
||||||
MsTableSelectAll,
|
|
||||||
MsTableColumn,
|
MsTableColumn,
|
||||||
MsTable,
|
MsTable,
|
||||||
MsRenameReportDialog,
|
MsRenameReportDialog,
|
||||||
@ -351,24 +341,6 @@ export default {
|
|||||||
this.tableData = data.listObject;
|
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) {
|
handleDelete(testPlanReport) {
|
||||||
this.$alert(
|
this.$alert(
|
||||||
this.$t("report.delete_confirm") + " " + testPlanReport.name + " ?",
|
this.$t("report.delete_confirm") + " " + testPlanReport.name + " ?",
|
||||||
@ -413,19 +385,6 @@ export default {
|
|||||||
let ids = rowArray.map((s) => s.id);
|
let ids = rowArray.map((s) => s.id);
|
||||||
return ids;
|
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) {
|
openReport(report) {
|
||||||
if (report.id) {
|
if (report.id) {
|
||||||
if (report.isNew) {
|
if (report.isNew) {
|
||||||
@ -435,28 +394,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) {
|
openReNameDialog($event) {
|
||||||
this.$refs.renameDialog.open($event);
|
this.$refs.renameDialog.open($event);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user