Update Keluhan and Gangguan components

This commit is contained in:
Dede Fuji Abdul
2024-03-30 15:34:15 +07:00
parent 2b98887972
commit b69d2024fe
6 changed files with 105 additions and 25 deletions

View File

@ -69,6 +69,7 @@
css-class="custom-table-column"
cell-template="formatText"
:group-index="0"
v-if="filters?.uid ? filters?.uid.id == 0 : 0"
/>
<DxColumn
:width="150"
@ -77,7 +78,7 @@
caption="Regional"
css-class="custom-table-column"
cell-template="formatText"
:group-index="1"
:group-index="filters?.uid.id != 0 ? 0 : 1"
/>
<DxColumn
:width="150"
@ -86,7 +87,7 @@
caption="UID"
css-class="custom-table-column"
cell-template="formatText"
:group-index="2"
:group-index="filters?.uid.id != 0 ? 0 : 2"
/>
<DxColumn
:width="150"
@ -95,7 +96,7 @@
caption="UP3"
css-class="custom-table-column"
cell-template="formatText"
:group-index="3"
:group-index="filters?.uid.id != 0 ? 0 : 3"
/>
<!-- <DxColumn
:width="150"
@ -1108,6 +1109,21 @@ const reportMeta = ref({
periode: ''
})
const getDataRowGroup = (data: any): any => {
if (data.items) {
if (Array.isArray(data.items)) {
return getDataRowGroup(data.items)
} else {
if (data.items.collapsedItems) {
}
}
} else if (data.collapsedItems) {
return {}
} else {
return {}
}
}
const onCellClicked = (e: any) => {
console.log('cell clicked', e)
// console.log('group cell clicked', e.column.caption)
@ -1116,6 +1132,8 @@ const onCellClicked = (e: any) => {
groupDialog.value = true
groupIndex.value = e.row.groupIndex
setAgreementDialog(e.column.caption)
const data = getDataRowGroup(e.data)
console.log('data', data)
if (e.row.groupIndex == 0) {
//
} else if (e.row.groupIndex == 1) {