Merge remote-tracking branch 'origin/master' into master
This commit is contained in:
commit
3314483424
|
@ -123,16 +123,17 @@ public class ApiScenarioModuleService {
|
|||
}
|
||||
}
|
||||
|
||||
private List<ApiScenarioDTO> queryByModuleIds(List<String> nodeIds) {
|
||||
private List<ApiScenarioDTO> queryByModuleIds(DragApiScenarioModuleRequest request) {
|
||||
ApiScenarioRequest apiScenarioRequest = new ApiScenarioRequest();
|
||||
apiScenarioRequest.setModuleIds(nodeIds);
|
||||
apiScenarioRequest.setProjectId(request.getProjectId());
|
||||
apiScenarioRequest.setModuleIds(request.getNodeIds());
|
||||
return apiAutomationService.list(apiScenarioRequest);
|
||||
}
|
||||
|
||||
public int editNode(DragApiScenarioModuleRequest request) {
|
||||
request.setUpdateTime(System.currentTimeMillis());
|
||||
checkApiScenarioModuleExist(request);
|
||||
List<ApiScenarioDTO> apiScenarios = queryByModuleIds(request.getNodeIds());
|
||||
List<ApiScenarioDTO> apiScenarios = queryByModuleIds(request);
|
||||
|
||||
apiScenarios.forEach(apiScenario -> {
|
||||
StringBuilder path = new StringBuilder(apiScenario.getModulePath());
|
||||
|
@ -171,7 +172,7 @@ public class ApiScenarioModuleService {
|
|||
|
||||
List<String> nodeIds = request.getNodeIds();
|
||||
|
||||
List<ApiScenarioDTO> apiScenarios = queryByModuleIds(nodeIds);
|
||||
List<ApiScenarioDTO> apiScenarios = queryByModuleIds(request);
|
||||
|
||||
ApiScenarioModuleDTO nodeTree = request.getNodeTree();
|
||||
|
||||
|
|
|
@ -30,11 +30,9 @@
|
|||
class="ms-el-input" size="mini"></el-input>
|
||||
</template>
|
||||
<!-- 如果不是编辑状态 -->
|
||||
<span v-else>
|
||||
<i class="el-icon-delete" v-if="data.id==='gc'"/>
|
||||
<i class="el-icon-folder" v-else/>
|
||||
<span class="node-title" v-text="data.name"></span>
|
||||
</span>
|
||||
<i class="el-icon-delete" v-if="data.isEdit!=1 && data.id==='gc'"/>
|
||||
<i class="el-icon-folder" v-if="data.isEdit!=1 && data.id!='gc'"/>
|
||||
<span class="node-title" v-if="data.isEdit!=1" v-text="data.name"></span>
|
||||
|
||||
<span class="node-operate child">
|
||||
<el-tooltip
|
||||
|
@ -117,6 +115,7 @@
|
|||
},
|
||||
methods: {
|
||||
getApiModuleTree() {
|
||||
this.nextFlag = true;
|
||||
let projectId = getCurrentProjectID();
|
||||
if (projectId) {
|
||||
if (this.expandedNode.length === 0) {
|
||||
|
@ -314,7 +313,7 @@
|
|||
editApiModule(node, data) {
|
||||
let projectId = getCurrentProjectID();
|
||||
if (!projectId) {
|
||||
this.$error("$t('api_test.select_project')");
|
||||
this.$error(this.$t('api_test.select_project'));
|
||||
return;
|
||||
}
|
||||
let url = "";
|
||||
|
|
|
@ -35,11 +35,10 @@
|
|||
@node-click="selectModule"
|
||||
@node-drag-end="handleDragEnd"
|
||||
:filter-node-method="filterNode"
|
||||
draggable
|
||||
:draggable="true"
|
||||
:allow-drop="allowDrop"
|
||||
:allow-drag="allowDrag" ref="tree">
|
||||
<span class="custom-tree-node father"
|
||||
slot-scope="{ node, data }">
|
||||
<span class="custom-tree-node father" slot-scope="{ node, data }">
|
||||
<!-- 如果是编辑状态 -->
|
||||
<template v-if="data.isEdit==1">
|
||||
<el-input ref="input"
|
||||
|
@ -48,12 +47,9 @@
|
|||
class="ms-el-input" size="mini"></el-input>
|
||||
</template>
|
||||
<!-- 如果不是编辑状态 -->
|
||||
<div v-else>
|
||||
<i class="el-icon-delete" v-if="data.id==='gc'"/>
|
||||
<i class="el-icon-folder" v-else/>
|
||||
<span class="node-title" v-text="data.name"></span>
|
||||
</div>
|
||||
|
||||
<i class="el-icon-delete" v-if="data.isEdit!=1 && data.id==='gc'"/>
|
||||
<i class="el-icon-folder" v-if="data.isEdit!=1 && data.id!='gc'"/>
|
||||
<span class="node-title" v-if="data.isEdit!=1" v-text="data.name"></span>
|
||||
<span class="node-operate child">
|
||||
<el-tooltip
|
||||
v-if="data.id!='root' && data.id!='gc'"
|
||||
|
@ -450,28 +446,6 @@
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
.father .child {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.father:hover .child {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.node-title {
|
||||
width: 0px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
flex: 1 1 auto;
|
||||
padding: 0px 5px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.node-operate > i {
|
||||
color: #409eff;
|
||||
margin: 0px 5px;
|
||||
}
|
||||
|
||||
/deep/ .el-tree-node__content {
|
||||
height: 33px;
|
||||
}
|
||||
|
@ -503,4 +477,26 @@
|
|||
width: 90px;
|
||||
}
|
||||
|
||||
.father .child {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.father:hover .child {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.node-title {
|
||||
width: 0px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
flex: 1 1 auto;
|
||||
padding: 0px 5px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.node-operate > i {
|
||||
color: #409eff;
|
||||
margin: 0px 5px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue