fix(接口测试) 修复用例headers内容不显示问题
This commit is contained in:
parent
e7c7ca9d10
commit
159c9a673d
|
@ -28,7 +28,8 @@
|
|||
</el-col>
|
||||
|
||||
<el-col class="item" v-if="unShowSelect===true">
|
||||
<el-input v-if="suggestions" :disabled="isReadOnly" v-model="item.name" size="small" maxlength="200" :placeholder="keyText" show-word-limit/>
|
||||
<el-input v-if="suggestions" :disabled="isReadOnly" v-model="item.name" size="small" maxlength="200"
|
||||
:placeholder="keyText" show-word-limit/>
|
||||
</el-col>
|
||||
|
||||
<el-col class="item">
|
||||
|
@ -63,7 +64,8 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<ms-api-variable-advance :scenario-definition="scenarioDefinition" :append-to-body="appendToBody" :current-item="currentItem" :parameters="keyValues" ref="variableAdvance"/>
|
||||
<ms-api-variable-advance :scenario-definition="scenarioDefinition" :append-to-body="appendToBody"
|
||||
:current-item="currentItem" :parameters="keyValues" ref="variableAdvance"/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
@ -84,7 +86,7 @@
|
|||
isShowEnable: {
|
||||
type: Boolean,
|
||||
},
|
||||
unShowSelect:{
|
||||
unShowSelect: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
|
@ -137,9 +139,9 @@
|
|||
advanced(item) {
|
||||
this.currentItem = item;
|
||||
// 冒泡到父组件,调用父组件的参数设置打开方法
|
||||
if(this.scenarioDefinition != undefined){
|
||||
if (this.scenarioDefinition != undefined) {
|
||||
this.$emit('editScenarioAdvance', this.currentItem);
|
||||
}else{
|
||||
} else {
|
||||
this.$refs.variableAdvance.open();
|
||||
}
|
||||
},
|
||||
|
@ -158,6 +160,7 @@
|
|||
if (this.items.length < 2 || index === this.items.length - 2) {
|
||||
return;
|
||||
}
|
||||
this.change();
|
||||
let thisRow = this.items[index];
|
||||
let nextRow = this.items[index + 1];
|
||||
Vue.set(this.items, index + 1, thisRow);
|
||||
|
@ -167,11 +170,11 @@
|
|||
if (index === 0) {
|
||||
return;
|
||||
}
|
||||
this.change();
|
||||
let thisRow = this.items[index];
|
||||
let lastRow = this.items[index - 1];
|
||||
Vue.set(this.items, index - 1, thisRow);
|
||||
Vue.set(this.items, index, lastRow)
|
||||
|
||||
},
|
||||
reload() {
|
||||
this.loading = true
|
||||
|
@ -228,6 +231,13 @@
|
|||
},
|
||||
},
|
||||
created() {
|
||||
if (this.items) {
|
||||
for (let i = 0; i < this.items.length; i++) {
|
||||
if (!this.items[i]) {
|
||||
this.items.splice(i, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.items.length === 0 || this.items[this.items.length - 1].name) {
|
||||
this.items.push(new KeyValue({enable: true, name: '', value: ''}));
|
||||
}
|
||||
|
|
|
@ -1,21 +1,19 @@
|
|||
<template>
|
||||
<el-card class="card-content" v-if="isShow && !loading">
|
||||
<el-button-group v-if="currentApi.id" style="z-index: 10; position: fixed;">
|
||||
<el-tooltip class="item" effect="dark" :content="$t('api_test.definition.api_title')" placement="left">
|
||||
<el-button plain :class="{active: showApiList}" @click="changeTab('api')" size="small">API</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip class="item" effect="dark" :content="$t('commons.test')" placement="top">
|
||||
<el-button plain :class="{active: showTest}" @click="changeTab('test')" size="small">TEST</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip class="item" effect="dark" :content="$t('api_test.definition.case_title')" placement="top">
|
||||
<el-button plain :class="{active: showTestCaseList}" @click="changeTab('testCase')" size="small">CASE
|
||||
<el-button class="item" plain :class="{active: showApiList}" @click="changeTab('api')" size="small">
|
||||
API
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
|
||||
<el-tooltip class="item" effect="dark" content="Mock设置" placement="right"
|
||||
<el-button class="item" plain :class="{active: showTest}" @click="changeTab('test')" size="small">
|
||||
TEST
|
||||
</el-button>
|
||||
<el-button class="item" plain :class="{active: showTestCaseList}" @click="changeTab('testCase')" size="small">
|
||||
CASE
|
||||
</el-button>
|
||||
<el-button class="item" plain :class="{active: showMock}" @click="changeTab('mock')" size="small"
|
||||
v-if="currentProtocol === 'HTTP' || currentProtocol === 'TCP'">
|
||||
<el-button plain :class="{active: showMock}" @click="changeTab('mock')" size="small"> MOCK</el-button>
|
||||
</el-tooltip>
|
||||
MOCK
|
||||
</el-button>
|
||||
|
||||
</el-button-group>
|
||||
<div style="height: 40px"></div>
|
||||
|
@ -110,19 +108,19 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import MsApiConfig from "./ApiConfig";
|
||||
import MsRunTestHttpPage from "./runtest/RunTestHTTPPage";
|
||||
import MsRunTestTcpPage from "./runtest/RunTestTCPPage";
|
||||
import MsRunTestSqlPage from "./runtest/RunTestSQLPage";
|
||||
import MsRunTestDubboPage from "./runtest/RunTestDubboPage";
|
||||
import MockTab from "@/business/components/api/definition/components/mock/MockTab";
|
||||
import TcpMockConfig from "@/business/components/api/definition/components/mock/TcpMockConfig";
|
||||
import ApiCaseSimpleList from "./list/ApiCaseSimpleList";
|
||||
import MsApiCaseList from "./case/ApiCaseList";
|
||||
import {getUUID} from "@/common/js/utils";
|
||||
import {TYPE_TO_C} from "@/business/components/api/automation/scenario/Setting";
|
||||
import MsApiConfig from "./ApiConfig";
|
||||
import MsRunTestHttpPage from "./runtest/RunTestHTTPPage";
|
||||
import MsRunTestTcpPage from "./runtest/RunTestTCPPage";
|
||||
import MsRunTestSqlPage from "./runtest/RunTestSQLPage";
|
||||
import MsRunTestDubboPage from "./runtest/RunTestDubboPage";
|
||||
import MockTab from "@/business/components/api/definition/components/mock/MockTab";
|
||||
import TcpMockConfig from "@/business/components/api/definition/components/mock/TcpMockConfig";
|
||||
import ApiCaseSimpleList from "./list/ApiCaseSimpleList";
|
||||
import MsApiCaseList from "./case/ApiCaseList";
|
||||
import {getUUID} from "@/common/js/utils";
|
||||
import {TYPE_TO_C} from "@/business/components/api/automation/scenario/Setting";
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: "EditCompleteContainer",
|
||||
components: {
|
||||
MsApiConfig,
|
||||
|
@ -252,7 +250,7 @@ export default {
|
|||
saveApi(data) {
|
||||
this.$emit("saveApi", data);
|
||||
if (data != null && data.tags !== 'null' && data.tags !== undefined) {
|
||||
if (Object.prototype.toString.call(data.tags)==="[object String]") {
|
||||
if (Object.prototype.toString.call(data.tags) === "[object String]") {
|
||||
data.tags = JSON.parse(data.tags);
|
||||
}
|
||||
}
|
||||
|
@ -339,30 +337,30 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.active {
|
||||
.active {
|
||||
border: solid 1px #6d317c !important;
|
||||
background-color: var(--primary_color) !important;
|
||||
color: #FFFFFF !important;
|
||||
}
|
||||
}
|
||||
|
||||
.case-button {
|
||||
.case-button {
|
||||
border-left: solid 1px var(--primary_color);
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
.item {
|
||||
border: solid 1px var(--primary_color);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.api-case-simple-list >>> .el-table {
|
||||
.api-case-simple-list >>> .el-table {
|
||||
height: calc(100vh - 262px) !important;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .ms-opt-btn {
|
||||
/deep/ .ms-opt-btn {
|
||||
position: fixed;
|
||||
right: 50px;
|
||||
z-index: 1;
|
||||
|
@ -370,5 +368,5 @@ export default {
|
|||
float: right;
|
||||
margin-right: 20px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue