fix(接口测试): 修复测试报告查看报告详情页面报错问题

--user=郭雨琦 修复测试报告查看报告详情页面报错问题
This commit is contained in:
guoyuqi 2022-03-01 14:12:45 +08:00 committed by 刘瑞斌
parent ede0559f5e
commit dbe1546fdf
2 changed files with 15 additions and 8 deletions

View File

@ -17,7 +17,10 @@
props: {
height: [String, Number],
data: {
type: String
type: String,
default() {
return ''
}
},
theme: {
type: String,

View File

@ -8,19 +8,19 @@
:content="responseResult.responseCode"
placement="top">
<div v-if="response.attachInfoMap && response.attachInfoMap.errorReportResult" class="node-title" :class="'ms-req-error-report-result'">
<div v-if="responseData.attachInfoMap && responseData.attachInfoMap.errorReportResult" class="node-title" :class="'ms-req-error-report-result'">
{{ responseResult && responseResult.responseCode ? responseResult.responseCode : '0' }}
</div>
<div v-else class="node-title" :class="response && response.success ?'ms-req-success':'ms-req-error'">
<div v-else class="node-title" :class="responseData && responseData.success ?'ms-req-success':'ms-req-error'">
{{ responseResult && responseResult.responseCode ? responseResult.responseCode : '0' }}
</div>
</el-tooltip>
<div v-else class="node-title" :class="response && response.success ?'ms-req-success':'ms-req-error'">
<div v-else class="node-title" :class="responseData && responseData.success ?'ms-req-success':'ms-req-error'">
{{ responseResult && responseResult.responseCode ? responseResult.responseCode : '0' }}
</div>
<div v-if="response.attachInfoMap && response.attachInfoMap.errorReportResult">
<div v-if="responseData.attachInfoMap && responseData.attachInfoMap.errorReportResult">
<div class="ms-req-error-report-result">
{{ response.attachInfoMap.errorReportResult }}
{{ responseData.attachInfoMap.errorReportResult }}
</div>
</div>
</el-col>
@ -39,7 +39,6 @@
<script>
export default {
name: "MsRequestMetric",
props: {
response: {
type: Object,
@ -48,6 +47,11 @@ export default {
}
}
},
data() {
return {
responseData: this.response ? this.response : {}
}
},
computed: {
responseResult() {
return this.response && this.response.responseResult ? this.response.responseResult : {};
@ -55,7 +59,7 @@ export default {
error() {
return this.response && this.response.responseCode && this.response.responseCode >= 400;
}
}
},
}
</script>