Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
e65c5aabeb
|
@ -43,11 +43,11 @@ public class LoadTestController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "/edit", consumes = {"multipart/form-data"})
|
@PostMapping(value = "/edit", consumes = {"multipart/form-data"})
|
||||||
public void edit(
|
public String edit(
|
||||||
@RequestPart("request") EditTestPlanRequest request,
|
@RequestPart("request") EditTestPlanRequest request,
|
||||||
@RequestPart(value = "file", required = false) MultipartFile file
|
@RequestPart(value = "file", required = false) MultipartFile file
|
||||||
) {
|
) {
|
||||||
loadTestService.edit(request, file);
|
return loadTestService.edit(request, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
|
|
|
@ -124,7 +124,7 @@ public class LoadTestService {
|
||||||
return fileMetadata;
|
return fileMetadata;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void edit(EditTestPlanRequest request, MultipartFile file) {
|
public String edit(EditTestPlanRequest request, MultipartFile file) {
|
||||||
// 新选择了一个文件,删除原来的文件
|
// 新选择了一个文件,删除原来的文件
|
||||||
if (file != null) {
|
if (file != null) {
|
||||||
fileService.deleteFileByTestId(request.getId());
|
fileService.deleteFileByTestId(request.getId());
|
||||||
|
@ -147,6 +147,8 @@ public class LoadTestService {
|
||||||
loadTest.setLoadConfiguration(request.getLoadConfiguration());
|
loadTest.setLoadConfiguration(request.getLoadConfiguration());
|
||||||
loadTestMapper.updateByPrimaryKeySelective(loadTest);
|
loadTestMapper.updateByPrimaryKeySelective(loadTest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return request.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void run(RunTestPlanRequest request) {
|
public void run(RunTestPlanRequest request) {
|
||||||
|
|
|
@ -103,7 +103,8 @@
|
||||||
|
|
||||||
let options = this.getSaveOption();
|
let options = this.getSaveOption();
|
||||||
|
|
||||||
this.result = this.$request(options, () => {
|
this.result = this.$request(options, (response) => {
|
||||||
|
this.testPlan.id = response.data;
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '保存成功!',
|
message: '保存成功!',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
|
|
Loading…
Reference in New Issue