fix(接口测试): 接口首页不同协议的用例跳转
--user=郭雨琦 --bug=1014073 【接口测试】首页-过去7天测试计划失败用例TOP10,非HTTP的接口也会跳到HTTP页面 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001014073
This commit is contained in:
parent
96fac03f5e
commit
f9e0fcb708
|
@ -80,26 +80,33 @@ export default {
|
|||
this.$emit('redirectPage', 'testPlanEdit', null, param);
|
||||
break;
|
||||
case "apiCase":
|
||||
this.$get('/api/definition/get/' + param.id, (response) => {
|
||||
let api = response.data;
|
||||
if (!api) {
|
||||
this.$get('/api/testcase/findById/' + param.id, (response) => {
|
||||
let apiCase = response.data;
|
||||
if (!apiCase) {
|
||||
this.$message.error(this.$t('commons.api_case') + this.$t('commons.not_exist'))
|
||||
} else {
|
||||
if (param.protocol === 'dubbo://') {
|
||||
param.protocol = 'DUBBO'
|
||||
}
|
||||
definitionData = this.$router.resolve({
|
||||
name: 'ApiDefinition',
|
||||
params: {
|
||||
redirectID: getUUID(),
|
||||
dataType: "api",
|
||||
dataSelectRange: 'edit:' + param.id,
|
||||
projectId: getCurrentProjectID(),
|
||||
type: api.protocol,
|
||||
workspaceId: getCurrentWorkspaceId(),
|
||||
this.$get('/api/definition/get/' + apiCase.apiDefinitionId, (response) => {
|
||||
let api = response.data;
|
||||
if (api) {
|
||||
this.$message.error(this.$t('api_test.home_page.api_details_card.title') + this.$t('commons.not_exist'))
|
||||
} else {
|
||||
if (param.protocol === 'dubbo://') {
|
||||
param.protocol = 'DUBBO'
|
||||
}
|
||||
definitionData = this.$router.resolve({
|
||||
name: 'ApiDefinition',
|
||||
params: {
|
||||
redirectID: getUUID(),
|
||||
dataType: "api",
|
||||
dataSelectRange: 'edit:' + param.id,
|
||||
projectId: getCurrentProjectID(),
|
||||
type: api.protocol,
|
||||
workspaceId: getCurrentWorkspaceId(),
|
||||
}
|
||||
});
|
||||
window.open(definitionData.href, '_blank');
|
||||
}
|
||||
});
|
||||
window.open(definitionData.href, '_blank');
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<span v-if="!data.isEdit" class="node-icon">
|
||||
<i class="el-icon-folder"/>
|
||||
</span>
|
||||
<el-tooltip class="item" effect="dark" :content="data.name" placement="top-start" open-delay="1000">
|
||||
<el-tooltip class="item" effect="dark" :content="data.name" placement="top-start" :open-delay="1000">
|
||||
<span v-if="!data.isEdit" class="node-title" v-text="data.name"/>
|
||||
</el-tooltip>
|
||||
|
||||
|
|
Loading…
Reference in New Issue