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