fix(接口定义): 统一id 方便后续引用
This commit is contained in:
parent
d571c9dc07
commit
4e12976dfd
|
@ -1,18 +1,22 @@
|
|||
<template>
|
||||
<div> apiAutomation</div>
|
||||
<div>
|
||||
<ms-edit-api-scenario/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MsEditApiScenario from "./scenario/EditApiScenario";
|
||||
|
||||
export default {
|
||||
name: "ApiAutomation",
|
||||
components: {},
|
||||
components: {MsEditApiScenario},
|
||||
comments: {},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
watch: {},
|
||||
methods: {}
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -73,7 +73,6 @@
|
|||
this.reqUrl = "/api/definition/update";
|
||||
} else {
|
||||
this.reqUrl = "/api/definition/create";
|
||||
this.currentApi.id = getUUID().substring(0, 8);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -139,6 +138,9 @@
|
|||
this.request.name = this.currentApi.name;
|
||||
data.protocol = this.currentProtocol;
|
||||
data.request = this.request;
|
||||
data.request.name = data.name;
|
||||
data.request.protocol = this.currentProtocol;
|
||||
data.id = data.request.id;
|
||||
data.response = this.response;
|
||||
},
|
||||
getBodyUploadFiles(data) {
|
||||
|
|
|
@ -111,14 +111,6 @@
|
|||
})
|
||||
},
|
||||
setParameter() {
|
||||
this.httpForm.bodyUploadIds = [];
|
||||
this.httpForm.projectId = this.projectId;
|
||||
this.httpForm.id = getUUID().substring(0, 8);
|
||||
this.httpForm.protocol = this.currentProtocol;
|
||||
if (this.currentModule != null) {
|
||||
this.httpForm.modulePath = this.currentModule.method != undefined ? this.currentModule.method : null;
|
||||
this.httpForm.moduleId = this.currentModule.id;
|
||||
}
|
||||
switch (this.currentProtocol) {
|
||||
case Request.TYPES.SQL:
|
||||
this.initSQL();
|
||||
|
@ -133,6 +125,22 @@
|
|||
this.initHTTP();
|
||||
break;
|
||||
}
|
||||
this.httpForm.bodyUploadIds = [];
|
||||
this.httpForm.projectId = this.projectId;
|
||||
this.httpForm.id = this.httpForm.request.id;
|
||||
this.httpForm.protocol = this.currentProtocol;
|
||||
|
||||
this.httpForm.request.name = this.httpForm.name;
|
||||
this.httpForm.request.protocol = this.currentProtocol;
|
||||
if (this.currentProtocol === 'HTTP') {
|
||||
this.httpForm.request.method = this.httpForm.method;
|
||||
this.httpForm.request.path = this.httpForm.path;
|
||||
}
|
||||
if (this.currentModule != null) {
|
||||
this.httpForm.modulePath = this.currentModule.method != undefined ? this.currentModule.method : null;
|
||||
this.httpForm.moduleId = this.currentModule.id;
|
||||
}
|
||||
|
||||
},
|
||||
initHTTP() {
|
||||
let request = createComponent("HTTPSamplerProxy");
|
||||
|
|
Loading…
Reference in New Issue