fix_接口定义_卡片跳转
This commit is contained in:
parent
bddf0568eb
commit
a74e9adcbc
|
@ -717,8 +717,9 @@
|
|||
<select id="scenarioList" resultType="io.metersphere.api.dto.scenario.Scenario">
|
||||
select DISTINCT t1.id
|
||||
from api_scenario t1
|
||||
join api_scenario_reference_id t2 on t1.id = t2.api_scenario_id
|
||||
join api_test_case t3 on t2.reference_id = t3.id and t2.reference_type = 'REF'
|
||||
join api_scenario_reference_id t2 on t1.id = t2.api_scenario_id and t1.`status` !='Trash'
|
||||
join api_test_case t3
|
||||
on t2.reference_id = t3.id and t2.reference_type = 'REF'
|
||||
where t3.api_definition_id = #{apiDefinitionId}
|
||||
and t3.`status`!='Trash'
|
||||
</select>
|
||||
|
|
|
@ -383,6 +383,7 @@ export default {
|
|||
});
|
||||
},
|
||||
'$route'(to, from) { // 路由改变时,把接口定义界面中的 ctrl s 保存快捷键监听移除
|
||||
window.location.reload();
|
||||
if (to.path.indexOf('/api/definition') === -1) {
|
||||
if (this.$refs && this.$refs.apiConfig) {
|
||||
this.$refs.apiConfig.forEach(item => {
|
||||
|
@ -390,7 +391,7 @@ export default {
|
|||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getEnv();
|
||||
|
|
|
@ -4,19 +4,21 @@
|
|||
<el-table-column prop="num" :label="$t('api_test.home_page.new_case_list.table_coloum.index')" width="100"
|
||||
show-overflow-tooltip>
|
||||
<template v-slot:default="{row}">
|
||||
<el-link type="num" @click="redirect(row.apiType,row.num)">
|
||||
<span type="num" @click="redirect(row.apiType,row.id)">
|
||||
{{ row.num }}
|
||||
</el-link>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" :label="$t('api_test.home_page.new_case_list.table_coloum.api_name')" width="150">
|
||||
<el-table-column prop="name" :label="$t('api_test.home_page.new_case_list.table_coloum.api_name')"
|
||||
show-overflow-tooltip width="170">
|
||||
<template v-slot:default="{row}">
|
||||
<el-link type="name" @click="redirect(row.apiType,row.name)">
|
||||
<span type="name" @click="redirect(row.apiType,row.id)">
|
||||
{{ row.name }}
|
||||
</el-link>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="path" :label="$t('api_test.home_page.new_case_list.table_coloum.path')" width="150">
|
||||
<el-table-column prop="path" :label="$t('api_test.home_page.new_case_list.table_coloum.path')" width="170"
|
||||
show-overflow-tooltip>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" :label="$t('api_test.home_page.new_case_list.table_coloum.api_status')">
|
||||
|
@ -32,7 +34,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="caseTotal" :label="$t('api_test.home_page.new_case_list.table_coloum.relation_case')"
|
||||
width="150">
|
||||
width="100">
|
||||
<template v-slot:default="{row}">
|
||||
<el-link type="info" @click="redirect(row.caseType,row.id)">
|
||||
{{ row.caseTotal }}
|
||||
|
@ -40,7 +42,8 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="scenarioTotal"
|
||||
:label="$t('api_test.home_page.new_case_list.table_coloum.relation_scenario')">
|
||||
:label="$t('api_test.home_page.new_case_list.table_coloum.relation_scenario')"
|
||||
width="100">
|
||||
<template v-slot:default="{row}">
|
||||
<el-link type="info" @click="redirect(row.scenarioType,row.ids)">
|
||||
{{ row.scenarioTotal }}
|
||||
|
@ -196,7 +199,7 @@ export default {
|
|||
redirect(pageType, param) {
|
||||
switch (pageType) {
|
||||
case "api":
|
||||
this.$emit('redirectPage', 'api', 'api', 'apiList:' + param);
|
||||
this.$router.push('/api/definition?resourceId=' + param)
|
||||
break;
|
||||
case "apiCase":
|
||||
this.$emit('redirectPage', 'api', 'apiTestCase', 'singleList:' + param);
|
||||
|
|
Loading…
Reference in New Issue