Daftar Gangguan Dialihkan Ke Posko Lain - Rekapitulasi Gangguan All

(Tabel 1 - Tabel 8)
This commit is contained in:
probdg
2024-01-29 14:14:42 +07:00
parent fcfe012a02
commit e4a6fbb6b8
17 changed files with 850 additions and 7675 deletions

View File

@@ -1,3 +1,4 @@
<!-- Rekapitulasi Gangguan/Jenis Gangguan -->
<template>
<div>
<DxDataGrid class="max-h-[calc(100vh-140px)]" :data-source="data" :show-column-lines="true" :show-row-lines="false"
@@ -7,7 +8,7 @@
<DxSelection mode="single" />
<DxPaging :enabled="false" />
<DxScrolling column-rendering-mode="virtual" mode="virtual" />
<DxLoadPanel :enabled="true" />
<DxLoadPanel v-model:visible.sync="loadingVisible" :enabled="true" />
<DxSearchPanel :visible="true" :highlight-case-sensitive="true" />
<DxExport :enabled="true" :formats="['pdf', 'xlsx', 'document']" :allow-export-selected-data="false" />
<DxColumnFixing :enabled="true" />
@@ -114,7 +115,7 @@
</template>
<script setup lang="ts">
import { onMounted } from 'vue'
import { onMounted, ref } from 'vue'
import { useFiltersStore } from '@/stores/filters'
import { DxDataGrid } from 'devextreme-vue'
import { DxColumn, DxColumnFixing, DxExport, DxGroupItem, DxGroupPanel, DxGrouping, DxLoadPanel, DxPaging, DxScrolling, DxSearchPanel, DxSelection, DxSummary } from 'devextreme-vue/data-grid'
@@ -123,7 +124,45 @@ import { exportDataGrid as exportToPdf } from 'devextreme/pdf_exporter'
import { exportDataGrid as exportToExcel } from 'devextreme/excel_exporter'
import { saveAs } from 'file-saver'
import { Workbook } from 'exceljs'
import gql from 'graphql-tag';
const dataReal = ref<any[]>([])
const GET_DAFTAR_GANGGUAN_RECOVERY_TIME = gql`
query daftarGangguanRecoveryTime(
$dateFrom: Date!
$dateTo: Date!
$minDurasiRecoveryTime: Int!
$maxDurasiRecoveryTime: Int!
$posko: String!
$idUid: Int!
$idUp3: Int!
) {
daftarKeluhanRecoveryTime(
dateFrom: $dateFrom
dateTo: $dateTo
minDurasiRecoveryTime: $minDurasiRecoveryTime
maxDurasiRecoveryTime: $maxDurasiRecoveryTime
posko: $posko
idUid: $idUid
idUp3: $idUp3
) {
alamat_pelapor
durasi_recovery_time
durasi_response_time
id_gangguan
idpel_nometer
keterangan_pelapor
media
nama_pelapor
no_laporan
no_telp_pelapor
posko
status_akhir
waktu_recovery
waktu_response
}
}`;
const loadingVisible = ref<boolean>(true)
const onExporting = (e: any) => {
if (e.format === 'pdf') {
const doc = new jsPDF()