diff --git a/frontend/src/business/components/api/definition/ApiDefinition.vue b/frontend/src/business/components/api/definition/ApiDefinition.vue
index faedc0c205..56a5fda42e 100644
--- a/frontend/src/business/components/api/definition/ApiDefinition.vue
+++ b/frontend/src/business/components/api/definition/ApiDefinition.vue
@@ -227,7 +227,7 @@
}); // 删除所有tab的 ctrl + s 监听
let tabs = this.apiTabs;
let index = tabs.findIndex(item => item.name === tab.name); // 找到当前选中tab的index
- if (index != -1) {
+ if (index != -1 && this.$refs.apiConfig[index - 1]) {
this.$refs.apiConfig[index - 1].addListener(); // 为选中tab添加 ctrl + s 监听(index-1的原因是要除去第一个固有tab)
}
}
diff --git a/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue b/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue
index bee3e51558..860b72f0fc 100644
--- a/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue
+++ b/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue
@@ -469,7 +469,10 @@ export default {
return ids;
},
showCaseRef(row) {
- this.$refs.viewRef.open(row);
+ let param = {};
+ Object.assign(param, row);
+ param.moduleId = undefined;
+ this.$refs.viewRef.open(param);
},
showEnvironment(row) {
diff --git a/frontend/src/business/components/api/definition/components/reference/ApiExtendBtns.vue b/frontend/src/business/components/api/definition/components/reference/ApiExtendBtns.vue
index ee712c5d2f..f23fe92e38 100644
--- a/frontend/src/business/components/api/definition/components/reference/ApiExtendBtns.vue
+++ b/frontend/src/business/components/api/definition/components/reference/ApiExtendBtns.vue
@@ -5,14 +5,9 @@
{{ $t('api_test.automation.view_ref') }}
-
{{ $t('api_test.create_performance_test') }}
-
-
-
-
@@ -36,7 +31,6 @@
planVisible: false,
}
},
-
methods: {
handleCommand(cmd) {
if (this.row.id) {
@@ -44,9 +38,6 @@
case "ref":
this.$refs.viewRef.open(this.row);
break;
- case "add_plan":
- this.addCaseToPlan();
- break;
case "create_performance":
this.createPerformance(this.row);
break;
@@ -113,16 +104,6 @@
this.$emit('runRefresh', {});
});
- },
- addCaseToPlan() {
- this.planVisible = true;
- },
- addTestPlan(plans) {
- let obj = {planIds: plans, apiIds: [this.row.id]};
- this.planVisible = false;
- this.$post("/api/automation/scenario/plan", obj, response => {
- this.$success(this.$t("commons.save_success"));
- });
}
}
}