fix(接口测试): 修复只读用户case添加按钮未禁用的问题

--bug=1013912 --user=宋天阳 【接口测试】只读用户,case添加按钮未禁用
https://www.tapd.cn/55049933/s/1177990
This commit is contained in:
song-tianyang 2022-06-09 17:23:44 +08:00 committed by f2c-ci-robot[bot]
parent e3ef8b8cbe
commit 7a9b16200a
1 changed files with 4 additions and 3 deletions

View File

@ -8,6 +8,7 @@
class="search-input" size="small"
v-model="condition.name"/>
<el-button type="primary" style="float: right;margin-right: 10px" icon="el-icon-plus" size="small"
v-permission="['PROJECT_API_DEFINITION:READ+CREATE_CASE']"
@click="addTestCase" v-if="apiDefinitionId">{{ $t('commons.add') }}
</el-button>
<ms-table
@ -822,7 +823,7 @@ export default {
}
selectApi.url = request.path;
this.$refs.caseList.runTestCase(selectApi, testCase.id);
let obj = {id:testCase.id};
let obj = {id: testCase.id};
this.$post('/api/testcase/updateExecuteInfo', obj);
});
},
@ -868,9 +869,9 @@ export default {
let uuid = getUUID();
let apiCaseRequest = JSON.parse(data.request);
apiCaseRequest.id = uuid;
if(apiCaseRequest.type === "TCPSampler"){
if (apiCaseRequest.type === "TCPSampler") {
apiCaseRequest.method = "TCP";
}else if(apiCaseRequest.type === "JDBCSampler"){
} else if (apiCaseRequest.type === "JDBCSampler") {
apiCaseRequest.method = "SQL";
}
let obj = {