feat(测试计划): 批量取消性能测试用例关联
This commit is contained in:
parent
ed819b4710
commit
2f8d0e9163
|
@ -52,4 +52,9 @@ public class TestPlanLoadCaseController {
|
|||
public Boolean isExistReport(@RequestBody LoadCaseReportRequest request) {
|
||||
return testPlanLoadCaseService.isExistReport(request);
|
||||
}
|
||||
|
||||
@PostMapping("/batch/delete")
|
||||
public void batchDelete(@RequestBody List<String> ids) {
|
||||
testPlanLoadCaseService.batchDelete(ids);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -113,4 +113,13 @@ public class TestPlanLoadCaseService {
|
|||
}
|
||||
testPlanLoadCaseMapper.deleteByExample(testPlanLoadCaseExample);
|
||||
}
|
||||
|
||||
public void batchDelete(List<String> ids) {
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
return;
|
||||
}
|
||||
TestPlanLoadCaseExample example = new TestPlanLoadCaseExample();
|
||||
example.createCriteria().andIdIn(ids);
|
||||
testPlanLoadCaseMapper.deleteByExample(example);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -205,7 +205,19 @@ export default {
|
|||
//
|
||||
// },
|
||||
handleDeleteBatch() {
|
||||
|
||||
this.$alert(this.$t('test_track.plan_view.confirm_cancel_relevance') + "?", '', {
|
||||
confirmButtonText: this.$t('commons.confirm'),
|
||||
callback: (action) => {
|
||||
if (action === 'confirm') {
|
||||
let ids = Array.from(this.selectRows).map(row => row.id);
|
||||
this.result = this.$post('/test/plan/load/case/batch/delete', ids, () => {
|
||||
this.selectRows.clear();
|
||||
this.initTable();
|
||||
this.$success(this.$t('test_track.cancel_relevance_success'));
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
handleRunBatch() {
|
||||
|
||||
|
@ -221,7 +233,7 @@ export default {
|
|||
})
|
||||
},
|
||||
handleDelete(loadCase) {
|
||||
this.$get('/test/plan/load/case/delete/' + loadCase.id, () => {
|
||||
this.result = this.$get('/test/plan/load/case/delete/' + loadCase.id, () => {
|
||||
this.$success(this.$t('test_track.cancel_relevance_success'));
|
||||
this.$emit('refresh');
|
||||
this.initTable();
|
||||
|
|
Loading…
Reference in New Issue