This commit is contained in:
chenjianxing 2020-07-23 11:56:04 +08:00
commit c3e54df8bb
2 changed files with 4 additions and 3 deletions

View File

@ -105,7 +105,7 @@ public class PerformanceReportController {
@GetMapping("log/{reportId}/{resourceId}/{goPage}") @GetMapping("log/{reportId}/{resourceId}/{goPage}")
public Pager<List<LoadTestReportLog>> logs(@PathVariable String reportId, @PathVariable String resourceId, @PathVariable int goPage) { public Pager<List<LoadTestReportLog>> logs(@PathVariable String reportId, @PathVariable String resourceId, @PathVariable int goPage) {
Page<Object> page = PageHelper.startPage(goPage, 10, true); Page<Object> page = PageHelper.startPage(goPage, 1, true);
return PageUtils.setPageInfo(page, reportService.getReportLogs(reportId, resourceId)); return PageUtils.setPageInfo(page, reportService.getReportLogs(reportId, resourceId));
} }

View File

@ -21,7 +21,7 @@
result: {}, result: {},
id: '', id: '',
page: 1, page: 1,
pageCount: 1, pageCount: 5,
loading: false, loading: false,
} }
}, },
@ -36,6 +36,8 @@
getResource() { getResource() {
this.result = this.$get("/performance/report/log/resource/" + this.id, data => { this.result = this.$get("/performance/report/log/resource/" + this.id, data => {
this.resource = data.data; this.resource = data.data;
this.page = 1;
this.logContent = [];
}) })
}, },
load(resourceId) { load(resourceId) {
@ -44,7 +46,6 @@
let url = "/performance/report/log/" + this.id + "/" + resourceId + "/" + this.page; let url = "/performance/report/log/" + this.id + "/" + resourceId + "/" + this.page;
this.$get(url, res => { this.$get(url, res => {
let data = res.data; let data = res.data;
this.pageCount = data.pageCount;
data.listObject.forEach(log => { data.listObject.forEach(log => {
this.logContent.push(log); this.logContent.push(log);
}) })