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,13 +1,15 @@
<!-- Rekapitulasi Gangguan/Jenis Gangguan SE 004 -->
<template>
<div>
<DxDataGrid class="max-h-[calc(100vh-140px)]" :show-column-lines="true" :show-row-lines="false" :show-borders="true"
<DxDataGrid class="max-h-[calc(100vh-140px)]" :data-source="data" :show-column-lines="true" :show-row-lines="false" :show-borders="true"
:row-alternation-enabled="true" :hover-state-enabled="true" @selection-changed="onSelectionChanged"
:column-width="100" @exporting="onExporting" :allow-column-resizing="true" column-resizing-mode="widget"
:word-wrap-enabled="true">
<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" />
@@ -73,7 +75,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, DxLoadPanel, DxPaging, DxScrolling, DxSearchPanel, DxSelection } from 'devextreme-vue/data-grid'
@@ -82,7 +84,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 data = 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()