This commit is contained in:
fit2-zhao 2021-02-24 11:04:39 +08:00
commit aa6bf4cb6e
3 changed files with 495 additions and 485 deletions

View File

@ -27,6 +27,7 @@
<!-- 列表集合 -->
<ms-api-list
v-if="item.type === 'list' && activeDom==='api' "
@runTest="runTest"
:module-tree="nodeTree"
:module-options="moduleOptions"
:current-protocol="currentProtocol"

View File

@ -160,7 +160,7 @@
:key="index"/>
</template>
<el-table-column fixed="right" v-if="!isReadOnly" :label="$t('commons.operating')" min-width="130"
<el-table-column fixed="right" v-if="!isReadOnly" :label="$t('commons.operating')" min-width="180"
align="center">
<template slot="header">
<span>{{ $t('commons.operating') }}
@ -168,6 +168,10 @@
</span>
</template>
<template v-slot:default="scope">
<ms-table-operator-button class="run-button" :is-tester-permission="true"
:tip="$t('api_test.automation.execute')"
icon="el-icon-video-play"
@exec="runApi(scope.row)"/>
<ms-table-operator-button :tip="$t('commons.reduction')" icon="el-icon-refresh-left"
@exec="reductionApi(scope.row)" v-if="trashEnable" v-tester/>
<ms-table-operator-button :tip="$t('commons.edit')" icon="el-icon-edit" @exec="editApi(scope.row)" v-else
@ -525,6 +529,11 @@
editApi(row) {
this.$emit('editApi', row);
},
runApi(row) {
let request = JSON.parse(row.request);
row.request = request
this.$emit('runTest', row);
},
reductionApi(row) {
let tmp = JSON.parse(JSON.stringify(row));
tmp.request = null;

View File

@ -40,7 +40,7 @@
<el-col>
<el-form-item :label="$t('system_parameter_setting.test_recipients')">
<el-input v-model="formInline.recipient" :placeholder="$t('system_parameter_setting.test_recipients')"
autocomplete="new-password" show-password type="text" ref="input">
autocomplete="new-password" type="text" ref="input">
</el-input>
<p style="color: #8a8b8d">({{ $t('system_parameter_setting.tip') }})</p>
</el-form-item>