style(接口测试): 修复接口测试首页swagger跳转的问题

--bug=1015399 --user=宋天阳 【接口测试】首页-运行中的定时任务,swagger定时任务跳转后没有显示定时任务tab
This commit is contained in:
song-tianyang 2022-08-02 09:58:59 +08:00 committed by 建国
parent f2cadd041a
commit 6d5ab7aaf9
1 changed files with 17 additions and 2 deletions

View File

@ -366,7 +366,6 @@ export default {
};
},
activated() {
this.selectNodeIds = [];
let dataRange = this.$route.params.dataSelectRange;
if (dataRange && dataRange.length > 0) {
this.activeDom = 'middle';
@ -385,7 +384,7 @@ export default {
if (item !== undefined) {
let type = item.taskGroup.toString();
if (type === "SWAGGER_IMPORT") {
this.handleTabsEdit(this.$t('api_test.api_import.timing_synchronization'), 'SCHEDULE');
this.openSwaggerScheduleTab();
this.param = item;
}
}
@ -448,6 +447,22 @@ export default {
}
},
methods: {
openSwaggerScheduleTab() {
//
let scheduleTabName = "";
if (this.apiTabs) {
this.apiTabs.forEach(tab => {
if (tab.type === 'SCHEDULE') {
scheduleTabName = tab.name;
}
});
}
if (scheduleTabName === "") {
this.handleTabsEdit(this.$t('api_test.api_import.timing_synchronization'), 'SCHEDULE');
} else {
this.apiDefaultTab = scheduleTabName;
}
},
setEnvironment(data) {
if (data) {
this.useEnvironment = data.id;