style(接口测试): 修复接口测试首页swagger跳转的问题
--bug=1015399 --user=宋天阳 【接口测试】首页-运行中的定时任务,swagger定时任务跳转后没有显示定时任务tab
This commit is contained in:
parent
f2cadd041a
commit
6d5ab7aaf9
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue