Rekapitulasi Gangguan ALL s/d Diselesaikan Mobile APKT 7- 17
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
<template>
|
||||
<div>
|
||||
<DxDataGrid class="max-h-[calc(100vh-140px)]" :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">
|
||||
<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">
|
||||
<DxSelection mode="single" />
|
||||
<DxPaging :enabled="false" />
|
||||
<DxScrolling column-rendering-mode="virtual" mode="virtual" />
|
||||
@@ -72,8 +73,8 @@ import { exportDataGrid as exportToExcel } from 'devextreme/excel_exporter'
|
||||
import type { Rekap1 } from '@/types/gangguan'
|
||||
import { saveAs } from 'file-saver'
|
||||
import { Workbook } from 'exceljs'
|
||||
|
||||
const data = ref<Rekap1[]>([])
|
||||
import { useQuery } from '@vue/apollo-composable'
|
||||
import gql from 'graphql-tag'
|
||||
|
||||
const onExporting = (e: any) => {
|
||||
if (e.format === 'pdf') {
|
||||
@@ -139,10 +140,67 @@ const onSelectionChanged = ({ selectedRowsData }: any) => {
|
||||
console.log(data)
|
||||
}
|
||||
|
||||
const data = ref<any[]>([])
|
||||
const GET_REKAPITULASI_GANGGUAN_RATING_PER_POSKO = gql`
|
||||
query rekapitulasiGangguanRatingPerPosko
|
||||
(
|
||||
$dateFrom: Date!
|
||||
$dateTo: Date!
|
||||
$posko: String!
|
||||
$idUid: Int!
|
||||
$idUp3: Int!
|
||||
) {
|
||||
rekapitulasiGangguanRatingPerPosko
|
||||
(
|
||||
dateFrom: $dateFrom
|
||||
dateTo: $dateTo
|
||||
posko: $posko
|
||||
idUid: $idUid
|
||||
idUp3: $idUp3
|
||||
) {
|
||||
in_process
|
||||
indeks_rating
|
||||
jumlah_non_rating
|
||||
jumlah_rating
|
||||
nama_posko
|
||||
persen_in_process
|
||||
persen_non_rating
|
||||
persen_rating
|
||||
persen_selesai
|
||||
rating_1
|
||||
rating_2
|
||||
rating_3
|
||||
rating_4
|
||||
rating_5
|
||||
regu
|
||||
selesai
|
||||
total
|
||||
}
|
||||
}`;
|
||||
const loadingVisible = ref<boolean>(true)
|
||||
onMounted(() => {
|
||||
createDummy()
|
||||
|
||||
const filters = useFiltersStore()
|
||||
const { onResult, onError } = useQuery(GET_REKAPITULASI_GANGGUAN_RATING_PER_POSKO, {
|
||||
dateFrom: new Date("2023-10-01").toISOString().slice(0, 10),
|
||||
dateTo: new Date("2023-10-01").toISOString().slice(0, 10),
|
||||
posko: "",
|
||||
idUid: 0,
|
||||
idUp3: 0,
|
||||
})
|
||||
|
||||
onResult(queryResult => {
|
||||
if (queryResult.data != undefined) {
|
||||
data.value = queryResult.data.rekapitulasiGangguanRatingPerPosko
|
||||
;
|
||||
loadingVisible.value = false
|
||||
}
|
||||
console.log(queryResult.data)
|
||||
console.log(queryResult.loading)
|
||||
console.log(queryResult.networkStatus)
|
||||
})
|
||||
onError((error) => {
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
filters.setConfig({
|
||||
type: 'type-1',
|
||||
|
Reference in New Issue
Block a user