diff --git a/test-track/frontend/src/business/case/TestCase.vue b/test-track/frontend/src/business/case/TestCase.vue index 0f1b1d4c43..e6e56a90a6 100644 --- a/test-track/frontend/src/business/case/TestCase.vue +++ b/test-track/frontend/src/business/case/TestCase.vue @@ -93,7 +93,7 @@ :tree-nodes="treeNodes" :trash-enable="false" :public-enable="false" - :current-version="currentVersion" + :default-version="currentVersion" :version-enable.sync="versionEnable" @refreshTable="refresh" @getTrashList="getTrashList" @@ -107,11 +107,12 @@ @@ -239,6 +240,7 @@ export default { } }, mounted() { + this.currentVersion = this.defaultVersion || null; this.getProject(); this.checkVersionEnable(); }, @@ -454,6 +456,7 @@ export default { }, refreshTreeByCaseFilter(currentVersion) { this.condition.versionId = currentVersion || null; + this.currentVersion = this.condition.versionId; if (this.publicEnable) { this.$refs.publicNodeTree.list(); } else if (this.trashEnable) { diff --git a/test-track/frontend/src/business/case/components/TestCaseList.vue b/test-track/frontend/src/business/case/components/TestCaseList.vue index f16e1fc891..177d821f50 100644 --- a/test-track/frontend/src/business/case/components/TestCaseList.vue +++ b/test-track/frontend/src/business/case/components/TestCaseList.vue @@ -12,7 +12,7 @@ - + @@ -512,7 +512,8 @@ export default { versionEnable: { type: Boolean, default: false - } + }, + defaultVersion: String }, computed: { routeProjectId() { @@ -541,6 +542,7 @@ export default { } }, created: function () { + this.currentVersion = this.defaultVersion || null; this.checkCurrentProject(); getProjectMemberUserFilter((data) => { diff --git a/test-track/frontend/src/business/common/minder/TestCaseMinder.vue b/test-track/frontend/src/business/common/minder/TestCaseMinder.vue index 8aaab16352..a06d77d69f 100644 --- a/test-track/frontend/src/business/common/minder/TestCaseMinder.vue +++ b/test-track/frontend/src/business/common/minder/TestCaseMinder.vue @@ -5,7 +5,7 @@
- +
{ @@ -183,6 +185,7 @@ export default { methods: { changeVersion(currentVersion) { this.currentVersion = currentVersion || null; + this.$emit('versionChange', currentVersion); }, handleNodeUpdateForMinder() { if (this.noRefreshMinder) {