Daftar Keluhan Pelanggan Lebih Dari 1 Kali

This commit is contained in:
Eko Haryadi
2024-02-23 14:59:20 +07:00
parent 0afde50462
commit 5bae24d35b
19 changed files with 164 additions and 158 deletions

View File

@@ -12,10 +12,10 @@
:allow-column-resizing="true" column-resizing-mode="widget" :word-wrap-enabled="true">
<DxSelection mode="single" />
<DxPaging :page-size="5" :enabled="true" />
<DxPager :visible="true" :allowed-page-sizes="[5, 10, 20]" display-mode="full"
:show-page-size-selector="true" :show-info="true" :show-navigation-buttons="true" />
<DxLoadPanel :position="position" :show-indicator="showIndicator" :show-pane="showPane" :shading="shading"
v-if="loading" v-model:visible="loading" :enabled="true" />
<DxPager :visible="true" :allowed-page-sizes="[5, 10, 20]" display-mode="full" :show-page-size-selector="true"
:show-info="true" :show-navigation-buttons="true" />
<DxLoadPanel :position="position" :show-indicator="showIndicator" :show-pane="showPane" :shading="shading"
v-if="loading" v-model:visible="loading" :enabled="true" />
<DxSearchPanel :visible="true" :highlight-case-sensitive="true" />
<DxExport :enabled="true" :formats="['pdf', 'xlsx', 'document']" :allow-export-selected-data="false" />
<DxColumnFixing :enabled="true" />
@@ -38,7 +38,7 @@
css-class="custom-table-column" />
<DxColumn :width="170" alignment="center" data-field="durasi_recovery_time" caption="Durasi Recovery Time"
css-class="custom-table-column" />
<DxColumn :width="170" alignment="center" data-field="posko_asal" caption="Unit Asal"
<DxColumn :width="170" alignment="center" data-field="nama_unit_lama" caption="Unit Asal"
css-class="custom-table-column" />
<DxColumn :width="120" alignment="center" data-field="status_akhir" caption="Status"
css-class="custom-table-column" />
@@ -60,7 +60,6 @@
import Filters from '@/components/Form/Filters.vue'
import Type3 from '@/components/Form/FiltersType/Type3.vue'
import { onMounted, ref } from 'vue'
import { useFiltersStore } from '@/stores/filters'
import { DxDataGrid } from 'devextreme-vue'
import {
DxColumn,
@@ -119,46 +118,47 @@ const onSelectionChanged = ({ selectedRowsData }: any) => {
}
const data = ref<any[]>([])
const GET_DAFTAR_KELUHAN_DIPINDAHKAN_KE_POSKO_LAIN = gql`
query daftarKeluhanDipindahkanKePoskoLain(
const GET_DAFTAR_KELUHAN_DIPINDAHKAN_KE_idUlp_LAIN = gql`
query daftarKeluhanDialihkanKeUnitLain(
$dateFrom: Date!
$dateTo: Date!
$posko: Int!
$idUlp: Int!
$idUid: Int!
$idUp3: Int!
) {
daftarKeluhanDipindahkanKePoskoLain(
daftarKeluhanDialihkanKeUnitLain(
dateFrom: $dateFrom
dateTo: $dateTo
posko: $posko
idUlp: $idUlp
idUid: $idUid
idUp3: $idUp3
) {
alamat_pelapor
durasi_recovery_time
durasi_response_time
id_keluhan
id_uid
id_up3
idpel_nometer
keterangan_pelapor
media
nama_pelapor
no_laporan
no_telp_pelapor
posko_asal
posko_tujuan
status_akhir
waktu_dialihkan
waktu_recovery
waktu_response
alamat_pelapor
durasi_recovery_time
durasi_response_time
id_unit_baru
id_unit_lama
idpel_nometer
keterangan_pelapor
media
nama_pelapor
nama_unit_baru
nama_unit_lama
no_laporan
no_telp_pelapor
pembuat_laporan
status_akhir
waktu_dialihkan
waktu_lapor
waktu_recovery
waktu_response
}
}
`
const { onResult, onError, loading, refetch } = useQuery(GET_DAFTAR_KELUHAN_DIPINDAHKAN_KE_POSKO_LAIN, {
const { onResult, onError, loading, refetch } = useQuery(GET_DAFTAR_KELUHAN_DIPINDAHKAN_KE_idUlp_LAIN, {
dateFrom: new Date('2023-10-01').toISOString().slice(0, 10),
dateTo: new Date('2023-10-01').toISOString().slice(0, 10),
posko: '',
idUlp: 0,
idUid: 0,
idUp3: 0
})
@@ -166,16 +166,17 @@ const { onResult, onError, loading, refetch } = useQuery(GET_DAFTAR_KELUHAN_DIPI
const filterData = (params: any) => {
const dateValue = params.periode.split(' s/d ')
const { posko, uid, up3 } = params
const { ulp, uid, up3 } = params
refetch({
dateFrom: dateValue[0] ? dateValue[0].split('-').reverse().join('-') : new Date().toISOString().slice(0, 10),
dateTo: dateValue[1] ? dateValue[1].split('-').reverse().join('-') : new Date().toISOString().slice(0, 10),
posko: posko ? posko.id : "",
idUid: uid ? uid.id :0,
idUp3: up3? up3.id:0})
idUlp: ulp ? ulp.id : 0,
idUid: uid ? uid.id : 0,
idUp3: up3 ? up3.id : 0
})
onResult((queryResult) => {
if (queryResult.data != undefined) {
data.value = queryResult.data.daftarKeluhanDipindahkanKePoskoLain
data.value = queryResult.data.daftarKeluhanDialihkanKeUnitLain
}
console.log(queryResult.data)
console.log(queryResult.loading)