From cbb7e0e0c416781e13a41e80058d96cd928860a9 Mon Sep 17 00:00:00 2001 From: Dede Fuji Abdul Date: Wed, 8 Nov 2023 13:29:23 +0700 Subject: [PATCH] Refactor code to improve performance and readability. --- src/components/Pages/Gangguan/Table_11.vue | 276 ++++++++++++++++++--- 1 file changed, 236 insertions(+), 40 deletions(-) diff --git a/src/components/Pages/Gangguan/Table_11.vue b/src/components/Pages/Gangguan/Table_11.vue index 7851893..765c412 100644 --- a/src/components/Pages/Gangguan/Table_11.vue +++ b/src/components/Pages/Gangguan/Table_11.vue @@ -1,9 +1,9 @@ @@ -74,7 +150,7 @@ import { onMounted } from 'vue' import { useFiltersStore } from '@/stores/filters' import { DxDataGrid } from 'devextreme-vue' -import { DxColumn, DxColumnFixing, DxExport, DxLoadPanel, DxPaging, DxScrolling, DxSearchPanel, DxSelection } from 'devextreme-vue/data-grid' +import { DxColumn, DxColumnFixing, DxExport, DxGroupItem, DxLoadPanel, DxPaging, DxScrolling, DxSearchPanel, DxSelection, DxSummary, DxTotalItem } from 'devextreme-vue/data-grid' import { jsPDF } from 'jspdf' import { exportDataGrid as exportToPdf } from 'devextreme/pdf_exporter' import { exportDataGrid as exportToExcel } from 'devextreme/excel_exporter' @@ -115,6 +191,126 @@ const onSelectionChanged = ({ selectedRowsData }: any) => { console.log(data) } +const data = [ + { + no: 1, + posko: 'POSKO CONDET', + laporan: { + total: 10, + sudahSelesai: { + jml: 5, + persen: 50, + }, + belumSelesai: { + jml: 5, + persen: 50, + }, + }, + responseTime: { + menit: { + total: 10, + rataRata: 10, + max: 10, + min: 10, + }, + laporan: { + lebihSla: 5, + kurangSla: 5, + }, + }, + recoveryTime: { + menit: { + total: 10, + rataRata: 10, + max: 10, + min: 10, + }, + laporan: { + lebihSla: 5, + kurangSla: 5, + }, + } + }, + { + no: 2, + posko: 'POSKO CONDET', + laporan: { + total: 10, + sudahSelesai: { + jml: 5, + persen: 50, + }, + belumSelesai: { + jml: 5, + persen: 50, + }, + }, + responseTime: { + menit: { + total: 10, + rataRata: 10, + max: 10, + min: 10, + }, + laporan: { + lebihSla: 5, + kurangSla: 5, + }, + }, + recoveryTime: { + menit: { + total: 10, + rataRata: 10, + max: 10, + min: 10, + }, + laporan: { + lebihSla: 5, + kurangSla: 5, + }, + } + }, + { + no: 3, + posko: 'POSKO ANGKREK', + laporan: { + total: 10, + sudahSelesai: { + jml: 5, + persen: 50, + }, + belumSelesai: { + jml: 5, + persen: 50, + }, + }, + responseTime: { + menit: { + total: 10, + rataRata: 10, + max: 10, + min: 10, + }, + laporan: { + lebihSla: 5, + kurangSla: 5, + }, + }, + recoveryTime: { + menit: { + total: 10, + rataRata: 10, + max: 10, + min: 10, + }, + laporan: { + lebihSla: 5, + kurangSla: 5, + }, + } + }, +] + onMounted(() => { const filters = useFiltersStore()