Add DxPager component to MonalisaLB_PenurunanJumlahKomplain.vue
This commit is contained in:
parent
375da8c9d5
commit
350a0662e4
@ -278,6 +278,431 @@
|
|||||||
</template>
|
</template>
|
||||||
</DxDataGrid>
|
</DxDataGrid>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<DetailDialog
|
||||||
|
:open="dialogDetail"
|
||||||
|
title="Detail Dispatching Time Gangguan"
|
||||||
|
@on-close="closedialogDetail"
|
||||||
|
:full-width="true"
|
||||||
|
>
|
||||||
|
<div class="w-full mb-4 lg:w-[70%] lg:float-left">
|
||||||
|
<div class="p-4 bg-white rounded-xl lg:mr-4">
|
||||||
|
<DxDataGrid
|
||||||
|
:allow-column-reordering="true"
|
||||||
|
class="max-h-[calc(100vh-140px)]"
|
||||||
|
:data-source="dataSub"
|
||||||
|
:show-column-lines="true"
|
||||||
|
:show-row-lines="false"
|
||||||
|
:show-borders="true"
|
||||||
|
:row-alternation-enabled="true"
|
||||||
|
:hover-state-enabled="true"
|
||||||
|
@selection-changed="onDataSubSelectionChanged"
|
||||||
|
:column-width="100"
|
||||||
|
@exporting="onExportingDetail"
|
||||||
|
:allow-column-resizing="true"
|
||||||
|
column-resizing-mode="widget"
|
||||||
|
>
|
||||||
|
<DxSelection mode="single" />
|
||||||
|
<DxPaging :page-size="20" :enabled="true" />
|
||||||
|
<DxPager
|
||||||
|
:visible="true"
|
||||||
|
:allowed-page-sizes="[20, 50, 100]"
|
||||||
|
display-mode="full"
|
||||||
|
:show-page-size-selector="true"
|
||||||
|
:show-info="true"
|
||||||
|
:show-navigation-buttons="true"
|
||||||
|
/>
|
||||||
|
<DxLoadPanel
|
||||||
|
shading-color="rgba(0,0,0,0.4)"
|
||||||
|
:position="position"
|
||||||
|
:show-indicator="showIndicator"
|
||||||
|
:show-pane="showPane"
|
||||||
|
:shading="shading"
|
||||||
|
v-model:visible="loadingSubData"
|
||||||
|
:enabled="true"
|
||||||
|
/>
|
||||||
|
<DxSearchPanel :visible="true" :highlight-case-sensitive="true" />
|
||||||
|
<DxExport
|
||||||
|
:enabled="true"
|
||||||
|
:formats="['pdf', 'xlsx', 'document']"
|
||||||
|
:allow-export-selected-data="false"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<DxColumn
|
||||||
|
css-class="custom-table-column"
|
||||||
|
:width="50"
|
||||||
|
alignment="center"
|
||||||
|
:calculate-display-value="(item: any) => dataSub.findIndex((i) => i == item) + 1"
|
||||||
|
data-type="number"
|
||||||
|
caption="No"
|
||||||
|
cell-template="formatNumber"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field="nama_ulp"
|
||||||
|
caption="ULP"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field="no_laporan"
|
||||||
|
caption="No Laporan"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field="waktu_lapor"
|
||||||
|
caption="Tgl/Jam Lapor"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field="waktu_response"
|
||||||
|
caption="Tgl/Jam Datang"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field="waktu_recovery"
|
||||||
|
caption="Tgl/Jam Nyala"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field="durasi_response_time"
|
||||||
|
caption="Durasi Response Time"
|
||||||
|
:allow-resizing="false"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatTime"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field="durasi_recovery_time"
|
||||||
|
caption="Durasi Recovery Time"
|
||||||
|
:allow-resizing="false"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatTime"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Durasi Penugasan Regu"
|
||||||
|
:allow-resizing="false"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatTime"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Durasi Perjalanan Regu"
|
||||||
|
:allow-resizing="false"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatTime"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Dispatch Oleh"
|
||||||
|
:allow-resizing="false"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatTime"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field="idpel_nometer"
|
||||||
|
caption="IDPEL/NO METER"
|
||||||
|
:allow-resizing="false"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatTime"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field="nama_pelapor"
|
||||||
|
caption="Nama Pelapor"
|
||||||
|
:allow-resizing="false"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="200"
|
||||||
|
alignment="center"
|
||||||
|
data-field="alamat_pelapor"
|
||||||
|
caption="Alamat Pelapor"
|
||||||
|
:allow-resizing="false"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field="no_telp_pelapor"
|
||||||
|
caption="No Tlp Pelapor"
|
||||||
|
:allow-resizing="false"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="200"
|
||||||
|
alignment="center"
|
||||||
|
data-field="keterangan_pelapor"
|
||||||
|
caption="Keterangan Pelapor"
|
||||||
|
:allow-resizing="false"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="200"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Sumber Lapor"
|
||||||
|
:allow-resizing="false"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="200"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Diselesaikan Oleh"
|
||||||
|
:allow-resizing="false"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field="status_akhir"
|
||||||
|
caption="Status"
|
||||||
|
:allow-resizing="false"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatTime"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="200"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Referensi Marking"
|
||||||
|
:allow-resizing="false"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="200"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Kode Gangguan"
|
||||||
|
:allow-resizing="false"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="200"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Janis Gangguan"
|
||||||
|
:allow-resizing="false"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="200"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Tindakan"
|
||||||
|
:allow-resizing="false"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<template #formatText="{ data }">
|
||||||
|
<p class="text-left cursor-pointer">
|
||||||
|
{{ data.text }}
|
||||||
|
</p>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #formatNumber="{ data }">
|
||||||
|
<p class="text-right cursor-pointer">
|
||||||
|
{{ data.text }}
|
||||||
|
</p>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #formatTime="{ data }">
|
||||||
|
<p class="text-right cursor-pointer">
|
||||||
|
{{ parseInt(data.text) ? formatWaktu(data.text) : '-' }}
|
||||||
|
</p>
|
||||||
|
</template>
|
||||||
|
</DxDataGrid>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="w-full mb-4 lg:w-[30%] lg:float-right">
|
||||||
|
<div class="p-4 space-y-2 bg-white rounded-xl">
|
||||||
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">ULP:</h3>
|
||||||
|
<InputText :readonly="true" :value="dataSubSelected?.nama_ulp" class-name="flex-1" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
<InputText :readonly="true" :value="dataSubSelected?.no_laporan" class-name="flex-1" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">Tgl/Jam Lapor:</h3>
|
||||||
|
<InputText :readonly="true" :value="dataSubSelected?.waktu_lapor" class-name="flex-1" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">Tgl/Jam Datang:</h3>
|
||||||
|
<InputText
|
||||||
|
:readonly="true"
|
||||||
|
:value="dataSubSelected?.waktu_response"
|
||||||
|
class-name="flex-1"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">Tgl/Jam Nyala:</h3>
|
||||||
|
<InputText
|
||||||
|
:readonly="true"
|
||||||
|
:value="dataSubSelected?.waktu_recovery"
|
||||||
|
class-name="flex-1"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
<InputText
|
||||||
|
:readonly="true"
|
||||||
|
:value="
|
||||||
|
parseInt(dataSubSelected?.durasi_response_time)
|
||||||
|
? formatWaktu(dataSubSelected?.durasi_response_time)
|
||||||
|
: '-'
|
||||||
|
"
|
||||||
|
class-name="flex-1"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
<InputText
|
||||||
|
:readonly="true"
|
||||||
|
:value="
|
||||||
|
parseInt(dataSubSelected?.durasi_recovery_time)
|
||||||
|
? formatWaktu(dataSubSelected?.durasi_recovery_time)
|
||||||
|
: '-'
|
||||||
|
"
|
||||||
|
class-name="flex-1"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">Durasi Penugasan Regu:</h3>
|
||||||
|
<InputText :readonly="true" value="" class-name="flex-1" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">Durasi Perjalanan Regu:</h3>
|
||||||
|
<InputText :readonly="true" value="" class-name="flex-1" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">Dispatch Oleh:</h3>
|
||||||
|
<InputText :readonly="true" value="" class-name="flex-1" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
<InputText :readonly="true" :value="dataSubSelected?.idpel_nometer" class-name="flex-1" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
<InputText :readonly="true" :value="dataSubSelected?.nama_pelapor" class-name="flex-1" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
<InputText
|
||||||
|
:readonly="true"
|
||||||
|
type="textarea"
|
||||||
|
:value="dataSubSelected?.alamat_pelapor"
|
||||||
|
class-name="flex-1"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
<InputText
|
||||||
|
:readonly="true"
|
||||||
|
:value="dataSubSelected?.no_telp_pelapor"
|
||||||
|
class-name="flex-1"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
<InputText
|
||||||
|
:readonly="true"
|
||||||
|
:value="dataSubSelected?.keterangan_pelapor"
|
||||||
|
class-name="flex-1"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">Sumber Lapor:</h3>
|
||||||
|
<InputText :readonly="true" value="" class-name="flex-1" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">Diselesaikan Oleh:</h3>
|
||||||
|
<InputText :readonly="true" value="" class-name="flex-1" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">Status:</h3>
|
||||||
|
<InputText :readonly="true" :value="dataSubSelected?.status_akhir" class-name="flex-1" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
<InputText :readonly="true" value="" class-name="flex-1" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">Kode Gangguan:</h3>
|
||||||
|
<InputText :readonly="true" value="" class-name="flex-1" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">Janis Gangguan:</h3>
|
||||||
|
<InputText :readonly="true" value="" class-name="flex-1" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex flex-row items-center justify-between w-full">
|
||||||
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">Tindakan:</h3>
|
||||||
|
<InputText :readonly="true" value="" class-name="flex-1" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</DetailDialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@ -292,6 +717,7 @@ import {
|
|||||||
DxGroupItem,
|
DxGroupItem,
|
||||||
DxGrouping,
|
DxGrouping,
|
||||||
DxLoadPanel,
|
DxLoadPanel,
|
||||||
|
DxPager,
|
||||||
DxPaging,
|
DxPaging,
|
||||||
DxScrolling,
|
DxScrolling,
|
||||||
DxSearchPanel,
|
DxSearchPanel,
|
||||||
@ -310,6 +736,9 @@ import { queries, requestGraphQl } from '@/utils/api/api.graphql'
|
|||||||
import { formatNumber, formatPercentage, isNumber } from '@/utils/numbers'
|
import { formatNumber, formatPercentage, isNumber } from '@/utils/numbers'
|
||||||
import { apolloClient } from '@/utils/api/api.graphql'
|
import { apolloClient } from '@/utils/api/api.graphql'
|
||||||
import { provideApolloClient } from '@vue/apollo-composable'
|
import { provideApolloClient } from '@vue/apollo-composable'
|
||||||
|
import DetailDialog from '@/components/Dialogs/DetailDialog.vue'
|
||||||
|
import { formatWaktu } from '@/components/Form/FiltersType/reference'
|
||||||
|
import InputText from '@/components/InputText.vue'
|
||||||
|
|
||||||
const client = apolloClient()
|
const client = apolloClient()
|
||||||
provideApolloClient(client)
|
provideApolloClient(client)
|
||||||
@ -413,7 +842,13 @@ const getDetail = async () => {
|
|||||||
: new Date().toISOString().slice(0, 10),
|
: new Date().toISOString().slice(0, 10),
|
||||||
idUlp: selected?.id_ulp ? selected?.id_ulp : 0,
|
idUlp: selected?.id_ulp ? selected?.id_ulp : 0,
|
||||||
idUid: selected?.id_uid ? selected?.id_uid : 0,
|
idUid: selected?.id_uid ? selected?.id_uid : 0,
|
||||||
idUp3: selected?.id_up3 ? selected?.id_up3 : 0
|
idUp3: selected?.id_up3 ? selected?.id_up3 : 0,
|
||||||
|
namaRegional: selected?.nama_regional ? selected?.nama_regional : '',
|
||||||
|
media: selected?.media ? selected?.media : '',
|
||||||
|
isSelesai: 0,
|
||||||
|
tanggal: '',
|
||||||
|
namaIssuetype: '',
|
||||||
|
namaSubissuetype: ''
|
||||||
}
|
}
|
||||||
|
|
||||||
loadingSubData.value = true
|
loadingSubData.value = true
|
||||||
@ -456,6 +891,8 @@ const onDataSubSelectionChanged = ({ selectedRowsData }: any) => {
|
|||||||
dataSubSelected.value = data
|
dataSubSelected.value = data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const onExportingDetail = (e: any) => {}
|
||||||
|
|
||||||
const filters = ref()
|
const filters = ref()
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (import.meta.env.DEV) {
|
if (import.meta.env.DEV) {
|
||||||
|
@ -985,7 +985,8 @@ import {
|
|||||||
DxSummary,
|
DxSummary,
|
||||||
DxTotalItem,
|
DxTotalItem,
|
||||||
DxGroupItem,
|
DxGroupItem,
|
||||||
DxGrouping
|
DxGrouping,
|
||||||
|
DxPager
|
||||||
} from 'devextreme-vue/data-grid'
|
} from 'devextreme-vue/data-grid'
|
||||||
import { jsPDF } from 'jspdf'
|
import { jsPDF } from 'jspdf'
|
||||||
import { exportDataGrid as exportToPdf } from 'devextreme/pdf_exporter'
|
import { exportDataGrid as exportToPdf } from 'devextreme/pdf_exporter'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user