mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 12:09:13 +08:00
style(接口测试): 统一部分间距样式
This commit is contained in:
parent
6af5a83399
commit
049c4b756d
@ -64,6 +64,6 @@
|
||||
<style scoped>
|
||||
.assertion-btn {
|
||||
text-align: center;
|
||||
width: 60px;
|
||||
width: 40px;
|
||||
}
|
||||
</style>
|
||||
|
@ -116,6 +116,5 @@
|
||||
.assertion-btn {
|
||||
text-align: center;
|
||||
width: 60px;
|
||||
margin-right: 14px;
|
||||
}
|
||||
</style>
|
||||
|
@ -105,6 +105,6 @@ export default {
|
||||
|
||||
.assertion-btn {
|
||||
text-align: center;
|
||||
width: 60px;
|
||||
width: 50px;
|
||||
}
|
||||
</style>
|
||||
|
@ -66,7 +66,6 @@
|
||||
|
||||
.assertion-btn {
|
||||
text-align: center;
|
||||
width: 60px;
|
||||
margin-left: 15px;
|
||||
width: 40px;
|
||||
}
|
||||
</style>
|
||||
|
@ -58,7 +58,16 @@
|
||||
</div>
|
||||
<div class="assertion-item-editing response-time" v-if="isDocument">
|
||||
<div>
|
||||
{{ assertions.document.type }}-{{ $t("api_test.definition.request.document_structure") }}
|
||||
<el-row :gutter="10" type="flex" justify="space-between" align="middle">
|
||||
<el-col>
|
||||
{{ assertions.document.type }}-{{ $t("api_test.definition.request.document_structure") }}
|
||||
</el-col>
|
||||
<el-col class="assertion-remove-btn">
|
||||
<el-tooltip effect="dark" :content="$t('commons.remove')" placement="top-start">
|
||||
<el-button icon="el-icon-delete" type="danger" size="mini" circle @click="remove()"/>
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<ms-document-body :document="assertions.document" :apiId="apiId" :isReadOnly="isReadOnly" @remove="remove"/>
|
||||
</div>
|
||||
@ -157,5 +166,8 @@ export default {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
|
||||
.assertion-remove-btn {
|
||||
text-align: center;
|
||||
width: 40px;
|
||||
}
|
||||
</style>
|
||||
|
@ -11,9 +11,6 @@
|
||||
<el-checkbox v-model="checked" @change="checkedAPI">{{ $t('commons.follow_api') }}</el-checkbox>
|
||||
</span>
|
||||
</el-col>
|
||||
<el-col class="assertion-btn">
|
||||
<el-button :disabled="isReadOnly" type="danger" size="mini" icon="el-icon-delete" circle @click="removeDoc" style="float: right"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-table
|
||||
@ -25,7 +22,7 @@
|
||||
row-key="id"
|
||||
border
|
||||
default-expand-all
|
||||
:height="400"
|
||||
:height="300"
|
||||
v-loading="loading">
|
||||
|
||||
<el-table-column prop="name" :label="$t('api_test.definition.request.esb_table.name')" width="230">
|
||||
|
@ -386,7 +386,7 @@ export default {
|
||||
}
|
||||
|
||||
.request-tabs {
|
||||
margin: 20px;
|
||||
margin: 10px;
|
||||
min-height: 200px;
|
||||
}
|
||||
|
||||
|
@ -324,7 +324,7 @@ export default {
|
||||
}
|
||||
|
||||
.request-tabs {
|
||||
margin: 20px;
|
||||
margin: 10px;
|
||||
min-height: 200px;
|
||||
}
|
||||
|
||||
|
@ -490,7 +490,7 @@ export default {
|
||||
}
|
||||
|
||||
.request-tabs {
|
||||
margin: 20px;
|
||||
margin: 10px;
|
||||
min-height: 200px;
|
||||
}
|
||||
|
||||
|
@ -354,7 +354,7 @@
|
||||
}
|
||||
|
||||
.request-tabs {
|
||||
margin: 20px;
|
||||
margin: 10px;
|
||||
min-height: 200px;
|
||||
}
|
||||
|
||||
|
@ -49,43 +49,36 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane :label="$t('api_test.definition.request.pre_script')" name="script" v-if="showPreScript">
|
||||
<jsr233-processor-content
|
||||
:jsr223-processor="request.tcpPreProcessor"
|
||||
:is-pre-processor="true"
|
||||
:is-read-only="isReadOnly"/>
|
||||
</el-tab-pane>
|
||||
|
||||
<!-- 脚本步骤/断言步骤 -->
|
||||
<el-tab-pane :label="$t('api_test.definition.request.pre_operation')" name="preOperate" v-if="showScript">
|
||||
<span class="item-tabs" effect="dark" placement="top-start" slot="label">
|
||||
{{ $t('api_test.definition.request.pre_operation') }}
|
||||
<div class="el-step__icon is-text ms-api-col ms-header" v-if="request.preSize > 0">
|
||||
<div class="el-step__icon-inner">{{ request.preSize }}</div>
|
||||
</div>
|
||||
</span>
|
||||
<span class="item-tabs" effect="dark" placement="top-start" slot="label">
|
||||
{{ $t('api_test.definition.request.pre_operation') }}
|
||||
<div class="el-step__icon is-text ms-api-col ms-header" v-if="request.preSize > 0">
|
||||
<div class="el-step__icon-inner">{{ request.preSize }}</div>
|
||||
</div>
|
||||
</span>
|
||||
<ms-jmx-step :request="request" :apiId="request.id" :response="response" :tab-type="'pre'"
|
||||
ref="preStep"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('api_test.definition.request.post_operation')" name="postOperate"
|
||||
v-if="showScript">
|
||||
<span class="item-tabs" effect="dark" placement="top-start" slot="label">
|
||||
{{ $t('api_test.definition.request.post_operation') }}
|
||||
<div class="el-step__icon is-text ms-api-col ms-header" v-if="request.postSize > 0">
|
||||
<div class="el-step__icon-inner">{{ request.postSize }}</div>
|
||||
</div>
|
||||
</span>
|
||||
<span class="item-tabs" effect="dark" placement="top-start" slot="label">
|
||||
{{ $t('api_test.definition.request.post_operation') }}
|
||||
<div class="el-step__icon is-text ms-api-col ms-header" v-if="request.postSize > 0">
|
||||
<div class="el-step__icon-inner">{{ request.postSize }}</div>
|
||||
</div>
|
||||
</span>
|
||||
<ms-jmx-step :request="request" :apiId="request.id" :response="response" :tab-type="'post'"
|
||||
ref="postStep"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('api_test.definition.request.assertions_rule')" name="assertionsRule"
|
||||
v-if="showScript">
|
||||
<span class="item-tabs" effect="dark" placement="top-start" slot="label">
|
||||
{{ $t('api_test.definition.request.assertions_rule') }}
|
||||
<div class="el-step__icon is-text ms-api-col ms-header" v-if="request.ruleSize > 0">
|
||||
<div class="el-step__icon-inner">{{ request.ruleSize }}</div>
|
||||
</div>
|
||||
</span>
|
||||
<span class="item-tabs" effect="dark" placement="top-start" slot="label">
|
||||
{{ $t('api_test.definition.request.assertions_rule') }}
|
||||
<div class="el-step__icon is-text ms-api-col ms-header" v-if="request.ruleSize > 0">
|
||||
<div class="el-step__icon-inner">{{ request.ruleSize }}</div>
|
||||
</div>
|
||||
</span>
|
||||
<ms-jmx-step :request="request" :apiId="request.id" :response="response" @reload="reloadBody"
|
||||
:tab-type="'assertionsRule'" ref="assertionsRule"/>
|
||||
</el-tab-pane>
|
||||
@ -164,9 +157,7 @@
|
||||
</el-tabs>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
@ -178,8 +169,6 @@ import MsApiExtract from "../../extract/ApiExtract";
|
||||
import ApiRequestMethodSelect from "../../collapse/ApiRequestMethodSelect";
|
||||
import MsCodeEdit from "../../../../../common/components/MsCodeEdit";
|
||||
import MsApiScenarioVariables from "../../ApiScenarioVariables";
|
||||
import {createComponent} from "../../jmeter/components";
|
||||
import {Assertions, Extract} from "../../../model/ApiTestModel";
|
||||
import {parseEnvironment} from "../../../model/EnvironmentModel";
|
||||
import ApiEnvironmentConfig from "../../environment/ApiEnvironmentConfig";
|
||||
import {API_STATUS} from "../../../model/JsonData";
|
||||
@ -188,7 +177,6 @@ import {getCurrentProjectID, getUUID} from "@/common/js/utils";
|
||||
import MsApiVariable from "../../ApiVariable";
|
||||
import MsInstructionsIcon from "../../../../../common/components/MsInstructionsIcon";
|
||||
import Jsr233ProcessorContent from "../../../../automation/scenario/common/Jsr233ProcessorContent";
|
||||
import JSR223PreProcessor from "../../jmeter/components/pre-processors/jsr223-pre-processor";
|
||||
import ApiDefinitionStepButton from "../components/ApiDefinitionStepButton";
|
||||
import TcpXmlTable from "@/business/components/api/definition/components/complete/table/TcpXmlTable";
|
||||
import {TYPE_TO_C} from "@/business/components/api/automation/scenario/Setting";
|
||||
@ -276,8 +264,9 @@ export default {
|
||||
this.$set(this.request, 'parameters', []);
|
||||
this.request.parameters = [];
|
||||
}
|
||||
if (!this.request.tcpPreProcessor) {
|
||||
this.$set(this.request, 'tcpPreProcessor', new JSR223PreProcessor())
|
||||
if (this.request.tcpPreProcessor && this.request.tcpPreProcessor.script) {
|
||||
this.request.hashTree.push(this.request.tcpPreProcessor);
|
||||
this.request.tcpPreProcessor = undefined;
|
||||
}
|
||||
if (this.request.tcpPreProcessor) {
|
||||
this.request.tcpPreProcessor.clazzName = TYPE_TO_C.get(this.request.tcpPreProcessor.type);
|
||||
@ -584,7 +573,7 @@ export default {
|
||||
}
|
||||
|
||||
.request-tabs {
|
||||
margin: 20px;
|
||||
margin: 10px;
|
||||
min-height: 200px;
|
||||
}
|
||||
|
||||
|
@ -292,7 +292,7 @@ export default {
|
||||
}
|
||||
|
||||
.request-tabs {
|
||||
margin: 20px;
|
||||
margin: 10px;
|
||||
min-height: 200px;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div v-if="loaded">
|
||||
<div>
|
||||
<p>
|
||||
<el-select v-model="preOperate" size="mini" class="ms-select-step" v-if="tabType === 'pre'">
|
||||
<el-option
|
||||
@ -155,11 +155,6 @@ export default {
|
||||
default: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'request.body.typeChange'() {
|
||||
this.showHide();
|
||||
}
|
||||
},
|
||||
data() {
|
||||
let validateURL = (rule, value, callback) => {
|
||||
try {
|
||||
@ -346,7 +341,7 @@ export default {
|
||||
let obj = JSON.parse(JSON.stringify(row));
|
||||
obj.id = getUUID();
|
||||
const index = this.request.hashTree.findIndex(d => d.id === row.id);
|
||||
if (index !==-1) {
|
||||
if (index !== -1) {
|
||||
this.request.hashTree.splice(index, 0, obj);
|
||||
} else {
|
||||
this.request.hashTree.push(obj);
|
||||
@ -380,12 +375,6 @@ export default {
|
||||
this.isReloadData = false
|
||||
})
|
||||
},
|
||||
showHide() {
|
||||
this.loaded = false
|
||||
this.$nextTick(() => {
|
||||
this.loaded = true
|
||||
})
|
||||
},
|
||||
init() {
|
||||
if (!this.request.body) {
|
||||
this.request.body = new Body();
|
||||
@ -566,12 +555,8 @@ export default {
|
||||
}
|
||||
|
||||
.ms-select-step {
|
||||
margin-left: 15px;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.ms-assertions-button {
|
||||
margin-left: 18px;
|
||||
}
|
||||
</style>
|
||||
|
@ -175,7 +175,7 @@ export default {
|
||||
}
|
||||
|
||||
.request-tabs {
|
||||
margin: 20px;
|
||||
margin: 10px;
|
||||
min-height: 200px;
|
||||
}
|
||||
|
||||
|
@ -173,7 +173,7 @@ export default {
|
||||
}
|
||||
|
||||
.request-tabs {
|
||||
margin: 20px;
|
||||
margin: 10px;
|
||||
min-height: 200px;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user