Merge branch 'dev-defuj' of https://github.com/defuj/eis into dev-randy
This commit is contained in:
commit
0ca4793c79
@ -34,8 +34,7 @@
|
|||||||
:show-indicator="showIndicator"
|
:show-indicator="showIndicator"
|
||||||
:show-pane="showPane"
|
:show-pane="showPane"
|
||||||
:shading="shading"
|
:shading="shading"
|
||||||
v-if="loading"
|
v-model:visible="loadingData"
|
||||||
v-model:visible="loading"
|
|
||||||
:enabled="true"
|
:enabled="true"
|
||||||
/>
|
/>
|
||||||
<DxSearchPanel :visible="true" :highlight-case-sensitive="true" />
|
<DxSearchPanel :visible="true" :highlight-case-sensitive="true" />
|
||||||
@ -568,7 +567,7 @@
|
|||||||
<DxColumn
|
<DxColumn
|
||||||
:width="150"
|
:width="150"
|
||||||
alignment="center"
|
alignment="center"
|
||||||
data-field=""
|
data-field="no_laporan"
|
||||||
caption="No Laporan"
|
caption="No Laporan"
|
||||||
css-class="custom-table-column"
|
css-class="custom-table-column"
|
||||||
cell-template="formatText"
|
cell-template="formatText"
|
||||||
@ -576,7 +575,7 @@
|
|||||||
<DxColumn
|
<DxColumn
|
||||||
:width="150"
|
:width="150"
|
||||||
alignment="center"
|
alignment="center"
|
||||||
data-field=""
|
data-field="waktu_lapor"
|
||||||
caption="Tgl Lapor"
|
caption="Tgl Lapor"
|
||||||
css-class="custom-table-column"
|
css-class="custom-table-column"
|
||||||
cell-template="formatText"
|
cell-template="formatText"
|
||||||
@ -584,7 +583,7 @@
|
|||||||
<DxColumn
|
<DxColumn
|
||||||
:width="150"
|
:width="150"
|
||||||
alignment="center"
|
alignment="center"
|
||||||
data-field=""
|
data-field="waktu_response"
|
||||||
caption="Tgl Datang"
|
caption="Tgl Datang"
|
||||||
css-class="custom-table-column"
|
css-class="custom-table-column"
|
||||||
cell-template="formatText"
|
cell-template="formatText"
|
||||||
@ -592,7 +591,7 @@
|
|||||||
<DxColumn
|
<DxColumn
|
||||||
:width="150"
|
:width="150"
|
||||||
alignment="center"
|
alignment="center"
|
||||||
data-field=""
|
data-field="waktu_recovery"
|
||||||
caption="Tgl Nyala"
|
caption="Tgl Nyala"
|
||||||
css-class="custom-table-column"
|
css-class="custom-table-column"
|
||||||
cell-template="formatText"
|
cell-template="formatText"
|
||||||
@ -600,7 +599,7 @@
|
|||||||
<DxColumn
|
<DxColumn
|
||||||
:width="150"
|
:width="150"
|
||||||
alignment="center"
|
alignment="center"
|
||||||
data-field=""
|
data-field="durasi_response_time"
|
||||||
caption="Durasi Response Time"
|
caption="Durasi Response Time"
|
||||||
css-class="custom-table-column"
|
css-class="custom-table-column"
|
||||||
cell-template="formatTime"
|
cell-template="formatTime"
|
||||||
@ -608,7 +607,7 @@
|
|||||||
<DxColumn
|
<DxColumn
|
||||||
:width="150"
|
:width="150"
|
||||||
alignment="center"
|
alignment="center"
|
||||||
data-field=""
|
data-field="durasi_recovery_time"
|
||||||
caption="Durasi Recovery Time"
|
caption="Durasi Recovery Time"
|
||||||
css-class="custom-table-column"
|
css-class="custom-table-column"
|
||||||
cell-template="formatTime"
|
cell-template="formatTime"
|
||||||
@ -616,7 +615,7 @@
|
|||||||
<DxColumn
|
<DxColumn
|
||||||
:width="150"
|
:width="150"
|
||||||
alignment="center"
|
alignment="center"
|
||||||
data-field=""
|
data-field="status_akhir"
|
||||||
caption="Status"
|
caption="Status"
|
||||||
css-class="custom-table-column"
|
css-class="custom-table-column"
|
||||||
cell-template="formatText"
|
cell-template="formatText"
|
||||||
@ -624,7 +623,7 @@
|
|||||||
<DxColumn
|
<DxColumn
|
||||||
:width="150"
|
:width="150"
|
||||||
alignment="center"
|
alignment="center"
|
||||||
data-field=""
|
data-field="referensi_marking"
|
||||||
caption="Referensi Marking"
|
caption="Referensi Marking"
|
||||||
css-class="custom-table-column"
|
css-class="custom-table-column"
|
||||||
cell-template="formatText"
|
cell-template="formatText"
|
||||||
@ -632,7 +631,7 @@
|
|||||||
<DxColumn
|
<DxColumn
|
||||||
:width="150"
|
:width="150"
|
||||||
alignment="center"
|
alignment="center"
|
||||||
data-field=""
|
data-field="idpel_nometer"
|
||||||
caption="IDPEL/NO METER"
|
caption="IDPEL/NO METER"
|
||||||
css-class="custom-table-column"
|
css-class="custom-table-column"
|
||||||
cell-template="formatText"
|
cell-template="formatText"
|
||||||
@ -640,7 +639,7 @@
|
|||||||
<DxColumn
|
<DxColumn
|
||||||
:width="150"
|
:width="150"
|
||||||
alignment="center"
|
alignment="center"
|
||||||
data-field=""
|
data-field="nama_pelapor"
|
||||||
caption="Nama Pelapor"
|
caption="Nama Pelapor"
|
||||||
css-class="custom-table-column"
|
css-class="custom-table-column"
|
||||||
cell-template="formatText"
|
cell-template="formatText"
|
||||||
@ -648,7 +647,7 @@
|
|||||||
<DxColumn
|
<DxColumn
|
||||||
:width="150"
|
:width="150"
|
||||||
alignment="center"
|
alignment="center"
|
||||||
data-field=""
|
data-field="alamat_pelapor"
|
||||||
caption="Alamat Pelapor"
|
caption="Alamat Pelapor"
|
||||||
css-class="custom-table-column"
|
css-class="custom-table-column"
|
||||||
cell-template="formatText"
|
cell-template="formatText"
|
||||||
@ -656,7 +655,7 @@
|
|||||||
<DxColumn
|
<DxColumn
|
||||||
:width="150"
|
:width="150"
|
||||||
alignment="center"
|
alignment="center"
|
||||||
data-field=""
|
data-field="no_telp_pelapor"
|
||||||
caption="No Telp Pelapor"
|
caption="No Telp Pelapor"
|
||||||
css-class="custom-table-column"
|
css-class="custom-table-column"
|
||||||
cell-template="formatText"
|
cell-template="formatText"
|
||||||
@ -664,7 +663,7 @@
|
|||||||
<DxColumn
|
<DxColumn
|
||||||
:width="200"
|
:width="200"
|
||||||
alignment="center"
|
alignment="center"
|
||||||
data-field=""
|
data-field="keterangan_pelapor"
|
||||||
caption="Keterangan Pelapor"
|
caption="Keterangan Pelapor"
|
||||||
css-class="custom-table-column"
|
css-class="custom-table-column"
|
||||||
cell-template="formatText"
|
cell-template="formatText"
|
||||||
@ -672,7 +671,7 @@
|
|||||||
<DxColumn
|
<DxColumn
|
||||||
:width="150"
|
:width="150"
|
||||||
alignment="center"
|
alignment="center"
|
||||||
data-field=""
|
data-field="nama_posko"
|
||||||
caption="Posko"
|
caption="Posko"
|
||||||
css-class="custom-table-column"
|
css-class="custom-table-column"
|
||||||
cell-template="formatText"
|
cell-template="formatText"
|
||||||
@ -680,15 +679,15 @@
|
|||||||
<DxColumn
|
<DxColumn
|
||||||
:width="150"
|
:width="150"
|
||||||
alignment="center"
|
alignment="center"
|
||||||
data-field=""
|
data-field="tindakan"
|
||||||
caption="Tindakan"
|
caption="Tidakan"
|
||||||
css-class="custom-table-column"
|
css-class="custom-table-column"
|
||||||
cell-template="formatText"
|
cell-template="formatText"
|
||||||
/>
|
/>
|
||||||
<DxColumn
|
<DxColumn
|
||||||
:width="150"
|
:width="150"
|
||||||
alignment="center"
|
alignment="center"
|
||||||
data-field=""
|
data-field="penyebab"
|
||||||
caption="Penyebab"
|
caption="Penyebab"
|
||||||
css-class="custom-table-column"
|
css-class="custom-table-column"
|
||||||
cell-template="formatText"
|
cell-template="formatText"
|
||||||
@ -718,82 +717,122 @@
|
|||||||
<div class="p-4 space-y-2 bg-white rounded-xl">
|
<div class="p-4 space-y-2 bg-white rounded-xl">
|
||||||
<div class="flex flex-row items-center justify-between w-full">
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
<h3 class="text-sm font-medium w-[135px] text-gray-800">No Laporan:</h3>
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">No Laporan:</h3>
|
||||||
<InputText :readonly="true" value="" class-name="flex-1" />
|
<InputText :readonly="true" :value="dataSubSelected?.no_laporan" class-name="flex-1" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-row items-center justify-between w-full">
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
<h3 class="text-sm font-medium w-[135px] text-gray-800">Tgl Lapor:</h3>
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">Tgl Lapor:</h3>
|
||||||
<InputText :readonly="true" value="" class-name="flex-1" />
|
<InputText :readonly="true" :value="dataSubSelected?.waktu_lapor" class-name="flex-1" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-row items-center justify-between w-full">
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
<h3 class="text-sm font-medium w-[135px] text-gray-800">Tgl Datang:</h3>
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">Tgl Datang:</h3>
|
||||||
<InputText :readonly="true" value="" class-name="flex-1" />
|
<InputText
|
||||||
|
:readonly="true"
|
||||||
|
:value="dataSubSelected?.waktu_response"
|
||||||
|
class-name="flex-1"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-row items-center justify-between w-full">
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
<h3 class="text-sm font-medium w-[135px] text-gray-800">Tgl Nyala:</h3>
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">Tgl Nyala:</h3>
|
||||||
<InputText :readonly="true" value="" class-name="flex-1" />
|
<InputText
|
||||||
|
:readonly="true"
|
||||||
|
:value="dataSubSelected?.waktu_recovery"
|
||||||
|
class-name="flex-1"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-row items-center justify-between w-full">
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
<h3 class="text-sm font-medium w-[135px] text-gray-800">Durasi Response Time:</h3>
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">Durasi Response Time:</h3>
|
||||||
<InputText :readonly="true" value="" class-name="flex-1" />
|
<InputText
|
||||||
|
:readonly="true"
|
||||||
|
:value="
|
||||||
|
parseInt(dataSubSelected?.durasi_response_time)
|
||||||
|
? formatWaktu(dataSubSelected?.durasi_response_time)
|
||||||
|
: '-'
|
||||||
|
"
|
||||||
|
class-name="flex-1"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-row items-center justify-between w-full">
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
<h3 class="text-sm font-medium w-[135px] text-gray-800">Durasi Recovery Time:</h3>
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">Durasi Recovery Time:</h3>
|
||||||
<InputText :readonly="true" value="" class-name="flex-1" />
|
<InputText
|
||||||
|
:readonly="true"
|
||||||
|
:value="
|
||||||
|
parseInt(dataSubSelected?.durasi_recovery_time)
|
||||||
|
? formatWaktu(dataSubSelected?.durasi_recovery_time)
|
||||||
|
: '-'
|
||||||
|
"
|
||||||
|
class-name="flex-1"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-row items-center justify-between w-full">
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
<h3 class="text-sm font-medium w-[135px] text-gray-800">Status:</h3>
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">Status:</h3>
|
||||||
<InputText :readonly="true" value="" class-name="flex-1" />
|
<InputText :readonly="true" :value="dataSubSelected?.status_akhir" class-name="flex-1" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-row items-center justify-between w-full">
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
<h3 class="text-sm font-medium w-[135px] text-gray-800">Referensi Marking:</h3>
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">Referensi Marking:</h3>
|
||||||
<InputText :readonly="true" value="" class-name="flex-1" />
|
<InputText
|
||||||
|
:readonly="true"
|
||||||
|
:value="dataSubSelected?.referensi_marking"
|
||||||
|
class-name="flex-1"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-row items-center justify-between w-full">
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
<h3 class="text-sm font-medium w-[135px] text-gray-800">IDPEL/NO METER:</h3>
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">IDPEL/NO METER:</h3>
|
||||||
<InputText :readonly="true" value="" class-name="flex-1" />
|
<InputText :readonly="true" :value="dataSubSelected?.idpel_nometer" class-name="flex-1" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-row items-center justify-between w-full">
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
<h3 class="text-sm font-medium w-[135px] text-gray-800">Nama Pelapor:</h3>
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">Nama Pelapor:</h3>
|
||||||
<InputText :readonly="true" value="" class-name="flex-1" />
|
<InputText :readonly="true" :value="dataSubSelected?.nama_pelapor" class-name="flex-1" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-row items-center justify-between w-full">
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
<h3 class="text-sm font-medium w-[135px] text-gray-800">Alamat Pelapor:</h3>
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">Alamat Pelapor:</h3>
|
||||||
<InputText :readonly="true" value="" class-name="flex-1" />
|
<InputText
|
||||||
|
:readonly="true"
|
||||||
|
:value="dataSubSelected?.alamat_pelapor"
|
||||||
|
class-name="flex-1"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-row items-center justify-between w-full">
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
<h3 class="text-sm font-medium w-[135px] text-gray-800">No Telp Pelapor:</h3>
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">No Telp Pelapor:</h3>
|
||||||
<InputText :readonly="true" value="" class-name="flex-1" />
|
<InputText
|
||||||
|
:readonly="true"
|
||||||
|
:value="dataSubSelected?.no_telp_pelapor"
|
||||||
|
class-name="flex-1"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-row items-center justify-between w-full">
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
<h3 class="text-sm font-medium w-[135px] text-gray-800">Keterangan Pelapor:</h3>
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">Keterangan Pelapor:</h3>
|
||||||
<InputText :readonly="true" value="" class-name="flex-1" />
|
<InputText
|
||||||
|
:readonly="true"
|
||||||
|
:value="dataSubSelected?.keterangan_pelapor"
|
||||||
|
class-name="flex-1"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-row items-center justify-between w-full">
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
<h3 class="text-sm font-medium w-[135px] text-gray-800">Posko:</h3>
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">Posko:</h3>
|
||||||
<InputText :readonly="true" value="" class-name="flex-1" />
|
<InputText :readonly="true" :value="dataSubSelected?.nama_posko" class-name="flex-1" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-row items-center justify-between w-full">
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
<h3 class="text-sm font-medium w-[135px] text-gray-800">Tindakan:</h3>
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">Tindakan:</h3>
|
||||||
<InputText :readonly="true" value="" class-name="flex-1" />
|
<InputText :readonly="true" :value="dataSubSelected?.tindakan" class-name="flex-1" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-row items-center justify-between w-full">
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
<h3 class="text-sm font-medium w-[135px] text-gray-800">Penyebab:</h3>
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">Penyeban:</h3>
|
||||||
<InputText :readonly="true" value="" class-name="flex-1" />
|
<InputText :readonly="true" :value="dataSubSelected?.penyebab" class-name="flex-1" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -804,7 +843,7 @@
|
|||||||
import Filters from '@/components/Form/Filters.vue'
|
import Filters from '@/components/Form/Filters.vue'
|
||||||
import { formatWaktu } from '@/components/Form/FiltersType/reference'
|
import { formatWaktu } from '@/components/Form/FiltersType/reference'
|
||||||
import Type8 from '@/components/Form/FiltersType/Type8.vue'
|
import Type8 from '@/components/Form/FiltersType/Type8.vue'
|
||||||
import { onMounted, ref } from 'vue'
|
import { onMounted, ref, watch } from 'vue'
|
||||||
import { DxDataGrid } from 'devextreme-vue'
|
import { DxDataGrid } from 'devextreme-vue'
|
||||||
import {
|
import {
|
||||||
DxColumn,
|
DxColumn,
|
||||||
@ -830,7 +869,11 @@ import { queries } from '@/utils/api/api.graphql'
|
|||||||
import { formatNumber, formatPercentage, isNumber } from '@/utils/numbers'
|
import { formatNumber, formatPercentage, isNumber } from '@/utils/numbers'
|
||||||
import DetailDialog from '@/components/Dialogs/DetailDialog.vue'
|
import DetailDialog from '@/components/Dialogs/DetailDialog.vue'
|
||||||
import InputText from '@/components/InputText.vue'
|
import InputText from '@/components/InputText.vue'
|
||||||
|
import { apolloClient } from '@/utils/api/api.graphql'
|
||||||
|
import { provideApolloClient } from '@vue/apollo-composable'
|
||||||
|
|
||||||
|
const client = apolloClient()
|
||||||
|
provideApolloClient(client)
|
||||||
const position = { of: '#data' }
|
const position = { of: '#data' }
|
||||||
const showIndicator = ref(true)
|
const showIndicator = ref(true)
|
||||||
const shading = ref(true)
|
const shading = ref(true)
|
||||||
@ -840,10 +883,55 @@ const dataSub = ref<any[]>([])
|
|||||||
const dataSelected = ref<any>()
|
const dataSelected = ref<any>()
|
||||||
const dataSubSelected = ref<any>()
|
const dataSubSelected = ref<any>()
|
||||||
const dialogDetail = ref(false)
|
const dialogDetail = ref(false)
|
||||||
|
const loadingData = ref(false)
|
||||||
const loadingSubData = ref(false)
|
const loadingSubData = ref(false)
|
||||||
|
|
||||||
|
const getDetail = () => {
|
||||||
|
loadingSubData.value = true
|
||||||
|
const dateValue = filters.value.periode.split(' s/d ')
|
||||||
|
const ref = dataSelected.value
|
||||||
|
|
||||||
|
const query = {
|
||||||
|
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: ref.id_posko,
|
||||||
|
idUid: ref.id_uid,
|
||||||
|
idUp3: ref.id_up3
|
||||||
|
}
|
||||||
|
|
||||||
|
const { onResult, onError, loading, refetch } = useQuery(
|
||||||
|
queries.gangguan.rekap.gangguanAllDetail,
|
||||||
|
query
|
||||||
|
)
|
||||||
|
|
||||||
|
refetch(query)
|
||||||
|
|
||||||
|
onResult((queryResult) => {
|
||||||
|
if (queryResult.data != undefined) {
|
||||||
|
dataSub.value = queryResult.data.detailGangguan
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
onError((error) => {
|
||||||
|
console.log(error)
|
||||||
|
})
|
||||||
|
|
||||||
|
watch(loading, (value) => {
|
||||||
|
loadingSubData.value = value
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const showDetail = () => {
|
const showDetail = () => {
|
||||||
dialogDetail.value = true
|
if (dataSelected.value != null) {
|
||||||
|
dataSub.value = []
|
||||||
|
dataSubSelected.value = null
|
||||||
|
dialogDetail.value = true
|
||||||
|
getDetail()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const closeDialog = () => {
|
const closeDialog = () => {
|
||||||
@ -881,7 +969,7 @@ const onExporting = (e: any) => {
|
|||||||
|
|
||||||
const onDataSelectionChanged = ({ selectedRowsData }: any) => {
|
const onDataSelectionChanged = ({ selectedRowsData }: any) => {
|
||||||
dataSelected.value = selectedRowsData[0]
|
dataSelected.value = selectedRowsData[0]
|
||||||
console.log(data)
|
showDetail()
|
||||||
}
|
}
|
||||||
|
|
||||||
const onDataSubSelectionChanged = ({ selectedRowsData }: any) => {
|
const onDataSubSelectionChanged = ({ selectedRowsData }: any) => {
|
||||||
@ -889,28 +977,25 @@ const onDataSubSelectionChanged = ({ selectedRowsData }: any) => {
|
|||||||
console.log(data)
|
console.log(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
const { onResult, onError, loading, refetch } = useQuery(queries.gangguan.rekap.gangguanPerPosko, {
|
|
||||||
dateFrom: new Date('2023-10-01').toISOString().slice(0, 10),
|
|
||||||
dateTo: new Date('2023-10-01').toISOString().slice(0, 10),
|
|
||||||
posko: 0,
|
|
||||||
idUid: 0,
|
|
||||||
idUp3: 0
|
|
||||||
})
|
|
||||||
|
|
||||||
const filterData = (params: any) => {
|
const filterData = (params: any) => {
|
||||||
const dateValue = params.periode.split(' s/d ')
|
const dateValue = params.periode.split(' s/d ')
|
||||||
const { posko, uid, up3 } = params
|
const { posko, uid, up3 } = params
|
||||||
refetch({
|
|
||||||
dateFrom: dateValue[0]
|
const { onResult, onError, loading, refetch } = useQuery(
|
||||||
? dateValue[0].split('-').reverse().join('-')
|
queries.gangguan.rekap.gangguanPerPosko,
|
||||||
: new Date().toISOString().slice(0, 10),
|
{
|
||||||
dateTo: dateValue[1]
|
dateFrom: dateValue[0]
|
||||||
? dateValue[1].split('-').reverse().join('-')
|
? dateValue[0].split('-').reverse().join('-')
|
||||||
: new Date().toISOString().slice(0, 10),
|
: new Date().toISOString().slice(0, 10),
|
||||||
posko: posko ? posko.id : 0,
|
dateTo: dateValue[1]
|
||||||
idUid: uid ? uid.id : 0,
|
? dateValue[1].split('-').reverse().join('-')
|
||||||
idUp3: up3 ? up3.id : 0
|
: new Date().toISOString().slice(0, 10),
|
||||||
})
|
posko: posko ? posko.id : 0,
|
||||||
|
idUid: uid ? uid.id : 0,
|
||||||
|
idUp3: up3 ? up3.id : 0
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
onResult((queryResult) => {
|
onResult((queryResult) => {
|
||||||
if (queryResult.data != undefined) {
|
if (queryResult.data != undefined) {
|
||||||
data.value = queryResult.data.rekapitulasiGangguanPerPosko.sort((a: any, b: any) =>
|
data.value = queryResult.data.rekapitulasiGangguanPerPosko.sort((a: any, b: any) =>
|
||||||
@ -921,9 +1006,14 @@ const filterData = (params: any) => {
|
|||||||
console.log(queryResult.loading)
|
console.log(queryResult.loading)
|
||||||
console.log(queryResult.networkStatus)
|
console.log(queryResult.networkStatus)
|
||||||
})
|
})
|
||||||
|
|
||||||
onError((error) => {
|
onError((error) => {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
watch(loading, (value) => {
|
||||||
|
loadingData.value = value
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const filters = ref()
|
const filters = ref()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user