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

This commit is contained in:
CaptainB 2022-06-20 19:09:23 +08:00 committed by 刘瑞斌
parent f01dc15eb6
commit da5bfc2c78
1 changed files with 4 additions and 1 deletions

View File

@ -73,7 +73,6 @@ export default {
this.resource = data; this.resource = data;
if (!this.currentInstance) { if (!this.currentInstance) {
this.currentInstance = this.resource[0]?.resourceId; this.currentInstance = this.resource[0]?.resourceId;
this.changeInstance(this.currentInstance);
} }
this.page = data.map(item => item.resourceId).reduce((result, curr) => { this.page = data.map(item => item.resourceId).reduce((result, curr) => {
result[curr] = 1; result[curr] = 1;
@ -83,6 +82,10 @@ export default {
result[curr] = []; result[curr] = [];
return result; return result;
}, {}); }, {});
//
if (this.currentInstance) {
this.changeInstance(this.currentInstance);
}
}, },
load(resourceId) { load(resourceId) {
if (this.loading || this.page[resourceId] > this.pageCount) { if (this.loading || this.page[resourceId] > this.pageCount) {