This commit is contained in:
fit2-zhao 2021-01-26 15:49:22 +08:00
commit bc2c2beefa
5 changed files with 43 additions and 34 deletions

View File

@ -6,7 +6,7 @@
<ms-environment-select :project-id="projectId" v-if="isTestPlan" :is-read-only="isReadOnly" @setEnvironment="setEnvironment"/>
<el-input placeholder="搜索" @blur="initTable" class="search-input" size="small" @keyup.enter.native="initTable" v-model="condition.name"/>
<el-input :placeholder="$t('api_monitor.please_search')" @blur="initTable" class="search-input" size="small" @keyup.enter.native="initTable" v-model="condition.name"/>
<el-table v-loading="result.loading"
border
@ -26,7 +26,7 @@
<ms-tag v-if="scope.row.status == 'Prepare'" type="info" effect="plain" :content="$t('test_track.plan.plan_status_prepare')"/>
<ms-tag v-if="scope.row.status == 'Underway'" type="warning" effect="plain" :content="$t('test_track.plan.plan_status_running')"/>
<ms-tag v-if="scope.row.status == 'Completed'" type="success" effect="plain" :content="$t('test_track.plan.plan_status_completed')"/>
<ms-tag v-if="scope.row.status == 'Trash'" type="danger" effect="plain" content="废弃"/>
<ms-tag v-if="scope.row.status == 'Trash'" type="danger" effect="plain" :content="$t('test_track.plan.plan_status_trash')"/>
</template>
</el-table-column>

View File

@ -1,5 +1,5 @@
<template>
<relevance-dialog :title="'场景导入'" ref="relevanceDialog">
<relevance-dialog :title="$t('api_test.automation.scenario_import')" ref="relevanceDialog">
<template v-slot:aside>
<ms-api-scenario-module
@ -19,8 +19,8 @@
ref="apiScenarioList"/>
<template v-slot:footer>
<el-button type="primary" @click="copy" @keydown.enter.native.prevent>复制</el-button>
<el-button type="primary" @click="reference" @keydown.enter.native.prevent>引用</el-button>
<el-button type="primary" @click="copy" @keydown.enter.native.prevent>{{$t('commons.copy')}}</el-button>
<el-button type="primary" @click="reference" @keydown.enter.native.prevent> {{ $t('api_test.scenario.reference') }}</el-button>
</template>
</relevance-dialog>

View File

@ -33,6 +33,7 @@
<i class="el-icon-edit" style="cursor:pointer" @click="showInput(apiCase)" v-tester/>
</span>
</span>
<div v-if="apiCase.id" style="color: #999999;font-size: 12px">
<span>
{{ apiCase.createTime | timestampFormatDate }}
@ -46,26 +47,28 @@
</el-col>
<el-col :span="4">
<div class="tag-item">
<div class="tag-item" @click.stop>
<ms-input-tag :currentScenario="apiCase" ref="tag" @keyup.enter.native="saveTestCase(apiCase)"/>
</div>
</el-col>
<el-col :span="4">
<ms-tip-button @click="singleRun(apiCase)" :tip="$t('api_test.run')" icon="el-icon-video-play"
style="background-color: #409EFF;color: white" size="mini" :disabled="!apiCase.id" circle v-tester/>
<ms-tip-button @click="copyCase(apiCase)" :tip="$t('commons.copy')" icon="el-icon-document-copy"
size="mini" :disabled="!apiCase.id || isCaseEdit" circle v-tester/>
<ms-tip-button @click="deleteCase(index,apiCase)" :tip="$t('commons.delete')" icon="el-icon-delete"
size="mini" :disabled="!apiCase.id || isCaseEdit" circle v-tester/>
<ms-api-extend-btns :is-case-edit="isCaseEdit" :environment="environment" :row="apiCase" v-tester/>
<span @click.stop>
<ms-tip-button @click="singleRun(apiCase)" :tip="$t('api_test.run')" icon="el-icon-video-play"
style="background-color: #409EFF;color: white" size="mini" :disabled="!apiCase.id" circle v-tester/>
<ms-tip-button @click="copyCase(apiCase)" :tip="$t('commons.copy')" icon="el-icon-document-copy"
size="mini" :disabled="!apiCase.id || isCaseEdit" circle v-tester/>
<ms-tip-button @click="deleteCase(index,apiCase)" :tip="$t('commons.delete')" icon="el-icon-delete"
size="mini" :disabled="!apiCase.id || isCaseEdit" circle v-tester/>
<ms-api-extend-btns :is-case-edit="isCaseEdit" :environment="environment" :row="apiCase" v-tester/>
</span>
</el-col>
<el-col :span="3">
<el-link type="danger" v-if="apiCase.execResult && apiCase.execResult==='error'" @click="showExecResult(apiCase)">
<el-link @click.stop type="danger" v-if="apiCase.execResult && apiCase.execResult==='error'" @click="showExecResult(apiCase)">
{{ getResult(apiCase.execResult) }}
</el-link>
<el-link v-else-if="apiCase.execResult && apiCase.execResult==='success'" @click="showExecResult(apiCase)">
<el-link @click.stop v-else-if="apiCase.execResult && apiCase.execResult==='success'" @click="showExecResult(apiCase)">
{{ getResult(apiCase.execResult) }}
</el-link>
<div v-else> {{ getResult(apiCase.execResult) }}</div>

