Skip to content

Commit ad9a15c

Browse files
committed
remove right panel if no operationid selected
1 parent 24ca25c commit ad9a15c

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

src/views/BodyView.vue

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ import SearchNav from '../components/SearchNav.vue'
3030
import Menu from '../components/Menu.vue'
3131
import AutoLogout from '../components/AutoLogout.vue'
3232
import ChatWidget from '../components/ChatWidget.vue'
33-
import { onMounted, ref } from 'vue'
33+
import { onMounted, ref, computed } from 'vue'
3434
import { getCurrentUser } from '../obp'
35+
import { useRoute } from 'vue-router'
3536
37+
const route = useRoute()
3638
const isLoggedIn = ref(false);
3739
3840
onMounted(async () => {
@@ -41,13 +43,16 @@ onMounted(async () => {
4143
isLoggedIn.value = currentResponseKeys.includes('username')
4244
})
4345
46+
const hasOperationId = computed(() => {
47+
return !!route.query.operationid
48+
})
4449
4550
const isChatbotEnabled = import.meta.env.VITE_CHATBOT_ENABLED === 'true'
4651
</script>
4752

4853
<template>
4954

50-
<AutoLogout v-if=isLoggedIn />
55+
<AutoLogout v-if=isLoggedIn />
5156
<el-container class="root">
5257
<el-aside class="search-nav" width="20%">
5358
<!--Left-->
@@ -62,10 +67,10 @@ const isChatbotEnabled = import.meta.env.VITE_CHATBOT_ENABLED === 'true'
6267
<Menu />
6368
</el-header>
6469
<el-container class="middle">
65-
<el-aside class="summary" width="50%">
70+
<el-aside class="summary" :width="hasOperationId ? '50%' : '100%'">
6671
<RouterView name="body" />
6772
</el-aside>
68-
<el-main class="preview">
73+
<el-main v-if="hasOperationId" class="preview">
6974
<!--right -->
7075
<RouterView class="preview" name="preview" />
7176
</el-main>

0 commit comments

Comments
 (0)