diff --git a/test-track/frontend/src/business/case/TestCase.vue b/test-track/frontend/src/business/case/TestCase.vue
index 0d55208a56..0c24f226fe 100644
--- a/test-track/frontend/src/business/case/TestCase.vue
+++ b/test-track/frontend/src/business/case/TestCase.vue
@@ -26,14 +26,14 @@
@@ -57,7 +57,7 @@
@testCaseCopy="copyTestCase"
@refresh="refreshTrashNode"
@refreshAll="refreshAll"
- @setCondition="setCondition"
+ @setCondition="setTrashCondition"
@search="refreshTreeByCaseFilter"
ref="testCaseTrashList">
@@ -75,7 +75,7 @@
@refresh="refresh"
@refreshAll="refreshAll"
@refreshPublic="refreshPublic"
- @setCondition="setCondition"
+ @setCondition="setPublicCondition"
@search="refreshTreeByCaseFilter"
ref="testCasePublicList">
@@ -143,7 +143,7 @@
:read-only="testCaseReadOnly"
:tree-nodes="treeNodes"
:select-node="selectNode"
- :select-condition="condition"
+ :select-condition="item.isPublic ? publicCondition : condition"
:public-enable="item.isPublic"
:case-type="type"
@addTab="addTab"
@@ -252,6 +252,8 @@ export default {
publicEnable: false,
showPublic: false,
condition: {},
+ trashCondition: {},
+ publicCondition: {},
activeName: 'default',
currentActiveName: '',
tabs: [],
@@ -755,14 +757,14 @@ export default {
setTreeNodes(data) {
this.treeNodes = data;
},
+ setPublicCondition(data) {
+ this.publicCondition = data;
+ },
+ setTrashCondition(data) {
+ this.trashCondition = data;
+ },
setCondition(data) {
- if (this.activeName === 'trash' && this.$refs.testCaseTrashList) {
- this.condition = this.$refs.testCaseTrashList.condition;
- } else if (this.activeName === 'default' && this.$refs.testCaseList) {
- this.condition = this.$refs.testCaseList.condition;
- } else {
- this.condition = data;
- }
+ this.condition = data;
},
getProject() {
getProjectApplicationConfig('CASE_CUSTOM_NUM')