refactor(测试跟踪): 如果服务不可用,不展示测试计划详情对应的tab
--bug=1047330 --user=陈建星 【测试跟踪】不修改任何配置,默认安装-上传有效证书-新建测试计划,显示UI测试且点击报错 https://www.tapd.cn/55049933/s/1604340
This commit is contained in:
parent
a88a385d80
commit
771024a172
|
@ -12,10 +12,10 @@
|
|||
<template v-slot:menu>
|
||||
<el-menu v-if="isMenuShow" :active-text-color="color" :default-active="activeIndex"
|
||||
class="el-menu-demo header-menu" mode="horizontal" @select="handleSelect">
|
||||
<el-menu-item index="functional">{{ $t('test_track.functional_test_case') }}</el-menu-item>
|
||||
<el-menu-item index="api" v-modules="['api']">{{ $t('test_track.api_test_case') }}</el-menu-item>
|
||||
<el-menu-item index="ui" v-modules="['ui']" v-if="hasLicense()">{{ $t('test_track.ui_test_case') }}</el-menu-item>
|
||||
<el-menu-item index="load" v-modules="['performance']">{{
|
||||
<el-menu-item v-if="microServiceActivated('track')" index="functional">{{ $t('test_track.functional_test_case') }}</el-menu-item>
|
||||
<el-menu-item v-if="microServiceActivated('api')" index="api" v-modules="['api']">{{ $t('test_track.api_test_case') }}</el-menu-item>
|
||||
<el-menu-item v-if="microServiceActivated('ui') && hasLicense()" index="ui" v-modules="['ui']">{{ $t('test_track.ui_test_case') }}</el-menu-item>
|
||||
<el-menu-item v-if="microServiceActivated('performance')" index="load" v-modules="['performance']">{{
|
||||
$t('test_track.performance_test_case')
|
||||
}}
|
||||
</el-menu-item>
|
||||
|
@ -113,7 +113,8 @@ export default {
|
|||
clickType: '',
|
||||
tmpActiveIndex: '',
|
||||
versionEnable: false,
|
||||
projectId: null
|
||||
projectId: null,
|
||||
microApp: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
@ -168,6 +169,7 @@ export default {
|
|||
}
|
||||
this.$EventBus.$on('projectChange', this.handleProjectChange);
|
||||
this.checkVersionEnable();
|
||||
this.microApp = JSON.parse(sessionStorage.getItem("micro_apps"));
|
||||
},
|
||||
destroyed() {
|
||||
this.$EventBus.$off('projectChange', this.handleProjectChange);
|
||||
|
@ -179,6 +181,9 @@ export default {
|
|||
this.genRedirectParam();
|
||||
},
|
||||
methods: {
|
||||
microServiceActivated(serviceName) {
|
||||
return this.microApp && this.microApp[serviceName];
|
||||
},
|
||||
handleProjectChange() {
|
||||
if (this.$route.path.indexOf("plan/view") > -1) {
|
||||
this.$nextTick(() => {
|
||||
|
|
Loading…
Reference in New Issue