style(接口测试): 调整接口自动化编辑和列表的背景
This commit is contained in:
parent
64e5e3b6d8
commit
893de5af32
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="scenario-div" v-loading="result">
|
<el-card class="scenario-div" v-loading="result">
|
||||||
<slot name="version"></slot>
|
<slot name="version"></slot>
|
||||||
<ms-search :condition.sync="condition" :base-search-tip="$t('commons.search_by_id_name_tag')" @search="search">
|
<ms-search :condition.sync="condition" :base-search-tip="$t('commons.search_by_id_name_tag')" @search="search">
|
||||||
</ms-search>
|
</ms-search>
|
||||||
|
@ -369,7 +369,7 @@
|
||||||
ref="apiDeleteConfirm" />
|
ref="apiDeleteConfirm" />
|
||||||
<!-- 引用场景弹窗 -->
|
<!-- 引用场景弹窗 -->
|
||||||
<ms-show-reference ref="viewRef" @showCaseRef="showScenarioRef" @openScenario="openScenario" />
|
<ms-show-reference ref="viewRef" @showCaseRef="showScenarioRef" @openScenario="openScenario" />
|
||||||
</div>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -522,7 +522,7 @@ export default {
|
||||||
type: API_SCENARIO_LIST,
|
type: API_SCENARIO_LIST,
|
||||||
fields: getCustomTableHeader('API_SCENARIO', undefined),
|
fields: getCustomTableHeader('API_SCENARIO', undefined),
|
||||||
fieldsWidth: getCustomTableWidth('API_SCENARIO'),
|
fieldsWidth: getCustomTableWidth('API_SCENARIO'),
|
||||||
screenHeight: 'calc(100vh - 180px)', //屏幕高度,
|
screenHeight: 'calc(100vh - 200px)', //屏幕高度,
|
||||||
condition: {
|
condition: {
|
||||||
components: this.trashEnable ? API_SCENARIO_CONFIGS_TRASH : API_SCENARIO_CONFIGS,
|
components: this.trashEnable ? API_SCENARIO_CONFIGS_TRASH : API_SCENARIO_CONFIGS,
|
||||||
},
|
},
|
||||||
|
|
|
@ -81,120 +81,121 @@
|
||||||
|
|
||||||
<!-- 右侧部分 -->
|
<!-- 右侧部分 -->
|
||||||
<ms-main-container style="overflow: hidden" class="ms-scenario-main-container">
|
<ms-main-container style="overflow: hidden" class="ms-scenario-main-container">
|
||||||
<!-- header 调试部分 -->
|
<el-card>
|
||||||
<div class="ms-debug-div" @click="showAll" ref="debugHeader">
|
<!-- header 调试部分 -->
|
||||||
<el-row style="margin: 5px">
|
<div class="ms-debug-div" @click="showAll" ref="debugHeader">
|
||||||
<el-col :span="1" class="ms-col-one ms-font" v-show="scenarioDefinition.length > 1">
|
<el-row style="margin: 5px">
|
||||||
<el-tooltip
|
<el-col :span="1" class="ms-col-one ms-font" v-show="scenarioDefinition.length > 1">
|
||||||
:content="$t('test_track.case.batch_operate')"
|
<el-tooltip
|
||||||
placement="top"
|
:content="$t('test_track.case.batch_operate')"
|
||||||
effect="light"
|
placement="top"
|
||||||
v-show="!isBatchProcess">
|
effect="light"
|
||||||
<font-awesome-icon
|
v-show="!isBatchProcess">
|
||||||
class="ms-batch-btn"
|
<font-awesome-icon
|
||||||
:icon="['fa', 'bars']"
|
class="ms-batch-btn"
|
||||||
v-prevent-re-click
|
:icon="['fa', 'bars']"
|
||||||
@click="batchProcessing" />
|
v-prevent-re-click
|
||||||
</el-tooltip>
|
@click="batchProcessing" />
|
||||||
<el-checkbox v-show="isBatchProcess" v-model="isCheckedAll" @change="checkedAll" />
|
</el-tooltip>
|
||||||
<el-tooltip :content="$t('commons.cancel')" placement="top" effect="light" v-show="isBatchProcess">
|
<el-checkbox v-show="isBatchProcess" v-model="isCheckedAll" @change="checkedAll" />
|
||||||
<font-awesome-icon
|
<el-tooltip :content="$t('commons.cancel')" placement="top" effect="light" v-show="isBatchProcess">
|
||||||
class="ms-batch-btn"
|
<font-awesome-icon
|
||||||
:icon="['fa', 'times']"
|
class="ms-batch-btn"
|
||||||
v-prevent-re-click
|
:icon="['fa', 'times']"
|
||||||
@click="cancelBatchProcessing" />
|
v-prevent-re-click
|
||||||
</el-tooltip>
|
@click="cancelBatchProcessing" />
|
||||||
</el-col>
|
</el-tooltip>
|
||||||
<el-col :span="2" class="ms-col-one ms-font">
|
</el-col>
|
||||||
{{ $t('api_test.automation.step_total') }}:{{ scenarioDefinition.length }}
|
<el-col :span="2" class="ms-col-one ms-font">
|
||||||
</el-col>
|
{{ $t('api_test.automation.step_total') }}:{{ scenarioDefinition.length }}
|
||||||
<el-col :span="2" class="ms-col-one ms-font">
|
</el-col>
|
||||||
<el-link class="head" @click="showScenarioParameters"
|
<el-col :span="2" class="ms-col-one ms-font">
|
||||||
|
<el-link class="head" @click="showScenarioParameters"
|
||||||
>{{ $t('api_test.automation.scenario_total') }}
|
>{{ $t('api_test.automation.scenario_total') }}
|
||||||
</el-link>
|
</el-link>
|
||||||
:{{ getVariableSize() }}
|
:{{ getVariableSize() }}
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" class="ms-col-one ms-font">
|
<el-col :span="2" class="ms-col-one ms-font">
|
||||||
<el-checkbox v-model="enableCookieShare">
|
<el-checkbox v-model="enableCookieShare">
|
||||||
<span style="font-size: 13px">{{ $t('api_test.scenario.share_cookie') }}</span>
|
<span style="font-size: 13px">{{ $t('api_test.scenario.share_cookie') }}</span>
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3" class="ms-col-one ms-font">
|
<el-col :span="3" class="ms-col-one ms-font">
|
||||||
<el-checkbox v-model="onSampleError">
|
<el-checkbox v-model="onSampleError">
|
||||||
<span style="font-size: 13px">{{ $t('commons.failure_continues') }}</span>
|
<span style="font-size: 13px">{{ $t('commons.failure_continues') }}</span>
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="13">
|
<el-col :span="13">
|
||||||
<env-popover
|
<env-popover
|
||||||
:disabled="scenarioDefinition.length < 1"
|
:disabled="scenarioDefinition.length < 1"
|
||||||
:env-map="projectEnvMap"
|
:env-map="projectEnvMap"
|
||||||
:project-ids="projectIds"
|
:project-ids="projectIds"
|
||||||
:result="envResult"
|
:result="envResult"
|
||||||
:environment-type.sync="environmentType"
|
:environment-type.sync="environmentType"
|
||||||
:isReadOnly="scenarioDefinition.length < 1"
|
:isReadOnly="scenarioDefinition.length < 1"
|
||||||
:group-id="envGroupId"
|
:group-id="envGroupId"
|
||||||
:project-list="projectList"
|
:project-list="projectList"
|
||||||
:show-config-button-with-out-permission="showConfigButtonWithOutPermission"
|
:show-config-button-with-out-permission="showConfigButtonWithOutPermission"
|
||||||
@setProjectEnvMap="setProjectEnvMap"
|
@setProjectEnvMap="setProjectEnvMap"
|
||||||
@setEnvGroup="setEnvGroup"
|
@setEnvGroup="setEnvGroup"
|
||||||
@showPopover="showPopover"
|
@showPopover="showPopover"
|
||||||
:has-option-group="true"
|
:has-option-group="true"
|
||||||
ref="envPopover"
|
ref="envPopover"
|
||||||
class="ms-message-right" />
|
class="ms-message-right" />
|
||||||
<el-tooltip v-if="!debugLoading" content="Ctrl + R" placement="top">
|
<el-tooltip v-if="!debugLoading" content="Ctrl + R" placement="top">
|
||||||
<el-dropdown
|
<el-dropdown
|
||||||
split-button
|
split-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="runDebug"
|
@click="runDebug"
|
||||||
class="ms-message-right"
|
class="ms-message-right"
|
||||||
size="mini"
|
size="mini"
|
||||||
@command="handleCommand"
|
@command="handleCommand"
|
||||||
v-permission="[
|
v-permission="[
|
||||||
'PROJECT_API_SCENARIO:READ+EDIT',
|
'PROJECT_API_SCENARIO:READ+EDIT',
|
||||||
'PROJECT_API_SCENARIO:READ+CREATE',
|
'PROJECT_API_SCENARIO:READ+CREATE',
|
||||||
'PROJECT_API_SCENARIO:READ+COPY',
|
'PROJECT_API_SCENARIO:READ+COPY',
|
||||||
]">
|
]">
|
||||||
{{ $t('api_test.request.debug') }}
|
{{ $t('api_test.request.debug') }}
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item>{{ $t('api_test.automation.generate_report') }}</el-dropdown-item>
|
<el-dropdown-item>{{ $t('api_test.automation.generate_report') }}</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-button size="mini" type="primary" v-else @click="stop">{{ $t('report.stop_btn') }}</el-button>
|
<el-button size="mini" type="primary" v-else @click="stop">{{ $t('report.stop_btn') }}</el-button>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
id="inputDelay"
|
id="inputDelay"
|
||||||
type="primary"
|
type="primary"
|
||||||
size="mini"
|
size="mini"
|
||||||
v-prevent-re-click
|
v-prevent-re-click
|
||||||
@click="editScenario"
|
@click="editScenario"
|
||||||
title="ctrl + s"
|
title="ctrl + s"
|
||||||
v-permission="[
|
v-permission="[
|
||||||
'PROJECT_API_SCENARIO:READ+EDIT',
|
'PROJECT_API_SCENARIO:READ+EDIT',
|
||||||
'PROJECT_API_SCENARIO:READ+CREATE',
|
'PROJECT_API_SCENARIO:READ+CREATE',
|
||||||
'PROJECT_API_SCENARIO:READ+COPY',
|
'PROJECT_API_SCENARIO:READ+COPY',
|
||||||
]">
|
]">
|
||||||
{{ $t('commons.save') }}
|
{{ $t('commons.save') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-tooltip class="item" effect="dark" :content="$t('commons.refresh')" placement="top-start">
|
<el-tooltip class="item" effect="dark" :content="$t('commons.refresh')" placement="top-start">
|
||||||
<el-button
|
<el-button
|
||||||
:disabled="scenarioDefinition.length < 1"
|
:disabled="scenarioDefinition.length < 1"
|
||||||
size="mini"
|
size="mini"
|
||||||
icon="el-icon-refresh"
|
icon="el-icon-refresh"
|
||||||
v-prevent-re-click
|
v-prevent-re-click
|
||||||
@click="refreshApiScenario"></el-button>
|
@click="refreshApiScenario"></el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<!--操作按钮-->
|
<!--操作按钮-->
|
||||||
<el-link type="primary" @click.stop @click="showHistory" style="margin: 0px 5px">
|
<el-link type="primary" @click.stop @click="showHistory" style="margin: 0px 5px">
|
||||||
{{ $t('commons.debug_history') }}
|
{{ $t('commons.debug_history') }}
|
||||||
</el-link>
|
</el-link>
|
||||||
|
|
||||||
<el-tooltip :content="$t('commons.follow')" placement="bottom" effect="dark" v-show="!showFollow">
|
<el-tooltip :content="$t('commons.follow')" placement="bottom" effect="dark" v-show="!showFollow">
|
||||||
<i
|
<i
|
||||||
class="el-icon-star-off"
|
class="el-icon-star-off"
|
||||||
style="
|
style="
|
||||||
color: var(--primary_color);
|
color: var(--primary_color);
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
|
@ -202,12 +203,12 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 3px;
|
top: 3px;
|
||||||
"
|
"
|
||||||
@click="saveFollow" />
|
@click="saveFollow" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip :content="$t('commons.cancel')" placement="bottom" effect="dark" v-show="showFollow">
|
<el-tooltip :content="$t('commons.cancel')" placement="bottom" effect="dark" v-show="showFollow">
|
||||||
<i
|
<i
|
||||||
class="el-icon-star-on"
|
class="el-icon-star-on"
|
||||||
style="
|
style="
|
||||||
color: var(--primary_color);
|
color: var(--primary_color);
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
|
@ -215,81 +216,81 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 3px;
|
top: 3px;
|
||||||
"
|
"
|
||||||
@click="saveFollow" />
|
@click="saveFollow" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-link
|
<el-link
|
||||||
type="primary"
|
type="primary"
|
||||||
style="margin-right: 5px"
|
style="margin-right: 5px"
|
||||||
@click="openHis"
|
@click="openHis"
|
||||||
v-show="path === '/api/automation/update'"
|
v-show="path === '/api/automation/update'"
|
||||||
>{{ $t('operating_log.change_history') }}
|
>{{ $t('operating_log.change_history') }}
|
||||||
</el-link>
|
</el-link>
|
||||||
<!-- 版本历史 -->
|
<!-- 版本历史 -->
|
||||||
<mx-version-history
|
<mx-version-history
|
||||||
v-xpack
|
v-xpack
|
||||||
ref="versionHistory"
|
ref="versionHistory"
|
||||||
:version-data="versionData"
|
:version-data="versionData"
|
||||||
:current-id="currentScenario.id"
|
:current-id="currentScenario.id"
|
||||||
@compare="compare"
|
@compare="compare"
|
||||||
@checkout="checkout"
|
@checkout="checkout"
|
||||||
@create="create"
|
@create="create"
|
||||||
@del="del" />
|
@del="del" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
effect="dark"
|
effect="dark"
|
||||||
:content="$t('commons.full_screen_editing')"
|
:content="$t('commons.full_screen_editing')"
|
||||||
placement="top-start"
|
placement="top-start"
|
||||||
style="margin-top: 6px">
|
style="margin-top: 6px">
|
||||||
<font-awesome-icon class="alt-ico" :icon="['fa', 'expand-alt']" size="lg" @click="fullScreen" />
|
<font-awesome-icon class="alt-ico" :icon="['fa', 'expand-alt']" size="lg" @click="fullScreen" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<!-- 场景步骤-->
|
<!-- 场景步骤-->
|
||||||
<div v-loading="loading">
|
<div v-loading="loading">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="21">
|
<el-col :span="21">
|
||||||
<div class="ms-debug-result" v-show="debug">
|
<div class="ms-debug-result" v-show="debug">
|
||||||
<span class="ms-message-right"> {{ reqTotalTime }} ms </span>
|
<span class="ms-message-right"> {{ reqTotalTime }} ms </span>
|
||||||
<span class="ms-message-right">{{ $t('api_test.automation.request_total') }} {{ reqTotal }}</span>
|
<span class="ms-message-right">{{ $t('api_test.automation.request_total') }} {{ reqTotal }}</span>
|
||||||
<span class="ms-message-right">{{ $t('api_test.automation.request_success') }} {{ reqSuccess }}</span>
|
<span class="ms-message-right">{{ $t('api_test.automation.request_success') }} {{ reqSuccess }}</span>
|
||||||
<span class="ms-message-right">
|
<span class="ms-message-right">
|
||||||
{{ $t('api_test.automation.request_error') }}
|
{{ $t('api_test.automation.request_error') }}
|
||||||
{{ reqError }}</span
|
{{ reqError }}</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col></el-col>
|
<el-col></el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="21">
|
<el-col :span="21">
|
||||||
<!-- 场景步骤内容 -->
|
<!-- 场景步骤内容 -->
|
||||||
<div ref="stepInfo">
|
<div ref="stepInfo">
|
||||||
<el-tree
|
<el-tree
|
||||||
node-key="resourceId"
|
node-key="resourceId"
|
||||||
:props="props"
|
:props="props"
|
||||||
:data="scenarioDefinition"
|
:data="scenarioDefinition"
|
||||||
class="ms-tree"
|
class="ms-tree"
|
||||||
:expand-on-click-node="false"
|
:expand-on-click-node="false"
|
||||||
:allow-drop="allowDrop"
|
:allow-drop="allowDrop"
|
||||||
:allow-drag="allowDrag"
|
:allow-drag="allowDrag"
|
||||||
:empty-text="$t('api_test.scenario.step_info')"
|
:empty-text="$t('api_test.scenario.step_info')"
|
||||||
highlight-current
|
highlight-current
|
||||||
:show-checkbox="isBatchProcess"
|
:show-checkbox="isBatchProcess"
|
||||||
@check-change="chooseHeadsUp"
|
@check-change="chooseHeadsUp"
|
||||||
@node-drag-end="nodeDragEnd"
|
@node-drag-end="nodeDragEnd"
|
||||||
@node-click="nodeClick"
|
@node-click="nodeClick"
|
||||||
draggable
|
draggable
|
||||||
ref="stepTree"
|
ref="stepTree"
|
||||||
:key="reloadTree">
|
:key="reloadTree">
|
||||||
<el-row
|
<el-row
|
||||||
class="custom-tree-node"
|
class="custom-tree-node"
|
||||||
:gutter="10"
|
:gutter="10"
|
||||||
type="flex"
|
type="flex"
|
||||||
align="middle"
|
align="middle"
|
||||||
slot-scope="{ node, data }"
|
slot-scope="{ node, data }"
|
||||||
style="width: 100%">
|
style="width: 100%">
|
||||||
<span
|
<span
|
||||||
class="custom-tree-node-col"
|
class="custom-tree-node-col"
|
||||||
style="padding-left: 0px; padding-right: 0px"
|
style="padding-left: 0px; padding-right: 0px"
|
||||||
|
@ -303,11 +304,11 @@
|
||||||
class="el-icon-remove-outline custom-node_e"
|
class="el-icon-remove-outline custom-node_e"
|
||||||
@click="openOrClose(node, data)" />
|
@click="openOrClose(node, data)" />
|
||||||
</span>
|
</span>
|
||||||
<!-- 批量操作 -->
|
<!-- 批量操作 -->
|
||||||
<span
|
<span
|
||||||
:class="data.checkBox ? 'custom-tree-node-hide' : 'custom-tree-node-col'"
|
:class="data.checkBox ? 'custom-tree-node-hide' : 'custom-tree-node-col'"
|
||||||
style="padding-left: 0px; padding-right: 0px"
|
style="padding-left: 0px; padding-right: 0px"
|
||||||
v-show="(data.hashTree && data.hashTree.length === 0) || data.isLeaf">
|
v-show="(data.hashTree && data.hashTree.length === 0) || data.isLeaf">
|
||||||
<show-more-btn
|
<show-more-btn
|
||||||
:is-show="node.checked"
|
:is-show="node.checked"
|
||||||
:buttons="batchOperators"
|
:buttons="batchOperators"
|
||||||
|
@ -315,7 +316,7 @@
|
||||||
v-show="data.checkBox"
|
v-show="data.checkBox"
|
||||||
style="margin-right: 10px" />
|
style="margin-right: 10px" />
|
||||||
</span>
|
</span>
|
||||||
<span style="width: calc(100% - 40px)">
|
<span style="width: calc(100% - 40px)">
|
||||||
<!-- 步骤组件-->
|
<!-- 步骤组件-->
|
||||||
<ms-component-config
|
<ms-component-config
|
||||||
:scenario-definition="scenarioDefinition"
|
:scenario-definition="scenarioDefinition"
|
||||||
|
@ -349,194 +350,195 @@
|
||||||
{{ hideNode(node) }}
|
{{ hideNode(node) }}
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- 按钮列表 -->
|
<!-- 按钮列表 -->
|
||||||
<el-col :span="3">
|
<el-col :span="3">
|
||||||
<div
|
<div
|
||||||
@click="fabClick"
|
@click="fabClick"
|
||||||
v-permission="['PROJECT_API_SCENARIO:READ+EDIT', 'PROJECT_API_SCENARIO:READ+CREATE']">
|
v-permission="['PROJECT_API_SCENARIO:READ+EDIT', 'PROJECT_API_SCENARIO:READ+CREATE']">
|
||||||
<vue-fab
|
<vue-fab
|
||||||
id="fab"
|
id="fab"
|
||||||
mainBtnColor="#783887"
|
mainBtnColor="#783887"
|
||||||
size="small"
|
size="small"
|
||||||
:global-options="globalOptions"
|
:global-options="globalOptions"
|
||||||
:click-auto-close="false"
|
:click-auto-close="false"
|
||||||
v-outside-click="outsideClick"
|
v-outside-click="outsideClick"
|
||||||
ref="refFab">
|
ref="refFab">
|
||||||
<fab-item
|
<fab-item
|
||||||
v-for="(item, index) in buttonData"
|
v-for="(item, index) in buttonData"
|
||||||
:key="index"
|
:key="index"
|
||||||
:idx="getIdx(index)"
|
:idx="getIdx(index)"
|
||||||
:title="item.title"
|
:title="item.title"
|
||||||
:title-bg-color="item.titleBgColor"
|
:title-bg-color="item.titleBgColor"
|
||||||
:title-color="item.titleColor"
|
:title-color="item.titleColor"
|
||||||
:color="item.titleColor"
|
:color="item.titleColor"
|
||||||
:icon="item.icon"
|
:icon="item.icon"
|
||||||
@clickItem="item.click" />
|
@clickItem="item.click" />
|
||||||
</vue-fab>
|
</vue-fab>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--参数设置-->
|
<!--参数设置-->
|
||||||
<ms-api-variable-advance
|
<ms-api-variable-advance
|
||||||
ref="scenarioVariableAdvance"
|
ref="scenarioVariableAdvance"
|
||||||
:append-to-body="true"
|
:append-to-body="true"
|
||||||
:current-item="currentItem"
|
:current-item="currentItem"
|
||||||
:variables="currentScenario.variables"
|
:variables="currentScenario.variables"
|
||||||
:scenario-definition="scenarioDefinition" />
|
:scenario-definition="scenarioDefinition" />
|
||||||
|
|
||||||
<!--接口列表-->
|
<!--接口列表-->
|
||||||
<scenario-api-relevance
|
<scenario-api-relevance
|
||||||
@save="pushApiOrCase"
|
@save="pushApiOrCase"
|
||||||
@close="setHideBtn"
|
@close="setHideBtn"
|
||||||
ref="scenarioApiRelevance"
|
ref="scenarioApiRelevance"
|
||||||
:is-across-space="true"
|
:is-across-space="true"
|
||||||
v-if="type !== 'detail'" />
|
v-if="type !== 'detail'" />
|
||||||
|
|
||||||
<!--自定义接口-->
|
<!--自定义接口-->
|
||||||
<el-drawer
|
<el-drawer
|
||||||
v-if="type !== 'detail'"
|
v-if="type !== 'detail'"
|
||||||
:visible.sync="customizeVisible"
|
:visible.sync="customizeVisible"
|
||||||
:destroy-on-close="true"
|
:destroy-on-close="true"
|
||||||
direction="ltr"
|
direction="ltr"
|
||||||
:withHeader="false"
|
:withHeader="false"
|
||||||
:title="$t('api_test.automation.customize_req')"
|
:title="$t('api_test.automation.customize_req')"
|
||||||
style="overflow: auto"
|
style="overflow: auto"
|
||||||
:modal="false"
|
:modal="false"
|
||||||
size="90%">
|
size="90%">
|
||||||
<ms-api-customize :request="customizeRequest" @addCustomizeApi="addCustomizeApi" />
|
<ms-api-customize :request="customizeRequest" @addCustomizeApi="addCustomizeApi" />
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
<!--场景导入 -->
|
<!--场景导入 -->
|
||||||
<scenario-relevance
|
<scenario-relevance
|
||||||
v-if="type !== 'detail'"
|
v-if="type !== 'detail'"
|
||||||
@save="addScenario"
|
@save="addScenario"
|
||||||
@close="setHideBtn"
|
@close="setHideBtn"
|
||||||
:is-across-space="true"
|
:is-across-space="true"
|
||||||
ref="scenarioRelevance" />
|
ref="scenarioRelevance" />
|
||||||
|
|
||||||
<!-- 环境 -->
|
<!-- 环境 -->
|
||||||
<api-environment-config v-if="type !== 'detail'" ref="environmentConfig" @close="environmentConfigClose" />
|
<api-environment-config v-if="type !== 'detail'" ref="environmentConfig" @close="environmentConfigClose" />
|
||||||
|
|
||||||
<!--执行组件-->
|
<!--执行组件-->
|
||||||
<ms-run
|
<ms-run
|
||||||
:debug="true"
|
|
||||||
v-if="type !== 'detail'"
|
|
||||||
:environment="projectEnvMap"
|
|
||||||
:reportId="reportId"
|
|
||||||
:saved="saved"
|
|
||||||
:run-data="debugData"
|
|
||||||
:environment-type="environmentType"
|
|
||||||
:environment-group-id="envGroupId"
|
|
||||||
:executeType="executeType"
|
|
||||||
@runRefresh="runRefresh"
|
|
||||||
@errorRefresh="errorRefresh"
|
|
||||||
ref="runTest" />
|
|
||||||
<!-- 调试结果 -->
|
|
||||||
<el-drawer
|
|
||||||
v-if="type !== 'detail'"
|
|
||||||
:visible.sync="debugVisible"
|
|
||||||
:destroy-on-close="true"
|
|
||||||
direction="ltr"
|
|
||||||
:withHeader="true"
|
|
||||||
:modal="false"
|
|
||||||
size="80%">
|
|
||||||
<ms-api-report-detail
|
|
||||||
:scenario="currentScenario"
|
|
||||||
:report-id="reportId"
|
|
||||||
:debug="true"
|
:debug="true"
|
||||||
:currentProjectId="projectId"
|
v-if="type !== 'detail'"
|
||||||
@refresh="detailRefresh" />
|
:environment="projectEnvMap"
|
||||||
</el-drawer>
|
:reportId="reportId"
|
||||||
|
:saved="saved"
|
||||||
|
:run-data="debugData"
|
||||||
|
:environment-type="environmentType"
|
||||||
|
:environment-group-id="envGroupId"
|
||||||
|
:executeType="executeType"
|
||||||
|
@runRefresh="runRefresh"
|
||||||
|
@errorRefresh="errorRefresh"
|
||||||
|
ref="runTest" />
|
||||||
|
<!-- 调试结果 -->
|
||||||
|
<el-drawer
|
||||||
|
v-if="type !== 'detail'"
|
||||||
|
:visible.sync="debugVisible"
|
||||||
|
:destroy-on-close="true"
|
||||||
|
direction="ltr"
|
||||||
|
:withHeader="true"
|
||||||
|
:modal="false"
|
||||||
|
size="80%">
|
||||||
|
<ms-api-report-detail
|
||||||
|
:scenario="currentScenario"
|
||||||
|
:report-id="reportId"
|
||||||
|
:debug="true"
|
||||||
|
:currentProjectId="projectId"
|
||||||
|
@refresh="detailRefresh" />
|
||||||
|
</el-drawer>
|
||||||
|
|
||||||
<!--场景公共参数-->
|
<!--场景公共参数-->
|
||||||
<ms-variable-list
|
<ms-variable-list
|
||||||
v-if="type !== 'detail'"
|
v-if="type !== 'detail'"
|
||||||
@setVariables="setVariables"
|
@setVariables="setVariables"
|
||||||
ref="scenarioParameters"
|
ref="scenarioParameters"
|
||||||
class="ms-sc-variable-header" />
|
class="ms-sc-variable-header" />
|
||||||
<!--外部导入-->
|
<!--外部导入-->
|
||||||
<api-import v-if="type !== 'detail'" ref="apiImport" :saved="false" @refresh="apiImport" />
|
<api-import v-if="type !== 'detail'" ref="apiImport" :saved="false" @refresh="apiImport" />
|
||||||
|
|
||||||
<!--步骤最大化-->
|
<!--步骤最大化-->
|
||||||
<ms-drawer
|
<ms-drawer
|
||||||
:visible="drawer"
|
:visible="drawer"
|
||||||
:size="100"
|
:size="100"
|
||||||
@close="close"
|
@close="close"
|
||||||
direction="default"
|
direction="default"
|
||||||
:show-full-screen="false"
|
:show-full-screen="false"
|
||||||
:is-show-close="false"
|
:is-show-close="false"
|
||||||
style="overflow: hidden"
|
style="overflow: hidden"
|
||||||
v-if="drawer">
|
v-if="drawer">
|
||||||
<maximize-scenario
|
<maximize-scenario
|
||||||
:scenario-definition="scenarioDefinition"
|
:scenario-definition="scenarioDefinition"
|
||||||
:projectIds.sync="projectIds"
|
:projectIds.sync="projectIds"
|
||||||
:projectList="projectList"
|
:projectList="projectList"
|
||||||
:envMap="projectEnvMap"
|
:envMap="projectEnvMap"
|
||||||
:moduleOptions="moduleOptions"
|
:moduleOptions="moduleOptions"
|
||||||
:req-error="reqError"
|
:req-error="reqError"
|
||||||
:req-success="reqSuccess"
|
:req-success="reqSuccess"
|
||||||
:req-total="reqTotal"
|
:req-total="reqTotal"
|
||||||
:req-total-time="reqTotalTime"
|
:req-total-time="reqTotalTime"
|
||||||
:currentScenario="currentScenario"
|
:currentScenario="currentScenario"
|
||||||
:type="type"
|
:type="type"
|
||||||
:debug="debugLoading"
|
:debug="debugLoading"
|
||||||
:reloadDebug="reloadDebug"
|
:reloadDebug="reloadDebug"
|
||||||
:stepReEnable="stepEnable"
|
:stepReEnable="stepEnable"
|
||||||
:message="message"
|
:message="message"
|
||||||
:enable-cookie="enableCookieShare"
|
:enable-cookie="enableCookieShare"
|
||||||
:on-sample-error="onSampleError"
|
:on-sample-error="onSampleError"
|
||||||
@setEnvType="setEnvType"
|
@setEnvType="setEnvType"
|
||||||
@envGroupId="setEnvGroup"
|
@envGroupId="setEnvGroup"
|
||||||
@closePage="close"
|
@closePage="close"
|
||||||
@unFullScreen="unFullScreen"
|
@unFullScreen="unFullScreen"
|
||||||
@showAllBtn="showAllBtn"
|
@showAllBtn="showAllBtn"
|
||||||
@runDebug="runDebug"
|
@runDebug="runDebug"
|
||||||
@handleCommand="handleCommand"
|
@handleCommand="handleCommand"
|
||||||
@setProjectEnvMap="setProjectEnvMap"
|
@setProjectEnvMap="setProjectEnvMap"
|
||||||
@showScenarioParameters="showScenarioParameters"
|
@showScenarioParameters="showScenarioParameters"
|
||||||
@setCookieShare="setCookieShare"
|
@setCookieShare="setCookieShare"
|
||||||
@setSampleError="setSampleError"
|
@setSampleError="setSampleError"
|
||||||
@stop="stop"
|
@stop="stop"
|
||||||
@sort="sort"
|
@sort="sort"
|
||||||
@openScenario="openScenario"
|
@openScenario="openScenario"
|
||||||
@runScenario="runDebug"
|
@runScenario="runDebug"
|
||||||
@stopScenario="stop"
|
@stopScenario="stop"
|
||||||
@editScenarioAdvance="editScenarioAdvance"
|
@editScenarioAdvance="editScenarioAdvance"
|
||||||
ref="maximizeScenario" />
|
ref="maximizeScenario" />
|
||||||
</ms-drawer>
|
</ms-drawer>
|
||||||
<ms-change-history ref="changeHistory" />
|
<ms-change-history ref="changeHistory" />
|
||||||
<el-backtop target=".card-content" :visibility-height="100" :right="20"></el-backtop>
|
<el-backtop target=".card-content" :visibility-height="100" :right="20"></el-backtop>
|
||||||
</div>
|
</div>
|
||||||
<ms-task-center ref="taskCenter" :show-menu="false" />
|
<ms-task-center ref="taskCenter" :show-menu="false" />
|
||||||
|
|
||||||
<!--版本对比-->
|
<!--版本对比-->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:fullscreen="true"
|
:fullscreen="true"
|
||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
:destroy-on-close="true"
|
:destroy-on-close="true"
|
||||||
@close="closeDiff"
|
@close="closeDiff"
|
||||||
width="100%">
|
width="100%">
|
||||||
<scenario-diff
|
<scenario-diff
|
||||||
v-if="dialogVisible"
|
v-if="dialogVisible"
|
||||||
:custom-num="customNum"
|
:custom-num="customNum"
|
||||||
:currentScenarioId="currentScenario.id"
|
:currentScenarioId="currentScenario.id"
|
||||||
:dffScenarioId="dffScenarioId"
|
:dffScenarioId="dffScenarioId"
|
||||||
:scenarioRefId="scenarioRefId"
|
:scenarioRefId="scenarioRefId"
|
||||||
:module-options="moduleOptions"
|
:module-options="moduleOptions"
|
||||||
:project-env-map="projectEnvMap"
|
:project-env-map="projectEnvMap"
|
||||||
:old-enable-cookie-share="enableCookieShare"
|
:old-enable-cookie-share="enableCookieShare"
|
||||||
:old-on-sample-error="onSampleError"
|
:old-on-sample-error="onSampleError"
|
||||||
:project-list="projectList"
|
:project-list="projectList"
|
||||||
:new-create-time="newCreateTime"
|
:new-create-time="newCreateTime"
|
||||||
:old-create-time="oldCreateTime"
|
:old-create-time="oldCreateTime"
|
||||||
:old-user-name="oldUserName"
|
:old-user-name="oldUserName"
|
||||||
:type="type" />
|
:type="type" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
</el-card>
|
||||||
</ms-main-container>
|
</ms-main-container>
|
||||||
</ms-container>
|
</ms-container>
|
||||||
</template>
|
</template>
|
||||||
|
@ -2544,7 +2546,7 @@ export default {
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.card-content {
|
.card-content {
|
||||||
height: calc(100vh - 160px);
|
height: calc(100vh - 170px);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2569,7 +2571,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
#fab {
|
#fab {
|
||||||
right: 60px;
|
right: 70px;
|
||||||
bottom: 120px;
|
bottom: 120px;
|
||||||
z-index: 5;
|
z-index: 5;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue