diff --git a/frontend/src/business/components/api/automation/report/ApiReportDetail.vue b/frontend/src/business/components/api/automation/report/ApiReportDetail.vue index 187582fb0b..7d298f4128 100644 --- a/frontend/src/business/components/api/automation/report/ApiReportDetail.vue +++ b/frontend/src/business/components/api/automation/report/ApiReportDetail.vue @@ -19,7 +19,8 @@ {{ $t('api_report.fail') }} + :treeData="fullTreeNodes" ref="failsTree" + :errorReport="content.error"/> diff --git a/frontend/src/business/components/api/automation/report/components/RequestResult.vue b/frontend/src/business/components/api/automation/report/components/RequestResult.vue index 9b1f187dbe..6236150346 100644 --- a/frontend/src/business/components/api/automation/report/components/RequestResult.vue +++ b/frontend/src/business/components/api/automation/report/components/RequestResult.vue @@ -2,15 +2,15 @@ - - + + {{ indexNumber }} - {{ getName(request.name) }} + {{ getName(request.name) }} @@ -103,10 +103,10 @@ export default { indexNumber: Number, console: String, errorCode: String, + isActive: Boolean, }, data() { return { - isActive: false, requestType: "", color: { type: String, @@ -188,6 +188,10 @@ export default { font-weight: 500; line-height: 35px; padding-left: 5px; + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .request-result .url { diff --git a/frontend/src/business/components/api/automation/report/components/ScenarioResult.vue b/frontend/src/business/components/api/automation/report/components/ScenarioResult.vue index 0d69386215..9a1b62807c 100644 --- a/frontend/src/business/components/api/automation/report/components/ScenarioResult.vue +++ b/frontend/src/business/components/api/automation/report/components/ScenarioResult.vue @@ -8,7 +8,9 @@ {{ node.index }} - {{ node.label }} + + {{ node.label }} + @@ -18,6 +20,7 @@ :error-code="node.errorCode" :scenarioName="node.label" :console="console" + :isActive="isActive" v-on:requestResult="requestResult" /> @@ -35,11 +38,11 @@ export default { scenario: Object, node: Object, console: String, + isActive: Boolean, }, data() { return { - isActive: false, stepFilter: new STEP, } }, @@ -75,6 +78,9 @@ export default { .ms-card >>> .el-card__body { padding: 10px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .scenario-result .info { @@ -98,7 +104,7 @@ export default { color: #64666A; } -.ms-api-col-create { +.ms-card .ms-api-col-create { background-color: #EBF2F2; border-color: #008080; margin-right: 10px; @@ -106,6 +112,7 @@ export default { color: #008080; } + /deep/ .el-step__icon { width: 20px; height: 20px; diff --git a/frontend/src/business/components/api/automation/report/components/ScenarioResults.vue b/frontend/src/business/components/api/automation/report/components/ScenarioResults.vue index 9f9609af2a..be28bc10b9 100644 --- a/frontend/src/business/components/api/automation/report/components/ScenarioResults.vue +++ b/frontend/src/business/components/api/automation/report/components/ScenarioResults.vue @@ -1,5 +1,13 @@ + + + + + + + + - + @@ -23,11 +32,17 @@ export default { scenarios: Array, treeData: Array, console: String, + errorReport: Number, defaultExpand: { default: false, type: Boolean, } }, + data() { + return { + isActive: false + } + }, created() { if (this.$refs.resultsTree && this.$refs.resultsTree.root) { this.$refs.resultsTree.root.expanded = true; @@ -65,7 +80,30 @@ export default { }, nodeClick(node) { node.expanded = !node.expanded; - } + }, + // 改变节点的状态 + changeTreeNodeStatus(node) { + node.expanded = this.expandAll + for (let i = 0; i < node.childNodes.length; i++) { + // 改变节点的自身expanded状态 + node.childNodes[i].expanded = this.expandAll + // 遍历子节点 + if (node.childNodes[i].childNodes.length > 0) { + this.changeTreeNodeStatus(node.childNodes[i]) + } + } + }, + closeExpansion() { + this.isActive = false; + this.expandAll = false; + this.changeTreeNodeStatus(this.$refs.resultsTree.store.root); + }, + openExpansion() { + this.isActive = true; + this.expandAll = true; + // 改变每个节点的状态 + this.changeTreeNodeStatus(this.$refs.resultsTree.store.root) + }, } } @@ -111,4 +149,20 @@ export default { padding: 0px 20px; } +.ms-open-btn { + margin: 5px 5px 0px; + color: #6D317C; + font-size: 20px; +} + +.ms-open-btn:hover { + background-color: #F2F9EE; + cursor: pointer; + color: #67C23A; +} + +.ms-open-btn-left { + margin-left: 30px; +} +