fix(接口测试): 分享报告登录问题
--user=郭雨琦 --bug=1013301 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001013301
This commit is contained in:
parent
af6d57061c
commit
3756231d5b
|
@ -17,6 +17,7 @@ import io.metersphere.commons.utils.Pager;
|
|||
import io.metersphere.controller.request.resourcepool.QueryResourcePoolRequest;
|
||||
import io.metersphere.dto.LogDetailDTO;
|
||||
import io.metersphere.dto.ReportDTO;
|
||||
import io.metersphere.dto.RequestResult;
|
||||
import io.metersphere.dto.TestResourcePoolDTO;
|
||||
import io.metersphere.performance.base.*;
|
||||
import io.metersphere.performance.dto.LoadTestExportJmx;
|
||||
|
@ -70,6 +71,8 @@ public class ShareController {
|
|||
MetricQueryService metricService;
|
||||
@Resource
|
||||
private TestResourcePoolService testResourcePoolService;
|
||||
@Resource
|
||||
private ApiScenarioReportService apiReportService;
|
||||
|
||||
@GetMapping("/issues/plan/get/{shareId}/{planId}")
|
||||
public List<IssuesDao> getIssuesByPlanoId(@PathVariable String shareId, @PathVariable String planId) {
|
||||
|
@ -308,4 +311,10 @@ public class ShareController {
|
|||
resourcePoolRequest.setStatus(ResourceStatusEnum.VALID.name());
|
||||
return testResourcePoolService.listResourcePools(resourcePoolRequest);
|
||||
}
|
||||
|
||||
@GetMapping("/{shareId}/scenario/report/selectReportContent/{stepId}")
|
||||
public RequestResult selectReportContent(@PathVariable String stepId,@PathVariable String shareId) {
|
||||
shareInfoService.validateExpired(shareId);
|
||||
return apiReportService.selectReportContent(stepId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
:treeData="fullTreeNodes"
|
||||
:console="content.console"
|
||||
:report="report"
|
||||
:is-share="isShare"
|
||||
:share-id="shareId"
|
||||
v-on:requestResult="requestResult"
|
||||
ref="resultsTree"/>
|
||||
</el-tab-pane>
|
||||
|
@ -38,6 +40,8 @@
|
|||
v-on:requestResult="requestResult"
|
||||
:console="content.console"
|
||||
:report="report"
|
||||
:is-share="isShare"
|
||||
:share-id="shareId"
|
||||
:treeData="fullTreeNodes" ref="failsTree"
|
||||
:errorReport="content.error"/>
|
||||
</el-tab-pane>
|
||||
|
@ -51,6 +55,8 @@
|
|||
<ms-scenario-results
|
||||
v-on:requestResult="requestResult"
|
||||
:report="report"
|
||||
:is-share="isShare"
|
||||
:share-id="shareId"
|
||||
:console="content.console"
|
||||
:treeData="fullTreeNodes" ref="errorReportTree"/>
|
||||
</el-tab-pane>
|
||||
|
@ -65,6 +71,8 @@
|
|||
<ms-scenario-results
|
||||
v-on:requestResult="requestResult"
|
||||
:report="report"
|
||||
:is-share="isShare"
|
||||
:share-id="shareId"
|
||||
:console="content.console"
|
||||
:treeData="fullTreeNodes" ref="unExecuteTree"/>
|
||||
</el-tab-pane>
|
||||
|
@ -171,11 +179,6 @@
|
|||
if (this.isTemplate) {
|
||||
this.getReport();
|
||||
}
|
||||
},
|
||||
isShare() {
|
||||
if(this.isShare()){
|
||||
this.handleExport()
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -185,7 +185,9 @@ export default {
|
|||
isActive: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
isShare: Boolean,
|
||||
shareId: String,
|
||||
},
|
||||
created() {
|
||||
this.showActive = this.isActive;
|
||||
|
@ -261,12 +263,22 @@ export default {
|
|||
},
|
||||
loadRequestInfoExpand() {
|
||||
if (!this.request.responseResult || this.request.responseResult.body === null || this.request.responseResult.body === undefined) {
|
||||
this.$get("/api/scenario/report/selectReportContent/" + this.stepId, response => {
|
||||
this.requestInfo = response.data;
|
||||
this.$nextTick(() => {
|
||||
this.requestInfo.loading = false;
|
||||
if (this.isShare) {
|
||||
this.$get("/share/" + this.shareId + "/scenario/report/selectReportContent/" + this.stepId, response => {
|
||||
this.requestInfo = response.data;
|
||||
this.$nextTick(() => {
|
||||
this.requestInfo.loading = false;
|
||||
});
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.$get("/api/scenario/report/selectReportContent/" + this.stepId, response => {
|
||||
this.requestInfo = response.data;
|
||||
this.$nextTick(() => {
|
||||
this.requestInfo.loading = false;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
this.requestInfo = this.request;
|
||||
}
|
||||
|
|
|
@ -36,6 +36,8 @@
|
|||
:total-status="node.totalStatus"
|
||||
:console="console"
|
||||
:isActive="isActive"
|
||||
:is-share="isShare"
|
||||
:share-id="shareId"
|
||||
v-on:requestResult="requestResult"
|
||||
/>
|
||||
</div>
|
||||
|
@ -59,6 +61,8 @@ export default {
|
|||
node: Object,
|
||||
console: String,
|
||||
isActive: Boolean,
|
||||
isShare:Boolean,
|
||||
shareId: String,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
highlight-current
|
||||
class="ms-tree ms-report-tree" ref="resultsTree">
|
||||
<span slot-scope="{ node, data}" style="width: 99%" @click="nodeClick(node)">
|
||||
<ms-scenario-result :node="data" :console="console" v-on:requestResult="requestResult"
|
||||
:isActive="isActive"/>
|
||||
<ms-scenario-result :node="data" :console="console" v-on:requestResult="requestResult"
|
||||
:isActive="isActive" :is-share="isShare" :share-id="shareId"/>
|
||||
</span>
|
||||
</el-tree>
|
||||
</el-card>
|
||||
|
@ -37,7 +37,9 @@ export default {
|
|||
defaultExpand: {
|
||||
default: false,
|
||||
type: Boolean,
|
||||
}
|
||||
},
|
||||
isShare:Boolean,
|
||||
shareId: String,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue