feat(接口自动化): 添加 v-tester 权限控制
This commit is contained in:
parent
59d43f73bf
commit
9aa9a3bbf5
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
<el-tab-pane name="add">
|
<el-tab-pane name="add">
|
||||||
<template v-slot:label>
|
<template v-slot:label>
|
||||||
<el-button type="primary" plain icon="el-icon-plus" size="mini"/>
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" v-tester/>
|
||||||
</template>
|
</template>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
|
|
@ -50,14 +50,14 @@
|
||||||
<el-table-column :label="$t('commons.operating')" width="200px" v-if="!referenced">
|
<el-table-column :label="$t('commons.operating')" width="200px" v-if="!referenced">
|
||||||
<template v-slot:default="{row}">
|
<template v-slot:default="{row}">
|
||||||
<div v-if="trashEnable">
|
<div v-if="trashEnable">
|
||||||
<el-button type="text" @click="reductionApi(row)">{{$t('commons.reduction')}}</el-button>
|
<el-button type="text" @click="reductionApi(row)" v-tester>{{$t('commons.reduction')}}</el-button>
|
||||||
<el-button type="text" @click="remove(row)">{{ $t('api_test.automation.remove') }}</el-button>
|
<el-button type="text" @click="remove(row)" v-tester>{{ $t('api_test.automation.remove') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<el-button type="text" @click="edit(row)">{{ $t('api_test.automation.edit') }}</el-button>
|
<el-button type="text" @click="edit(row)" v-tester>{{ $t('api_test.automation.edit') }}</el-button>
|
||||||
<el-button type="text" @click="execute(row)">{{ $t('api_test.automation.execute') }}</el-button>
|
<el-button type="text" @click="execute(row)" v-tester>{{ $t('api_test.automation.execute') }}</el-button>
|
||||||
<el-button type="text" @click="copy(row)">{{ $t('api_test.automation.copy') }}</el-button>
|
<el-button type="text" @click="copy(row)" v-tester>{{ $t('api_test.automation.copy') }}</el-button>
|
||||||
<el-button type="text" @click="remove(row)">{{ $t('api_test.automation.remove') }}</el-button>
|
<el-button type="text" @click="remove(row)" v-tester>{{ $t('api_test.automation.remove') }}</el-button>
|
||||||
<ms-scenario-extend-buttons :row="row"/>
|
<ms-scenario-extend-buttons :row="row"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -161,7 +161,7 @@
|
||||||
if (this.projectId != null) {
|
if (this.projectId != null) {
|
||||||
this.condition.projectId = this.projectId;
|
this.condition.projectId = this.projectId;
|
||||||
}
|
}
|
||||||
|
this.selection = [];
|
||||||
let url = "/api/automation/list/" + this.currentPage + "/" + this.pageSize;
|
let url = "/api/automation/list/" + this.currentPage + "/" + this.pageSize;
|
||||||
this.$post(url, this.condition, response => {
|
this.$post(url, this.condition, response => {
|
||||||
let data = response.data;
|
let data = response.data;
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<el-input class="module-input" :placeholder="$t('test_track.module.search')" v-model="condition.filterText"
|
<el-input class="module-input" :placeholder="$t('test_track.module.search')" v-model="condition.filterText"
|
||||||
size="small">
|
size="small">
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<el-button icon="el-icon-folder-add" @click="addScenario"/>
|
<el-button icon="el-icon-folder-add" @click="addScenario" v-tester/>
|
||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
<module-trash-button v-if="!isReadOnly" :condition="condition" :exe="enableTrash"/>
|
<module-trash-button v-if="!isReadOnly" :condition="condition" :exe="enableTrash"/>
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<ms-main-container>
|
<ms-main-container>
|
||||||
<el-dropdown size="small" split-button type="primary" class="ms-api-buttion"
|
<el-dropdown size="small" split-button type="primary" class="ms-api-buttion"
|
||||||
@click="handleCommand('ADD')"
|
@click="handleCommand('ADD')"
|
||||||
@command="handleCommand">
|
@command="handleCommand" v-tester>
|
||||||
{{$t('commons.add')}}
|
{{$t('commons.add')}}
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="debug">{{$t('api_test.definition.request.fast_debug')}}</el-dropdown-item>
|
<el-dropdown-item command="debug">{{$t('api_test.definition.request.fast_debug')}}</el-dropdown-item>
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" v-if="!(isReadOnly || isCaseEdit)">
|
<el-col :span="2" v-if="!(isReadOnly || isCaseEdit)">
|
||||||
<el-dropdown size="small" split-button type="primary" class="ms-api-header-select" @click="addCase"
|
<el-dropdown size="small" split-button type="primary" class="ms-api-header-select" @click="addCase"
|
||||||
@command="handleCommand">
|
@command="handleCommand" v-tester>
|
||||||
+{{$t('api_test.definition.request.case')}}
|
+{{$t('api_test.definition.request.case')}}
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="run">{{$t('commons.test')}}</el-dropdown-item>
|
<el-dropdown-item command="run">{{$t('commons.test')}}</el-dropdown-item>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
@blur="saveTestCase(apiCase)" placeholder="请输入用例名称"/>
|
@blur="saveTestCase(apiCase)" placeholder="请输入用例名称"/>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
{{apiCase.id ? apiCase.name:''}}
|
{{apiCase.id ? apiCase.name:''}}
|
||||||
<i class="el-icon-edit" style="cursor:pointer" @click="showInput(apiCase)"/>
|
<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">
|
<div v-if="apiCase.id" style="color: #999999;font-size: 12px">
|
||||||
<span>
|
<span>
|
||||||
|
@ -35,12 +35,12 @@
|
||||||
|
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<ms-tip-button @click="singleRun(apiCase)" :tip="$t('api_test.run')" icon="el-icon-video-play"
|
<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/>
|
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"
|
<ms-tip-button @click="copyCase(apiCase)" :tip="$t('commons.copy')" icon="el-icon-document-copy"
|
||||||
size="mini" :disabled="!apiCase.id || isCaseEdit" circle/>
|
size="mini" :disabled="!apiCase.id || isCaseEdit" circle v-tester/>
|
||||||
<ms-tip-button @click="deleteCase(index,apiCase)" :tip="$t('commons.delete')" icon="el-icon-delete"
|
<ms-tip-button @click="deleteCase(index,apiCase)" :tip="$t('commons.delete')" icon="el-icon-delete"
|
||||||
size="mini" :disabled="!apiCase.id || isCaseEdit" circle/>
|
size="mini" :disabled="!apiCase.id || isCaseEdit" circle v-tester/>
|
||||||
<ms-api-extend-btns :is-case-edit="isCaseEdit" :row="apiCase"/>
|
<ms-api-extend-btns :is-case-edit="isCaseEdit" :row="apiCase" v-tester/>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="3">
|
<el-col :span="3">
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
<ms-sql-basis-parameters :request="apiCase.request" v-if="api.protocol==='SQL'"/>
|
<ms-sql-basis-parameters :request="apiCase.request" v-if="api.protocol==='SQL'"/>
|
||||||
<ms-dubbo-basis-parameters :request="apiCase.request" v-if="api.protocol==='DUBBO'"/>
|
<ms-dubbo-basis-parameters :request="apiCase.request" v-if="api.protocol==='DUBBO'"/>
|
||||||
<!-- 保存操作 -->
|
<!-- 保存操作 -->
|
||||||
<el-button type="primary" size="small" style="margin: 20px; float: right" @click="saveTestCase(apiCase)">
|
<el-button type="primary" size="small" style="margin: 20px; float: right" @click="saveTestCase(apiCase)" v-tester>
|
||||||
{{$t('commons.save')}}
|
{{$t('commons.save')}}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -78,10 +78,10 @@
|
||||||
|
|
||||||
<el-table-column v-if="!isReadOnly && !isRelevance" :label="$t('commons.operating')" min-width="130" align="center">
|
<el-table-column v-if="!isReadOnly && !isRelevance" :label="$t('commons.operating')" min-width="130" align="center">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<el-button type="text" @click="reductionApi(scope.row)" v-if="trashEnable">{{$t('commons.reduction')}}</el-button>
|
<el-button type="text" @click="reductionApi(scope.row)" v-if="trashEnable" v-tester>{{$t('commons.reduction')}}</el-button>
|
||||||
<el-button type="text" @click="editApi(scope.row)" v-else>{{$t('commons.edit')}}</el-button>
|
<el-button type="text" @click="editApi(scope.row)" v-else v-tester>{{$t('commons.edit')}}</el-button>
|
||||||
<el-button type="text" @click="handleTestCase(scope.row)">{{$t('api_test.definition.request.case')}}</el-button>
|
<el-button type="text" @click="handleTestCase(scope.row)">{{$t('api_test.definition.request.case')}}</el-button>
|
||||||
<el-button type="text" @click="handleDelete(scope.row)" style="color: #F56C6C">{{$t('commons.delete')}}</el-button>
|
<el-button type="text" @click="handleDelete(scope.row)" style="color: #F56C6C" v-tester>{{$t('commons.delete')}}</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
Loading…
Reference in New Issue