refactor(性能测试): 修改日志详情查询

This commit is contained in:
CaptainB 2022-06-20 18:01:06 +08:00 committed by f2c-ci-robot[bot]
parent 24b99ae305
commit f6a2a330ad
2 changed files with 4 additions and 9 deletions

View File

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

View File

@ -2,7 +2,8 @@
<div>
<el-row :gutter="10">
<el-col :span="4">
<el-select v-model="currentInstance" placeholder="" size="small" style="width: 100%">
<el-select v-model="currentInstance" placeholder="" size="small" style="width: 100%"
@change="changeInstance(currentInstance)">
<el-option
v-for="item in resource"
:key="item.resourceId"
@ -72,6 +73,7 @@ export default {
this.resource = data;
if (!this.currentInstance) {
this.currentInstance = this.resource[0]?.resourceId;
this.changeInstance(this.currentInstance);
}
this.page = data.map(item => item.resourceId).reduce((result, curr) => {
result[curr] = 1;
@ -108,8 +110,6 @@ export default {
});
this.page[resourceId]++;
this.loading = false;
//
this.load(resourceId);
},
changeInstance(instance) {
this.currentInstance = instance;
@ -184,11 +184,6 @@ export default {
}
},
deep: true
},
currentInstance() {
if (this.currentInstance) {
this.changeInstance(this.currentInstance);
}
}
},
};