diff --git a/frontend/src/business/components/track/case/TestCase.vue b/frontend/src/business/components/track/case/TestCase.vue index 594f2de954..f60cc40118 100644 --- a/frontend/src/business/components/track/case/TestCase.vue +++ b/frontend/src/business/components/track/case/TestCase.vue @@ -23,8 +23,8 @@ @@ -19,12 +20,12 @@ } }, props: { - nodeNames: { + nodes: { type: Array } }, watch: { - nodeNames() { + nodes() { this.filterData(); } }, @@ -33,7 +34,7 @@ this.$emit('refresh'); }, filterData() { - this.data = this.nodeNames; + this.data = this.nodes; if (this.data.length > 4) { let lastData = this.data[this.data.length - 1]; this.data.splice(1, this.data.length); diff --git a/frontend/src/business/components/track/common/NodeTree.vue b/frontend/src/business/components/track/common/NodeTree.vue index 976e96915c..3682234531 100644 --- a/frontend/src/business/components/track/common/NodeTree.vue +++ b/frontend/src/business/components/track/common/NodeTree.vue @@ -52,7 +52,6 @@ - @@ -168,10 +167,10 @@ export default { }, handleNodeSelect(node) { let nodeIds = []; - let nodeNames = []; + let pNodes = []; this.getChildNodeId(node, nodeIds); - this.getParentNodeName(node, nodeNames); - this.$emit("nodeSelectEvent", nodeIds, nodeNames); + this.getParentNodes(node, pNodes); + this.$emit("nodeSelectEvent", nodeIds, pNodes); this.$emit("update:selectNode", node); }, getChildNodeId(rootNode, nodeIds) { @@ -181,12 +180,12 @@ export default { this.getChildNodeId(rootNode.childNodes[i], nodeIds); } }, - getParentNodeName(rootNode, nodeNames) { + getParentNodes(rootNode, pNodes) { if (rootNode.parent && rootNode.parent.id != 0) { - this.getParentNodeName(rootNode.parent, nodeNames); + this.getParentNodes(rootNode.parent, pNodes); } if (rootNode.data.name && rootNode.data.name != "") { - nodeNames.push(rootNode.data.name); + pNodes.push(rootNode.data); } }, filterNode(value, data) { diff --git a/frontend/src/business/components/track/plan/view/TestPlanView.vue b/frontend/src/business/components/track/plan/view/TestPlanView.vue index 4ec3d71789..01d3adfae2 100644 --- a/frontend/src/business/components/track/plan/view/TestPlanView.vue +++ b/frontend/src/business/components/track/plan/view/TestPlanView.vue @@ -23,7 +23,7 @@ @refresh="refresh" :plan-id="planId" :select-node-ids="selectNodeIds" - :select-node-names="selectNodeNames" + :select-parent-nodes="selectParentNodes" ref="testCasePlanList"/> @@ -52,7 +52,7 @@ testPlans: [], currentPlan: {}, selectNodeIds: [], - selectNodeNames: [], + selectParentNodes: [], treeNodes: [] } }, @@ -72,7 +72,7 @@ methods: { refresh() { this.selectNodeIds = []; - this.selectNodeNames = []; + this.selectParentNodes = []; this.getNodeTreeByPlanId(); }, initData() { @@ -92,9 +92,9 @@ }); }); }, - nodeChange(nodeIds, nodeNames) { + nodeChange(nodeIds, pNodes) { this.selectNodeIds = nodeIds; - this.selectNodeNames = nodeNames; + this.selectParentNodes = pNodes; }, changePlan(plan) { this.currentPlan = plan; diff --git a/frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseList.vue b/frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseList.vue index e4f0cfe1c2..159da9403e 100644 --- a/frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseList.vue +++ b/frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseList.vue @@ -3,7 +3,7 @@