Merge branch 'master' of https://github.com/metersphere/metersphere
This commit is contained in:
commit
c3466d5ca7
|
@ -149,7 +149,7 @@
|
|||
<span class="custom-tree-node father" slot-scope="{ node, data}" style="width: 96%">
|
||||
<!-- 步骤组件-->
|
||||
<ms-component-config :type="data.type" :scenario="data" :response="response" :currentScenario="currentScenario"
|
||||
:currentEnvironmentId="currentEnvironmentId" :node="node"
|
||||
:currentEnvironmentId="currentEnvironmentId" :node="node" :project-list="projectList"
|
||||
@remove="remove" @copyRow="copyRow" @suggestClick="suggestClick" @refReload="reload"/>
|
||||
</span>
|
||||
</el-tree>
|
||||
|
@ -300,7 +300,8 @@ export default {
|
|||
},
|
||||
response: {},
|
||||
projectIds: new Set,
|
||||
projectEnvMap: new Map
|
||||
projectEnvMap: new Map,
|
||||
projectList: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -309,6 +310,7 @@ export default {
|
|||
}
|
||||
this.projectId = getCurrentProjectID();
|
||||
this.operatingElements = ELEMENTS.get("ALL");
|
||||
this.getWsProjects();
|
||||
this.getMaintainerOptions();
|
||||
this.getApiScenario();
|
||||
this.addListener(); // 添加 ctrl s 监听
|
||||
|
@ -1031,7 +1033,12 @@ export default {
|
|||
},
|
||||
setProjectEnvMap(projectEnvMap) {
|
||||
this.projectEnvMap = projectEnvMap;
|
||||
}
|
||||
},
|
||||
getWsProjects() {
|
||||
this.$get("/project/listAll", res => {
|
||||
this.projectList = res.data;
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -84,6 +84,7 @@
|
|||
default: false,
|
||||
},
|
||||
currentEnvironmentId: String,
|
||||
projectList: Array
|
||||
},
|
||||
components: {
|
||||
CustomizeReqInfo,
|
||||
|
@ -96,7 +97,6 @@
|
|||
reportId: "",
|
||||
runData: [],
|
||||
isShowInput: false,
|
||||
projects: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -106,7 +106,6 @@
|
|||
this.request.projectId = getCurrentProjectID();
|
||||
// 加载引用对象数据
|
||||
this.getApiInfo();
|
||||
this.getWsProjects();
|
||||
if (this.request.protocol === 'HTTP') {
|
||||
this.setUrl(this.request.url);
|
||||
this.setUrl(this.request.path);
|
||||
|
@ -279,17 +278,9 @@
|
|||
this.loading = false
|
||||
})
|
||||
},
|
||||
getWsProjects() {
|
||||
this.$get("/project/listAll", res => {
|
||||
this.projects = res.data;
|
||||
})
|
||||
},
|
||||
getProjectName(id) {
|
||||
const project = this.projects.find(p => p.id === id);
|
||||
if (project) {
|
||||
return project.name;
|
||||
}
|
||||
return '';
|
||||
const project = this.projectList.find(p => p.id === id);
|
||||
return project ? project.name : "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,11 +42,13 @@
|
|||
default: false,
|
||||
},
|
||||
currentEnvironmentId: String,
|
||||
projectList: Array
|
||||
},
|
||||
watch: {},
|
||||
created() {
|
||||
this.getWsProjects();
|
||||
if (!this.scenario.projectId) {
|
||||
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 => {
|
||||
|
@ -76,7 +78,6 @@
|
|||
return {
|
||||
loading: false,
|
||||
isShowInput: false,
|
||||
projects: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -122,17 +123,9 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
getWsProjects() {
|
||||
this.$get("/project/listAll", res => {
|
||||
this.projects = res.data;
|
||||
})
|
||||
},
|
||||
getProjectName(id) {
|
||||
const project = this.projects.find(p => p.id === id);
|
||||
if (project) {
|
||||
return project.name;
|
||||
}
|
||||
return '';
|
||||
const project = this.projectList.find(p => p.id === id) ;
|
||||
return project ? project.name : "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="request-form">
|
||||
<component :is="component" :scenario="scenario" :controller="scenario" :timer="scenario" :assertions="scenario" :extract="scenario" :jsr223-processor="scenario" :request="scenario" :currentScenario="currentScenario" :currentEnvironmentId="currentEnvironmentId" :node="node"
|
||||
:draggable="true" :title="title" :color="titleColor" :background-color="backgroundColor" @suggestClick="suggestClick(node)" :response="response"
|
||||
@remove="remove" @copyRow="copyRow" @refReload="refReload"/>
|
||||
@remove="remove" @copyRow="copyRow" @refReload="refReload" :project-list="projectList"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -28,6 +28,7 @@
|
|||
currentEnvironmentId: String,
|
||||
response: {},
|
||||
node: {},
|
||||
projectList: Array
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue