1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-10 20:39:48 +08:00

Hide and show context information (#471)

* Hide and show context information

* default value true

* rename variable

* rename variable
This commit is contained in:
elsiosanchez 2020-04-29 17:11:31 -04:00 committed by GitHub
parent b45619fa74
commit 983d3642c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 52 additions and 7 deletions

View File

@ -249,7 +249,8 @@ export default {
theme: 'Theme Color',
tagsView: 'Open Tags-View',
fixedHeader: 'Fixed Header',
sidebarLogo: 'Sidebar Logo'
sidebarLogo: 'Sidebar Logo',
showContextMenu: 'Show Context Information'
},
profile: {
aboutMe: 'About Me',

View File

@ -224,7 +224,8 @@ export default {
theme: 'Color del tema',
tagsView: 'Habilitar Tags-View',
fixedHeader: 'Encabezado fijo',
sidebarLogo: 'Logotipo de la barra lateral'
sidebarLogo: 'Logotipo de la barra lateral',
showContextMenu: 'Mostrar Menu de Contexto'
},
profile: {
aboutMe: 'Sobre Mi',

View File

@ -13,6 +13,11 @@
<el-switch v-model="tagsView" class="drawer-switch" />
</div>
<div class="drawer-item">
<span>{{ $t('settings.showContextMenu') }}</span>
<el-switch v-model="showContextMenu" class="drawer-switch" />
</div>
<div class="drawer-item">
<span>{{ $t('settings.fixedHeader') }}</span>
<el-switch v-model="fixedHeader" class="drawer-switch" />
@ -58,6 +63,17 @@ export default {
})
}
},
showContextMenu: {
get() {
return this.$store.state.settings.showContextMenu
},
set(val) {
this.$store.dispatch('settings/changeSetting', {
key: 'showContextMenu',
value: val
})
}
},
sidebarLogo: {
get() {
return this.$store.state.settings.sidebarLogo

View File

@ -8,6 +8,7 @@ const state = {
showSettings: showSettings,
tagsView: tagsView,
fixedHeader: fixedHeader,
showContextMenu: true,
sidebarLogo: sidebarLogo
}
@ -31,4 +32,3 @@ export default {
mutations,
actions
}

View File

@ -9,7 +9,9 @@
:container-uuid="browserUuid"
:panel-type="panelType"
/>
<el-header>
<el-header
v-if="ShowInfoContext"
>
<context-menu
:menu-parent-uuid="$route.meta.parentUuid"
:container-uuid="browserUuid"
@ -103,6 +105,9 @@ export default {
}
},
computed: {
ShowInfoContext() {
return this.$store.state.settings.ShowInfoContext
},
getterBrowser() {
return this.$store.getters.getBrowser(this.browserUuid)
},

View File

@ -5,7 +5,10 @@
class="view-base"
style="height: 84vh;"
>
<el-header style="height: 39px;">
<el-header
v-if="ShowInfoContext"
style="height: 39px; background: white;"
>
<context-menu
:menu-parent-uuid="$route.meta.parentUuid"
:container-uuid="formUuid"
@ -79,6 +82,9 @@ export default {
}
},
computed: {
ShowInfoContext() {
return this.$store.state.settings.ShowInfoContext
},
formTitle() {
return this.formMetadata.name || this.$route.meta.title
},

View File

@ -5,7 +5,10 @@
class="view-base"
style="height: 84vh;"
>
<el-header style="height: 39px;">
<el-header
v-if="ShowInfoContext"
style="height: 39px;"
>
<context-menu
:menu-parent-uuid="$route.meta.parentUuid"
:container-uuid="processUuid"
@ -86,6 +89,9 @@ export default {
}
},
computed: {
ShowInfoContext() {
return this.$store.state.settings.ShowInfoContext
},
getterProcess() {
return this.$store.getters.getPanel(this.processUuid)
},

View File

@ -1,6 +1,7 @@
<template>
<div v-if="isLoading" key="report-viewer-loaded" style="min-height: inherit;">
<context-menu
v-if="ShowInfoContext"
:container-uuid="reportResult.processUuid"
:panel-type="panelType"
:is-report="true"
@ -112,6 +113,9 @@ export default {
},
computed: {
// TODO: Add get metadata from server to open report view from link
ShowInfoContext() {
return this.$store.state.settings.ShowInfoContext
},
getterProcess() {
return this.$store.getters.getProcessById(this.$route.params.processId)
},

View File

@ -58,7 +58,10 @@
<resize-observer @notify="handleResize" />
<Split v-shortkey="['f8']" direction="vertical" @onDrag="onDrag" @shortkey.native="handleChangeShowedRecordNavigation(!isShowedRecordNavigation)">
<SplitArea :size="sizeAreaStyle" :style="splitAreaStyle">
<el-header :style="isWorkflowBarStatus ? 'height: 45px; background: #F5F7FA' : 'height: 40px'">
<el-header
v-if="ShowInfoContext"
:style="isWorkflowBarStatus ? 'height: 45px; background: #F5F7FA' : 'height: 40px'"
>
<el-container>
<el-aside width="100%" style="width: 78vw;overflow: hidden;">
<el-scrollbar>
@ -340,6 +343,9 @@ export default {
next()
},
computed: {
ShowInfoContext() {
return this.$store.state.settings.ShowInfoContext
},
defaultPorcentSplitPane() {
if (this.isShowedRecordPanel) {
if (this.isShowedRecordNavigation) {