View File

@ -29,6 +29,8 @@
<p class="tip">{{$t('api_test.definition.request.res_param')}} </p>
<ms-request-result-tail :response="responseData" :currentProtocol="currentProtocol" ref="debugResult"/>
<ms-jmx-step :request="request" :response="responseData"/>
<!-- 执行组件 -->
<ms-run :debug="true" :reportId="reportId" :run-data="runData" @runRefresh="runRefresh" ref="runTest"/>
</el-card>
@ -50,10 +52,12 @@
import {REQ_METHOD} from "../../model/JsonData";
import MsRequestResultTail from "../response/RequestResultTail";
import TcpBasisParameters from "../request/tcp/TcpBasisParameters";
import MsJmxStep from "../step/JmxStep";
export default {
name: "ApiConfig",
components: {
MsJmxStep,
TcpBasisParameters,
MsRequestResultTail, MsResponseResult, MsApiRequestForm, MsRequestMetric, MsResponseText, MsRun},
props: {

View File

@ -1,23 +1,24 @@
<template>
<el-dialog :title="this.$t('test_track.case.select_catalog')"
:visible.sync="dialogVisible"
:before-close="close"
:destroy-on-close="true"
width="40%"
>
<div>
<el-input :placeholder="$t('test_track.module.search')" v-model="filterText" size="small"/>
<el-tree
class="filter-tree node-tree"
:data="treeNodes"
node-key="id"
:filter-node-method="filterNode"
:expand-on-click-node="false"
highlight-current
@node-click="nodeClick"
ref="tree"
>
<template v-slot:default="{node}">
<div v-if="dialogVisible" class="batch-move" v-loading="result.loading">
<el-dialog :title="this.$t('test_track.case.select_catalog')"
:visible.sync="dialogVisible"
:before-close="close"
:destroy-on-close="true"
width="20%"
>
<div>
<el-input :placeholder="$t('test_track.module.search')" v-model="filterText" size="small"/>
<el-tree
class="filter-tree node-tree"
:data="treeNodes"
node-key="id"
:filter-node-method="filterNode"
:expand-on-click-node="false"
highlight-current
@node-click="nodeClick"
ref="tree"
>
<template v-slot:default="{node}">
<span>
<span class="node-icon">
<i class="el-icon-folder"/>
@ -33,6 +34,7 @@
@confirm="save"/>
</template>
</el-dialog>
</div>
</template>
<script>