style(接口测试): 统一部分间距样式

This commit is contained in:
fit2-zhao 2022-03-16 13:17:58 +08:00 committed by CountryBuilder
parent 513c1897de
commit f40a839621
15 changed files with 50 additions and 69 deletions

View File

@ -64,6 +64,6 @@
<style scoped>
.assertion-btn {
text-align: center;
width: 60px;
width: 40px;
}
</style>

View File

@ -116,6 +116,5 @@
.assertion-btn {
text-align: center;
width: 60px;
margin-right: 14px;
}
</style>

View File

@ -105,6 +105,6 @@ export default {
.assertion-btn {
text-align: center;
width: 60px;
width: 50px;
}
</style>

View File

@ -66,7 +66,6 @@
.assertion-btn {
text-align: center;
width: 60px;
margin-left: 15px;
width: 40px;
}
</style>

View File

@ -58,7 +58,16 @@
</div>
<div class="assertion-item-editing response-time" v-if="isDocument">
<div>
<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>

View File

@ -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">

View File

@ -386,7 +386,7 @@ export default {
}
.request-tabs {
margin: 20px;
margin: 10px;
min-height: 200px;
}

View File

@ -324,7 +324,7 @@ export default {
}
.request-tabs {
margin: 20px;
margin: 10px;
min-height: 200px;
}

View File

@ -490,7 +490,7 @@ export default {
}
.request-tabs {
margin: 20px;
margin: 10px;
min-height: 200px;
}

View File

@ -354,7 +354,7 @@
}
.request-tabs {
margin: 20px;
margin: 10px;
min-height: 200px;
}

View File

@ -49,13 +49,6 @@
</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">
@ -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;
}

View File

@ -292,7 +292,7 @@ export default {
}
.request-tabs {
margin: 20px;
margin: 10px;
min-height: 200px;
}

View File

@ -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 {
@ -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>

View File

@ -175,7 +175,7 @@ export default {
}
.request-tabs {
margin: 20px;
margin: 10px;
min-height: 200px;
}

View File

@ -173,7 +173,7 @@ export default {
}
.request-tabs {
margin: 20px;
margin: 10px;
min-height: 200px;
}