fix 节点拖拽
This commit is contained in:
parent
be6d48f497
commit
0285b4cd59
|
@ -124,11 +124,17 @@ public class TestCaseNodeService {
|
||||||
|
|
||||||
testCases.forEach(testCase -> {
|
testCases.forEach(testCase -> {
|
||||||
StringBuilder path = new StringBuilder(testCase.getNodePath());
|
StringBuilder path = new StringBuilder(testCase.getNodePath());
|
||||||
List<String> list = Arrays.asList(path.toString().split("/"));
|
List<String> pathLists = Arrays.asList(path.toString().split("/"));
|
||||||
list.set(request.getLevel(), request.getName());
|
|
||||||
|
if (request.getLevel() <= pathLists.size()) {
|
||||||
|
pathLists.set(request.getLevel(), request.getName());
|
||||||
|
} else {
|
||||||
|
pathLists.add(request.getName());
|
||||||
|
}
|
||||||
|
|
||||||
path.delete( 0, path.length());
|
path.delete( 0, path.length());
|
||||||
for (int i = 1; i < list.size(); i++) {
|
for (int i = 1; i < pathLists.size(); i++) {
|
||||||
path = path.append("/").append(list.get(i));
|
path = path.append("/").append(pathLists.get(i));
|
||||||
}
|
}
|
||||||
testCase.setNodePath(path.toString());
|
testCase.setNodePath(path.toString());
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue