fix:首页切换

This commit is contained in:
wenyann 2020-12-18 12:58:17 +08:00
parent 3db39fb276
commit 602e500926
3 changed files with 17 additions and 7 deletions

View File

@ -3,7 +3,6 @@ import MsProject from "@/business/components/settings/project/MsProject";
export default {
path: "/api",
name: "api",
redirect: "/api/home",
components: {
content: () => import('@/business/components/api/ApiTest')
},

View File

@ -9,17 +9,17 @@
router>
<el-menu-item index="/track" v-permission="['test_manager','test_user','test_viewer']">
{{$t('test_track.test_track')}}
{{ $t('test_track.test_track') }}
</el-menu-item>
<el-menu-item index="/api" v-permission="['test_manager','test_user','test_viewer']">
{{$t('commons.api')}}
<el-menu-item index="/api" @click="active()" v-permission="['test_manager','test_user','test_viewer']">
{{ $t('commons.api') }}
</el-menu-item>
<el-menu-item index="/performance" onselectstart="return false"
v-permission="['test_manager','test_user','test_viewer']">
{{$t('commons.performance')}}
{{ $t('commons.performance') }}
</el-menu-item>
<el-menu-item index="/setting" onselectstart="return false">
{{$t('commons.system_setting')}}
{{ $t('commons.system_setting') }}
</el-menu-item>
</el-menu>
</template>
@ -47,7 +47,18 @@
},
methods: {
handleSelect(index) {
console.log(index)
this.activeIndex = index
},
active() {
if (this.activeIndex === '/api') {
if (this.$store.state.switch.value == 'new') {
window.location.href = "/#/api/home";
} else if (this.$store.state.switch.value == 'old') {
window.location.href = "/#/api/home_obsolete";
}
}
}
}
}

@ -1 +1 @@
Subproject commit d39dafaf84b9c7a56cb51f2caf67dd7dfde5938c
Subproject commit 010ad7a5f072a5e9d368c756a2473bbd20781433