Skip to content

Commit

Permalink
fix: Height Table Report (PanJiaChen#2656)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricargame authored Sep 19, 2024
1 parent b780ec3 commit 84749af
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
7 changes: 7 additions & 0 deletions src/components/ADempiere/Report/Data/DataReport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,13 @@ export default defineComponent({
if (isEmptyValue(rowCells)) return []
return rowCells
})
const tableHeight = computed(() => {
return store.getters.getIsActiateCollapse
})
const height = computed(() => {
if (tableHeight.value === '1') {
return 'calc(100vh - 460px)'
}
if (store.getters.device !== 'mobile') {
return 'calc(100vh - 295px)'
}
Expand Down Expand Up @@ -452,6 +458,7 @@ export default defineComponent({
isLoadingReport,
currentPageSize,
currentPageNumber,
tableHeight,
getColumnStyle,
// Methods
keyAction,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</b>
</div>

<el-collapse v-model="activeCollapse">
<el-collapse @change="activeCollapse">
<el-collapse-item name="1">
<template slot="title">
<b style="font-size: 18px">
Expand Down Expand Up @@ -266,7 +266,7 @@ export default defineComponent({
const reportAsViewValue = ref(undefined)
const reportAsPrintFormatValue = ref(undefined)
const reportTypeFormatValue = ref('')
const activeCollapse = ref(['1', '2'])
// const activeCollapse = ref(['1', '2'])
const isSummaryReport = ref(true)

/**
Expand All @@ -280,6 +280,9 @@ export default defineComponent({
* @containerManagerReportViwer - Container Manager the Report Viwer
* @componentRender - Import the Panel Definitions component
*/
function activeCollapse({ 0: data }) {
store.commit('setActivateCollapse', data)
}
const reportAsView = computed(() => {
const options = store.getters.getStoredActionsMenu({
containerUuid: props.containerUuid
Expand Down
9 changes: 8 additions & 1 deletion src/store/modules/ADempiere/reportManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,16 @@ const initState = {
exportReport: {},
contactSend: '',
typeNotify: '',
defaultBody: ''
defaultBody: '',
activateCollapse: 0
}
const reportManager = {
state: initState,

mutations: {
setActivateCollapse(state, activateCollapse) {
state.activateCollapse = activateCollapse
},
setContactSend(state, contactSend) {
state.contactSend = contactSend
},
Expand Down Expand Up @@ -1003,6 +1007,9 @@ const reportManager = {
},
getDefaultBody: (state) => {
return state.defaultBody
},
getIsActiateCollapse: (state) => {
return state.activateCollapse
}
}
}
Expand Down

0 comments on commit 84749af

Please sign in to comment.