mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-05 21:49:23 +08:00
fix(接口自动化): 修复新功能导致执行问题
This commit is contained in:
parent
9b2b7e7f63
commit
6b47ed7470
@ -61,29 +61,29 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MsSqlBasisParameters from "../../../definition/components/request/database/BasisParameters";
|
||||
import MsTcpBasisParameters from "../../../definition/components/request/tcp/TcpBasisParameters";
|
||||
import MsDubboBasisParameters from "../../../definition/components/request/dubbo/BasisParameters";
|
||||
import MsApiRequestForm from "../../../definition/components/request/http/ApiHttpRequestForm";
|
||||
import MsRequestResultTail from "../../../definition/components/response/RequestResultTail";
|
||||
import MsRun from "../../../definition/components/Run";
|
||||
import {getUUID} from "@/common/js/utils";
|
||||
import ApiBaseComponent from "../common/ApiBaseComponent";
|
||||
import ApiResponseComponent from "./ApiResponseComponent";
|
||||
import CustomizeReqInfo from "@/business/components/api/automation/scenario/common/CustomizeReqInfo";
|
||||
import {getProject} from "@/business/components/api/automation/scenario/event";
|
||||
import MsSqlBasisParameters from "../../../definition/components/request/database/BasisParameters";
|
||||
import MsTcpBasisParameters from "../../../definition/components/request/tcp/TcpBasisParameters";
|
||||
import MsDubboBasisParameters from "../../../definition/components/request/dubbo/BasisParameters";
|
||||
import MsApiRequestForm from "../../../definition/components/request/http/ApiHttpRequestForm";
|
||||
import MsRequestResultTail from "../../../definition/components/response/RequestResultTail";
|
||||
import MsRun from "../../../definition/components/Run";
|
||||
import {getUUID,getCurrentProjectID} from "@/common/js/utils";
|
||||
import ApiBaseComponent from "../common/ApiBaseComponent";
|
||||
import ApiResponseComponent from "./ApiResponseComponent";
|
||||
import CustomizeReqInfo from "@/business/components/api/automation/scenario/common/CustomizeReqInfo";
|
||||
import {getProject} from "@/business/components/api/automation/scenario/event";
|
||||
|
||||
export default {
|
||||
name: "MsApiComponent",
|
||||
props: {
|
||||
request: {},
|
||||
currentScenario: {},
|
||||
node: {},
|
||||
draggable: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
currentEnvironmentId: String,
|
||||
export default {
|
||||
name: "MsApiComponent",
|
||||
props: {
|
||||
request: {},
|
||||
currentScenario: {},
|
||||
node: {},
|
||||
draggable: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
currentEnvironmentId: String,
|
||||
},
|
||||
components: {
|
||||
CustomizeReqInfo,
|
||||
@ -103,6 +103,7 @@ export default {
|
||||
if (!this.request.requestResult) {
|
||||
this.request.requestResult = {responseResult: {}};
|
||||
}
|
||||
this.request.projectId = getCurrentProjectID();
|
||||
// 加载引用对象数据
|
||||
this.getApiInfo();
|
||||
this.getWsProjects();
|
||||
@ -215,6 +216,9 @@ export default {
|
||||
this.request.requestResult = requestResult;
|
||||
this.request.id = response.data.id;
|
||||
this.request.disabled = true;
|
||||
if (!this.request.projectId) {
|
||||
this.request.projectId = response.data.projectId;
|
||||
}
|
||||
this.reload();
|
||||
this.sort();
|
||||
} else {
|
||||
|
@ -30,6 +30,7 @@
|
||||
import MsApiRequestForm from "../../../definition/components/request/http/ApiHttpRequestForm";
|
||||
import ApiBaseComponent from "../common/ApiBaseComponent";
|
||||
import {getProject} from "@/business/components/api/automation/scenario/event";
|
||||
import {getCurrentProjectID} from "@/common/js/utils";
|
||||
|
||||
export default {
|
||||
name: "ApiScenarioComponent",
|
||||
@ -45,6 +46,7 @@
|
||||
watch: {},
|
||||
created() {
|
||||
this.getWsProjects();
|
||||
this.scenario.projectId = getCurrentProjectID();
|
||||
getProject.$emit('addProjectEnv', this.scenario.projectId, this.currentEnvironmentId);
|
||||
if (this.scenario.id && this.scenario.referenced === 'REF' && !this.scenario.loaded) {
|
||||
this.result = this.$get("/api/automation/getApiScenario/" + this.scenario.id, response => {
|
||||
@ -58,6 +60,10 @@
|
||||
}
|
||||
this.scenario.disabled = true;
|
||||
this.scenario.name = response.data.name;
|
||||
if (!this.scenario.projectId) {
|
||||
this.scenario.projectId = response.data.projectId;
|
||||
}
|
||||
|
||||
this.$emit('refReload');
|
||||
} else {
|
||||
this.scenario.referenced = "Deleted";
|
||||
|
Loading…
Reference in New Issue
Block a user