refactor(接口测试): 单接口执行页面优化
This commit is contained in:
parent
5424f9b505
commit
3882914c6b
|
@ -29,7 +29,8 @@
|
||||||
"mockjs": "^1.1.0",
|
"mockjs": "^1.1.0",
|
||||||
"md5": "^2.3.0",
|
"md5": "^2.3.0",
|
||||||
"sha.js": "^2.4.11",
|
"sha.js": "^2.4.11",
|
||||||
"js-base64": "^3.4.4"
|
"js-base64": "^3.4.4",
|
||||||
|
"json-bigint": "^1.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vue/cli-plugin-babel": "^4.1.0",
|
"@vue/cli-plugin-babel": "^4.1.0",
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-button :disabled="!request.enable || !scenario.enable || isReadOnly" class="debug-button" size="small" type="primary" @click="runDebug">{{$t('load_test.save_and_run')}}</el-button>
|
<el-button :disabled="!request.enable || !scenario.enable || isReadOnly" class="debug-button" size="small" type="primary" @click="runDebug">{{$t('api_test.request.debug')}}</el-button>
|
||||||
|
|
||||||
<el-tabs v-model="activeName">
|
<el-tabs v-model="activeName">
|
||||||
<el-tab-pane label="Interface" name="interface">
|
<el-tab-pane label="Interface" name="interface">
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-button :disabled="!request.enable || !scenario.enable || isReadOnly" class="debug-button" size="small" type="primary" @click="runDebug">{{ $t('load_test.save_and_run') }}</el-button>
|
<el-button :disabled="!request.enable || !scenario.enable || isReadOnly" class="debug-button" size="small" type="primary" @click="runDebug">{{ $t('api_test.request.debug') }}</el-button>
|
||||||
|
|
||||||
<el-tabs v-model="activeName">
|
<el-tabs v-model="activeName">
|
||||||
<el-tab-pane :label="$t('api_test.request.parameters')" name="parameters">
|
<el-tab-pane :label="$t('api_test.request.parameters')" name="parameters">
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="request-form">
|
<div class="request-form">
|
||||||
<component @runDebug="runDebug" :is="component" :is-read-only="isReadOnly" :request="request" :scenario="scenario"/>
|
<component @runDebug="runDebug" :is="component" :is-read-only="isReadOnly" :request="request" :scenario="scenario"/>
|
||||||
|
<el-divider v-if="isCompleted"></el-divider>
|
||||||
<ms-request-result-tail v-loading="debugReportLoading" v-if="isCompleted" :request="request.debugRequestResult ? request.debugRequestResult : {responseResult: {}, subRequestResults: []}"
|
<ms-request-result-tail v-loading="debugReportLoading" v-if="isCompleted" :request="request.debugRequestResult ? request.debugRequestResult : {responseResult: {}, subRequestResults: []}"
|
||||||
:scenario-name="request.debugScenario ? request.debugScenario.name : ''" ref="msDebugResult"/>
|
:scenario-name="request.debugScenario ? request.debugScenario.name : ''" ref="msDebugResult"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -72,8 +72,8 @@
|
||||||
format() {
|
format() {
|
||||||
if (this.mode === 'json') {
|
if (this.mode === 'json') {
|
||||||
try {
|
try {
|
||||||
var JSONbigString = require('json-bigint')({"storeAsString": true});
|
var JSONbig = require('json-bigint')({"storeAsString": false});
|
||||||
this.formatData = JSON.stringify(JSONbigString.parse(this.data), null, '\t');
|
this.formatData = JSON.stringify(JSONbig.parse(this.data), null, '\t');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (this.data) {
|
if (this.data) {
|
||||||
this.formatData = this.data;
|
this.formatData = this.data;
|
||||||
|
|
|
@ -406,6 +406,7 @@ export default {
|
||||||
enable: "Enable"
|
enable: "Enable"
|
||||||
},
|
},
|
||||||
request: {
|
request: {
|
||||||
|
debug: "Debug",
|
||||||
copy: "Copy request",
|
copy: "Copy request",
|
||||||
delete: "Delete request",
|
delete: "Delete request",
|
||||||
input_name: "Please enter the request name",
|
input_name: "Please enter the request name",
|
||||||
|
|
|
@ -406,6 +406,7 @@ export default {
|
||||||
enable: "启用"
|
enable: "启用"
|
||||||
},
|
},
|
||||||
request: {
|
request: {
|
||||||
|
debug: "调试",
|
||||||
copy: "复制请求",
|
copy: "复制请求",
|
||||||
delete: "删除请求",
|
delete: "删除请求",
|
||||||
input_name: "请输入请求名称",
|
input_name: "请输入请求名称",
|
||||||
|
|
|
@ -405,6 +405,7 @@ export default {
|
||||||
enable: "啟用"
|
enable: "啟用"
|
||||||
},
|
},
|
||||||
request: {
|
request: {
|
||||||
|
debug: "調試",
|
||||||
copy: "複製請求",
|
copy: "複製請求",
|
||||||
delete: "删除請求",
|
delete: "删除請求",
|
||||||
input_name: "請輸入請求名稱",
|
input_name: "請輸入請求名稱",
|
||||||
|
|
Loading…
Reference in New Issue