refactor(测试跟踪): 功能用例列表和脑图切换时,携带版本筛选条件

--bug=1028140 --user=陈建星 【测试跟踪】github#25848,功能用例使用版本筛选条件,切换到脑图模式后,条件没有带过来,需要重新筛选 https://www.tapd.cn/55049933/s/1397494
This commit is contained in:
jianxing 2023-07-26 09:52:47 +08:00 committed by 刘瑞斌
parent ddf54f0204
commit b59d8e8abf
3 changed files with 14 additions and 6 deletions

View File

@ -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 @@
</test-case-list>
<test-case-minder
v-if="isMinderMode"
:current-version="currentVersion"
:default-version="currentVersion"
:tree-nodes="treeNodes"
:project-id="projectId"
:condition="condition"
:active-name="activeName"
@versionChange="changeVersion"
@refresh="minderSaveRefresh"
@toggleMinderFullScreen="toggleMinderFullScreen"
ref="minder"/>
@ -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) {

View File

@ -12,7 +12,7 @@
<ms-new-ui-search :condition.sync="condition" @search="search" style="float: left" />
<!-- 版本切换组件 -->
<version-select v-xpack :project-id="projectId" @changeVersion="changeVersion" />
<version-select v-xpack :project-id="projectId" :default-version="defaultVersion" @changeVersion="changeVersion" />
<!-- 高级搜索框 -->
<ms-table-adv-search :condition.sync="condition" @search="search" ref="advanceSearch"/>
@ -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) => {

View File

@ -5,7 +5,7 @@
</div>
<div class="case-main-layout-right" style="float: right; display: flex">
<version-select v-xpack :project-id="projectId" @changeVersion="changeVersion" />
<version-select v-xpack :default-version="defaultVersion" :project-id="projectId" @changeVersion="changeVersion" />
</div>
<ms-module-minder
@ -122,7 +122,8 @@ export default {
},
condition: Object,
projectId: String,
activeName: String
activeName: String,
defaultVersion: String
},
computed: {
...mapState(useStore, {
@ -167,6 +168,7 @@ export default {
}
},
mounted() {
this.currentVersion = this.defaultVersion || null;
this.setIsChange(false);
let moduleNum = 0;
this.treeNodes.forEach(node => {
@ -183,6 +185,7 @@ export default {
methods: {
changeVersion(currentVersion) {
this.currentVersion = currentVersion || null;
this.$emit('versionChange', currentVersion);
},
handleNodeUpdateForMinder() {
if (this.noRefreshMinder) {