fix(接口测试): 修复跨项目复制的自定义sql请求无法拿到原项目环境的缺陷
--bug=1025195 --user=王孝刚 【接口测试】场景中跨项目复制场景B(自定义sql请求),sql请求运行环境不能选原项目中的环境 https://www.tapd.cn/55049933/s/1360280
This commit is contained in:
parent
bc5dc86247
commit
afbe081d26
|
@ -273,6 +273,13 @@ export default {
|
||||||
this.request.projectId = getCurrentProjectID();
|
this.request.projectId = getCurrentProjectID();
|
||||||
}
|
}
|
||||||
this.request.customizeReq = this.isCustomizeReq;
|
this.request.customizeReq = this.isCustomizeReq;
|
||||||
|
if (this.request.customizeReq) {
|
||||||
|
if (this.node.parent && this.node.parent.data && this.node.parent.data.length > 1) {
|
||||||
|
this.request.projectId = getCurrentProjectID();
|
||||||
|
}else {
|
||||||
|
this.request.projectId = this.node.parent.data.projectId;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (this.currentScenario) {
|
if (this.currentScenario) {
|
||||||
this.request.currentScenarioId = this.currentScenario.id;
|
this.request.currentScenarioId = this.currentScenario.id;
|
||||||
}
|
}
|
||||||
|
|
|
@ -337,7 +337,7 @@ export default {
|
||||||
runTest() {},
|
runTest() {},
|
||||||
itselfEnvironment(environmentId) {
|
itselfEnvironment(environmentId) {
|
||||||
let id = this.request.projectId ? this.request.projectId : this.projectId;
|
let id = this.request.projectId ? this.request.projectId : this.projectId;
|
||||||
getEnvironmentByProjectId(this.projectId).then((response) => {
|
getEnvironmentByProjectId(id).then((response) => {
|
||||||
this.environments = response.data;
|
this.environments = response.data;
|
||||||
let targetDataSourceName = undefined;
|
let targetDataSourceName = undefined;
|
||||||
let currentEnvironment = undefined;
|
let currentEnvironment = undefined;
|
||||||
|
|
Loading…
Reference in New Issue