Merge branch 'dev-defuj' of github.com:defuj/eis into dev-bagus
This commit is contained in:
@ -3265,6 +3265,10 @@ body {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.\!text-center {
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.\!text-right {
|
||||
text-align: right !important;
|
||||
}
|
||||
@ -5656,8 +5660,8 @@ body {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.sm\:max-w-\[90\%\] {
|
||||
max-width: 90%;
|
||||
.sm\:max-w-full {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.sm\:max-w-lg {
|
||||
|
@ -42,7 +42,7 @@ const handleOnClose = () => {
|
||||
leave-from="opacity-100 translate-y-0 sm:scale-100"
|
||||
leave-to="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95">
|
||||
<DialogPanel
|
||||
:class="[fullWidth ? 'sm:max-w-[90%]' : 'sm:max-w-lg', 'relative overflow-hidden text-left transition-all transform bg-gray-50 rounded-2xl sm:my-8 sm:w-full']">
|
||||
:class="[fullWidth ? 'sm:max-w-full' : 'sm:max-w-lg sm:my-8', 'relative overflow-hidden text-left transition-all transform bg-gray-50 rounded-2xl sm:w-full']">
|
||||
<!-- Body Section -->
|
||||
<div class="px-4 py-4 bg-gray-50">
|
||||
<div class="items-start">
|
||||
|
@ -6,8 +6,8 @@
|
||||
<div id="data">
|
||||
<DxDataGrid class="max-h-[calc(100vh-140px)] mb-10" :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">
|
||||
@selection-changed="onDataSelectionChanged" :column-width="100" @exporting="onExporting"
|
||||
:allow-column-resizing="true" column-resizing-mode="widget" :word-wrap-enabled="false">
|
||||
<DxSelection mode="single" />
|
||||
<DxPaging :enabled="false" />
|
||||
<DxScrolling column-rendering-mode="virtual" mode="virtual" />
|
||||
@ -18,33 +18,374 @@
|
||||
<DxColumnFixing :enabled="true" />
|
||||
|
||||
<DxColumn :width="200" alignment="center" data-field="user_regu" caption="User Regu"
|
||||
css-class="custom-table-column" />
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="200" alignment="center" data-field="personil_yantek" caption="Personil Yantek"
|
||||
css-class="custom-table-column" />
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="200" alignment="center" data-field="jumlah_wo_gangguan_individual" data-type="number"
|
||||
caption="Jumlah WO Gangguan Individual" css-class="custom-table-column" />
|
||||
caption="Jumlah WO Gangguan Individual" css-class="custom-table-column" cell-template="cellRight" />
|
||||
<DxColumn :width="200" alignment="center" data-field="avg_durasi_wo_gangguan_individual" data-type="number"
|
||||
caption="Rata-rata Durasi WO Gangguan" css-class="custom-table-column" />
|
||||
caption="Rata-rata Durasi WO Gangguan" css-class="custom-table-column" cell-template="cellRight" />
|
||||
<DxColumn :width="200" alignment="center" data-field="avg_rpt_wo_gangguan_individual" data-type="number"
|
||||
caption="Rata-rata RPT WO Gangguan" css-class="custom-table-column" />
|
||||
caption="Rata-rata RPT WO Gangguan" css-class="custom-table-column" cell-template="cellRight" />
|
||||
<DxColumn :width="200" alignment="center" data-field="avg_rct_wo_gangguan_individual" data-type="number"
|
||||
caption="Rata-rata RCT WO Gangguan" css-class="custom-table-column" />
|
||||
caption="Rata-rata RCT WO Gangguan" css-class="custom-table-column" cell-template="cellRight" />
|
||||
<DxColumn :width="200" alignment="center" data-field="jumlah_wo_penugasan_khusus" data-type="number"
|
||||
caption="Jumlah Wo Penugasan Khusus" css-class="custom-table-column" />
|
||||
<DxColumn :width="200" alignment="center" data-field="avg_durasi_wo_gangguan_individual" data-type="number"
|
||||
caption="Rata-rata Durasi WO Penugasan" css-class="custom-table-column" />
|
||||
caption="Jumlah Wo Penugasan Khusus" css-class="custom-table-column" cell-template="cellRight" />
|
||||
<DxColumn :width="200" alignment="center" data-field="avg_wo_penugasan_khusus" data-type="number"
|
||||
caption="Rata-rata Durasi WO Penugasan" css-class="custom-table-column" cell-template="cellRight" />
|
||||
|
||||
<template #cellLeft="{ data }">
|
||||
<p class="text-left cursor-pointer" @click="showDialogDataSelected()">
|
||||
{{ data.text }}
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<template #cellRight="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="showDialogDataSelected()">
|
||||
{{ isNumber(data.text) ? data.column.caption == '%' ? formatPercentage(data.text) :
|
||||
formatNumber(data.text) :
|
||||
data.text }}
|
||||
</p>
|
||||
</template>
|
||||
</DxDataGrid>
|
||||
</div>
|
||||
|
||||
<DetailDialog :open="dialogDataSelected" title="Daftar Detail Jumlah WO Gangguan Individu"
|
||||
@on-close="closeDialogDataSelected" :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 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="onExporting"
|
||||
:allow-column-resizing="true" column-resizing-mode="widget">
|
||||
<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" />
|
||||
<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"
|
||||
:calculateCellValue="(item: any) => dataSub.findIndex((i) => i == item) + 1" data-type="number" caption="No"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="UID/UIW" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="UP3" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Posko" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Sumber Lapor" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Created By" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Dispatch By" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Dispatch Time"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="User Regu" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Nama Regu" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Nama Petugas" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Shif" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Check In Petugas"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="No Laporan" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Tgl Lapor" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Tgl Penugasan Baru"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Tgl Dalam Perjalanan"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Tgl Pengerjaan"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Tgl Nyala Sementara"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Tgl Nyala" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Tgl Selesai" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Durasi Perjalanan"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Durasi WO" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Check Out Petugas"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="RPT" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="RCT" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Rating" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Jml Pelanggan Padam"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Fasilitas" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Sub Fasilitas"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Peralatan" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Dampak Kerusakan"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Penyebab" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Kelompok Penyebab"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Cuaca" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Keterangan Pelapor"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Keterangan" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Penyebab Padam"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Tindakan" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="APKT Status" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Referensi Marking"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="BLTH" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
|
||||
<template #cellLeft="{ data }">
|
||||
<p class="text-left cursor-pointer">
|
||||
{{ data.text }}
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<template #data-waktu="{ data }">
|
||||
<p>
|
||||
{{ 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">UID/UIW:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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">UP3:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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">Posko:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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="dataSubSelected" 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">Created By:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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 By:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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 Time:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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">User Regu:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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 Regu:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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 Petugas:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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">Shif:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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">Check In Petugas:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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" 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 Lapor:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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 Penugasan Regu:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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 Dalam Perjalanan:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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 Pengerjaan:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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 Nyala:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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 Selesai:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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 WO:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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">Check Out Petugas:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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">RPT</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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">RCT</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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">Rating</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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">Jml Pelanggan Padam:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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">Fasilitas:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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">Sub Fasilitas:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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">Peralatan:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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">Dampak Kerusakan:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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">Penyebab:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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">Kelompok Penyebab:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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">Cuaca:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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" 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:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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">Penyebab Padam:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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="dataSubSelected" 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">PKT Status:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" 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="dataSubSelected" 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">BLTH</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" class-name="flex-1" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</DetailDialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { DxDataGrid } from 'devextreme-vue'
|
||||
import {
|
||||
DxColumn,
|
||||
DxColumnFixing,
|
||||
DxExport,
|
||||
DxLoadPanel,
|
||||
DxPager,
|
||||
DxPaging,
|
||||
DxScrolling,
|
||||
DxSearchPanel,
|
||||
@ -59,16 +400,22 @@ import Filters from '@/components/Form/Filters.vue'
|
||||
import { Type1 } from '@/components/Form/FiltersType'
|
||||
import { useQuery } from '@vue/apollo-composable'
|
||||
import { queries } from '@/utils/api/api.graphql'
|
||||
import { formatNumber, formatPercentage, isNumber } from '@/utils/numbers'
|
||||
import DetailDialog from '@/components/Dialogs/DetailDialog.vue'
|
||||
import InputText from '@/components/InputText.vue'
|
||||
import { formatWaktu } from '@/components/Form/FiltersType/reference'
|
||||
const position = { of: '#data' }
|
||||
const showIndicator = ref(true)
|
||||
const shading = ref(true)
|
||||
const showPane = ref(true)
|
||||
const dataDetail = ref<any>()
|
||||
const dataSelected = ref<any>()
|
||||
const dataSubSelected = ref<any>()
|
||||
const data = ref<any[]>([])
|
||||
const showDetail = ref(false)
|
||||
const showData = () => {
|
||||
showDetail.value = true
|
||||
}
|
||||
const dataSub = ref<any[]>([])
|
||||
const dialogDataSelected = ref(false)
|
||||
const closeDialogDataSelected = () => dialogDataSelected.value = false
|
||||
const showDialogDataSelected = () => dialogDataSelected.value = true
|
||||
|
||||
const onExporting = (e: any) => {
|
||||
if (e.format === 'pdf') {
|
||||
const doc = new jsPDF()
|
||||
@ -97,9 +444,16 @@ const onExporting = (e: any) => {
|
||||
e.cancel = true
|
||||
}
|
||||
}
|
||||
const onSelectionChanged = ({ selectedRowsData }: any) => {
|
||||
|
||||
const onDataSelectionChanged = ({ selectedRowsData }: any) => {
|
||||
const data = selectedRowsData[0]
|
||||
dataDetail.value = data
|
||||
dataSelected.value = data
|
||||
console.log(data)
|
||||
}
|
||||
|
||||
const onDataSubSelectionChanged = ({ selectedRowsData }: any) => {
|
||||
const data = selectedRowsData[0]
|
||||
dataSubSelected.value = data
|
||||
console.log(data)
|
||||
}
|
||||
|
||||
@ -138,4 +492,19 @@ const { onResult, onError, loading, refetch } = useQuery(queries.cico.laporanChe
|
||||
})
|
||||
|
||||
const filters = ref()
|
||||
|
||||
onMounted(() => {
|
||||
data.value = [
|
||||
{
|
||||
"user_regu": "11110.REGU1",
|
||||
"personil_yantek": "11110_FAUZI",
|
||||
"jumlah_wo_gangguan_individual": 54,
|
||||
"avg_durasi_wo_gangguan_individual": 70.67,
|
||||
"avg_rpt_wo_gangguan_individual": 40.69,
|
||||
"avg_rct_wo_gangguan_individual": 71.61,
|
||||
"jumlah_wo_penugasan_khusus": 31,
|
||||
"avg_wo_penugasan_khusus": 63.79
|
||||
}
|
||||
]
|
||||
})
|
||||
</script>
|
@ -13,14 +13,23 @@
|
||||
<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" />
|
||||
v-model:visible="loadingData" :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"
|
||||
:calculateCellValue="(item: any) => data.findIndex((i) => i == item) + 1" data-type="number" caption="No" />
|
||||
|
||||
<DxColumn :width="150" alignment="center" data-field="nama_posko" caption="Nama Unit"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
|
||||
<DxColumn :width="150" alignment="center" data-field="nama_posko" caption="Nama Unit"
|
||||
css-class="custom-table-column" cell-template="cellLeft" name="namaUnit" :group-index="0" />
|
||||
<DxColumn :width="150" alignment="center" data-field="nama_regional" caption="Regional"
|
||||
css-class="custom-table-column" cell-template="cellLeft" :group-index="1" />
|
||||
<DxColumn :width="150" alignment="center" data-field="nama_uid" caption="UID" css-class="custom-table-column"
|
||||
cell-template="cellLeft" :group-index="2" />
|
||||
<DxColumn :width="150" alignment="center" data-field="nama_up3" caption="UP3" css-class="custom-table-column"
|
||||
cell-template="cellLeft" :group-index="3" />
|
||||
|
||||
<DxColumn :width="150" alignment="center" data-field="total" data-type="number" caption="Total"
|
||||
:allow-resizing="false" css-class="custom-table-column" cell-template="cellRight" />
|
||||
<DxColumn :width="150" alignment="center" data-field="total_selesai" caption="Selesai" :allow-resizing="false"
|
||||
@ -93,6 +102,66 @@
|
||||
{{ parseInt(data.text) ? formatWaktu(data.text) : '-' }}
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<DxSummary>
|
||||
<DxGroupItem :show-in-group-footer="false" :align-by-column="true" column="total" summary-type="sum"
|
||||
css-class="!text-right" :customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))" />
|
||||
<DxGroupItem :show-in-group-footer="false" :align-by-column="true" column="total_selesai" summary-type="sum"
|
||||
css-class="!text-right" :customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))" />
|
||||
<DxGroupItem :show-in-group-footer="false" :align-by-column="true" column="persen_selesai" summary-type="avg"
|
||||
css-class="!text-right" :customize-text="(e: any) => formatPercentage(parseFloat(e.value.toString()))" />
|
||||
<DxGroupItem :show-in-group-footer="false" :align-by-column="true" column="total_inproses" summary-type="sum"
|
||||
css-class="!text-right" :customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))" />
|
||||
<DxGroupItem :show-in-group-footer="false" :align-by-column="true" column="persen_inproses" summary-type="avg"
|
||||
css-class="!text-right" :customize-text="(e: any) => formatPercentage(parseFloat(e.value.toString()))" />
|
||||
<DxGroupItem :show-in-group-footer="false" :align-by-column="true" column="avg_durasi_dispatch"
|
||||
summary-type="avg" css-class="!text-right"
|
||||
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))" />
|
||||
|
||||
<DxGroupItem :show-in-group-footer="false" :align-by-column="true" column="max_durasi_dispatch"
|
||||
summary-type="avg" css-class="!text-center"
|
||||
:customize-text="(e: any) => parseInt(e.value) ? formatWaktu(e.value) : '-'" />
|
||||
<DxGroupItem :show-in-group-footer="false" :align-by-column="true" column="min_durasi_dispatch"
|
||||
summary-type="avg" css-class="!text-center"
|
||||
:customize-text="(e: any) => parseInt(e.value) ? formatWaktu(e.value) : '-'" />
|
||||
<DxGroupItem :show-in-group-footer="false" :align-by-column="true" column="total_diatas_sla_dispatch"
|
||||
summary-type="sum" css-class="!text-right"
|
||||
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))" />
|
||||
<DxGroupItem :show-in-group-footer="false" :align-by-column="true" column="total_dibawah_sla_dispatch"
|
||||
summary-type="sum" css-class="!text-right"
|
||||
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))" />
|
||||
<DxGroupItem :show-in-group-footer="false" :align-by-column="true" column="avg_durasi_response"
|
||||
summary-type="avg" css-class="!text-right"
|
||||
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))" />
|
||||
<DxGroupItem :show-in-group-footer="false" :align-by-column="true" column="max_durasi_response"
|
||||
summary-type="avg" css-class="!text-center"
|
||||
:customize-text="(e: any) => parseInt(e.value) ? formatWaktu(e.value) : '-'" />
|
||||
<DxGroupItem :show-in-group-footer="false" :align-by-column="true" column="min_durasi_response"
|
||||
summary-type="avg" css-class="!text-center"
|
||||
:customize-text="(e: any) => parseInt(e.value) ? formatWaktu(e.value) : '-'" />
|
||||
<DxGroupItem :show-in-group-footer="false" :align-by-column="true" column="total_diatas_sla_response"
|
||||
summary-type="sum" css-class="!text-right"
|
||||
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))" />
|
||||
<DxGroupItem :show-in-group-footer="false" :align-by-column="true" column="total_dibawah_sla_response"
|
||||
summary-type="sum" css-class="!text-right"
|
||||
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))" />
|
||||
<DxGroupItem :show-in-group-footer="false" :align-by-column="true" column="avg_durasi_recovery"
|
||||
summary-type="avg" css-class="!text-right"
|
||||
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))" />
|
||||
<DxGroupItem :show-in-group-footer="false" :align-by-column="true" column="max_durasi_recovery"
|
||||
summary-type="avg" css-class="!text-center"
|
||||
:customize-text="(e: any) => parseInt(e.value) ? formatWaktu(e.value) : '-'" />
|
||||
<DxGroupItem :show-in-group-footer="false" :align-by-column="true" column="min_durasi_recovery"
|
||||
summary-type="avg" css-class="!text-center"
|
||||
:customize-text="(e: any) => parseInt(e.value) ? formatWaktu(e.value) : '-'" />
|
||||
<DxGroupItem :show-in-group-footer="false" :align-by-column="true" column="total_diatas_sla_recovery"
|
||||
summary-type="sum" css-class="!text-right"
|
||||
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))" />
|
||||
<DxGroupItem :show-in-group-footer="false" :align-by-column="true" column="total_dibawah_sla_recovery"
|
||||
summary-type="sum" css-class="!text-right"
|
||||
:customize-text="(e: any) => formatNumber(parseFloat(e.value.toString()))" />
|
||||
|
||||
</DxSummary>
|
||||
</DxDataGrid>
|
||||
</div>
|
||||
|
||||
@ -101,69 +170,69 @@
|
||||
|
||||
<div class="w-full mb-4 lg:w-[70%] lg:float-left">
|
||||
<div class="p-4 bg-white rounded-xl lg:mr-4">
|
||||
<DxDataGrid 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="onExporting"
|
||||
:allow-column-resizing="true" column-resizing-mode="widget">
|
||||
<DxDataGrid class="max-h-[calc(100vh-140px)]" :data-source="dummyData.gangguan.rekap.detailGangguan"
|
||||
: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="onExporting" :allow-column-resizing="true" column-resizing-mode="widget">
|
||||
<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" />
|
||||
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"
|
||||
:calculateCellValue="(item: any) => data.findIndex((i) => i == item) + 1" data-type="number" caption="No"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Posko" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="No Lapor" css-class="custom-table-column"
|
||||
cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Tgl/Jam Lapor"
|
||||
:calculateCellValue="(item: any) => dummyData.gangguan.rekap.detailGangguan.findIndex((i) => i == item) + 1"
|
||||
data-type="number" caption="No" cell-template="cellRight" />
|
||||
<DxColumn :width="150" alignment="center" data-field="nama_posko" caption="Posko"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Tgl/Jam Datang" :allow-resizing="false"
|
||||
<DxColumn :width="150" alignment="center" data-field="no_laporan" caption="No Lapor"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Tgl/Jam Nyala" :allow-resizing="false"
|
||||
<DxColumn :width="150" alignment="center" data-field="waktu_lapor" caption="Tgl/Jam Lapor"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Durasi Response Time" :allow-resizing="false"
|
||||
css-class="custom-table-column" cell-template="data-waktu" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Durasi Recovery Time" :allow-resizing="false"
|
||||
css-class="custom-table-column" cell-template="data-waktu" />
|
||||
<DxColumn :width="150" alignment="center" data-field="waktu_response" caption="Tgl/Jam Datang"
|
||||
:allow-resizing="false" css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="waktu_recovery" caption="Tgl/Jam Nyala"
|
||||
:allow-resizing="false" css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="durasi_response_time" caption="Durasi Response Time"
|
||||
:allow-resizing="false" css-class="custom-table-column" cell-template="data-waktu" />
|
||||
<DxColumn :width="150" alignment="center" data-field="durasi_recovery_time" caption="Durasi Recovery Time"
|
||||
:allow-resizing="false" css-class="custom-table-column" cell-template="data-waktu" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Durasi Penugasan Regu"
|
||||
:allow-resizing="false" css-class="custom-table-column" cell-template="data-waktu" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Duras Perjalanan Regu"
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Durasi Perjalanan Regu"
|
||||
:allow-resizing="false" css-class="custom-table-column" cell-template="data-waktu" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Jarak Closing (m)" :allow-resizing="false"
|
||||
<DxColumn :width="150" alignment="center" data-field="jarak_closing" caption="Jarak Closing (m)"
|
||||
:allow-resizing="false" css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="dispatch_oleh" caption="Dispatch Oleh"
|
||||
:allow-resizing="false" css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="idpel_nometer" caption="IDPEL/NO METER"
|
||||
:allow-resizing="false" css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="nama_pelapor" caption="Nama Pelapor"
|
||||
:allow-resizing="false" css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="200" alignment="center" data-field="alamat_pelapor" caption="Alamat Pelapor"
|
||||
:allow-resizing="false" css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="no_telp_pelapor" caption="No Telp Pelapor"
|
||||
:allow-resizing="false" css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="200" alignment="center" data-field="keterangan_pelapor" caption="Keterangan Pelapor"
|
||||
:allow-resizing="false" css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="pembuat_laporan" caption="Sumber Lapor"
|
||||
:allow-resizing="false" css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="diselesaikan_oleh" caption="Diselesaikan Oleh"
|
||||
:allow-resizing="false" css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="status_akhir" caption="Status" :allow-resizing="false"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Dispatch Oleh" :allow-resizing="false"
|
||||
<DxColumn :width="150" alignment="center" data-field="referensi_marking" caption="Referensi Marking"
|
||||
:allow-resizing="false" css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="kode_gangguan" caption="Kode Gangguan"
|
||||
:allow-resizing="false" css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="jenis_gangguan" caption="Jenis Gangguan"
|
||||
:allow-resizing="false" css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="penyebab" caption="Penyebab" :allow-resizing="false"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="IDPEL/NO METER" :allow-resizing="false"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Nama Pelapor" :allow-resizing="false"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="200" alignment="center" data-field="" caption="Alamat Pelapor" :allow-resizing="false"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="No Telp Pelapor" :allow-resizing="false"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="200" alignment="center" data-field="" caption="Keterangan Pelapor" :allow-resizing="false"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Sumber Lapor" :allow-resizing="false"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Diselesaikan Oleh" :allow-resizing="false"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Status" :allow-resizing="false"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Referensi Marking" :allow-resizing="false"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Kode Gangguan" :allow-resizing="false"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Jenis Gangguan" :allow-resizing="false"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Penyebab" :allow-resizing="false"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
<DxColumn :width="150" alignment="center" data-field="" caption="Tindakan" :allow-resizing="false"
|
||||
<DxColumn :width="150" alignment="center" data-field="tindakan" caption="Tindakan" :allow-resizing="false"
|
||||
css-class="custom-table-column" cell-template="cellLeft" />
|
||||
|
||||
<template #cellLeft="{ data }">
|
||||
@ -172,6 +241,12 @@
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<template #cellRight="{ data }">
|
||||
<p class="text-right cursor-pointer">
|
||||
{{ data.text }}
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<template #data-waktu="{ data }">
|
||||
<p>
|
||||
{{ parseInt(data.text) ? formatWaktu(data.text) : '-' }}
|
||||
@ -185,38 +260,41 @@
|
||||
<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">Posko:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" class-name="flex-1" />
|
||||
<InputText :readonly="true" :value="dataSubSelected?.nama_posko" 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" class-name="flex-1" />
|
||||
<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" class-name="flex-1" />
|
||||
<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" class-name="flex-1" />
|
||||
<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" class-name="flex-1" />
|
||||
<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="dataSubSelected" class-name="flex-1" />
|
||||
<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_response_time)
|
||||
? formatWaktu(dataSubSelected?.durasi_response_time)
|
||||
<InputText :readonly="true" :value="parseInt(dataSubSelected?.durasi_recovery_time)
|
||||
? formatWaktu(dataSubSelected?.durasi_recovery_time)
|
||||
: '-'
|
||||
" class-name="flex-1" />
|
||||
</div>
|
||||
@ -231,82 +309,85 @@
|
||||
|
||||
<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="dataSubSelected" class-name="flex-1" />
|
||||
<InputText :readonly="true" :value="parseInt(dataSubSelected?.durasi_dispatch_time)
|
||||
? formatWaktu(dataSubSelected?.durasi_dispatch_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">Jarak Closing (m):</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" class-name="flex-1" />
|
||||
<InputText :readonly="true" :value="dataSubSelected?.jarak_closing" 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="dataSubSelected" class-name="flex-1" />
|
||||
<InputText :readonly="true" :value="dataSubSelected?.dispatch_oleh" 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" class-name="flex-1" />
|
||||
<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" class-name="flex-1" />
|
||||
<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" class-name="flex-1" />
|
||||
<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" class-name="flex-1" />
|
||||
<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" class-name="flex-1" />
|
||||
<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="dataSubSelected" class-name="flex-1" />
|
||||
<InputText :readonly="true" :value="dataSubSelected?.pembuat_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">Diselesaikan Oleh:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" class-name="flex-1" />
|
||||
<InputText :readonly="true" :value="dataSubSelected?.diselesaikan_oleh" 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" class-name="flex-1" />
|
||||
<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="dataSubSelected" class-name="flex-1" />
|
||||
<InputText :readonly="true" :value="dataSubSelected?.referensi_marking" 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="dataSubSelected" class-name="flex-1" />
|
||||
<InputText :readonly="true" :value="dataSubSelected?.kode_gangguan" 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">Jenis Gangguan:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" class-name="flex-1" />
|
||||
<InputText :readonly="true" :value="dataSubSelected?.jenis_gangguan" 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">Penyebab:</h3>
|
||||
<InputText :readonly="true" :value="dataSubSelected" class-name="flex-1" />
|
||||
<InputText :readonly="true" :value="dataSubSelected?.penyebab" 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="dataSubSelected" class-name="flex-1" />
|
||||
<InputText :readonly="true" :value="dataSubSelected?.tindakan" class-name="flex-1" />
|
||||
</div>
|
||||
|
||||
|
||||
@ -328,9 +409,11 @@ import {
|
||||
DxPager,
|
||||
DxPaging,
|
||||
DxSearchPanel,
|
||||
DxSelection
|
||||
DxSelection,
|
||||
DxSummary,
|
||||
DxGroupItem,
|
||||
} from 'devextreme-vue/data-grid'
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { onMounted, ref, watch } from 'vue'
|
||||
import { jsPDF } from 'jspdf'
|
||||
import { exportDataGrid as exportToPdf } from 'devextreme/pdf_exporter'
|
||||
import { exportDataGrid as exportToExcel } from 'devextreme/excel_exporter'
|
||||
@ -353,19 +436,22 @@ const dataSelected = ref<any>()
|
||||
const dataSubSelected = ref<any>()
|
||||
const dialogDataSelected = ref(false)
|
||||
const closeDialogDataSelected = () => dialogDataSelected.value = false
|
||||
const showDialogDataSelected = () => dialogDataSelected.value = true
|
||||
const loadingData = ref(false)
|
||||
const loadingSubData = ref(false)
|
||||
|
||||
const { onResult, onError, loading, refetch } = useQuery(queries.gangguan.rekap.gangguanAll, {
|
||||
dateFrom: new Date().toISOString().slice(0, 10),
|
||||
dateTo: new Date().toISOString().slice(0, 10),
|
||||
posko: 0,
|
||||
idUid: 0,
|
||||
idUp3: 0
|
||||
})
|
||||
|
||||
const filterData = (params: any) => {
|
||||
const { onResult, onError, loading, refetch } = useQuery(queries.gangguan.rekap.gangguanAll, {
|
||||
dateFrom: new Date().toISOString().slice(0, 10),
|
||||
dateTo: new Date().toISOString().slice(0, 10),
|
||||
posko: 0,
|
||||
idUid: 0,
|
||||
idUp3: 0
|
||||
})
|
||||
|
||||
const { posko, uid, up3 } = params
|
||||
const dateValue = params.periode.split(' s/d ')
|
||||
|
||||
refetch({
|
||||
dateFrom: dateValue[0]
|
||||
? dateValue[0].split('-').reverse().join('-')
|
||||
@ -377,6 +463,7 @@ const filterData = (params: any) => {
|
||||
idUid: uid ? uid.id : 0,
|
||||
idUp3: up3 ? up3.id : 0
|
||||
})
|
||||
|
||||
onResult((queryResult) => {
|
||||
if (queryResult.data != undefined) {
|
||||
data.value = queryResult.data.rekapitulasiAllGangguan
|
||||
@ -384,9 +471,59 @@ const filterData = (params: any) => {
|
||||
console.log(queryResult.loading)
|
||||
console.log(queryResult.networkStatus)
|
||||
})
|
||||
|
||||
onError((error) => {
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
watch(loading, (value) => {
|
||||
loadingData.value = value
|
||||
})
|
||||
}
|
||||
|
||||
const getDetail = () => {
|
||||
const { onResult, onError, loading, refetch } = useQuery(queries.gangguan.rekap.gangguanAllDetail, {
|
||||
dateFrom: new Date().toISOString().slice(0, 10),
|
||||
dateTo: new Date().toISOString().slice(0, 10),
|
||||
posko: 0,
|
||||
idUid: 0,
|
||||
idUp3: 0
|
||||
})
|
||||
|
||||
const { posko, uid, up3 } = filters
|
||||
const dateValue = params.periode.split(' s/d ')
|
||||
|
||||
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 : 0,
|
||||
idUid: uid ? uid.id : 0,
|
||||
idUp3: up3 ? up3.id : 0
|
||||
})
|
||||
|
||||
onResult((queryResult) => {
|
||||
if (queryResult.data != undefined) {
|
||||
dataSub.value = queryResult.data.detailGangguan
|
||||
}
|
||||
})
|
||||
|
||||
onError((error) => {
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
watch(loading, (value) => {
|
||||
loadingSubData.value = value
|
||||
})
|
||||
|
||||
dataSub.value = dummyData.gangguan.rekap.detailGangguan
|
||||
}
|
||||
const showDialogDataSelected = () => {
|
||||
dialogDataSelected.value = true
|
||||
getDetail()
|
||||
}
|
||||
|
||||
const onExporting = (e: any) => {
|
||||
@ -434,4 +571,4 @@ const filters = ref()
|
||||
onMounted(() => {
|
||||
data.value = dummyData.gangguan.rekap.rekapitulasiAllGangguan
|
||||
})
|
||||
</script>@/utils/api/graphql
|
||||
</script>
|
||||
|
@ -1034,6 +1034,50 @@ export const queries = {
|
||||
}
|
||||
}
|
||||
`,
|
||||
gangguanAllDetail: gql`
|
||||
query daftarGangguanDiselesaikanMobileAPKT(
|
||||
$dateFrom: Date!
|
||||
$dateTo: Date!
|
||||
$posko: Int!
|
||||
$idUid: Int!
|
||||
$idUp3: Int!
|
||||
) {
|
||||
detailGangguan (
|
||||
dateFrom:$dateFrom
|
||||
dateTo:$dateTo
|
||||
posko:$posko
|
||||
idUid:$idUid
|
||||
idUp3:$idUp3
|
||||
) {
|
||||
id
|
||||
no_laporan
|
||||
pembuat_laporan
|
||||
waktu_lapor
|
||||
waktu_response
|
||||
waktu_recovery
|
||||
durasi_dispatch_time
|
||||
durasi_response_time
|
||||
durasi_recovery_time
|
||||
status_akhir
|
||||
is_marking
|
||||
referensi_marking
|
||||
idpel_nometer
|
||||
nama_pelapor
|
||||
alamat_pelapor
|
||||
no_telp_pelapor
|
||||
keterangan_pelapor
|
||||
media
|
||||
nama_posko
|
||||
jarak_closing
|
||||
dispatch_oleh
|
||||
diselesaikan_oleh
|
||||
penyebab
|
||||
tindakan
|
||||
kode_gangguan
|
||||
jenis_gangguan
|
||||
}
|
||||
}
|
||||
`,
|
||||
gangguanAlihPosko: gql`
|
||||
query rekapitulasiGangguanAlihPosko(
|
||||
$dateFrom: Date!
|
||||
|
28916
src/utils/dummy.ts
28916
src/utils/dummy.ts
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user