diff --git a/test-track/frontend/src/business/case/components/case/CaseChangeHistory.vue b/test-track/frontend/src/business/case/components/case/CaseChangeHistory.vue index 25e7acea9e..f2d5ec39d5 100644 --- a/test-track/frontend/src/business/case/components/case/CaseChangeHistory.vue +++ b/test-track/frontend/src/business/case/components/case/CaseChangeHistory.vue @@ -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; diff --git a/test-track/frontend/src/business/case/components/public/PublicTestCaseList.vue b/test-track/frontend/src/business/case/components/public/PublicTestCaseList.vue index da1c2a684a..78b5954d79 100644 --- a/test-track/frontend/src/business/case/components/public/PublicTestCaseList.vue +++ b/test-track/frontend/src/business/case/components/public/PublicTestCaseList.vue @@ -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) { diff --git a/test-track/frontend/src/business/module/TestCasePublicNodeTree.vue b/test-track/frontend/src/business/module/TestCasePublicNodeTree.vue index be11f1dd44..39589a9563 100644 --- a/test-track/frontend/src/business/module/TestCasePublicNodeTree.vue +++ b/test-track/frontend/src/business/module/TestCasePublicNodeTree.vue @@ -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() { diff --git a/test-track/frontend/src/store/state.js b/test-track/frontend/src/store/state.js index aef62c015a..fc48a6ebb4 100644 --- a/test-track/frontend/src/store/state.js +++ b/test-track/frontend/src/store/state.js @@ -4,6 +4,7 @@ export default { theme: undefined, testCaseSelectNode: {}, testCaseSelectNodeIds: [], + testCasePublicSelectNodeIds: [], testCaseModuleOptions: [], testReviewSelectNode: {}, testReviewSelectNodeIds: [],