style(接口测试): 接口自动化样式调整

This commit is contained in:
RubyLiu 2023-06-26 19:53:12 +08:00 committed by 刘瑞斌
parent 3ff5c7d548
commit e901a35105
3 changed files with 90 additions and 68 deletions

View File

@ -401,8 +401,6 @@ export default {
}
.metric-icon-box {
text-align: left;
height: 20px;
margin: 0 10px;
}

View File

@ -84,8 +84,8 @@
<el-card>
<!-- header 调试部分 -->
<div class="ms-debug-div" @click="showAll" ref="debugHeader">
<el-row style="margin: 5px">
<el-col :span="1" class="ms-col-one ms-font" v-show="scenarioDefinition.length > 1">
<div class="debug-header" style="margin: 5px">
<div class="ms-col-one mt-2" v-show="scenarioDefinition.length > 1">
<el-tooltip
:content="$t('test_track.case.batch_operate')"
placement="top"
@ -105,28 +105,27 @@
v-prevent-re-click
@click="cancelBatchProcessing" />
</el-tooltip>
</el-col>
<el-col :span="2" class="ms-col-one ms-font">
{{ $t('api_test.automation.step_total') }}{{ scenarioDefinition.length }}
</el-col>
<el-col :span="2" class="ms-col-one ms-font">
</div>
<div class="ms-col-one mt-2">
<div class="ml-10">{{ $t('api_test.automation.step_total') }}{{ scenarioDefinition.length }}</div>
<div class="ml-10">
<el-link class="head" @click="showScenarioParameters"
>{{ $t('api_test.automation.scenario_total') }}
</el-link>
{{ getVariableSize() }}
</el-col>
<el-col :span="2" class="ms-col-one ms-font">
</div>
<div class="ml-10">
<el-checkbox v-model="enableCookieShare">
<span style="font-size: 13px">{{ $t('api_test.scenario.share_cookie') }}</span>
</el-checkbox>
</el-col>
<el-col :span="3" class="ms-col-one ms-font">
</div>
<div class="ml-10">
<el-checkbox v-model="onSampleError">
<span style="font-size: 13px">{{ $t('commons.failure_continues') }}</span>
</el-checkbox>
</el-col>
<el-col :span="13">
</div>
</div>
<div class="ms-col-one">
<env-popover
:env-map="projectEnvMap"
:project-ids="projectIds"
@ -142,8 +141,10 @@
@saveRefresh="setDomain"
:has-option-group="true"
ref="envPopover"
class="ms-message-right" />
<el-tooltip v-if="!debugLoading" content="Ctrl + R" placement="top">
class="ml-10"
/>
<el-tooltip class="mt-2 ml-10" v-if="!debugLoading" content="Ctrl + R" placement="top">
<el-dropdown
split-button
type="primary"
@ -152,20 +153,20 @@
size="mini"
:disabled="scenarioDefinition.length < 1"
@command="handleCommand"
v-permission="[
'PROJECT_API_SCENARIO:READ+DEBUG',
'PROJECT_API_SCENARIO:READ+RUN'
]">
v-permission="['PROJECT_API_SCENARIO:READ+DEBUG', 'PROJECT_API_SCENARIO:READ+RUN']">
{{ $t('api_test.request.debug') }}
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>{{ $t('api_test.automation.generate_report') }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-tooltip>
<el-button size="mini" type="primary" v-else @click="stop">{{ $t('report.stop_btn') }}</el-button>
<el-button class="mt-2" size="mini" type="primary" v-else @click="stop">{{
$t('report.stop_btn')
}}</el-button>
<el-button
id="inputDelay"
class="ml-10"
type="primary"
size="mini"
v-prevent-re-click
@ -201,7 +202,6 @@
margin-right: 5px;
cursor: pointer;
position: relative;
top: 3px;
"
@click="saveFollow" />
</el-tooltip>
@ -226,6 +226,7 @@
>{{ $t('operating_log.change_history') }}
</el-link>
<!-- 版本历史 -->
<div class="history">
<mx-version-history
v-xpack
ref="versionHistory"
@ -237,15 +238,18 @@
@checkout="checkout"
@create="create"
@del="del" />
</el-col>
</div>
</div>
</div>
<div class="ms-full-screen">
<el-tooltip
effect="dark"
:content="$t('commons.full_screen_editing')"
placement="top-start"
style="margin-top: 6px">
class="ms-full-screen">
<font-awesome-icon class="alt-ico" :icon="['fa', 'expand-alt']" size="lg" @click="fullScreen" />
</el-tooltip>
</el-row>
</div>
</div>
<div class="card-content">
@ -1114,7 +1118,7 @@ export default {
}
},
evaluationParent(node, status) {
if(node.data.code === "ERROR") {
if (node.data.code === 'ERROR') {
return;
}
if (node.data.code === 'FAKE_ERROR') {
@ -1138,7 +1142,7 @@ export default {
let id = item.data.id || item.data.resourceId;
if (id + '_' + item.data.parentIndex === resourceId) {
item.data.testing = false;
item.data.code = status ? "SUCCESS" : "ERROR";
item.data.code = status ? 'SUCCESS' : 'ERROR';
this.evaluationParent(item.parent, status);
}
if (item.childNodes && item.childNodes.length > 0) {
@ -2624,7 +2628,7 @@ export default {
};
</script>
<style scoped>
<style lang="scss" scoped>
.card-content {
height: calc(100vh - 170px);
overflow-y: auto;
@ -2635,19 +2639,34 @@ export default {
}
.ms-debug-div {
display: flex;
flex-flow: row nowrap;
justify-content: space-between;
align-items: center;
border: 1px #dcdfe6 solid;
border-radius: 4px;
margin-right: 0px;
}
.ms-font {
.debug-header {
display: flex;
flex-flow: row nowrap;
align-items: center;
justify-content: space-between;
.ms-col-one {
display: flex;
align-items: center;
color: #303133;
font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', Arial, sans-serif;
font-size: 13px;
.history {
display: flex;
align-items: center;
}
}
}
.ms-full-screen {
margin-top: 0px;
}
.ms-col-one {
margin-top: 5px;
}
#fab {
@ -2759,11 +2778,15 @@ export default {
height: 20px;
float: right;
}
.ms-message-right {
margin-right: 10px;
.ml-10 {
margin-left: 10px;
}
.ml-5 {
margin-left: 5px;
}
.mt-2 {
margin-top: 2px;
}
.custom-node_e {
color: #7c3985;
font-size: 20px;

View File

@ -1457,6 +1457,7 @@ export default {
height: 36px;
background-color: #fff;
font-size: 12px;
padding-left: 5px;
}
.ms-div {