fix(测试跟踪): 修改公共用例库切换页码数据显示错误的缺陷

--bug=1024046 --user=王孝刚 【测试跟踪】公共用例库,选择模块,模块内切换页码,显示数据错误
https://www.tapd.cn/55049933/s/1347113
This commit is contained in:
wxg0103 2023-03-08 17:46:34 +08:00 committed by jianxing
parent 705feca821
commit 04372f4848
4 changed files with 12 additions and 2 deletions

View File

@ -267,7 +267,7 @@ export default {
text-overflow: ellipsis;
vertical-align: middle;
white-space: nowrap;
width: 120px;
width: 150px !important;
}
.wrap {
padding: 24px 0 0 0;

View File

@ -369,7 +369,7 @@ export default {
return getCurrentProjectID();
},
...mapState(useStore, {
selectNodeIds: 'testCaseSelectNodeIds',
selectNodeIds: 'testCasePublicSelectNodeIds',
selectNode: 'testCaseSelectNode',
moduleOptions: 'testCaseModuleOptions',
customNum: 'currentProjectIsCustomNum'
@ -417,6 +417,12 @@ export default {
this.condition.nodeIds = [];
initCondition(this.condition, this.condition.selectAll);
this.condition.orders = getLastTableSortField(this.tableHeaderKey);
if (this.selectNodeIds && this.selectNodeIds.length > 0) {
if (!this.selectNode || this.selectNode.data.id !== 'root') {
// root
this.condition.nodeIds = this.selectNodeIds;
}
}
this.condition.versionId = this.currentVersion || null;
this.condition.filters.reviewStatus = ["Prepare", "Pass", "UnPass"];
if (nodeIds && Array.isArray(nodeIds) && nodeIds.length > 0) {

View File

@ -19,6 +19,7 @@
import MsSearchBar from "metersphere-frontend/src/components/new-ui/MsSearchBar";
import MsNodeTree from "metersphere-frontend/src/components/new-ui/MsNodeTree";
import {getTestCasePublicNodes} from "@/api/testCase";
import {useStore} from "@/store";
export default {
name: "TestCasePublicNodeTree",
@ -46,6 +47,8 @@ export default {
this.$refs.publicNodeTree.filter(this.condition.filterText);
},
publicNodeChange(node, nodeIds, pNodes) {
let store = useStore();
store.testCasePublicSelectNodeIds = nodeIds;
this.$emit("nodeSelectEvent", node, node.data.id === 'root' ? [] : nodeIds, pNodes);
},
list() {

View File

@ -4,6 +4,7 @@ export default {
theme: undefined,
testCaseSelectNode: {},
testCaseSelectNodeIds: [],
testCasePublicSelectNodeIds: [],
testCaseModuleOptions: [],
testReviewSelectNode: {},
testReviewSelectNodeIds: [],