fix(接口测试): 修复增加首页版本跳转功能时引起的列表版本切换不生效的问题

修复增加首页版本跳转功能时引起的列表版本切换不生效的问题
This commit is contained in:
song-tianyang 2022-12-14 10:55:16 +08:00 committed by 建国
parent bebee3896d
commit 2938a1e9a6
4 changed files with 4 additions and 5 deletions

View File

@ -326,7 +326,7 @@ export default {
let selectDataType = 'all';
let routeParamObj = this.$route.params;
let redirectVersionId = this.$route.params.versionId;
if (redirectVersionId !== 'default') {
if (redirectVersionId && redirectVersionId !== 'default') {
this.condition.versionId = redirectVersionId;
}
if (routeParamObj) {

View File

@ -1325,7 +1325,7 @@ export default {
this.selectDataType = 'all';
let routeParamObj = this.$route.params;
let redirectVersionId = this.$route.params.versionId;
if (redirectVersionId !== 'default') {
if (redirectVersionId && redirectVersionId !== 'default') {
this.condition.versionId = redirectVersionId;
}
if (routeParamObj) {

View File

@ -1280,7 +1280,7 @@ export default {
let routeParam = this.$route.params.dataSelectRange;
let dataType = this.$route.params.dataType;
let redirectVersionId = this.$route.params.versionId;
if (redirectVersionId !== 'default') {
if (redirectVersionId && redirectVersionId !== 'default') {
this.condition.versionId = redirectVersionId;
}
if (dataType === 'apiTestCase') {

View File

@ -1047,7 +1047,6 @@ export default {
});
}
},
getColor(enable, method) {
if (enable) {
return this.methodColorMap.get(method);
@ -1061,7 +1060,7 @@ export default {
let dataRange = this.$route.params.dataSelectRange;
let dataType = this.$route.params.dataType;
let redirectVersionId = this.$route.params.versionId;
if (redirectVersionId !== 'default') {
if (redirectVersionId && redirectVersionId !== 'default') {
this.condition.versionId = redirectVersionId;
}
this.selectDataRange = dataType === 'api' ? dataRange : 'all';