fix(接口测试): 报告页面时间显示调整,响应不刷新,页面全部展开
This commit is contained in:
parent
b0e0aa1327
commit
7530fff681
|
@ -42,6 +42,7 @@
|
||||||
import MsScenarioResult from "./components/ScenarioResult";
|
import MsScenarioResult from "./components/ScenarioResult";
|
||||||
import MsMetricChart from "./components/MetricChart";
|
import MsMetricChart from "./components/MetricChart";
|
||||||
import MsScenarioResults from "./components/ScenarioResults";
|
import MsScenarioResults from "./components/ScenarioResults";
|
||||||
|
import {Scenario} from "../test/model/ScenarioModel";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MsApiReportView",
|
name: "MsApiReportView",
|
||||||
|
@ -119,9 +120,12 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
requestResult(requestResult) {
|
requestResult(requestResult) {
|
||||||
|
this.isRequestResult = false;
|
||||||
|
this.$nextTick(function () {
|
||||||
this.isRequestResult = true;
|
this.isRequestResult = true;
|
||||||
this.request = requestResult.request;
|
this.request = requestResult.request;
|
||||||
this.scenarioName = requestResult.scenarioName;
|
this.scenarioName = requestResult.scenarioName;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,12 @@
|
||||||
<el-row type="flex" align="middle">
|
<el-row type="flex" align="middle">
|
||||||
<div style="width: 50%">
|
<div style="width: 50%">
|
||||||
<el-row type="flex" justify="center" align="middle">
|
<el-row type="flex" justify="center" align="middle">
|
||||||
|
<el-row>
|
||||||
<div class="metric-time">
|
<div class="metric-time">
|
||||||
<div class="value" style="margin-left: -150px">{{time}}</div>
|
<div class="value" style="margin-right: 10px">{{time}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
<chart id="chart" ref="chart" :options="options" :autoresize="true"></chart>
|
<chart id="chart" ref="chart" :options="options" :autoresize="true"></chart>
|
||||||
<el-row type="flex" justify="center" align="middle">
|
<el-row type="flex" justify="center" align="middle">
|
||||||
<i class="circle success"/>
|
<i class="circle success"/>
|
||||||
|
|
|
@ -39,17 +39,18 @@
|
||||||
methods: {
|
methods: {
|
||||||
active() {
|
active() {
|
||||||
this.$emit("requestResult", {request: this.request, scenarioName: this.scenarioName});
|
this.$emit("requestResult", {request: this.request, scenarioName: this.scenarioName});
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
/* computed: {
|
||||||
assertion() {
|
assertion() {
|
||||||
return this.request.passAssertions + " / " + this.request.totalAssertions;
|
return this.request.passAssertions + " / " + this.request.totalAssertions;
|
||||||
},
|
},
|
||||||
hasSub() {
|
hasSub() {
|
||||||
return this.request.subRequestResults.length > 0;
|
return this.request.subRequestResults.length > 0;
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -7,10 +7,7 @@
|
||||||
<el-collapse-transition>
|
<el-collapse-transition>
|
||||||
<el-tabs v-model="activeName" v-show="isActive">
|
<el-tabs v-model="activeName" v-show="isActive">
|
||||||
<el-tab-pane label="Body" name="body" class="pane">
|
<el-tab-pane label="Body" name="body" class="pane">
|
||||||
<!--
|
|
||||||
<ms-code-edit :mode="mode" :read-only="true" :data="response.body" :modes="modes" ref="codeEdit"/>
|
<ms-code-edit :mode="mode" :read-only="true" :data="response.body" :modes="modes" ref="codeEdit"/>
|
||||||
-->
|
|
||||||
<pre>{{response.body}}</pre>
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="Headers" name="headers" class="pane">
|
<el-tab-pane label="Headers" name="headers" class="pane">
|
||||||
<pre>{{response.headers}}</pre>
|
<pre>{{response.headers}}</pre>
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
|
||||||
<editor v-model="formatData" :lang="mode" @init="editorInit" theme="chrome"/>
|
<editor v-model="formatData" :lang="mode" @init="editorInit" theme="chrome"/>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -65,7 +63,7 @@
|
||||||
this.init(editor);
|
this.init(editor);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/*format() {
|
format() {
|
||||||
if (this.mode === 'json') {
|
if (this.mode === 'json') {
|
||||||
try {
|
try {
|
||||||
this.formatData = JSON.stringify(JSON.parse(this.data), null, '\t');
|
this.formatData = JSON.stringify(JSON.parse(this.data), null, '\t');
|
||||||
|
@ -79,7 +77,7 @@
|
||||||
this.formatData = this.data;
|
this.formatData = this.data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue