diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue
index 564b195bff..1331ad4ea3 100644
--- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue
+++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue
@@ -208,9 +208,7 @@
-
-
-
+
@@ -241,7 +239,6 @@
import MsIfController from "./IfController";
import MsApiAssertions from "../../definition/components/assertion/ApiAssertions";
import MsApiExtract from "../../definition/components/extract/ApiExtract";
- import MsApiDefinition from "./api/ApiDefinition";
import MsApiComponent from "./ApiComponent";
import {ELEMENTS, ELEMENT_TYPE} from "./Setting";
import MsApiCustomize from "./ApiCustomize";
@@ -257,6 +254,7 @@
import InputTag from 'vue-input-tag'
import "@/common/css/material-icons.css"
import ScenarioApiRelevance from "./api/ScenarioApiRelevance";
+ import ScenarioRelevance from "./api/ScenarioRelevance";
export default {
name: "EditApiScenario",
@@ -265,13 +263,13 @@
currentScenario: {},
},
components: {
+ ScenarioRelevance,
ScenarioApiRelevance,
ApiEnvironmentConfig,
MsScenarioParameters,
MsApiReportDetail,
MsInputTag, MsRun,
MsApiScenarioComponent,
- MsImportApiScenario,
MsJsr233Processor,
MsConstantTimer,
MsIfController,
@@ -488,7 +486,8 @@
this.customizeVisible = true;
break;
case ELEMENT_TYPE.scenario:
- this.scenarioVisible = true;
+ // this.scenarioVisible = true;
+ this.$refs.scenarioRelevance.open();
break;
default:
this.$refs.apiImport.open();
@@ -546,8 +545,7 @@
this.customizeRequest = {};
this.sort();
this.reload();
- }
- ,
+ },
addScenario(arr) {
if (arr && arr.length > 0) {
arr.forEach(item => {
@@ -562,8 +560,7 @@
this.sort();
this.reload();
this.scenarioVisible = false;
- }
- ,
+ },
setApiParameter(item, refType, referenced) {
let request = {};
if (Object.prototype.toString.call(item.request).indexOf("String") > 0) {
diff --git a/frontend/src/business/components/api/automation/scenario/api/ScenarioApiRelevance.vue b/frontend/src/business/components/api/automation/scenario/api/ScenarioApiRelevance.vue
index 185fc3df58..c840464a00 100644
--- a/frontend/src/business/components/api/automation/scenario/api/ScenarioApiRelevance.vue
+++ b/frontend/src/business/components/api/automation/scenario/api/ScenarioApiRelevance.vue
@@ -108,38 +108,6 @@
setModuleOptions(data) {
this.moduleOptions = data;
},
-
- saveCaseRelevance() {
-
- let param = {};
- let url = '';
- let environmentId = undefined;
- let selectIds = [];
- if (this.isApiListEnable) {
- url = '/api/definition/relevance';
- environmentId = this.$refs.apiList.environmentId;
- selectIds = Array.from(this.$refs.apiList.selectRows).map(row => row.id);
- } else {
- url = '/api/testcase/relevance';
- environmentId = this.$refs.apiCaseList.environmentId;
- selectIds = Array.from(this.$refs.apiCaseList.selectRows).map(row => row.id);
- }
-
- if (!environmentId) {
- this.$warning(this.$t('api_test.environment.select_environment'));
- return;
- }
- param.planId = this.planId;
- param.selectIds = selectIds;
- param.environmentId = environmentId;
- this.result = this.$post(url, param, () => {
- this.$success(this.$t('commons.save_success'));
- this.$emit('refresh');
- this.refresh();
- this.$refs.baseRelevance.close();
- });
- },
-
refresh() {
if (this.isApiListEnable) {
this.$refs.apiList.initTable();
@@ -147,7 +115,6 @@
this.$refs.apiCaseList.initTable();
}
},
-
}
}
diff --git a/frontend/src/business/components/api/automation/scenario/api/ScenarioRelevance.vue b/frontend/src/business/components/api/automation/scenario/api/ScenarioRelevance.vue
new file mode 100644
index 0000000000..bbc912908f
--- /dev/null
+++ b/frontend/src/business/components/api/automation/scenario/api/ScenarioRelevance.vue
@@ -0,0 +1,138 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 复制
+ 引用
+
+
+
+
+
+
+
+