Skip to content

Commit 84749af

Browse files
authored
fix: Height Table Report (PanJiaChen#2656)
1 parent b780ec3 commit 84749af

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

src/components/ADempiere/Report/Data/DataReport.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,13 @@ export default defineComponent({
135135
if (isEmptyValue(rowCells)) return []
136136
return rowCells
137137
})
138+
const tableHeight = computed(() => {
139+
return store.getters.getIsActiateCollapse
140+
})
138141
const height = computed(() => {
142+
if (tableHeight.value === '1') {
143+
return 'calc(100vh - 460px)'
144+
}
139145
if (store.getters.device !== 'mobile') {
140146
return 'calc(100vh - 295px)'
141147
}
@@ -452,6 +458,7 @@ export default defineComponent({
452458
isLoadingReport,
453459
currentPageSize,
454460
currentPageNumber,
461+
tableHeight,
455462
getColumnStyle,
456463
// Methods
457464
keyAction,

src/components/ADempiere/ReportManager/Setup/optionsReportViewer.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</b>
2525
</div>
2626

27-
<el-collapse v-model="activeCollapse">
27+
<el-collapse @change="activeCollapse">
2828
<el-collapse-item name="1">
2929
<template slot="title">
3030
<b style="font-size: 18px">
@@ -266,7 +266,7 @@ export default defineComponent({
266266
const reportAsViewValue = ref(undefined)
267267
const reportAsPrintFormatValue = ref(undefined)
268268
const reportTypeFormatValue = ref('')
269-
const activeCollapse = ref(['1', '2'])
269+
// const activeCollapse = ref(['1', '2'])
270270
const isSummaryReport = ref(true)
271271

272272
/**
@@ -280,6 +280,9 @@ export default defineComponent({
280280
* @containerManagerReportViwer - Container Manager the Report Viwer
281281
* @componentRender - Import the Panel Definitions component
282282
*/
283+
function activeCollapse({ 0: data }) {
284+
store.commit('setActivateCollapse', data)
285+
}
283286
const reportAsView = computed(() => {
284287
const options = store.getters.getStoredActionsMenu({
285288
containerUuid: props.containerUuid

src/store/modules/ADempiere/reportManager.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,16 @@ const initState = {
7070
exportReport: {},
7171
contactSend: '',
7272
typeNotify: '',
73-
defaultBody: ''
73+
defaultBody: '',
74+
activateCollapse: 0
7475
}
7576
const reportManager = {
7677
state: initState,
7778

7879
mutations: {
80+
setActivateCollapse(state, activateCollapse) {
81+
state.activateCollapse = activateCollapse
82+
},
7983
setContactSend(state, contactSend) {
8084
state.contactSend = contactSend
8185
},
@@ -1003,6 +1007,9 @@ const reportManager = {
10031007
},
10041008
getDefaultBody: (state) => {
10051009
return state.defaultBody
1010+
},
1011+
getIsActiateCollapse: (state) => {
1012+
return state.activateCollapse
10061013
}
10071014
}
10081015
}

0 commit comments

Comments
 (0)