add dialog detail
This commit is contained in:
parent
ef58bb36c5
commit
131a72cc23
@ -16,7 +16,7 @@
|
|||||||
:show-borders="true"
|
:show-borders="true"
|
||||||
:row-alternation-enabled="true"
|
:row-alternation-enabled="true"
|
||||||
:hover-state-enabled="true"
|
:hover-state-enabled="true"
|
||||||
@selection-changed="onSelectionChanged"
|
@selection-changed="onDataSelectionChanged"
|
||||||
:column-width="100"
|
:column-width="100"
|
||||||
@exporting="onExporting"
|
@exporting="onExporting"
|
||||||
:allow-column-resizing="true"
|
:allow-column-resizing="true"
|
||||||
@ -84,20 +84,14 @@
|
|||||||
cell-template="formatNumber"
|
cell-template="formatNumber"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<template #cellCenter="{ data }">
|
|
||||||
<p class="cursor-pointer">
|
|
||||||
{{ data.text }}
|
|
||||||
</p>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template #formatText="{ data }">
|
<template #formatText="{ data }">
|
||||||
<p class="text-left cursor-pointer">
|
<p class="text-left cursor-pointer" @click="showDetail()">
|
||||||
{{ data.text }}
|
{{ data.text }}
|
||||||
</p>
|
</p>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #formatNumber="{ data }">
|
<template #formatNumber="{ data }">
|
||||||
<p class="text-right cursor-pointer">
|
<p class="text-right cursor-pointer" @click="showDetail()">
|
||||||
{{
|
{{
|
||||||
isNumber(data.text)
|
isNumber(data.text)
|
||||||
? data.column.caption == '%'
|
? data.column.caption == '%'
|
||||||
@ -138,6 +132,296 @@
|
|||||||
</DxSummary>
|
</DxSummary>
|
||||||
</DxDataGrid>
|
</DxDataGrid>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<DetailDialog
|
||||||
|
:open="dialogDetail"
|
||||||
|
title="Detail Rekapitulasi Gangguan Berdasarkan Media"
|
||||||
|
@on-close="closeDialog"
|
||||||
|
: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-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) => dataSub.findIndex((i) => i == item) + 1"
|
||||||
|
data-type="number"
|
||||||
|
caption="No"
|
||||||
|
cell-template="formatNumber"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="No Laporan"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Tgl Lapor"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Tgl Datang"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Tgl Nyala"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Durasi Response Time"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatTime"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Durasi Recovery Time"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatTime"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Status"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Referensi Marking"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="IDPEL/NO METER"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Nama Pelapor"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Alamat Pelapor"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="No Telp Pelapor"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="200"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Keterangan Pelapor"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Posko"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Tidakan"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Penyebab"
|
||||||
|
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>
|
||||||
|
{{ 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">No Laporan:</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">Tgl 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">Tgl Datang:</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">Tgl Nyala:</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 Response Time:</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 Recovery Time:</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="" 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">IDPEL/NO METER:</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">Nama Pelapor:</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">Alamat Pelapor:</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">No Telp Pelapor:</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">Keterangan Pelapor:</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">Posko:</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 class="flex flex-row items-center justify-between w-full">
|
||||||
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">Penyeban:</h3>
|
||||||
|
<InputText :readonly="true" value="" class-name="flex-1" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</DetailDialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@ -150,6 +434,7 @@ import {
|
|||||||
DxColumnFixing,
|
DxColumnFixing,
|
||||||
DxExport,
|
DxExport,
|
||||||
DxLoadPanel,
|
DxLoadPanel,
|
||||||
|
DxPager,
|
||||||
DxPaging,
|
DxPaging,
|
||||||
DxScrolling,
|
DxScrolling,
|
||||||
DxSearchPanel,
|
DxSearchPanel,
|
||||||
@ -166,11 +451,29 @@ import { useQuery } from '@vue/apollo-composable'
|
|||||||
import { queries } from '@/utils/api/api.graphql'
|
import { queries } from '@/utils/api/api.graphql'
|
||||||
import { formatNumber, formatPercentage, isNumber } from '@/utils/numbers'
|
import { formatNumber, formatPercentage, isNumber } from '@/utils/numbers'
|
||||||
import { dummyData } from '@/utils/dummy'
|
import { dummyData } from '@/utils/dummy'
|
||||||
|
import DetailDialog from '@/components/Dialogs/DetailDialog.vue'
|
||||||
|
import { formatWaktu } from '@/components/Form/FiltersType/reference'
|
||||||
|
import InputText from '@/components/InputText.vue'
|
||||||
|
|
||||||
const position = { of: '#data' }
|
const position = { of: '#data' }
|
||||||
const showIndicator = ref(true)
|
const showIndicator = ref(true)
|
||||||
const shading = ref(true)
|
const shading = ref(true)
|
||||||
const showPane = ref(true)
|
const showPane = ref(true)
|
||||||
|
const data = ref<any[]>([])
|
||||||
|
const dataSub = ref<any[]>([])
|
||||||
|
const dataSelected = ref<any>()
|
||||||
|
const dataSubSelected = ref<any>()
|
||||||
|
const dialogDetail = ref(false)
|
||||||
|
const loadingSubData = ref(false)
|
||||||
|
|
||||||
|
const showDetail = () => {
|
||||||
|
dialogDetail.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
const closeDialog = () => {
|
||||||
|
dialogDetail.value = false
|
||||||
|
}
|
||||||
|
|
||||||
const onExporting = (e: any) => {
|
const onExporting = (e: any) => {
|
||||||
if (e.format === 'pdf') {
|
if (e.format === 'pdf') {
|
||||||
const doc = new jsPDF()
|
const doc = new jsPDF()
|
||||||
@ -200,12 +503,15 @@ const onExporting = (e: any) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const onSelectionChanged = ({ selectedRowsData }: any) => {
|
const onDataSelectionChanged = ({ selectedRowsData }: any) => {
|
||||||
const data = selectedRowsData[0]
|
dataSelected.value = selectedRowsData[0]
|
||||||
console.log(data)
|
console.log(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = ref<any[]>([])
|
const onDataSubSelectionChanged = ({ selectedRowsData }: any) => {
|
||||||
|
dataSubSelected.value = selectedRowsData[0]
|
||||||
|
console.log(data)
|
||||||
|
}
|
||||||
|
|
||||||
const { onResult, onError, loading, refetch } = useQuery(queries.gangguan.rekap.berdasarkanMedia, {
|
const { onResult, onError, loading, refetch } = useQuery(queries.gangguan.rekap.berdasarkanMedia, {
|
||||||
dateFrom: new Date('2023-10-01').toISOString().slice(0, 10),
|
dateFrom: new Date('2023-10-01').toISOString().slice(0, 10),
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
:show-borders="true"
|
:show-borders="true"
|
||||||
:row-alternation-enabled="true"
|
:row-alternation-enabled="true"
|
||||||
:hover-state-enabled="true"
|
:hover-state-enabled="true"
|
||||||
@selection-changed="onSelectionChanged"
|
@selection-changed="onDataSelectionChanged"
|
||||||
@exporting="onExporting"
|
@exporting="onExporting"
|
||||||
:allow-column-resizing="true"
|
:allow-column-resizing="true"
|
||||||
column-resizing-mode="widget"
|
column-resizing-mode="widget"
|
||||||
@ -332,13 +332,13 @@
|
|||||||
</DxColumn>
|
</DxColumn>
|
||||||
|
|
||||||
<template #formatText="{ data }">
|
<template #formatText="{ data }">
|
||||||
<p class="text-left cursor-pointer">
|
<p class="text-left cursor-pointer" @click="showDetail()">
|
||||||
{{ data.text }}
|
{{ data.text }}
|
||||||
</p>
|
</p>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #formatNumber="{ data }">
|
<template #formatNumber="{ data }">
|
||||||
<p class="text-right cursor-pointer">
|
<p class="text-right cursor-pointer" @click="showDetail()">
|
||||||
{{
|
{{
|
||||||
isNumber(data.text)
|
isNumber(data.text)
|
||||||
? data.column.caption == '%'
|
? data.column.caption == '%'
|
||||||
@ -350,13 +350,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #formatPercentage="{ data }">
|
<template #formatPercentage="{ data }">
|
||||||
<p class="text-right cursor-pointer">
|
<p class="text-right cursor-pointer" @click="showDetail()">
|
||||||
{{ parseFloat(data.text) ? formatPercentage(data.text) : '0%' }}
|
{{ parseFloat(data.text) ? formatPercentage(data.text) : '0%' }}
|
||||||
</p>
|
</p>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #formatTime="{ data }">
|
<template #formatTime="{ data }">
|
||||||
<p class="!text-right">
|
<p class="!text-right cursor-pointer" @click="showDetail()">
|
||||||
{{ parseInt(data.text) ? formatWaktu(data.text) : '-' }}
|
{{ parseInt(data.text) ? formatWaktu(data.text) : '-' }}
|
||||||
</p>
|
</p>
|
||||||
</template>
|
</template>
|
||||||
@ -412,6 +412,296 @@
|
|||||||
</DxSummary>
|
</DxSummary>
|
||||||
</DxDataGrid>
|
</DxDataGrid>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<DetailDialog
|
||||||
|
:open="dialogDetail"
|
||||||
|
title="Detail Rekapitulasi Gangguan Diselesaikan Mobile APKT"
|
||||||
|
@on-close="closeDialog"
|
||||||
|
: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-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) => dataSub.findIndex((i) => i == item) + 1"
|
||||||
|
data-type="number"
|
||||||
|
caption="No"
|
||||||
|
cell-template="formatNumber"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="No Laporan"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Tgl Lapor"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Tgl Datang"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Tgl Nyala"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Durasi Response Time"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatTime"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Durasi Recovery Time"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatTime"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Status"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Referensi Marking"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="IDPEL/NO METER"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Nama Pelapor"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Alamat Pelapor"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="No Telp Pelapor"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="200"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Keterangan Pelapor"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Posko"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Tidakan"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
cell-template="formatText"
|
||||||
|
/>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field=""
|
||||||
|
caption="Penyebab"
|
||||||
|
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>
|
||||||
|
{{ 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">No Laporan:</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">Tgl 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">Tgl Datang:</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">Tgl Nyala:</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 Response Time:</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 Recovery Time:</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="" 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">IDPEL/NO METER:</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">Nama Pelapor:</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">Alamat Pelapor:</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">No Telp Pelapor:</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">Keterangan Pelapor:</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">Posko:</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 class="flex flex-row items-center justify-between w-full">
|
||||||
|
<h3 class="text-sm font-medium w-[135px] text-gray-800">Penyeban:</h3>
|
||||||
|
<InputText :readonly="true" value="" class-name="flex-1" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</DetailDialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@ -425,6 +715,7 @@ import {
|
|||||||
DxColumnFixing,
|
DxColumnFixing,
|
||||||
DxExport,
|
DxExport,
|
||||||
DxLoadPanel,
|
DxLoadPanel,
|
||||||
|
DxPager,
|
||||||
DxPaging,
|
DxPaging,
|
||||||
DxScrolling,
|
DxScrolling,
|
||||||
DxSearchPanel,
|
DxSearchPanel,
|
||||||
@ -441,11 +732,28 @@ import { useQuery } from '@vue/apollo-composable'
|
|||||||
import { queries } from '@/utils/api/api.graphql'
|
import { queries } from '@/utils/api/api.graphql'
|
||||||
import { formatNumber, formatPercentage, isNumber } from '@/utils/numbers'
|
import { formatNumber, formatPercentage, isNumber } from '@/utils/numbers'
|
||||||
import { formatWaktu } from '@/components/Form/FiltersType/reference'
|
import { formatWaktu } from '@/components/Form/FiltersType/reference'
|
||||||
|
import InputText from '@/components/InputText.vue'
|
||||||
|
import DetailDialog from '@/components/Dialogs/DetailDialog.vue'
|
||||||
|
|
||||||
const position = { of: '#data' }
|
const position = { of: '#data' }
|
||||||
const showIndicator = ref(true)
|
const showIndicator = ref(true)
|
||||||
const shading = ref(true)
|
const shading = ref(true)
|
||||||
const showPane = ref(true)
|
const showPane = ref(true)
|
||||||
|
const data = ref<any[]>([])
|
||||||
|
const dataSub = ref<any[]>([])
|
||||||
|
const dataSelected = ref<any>()
|
||||||
|
const dataSubSelected = ref<any>()
|
||||||
|
const dialogDetail = ref(false)
|
||||||
|
const loadingSubData = ref(false)
|
||||||
|
|
||||||
|
const showDetail = () => {
|
||||||
|
dialogDetail.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
const closeDialog = () => {
|
||||||
|
dialogDetail.value = false
|
||||||
|
}
|
||||||
|
|
||||||
const onExporting = (e: any) => {
|
const onExporting = (e: any) => {
|
||||||
if (e.format === 'pdf') {
|
if (e.format === 'pdf') {
|
||||||
const doc = new jsPDF()
|
const doc = new jsPDF()
|
||||||
@ -475,11 +783,16 @@ const onExporting = (e: any) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const onSelectionChanged = ({ selectedRowsData }: any) => {
|
const onDataSelectionChanged = ({ selectedRowsData }: any) => {
|
||||||
const data = selectedRowsData[0]
|
dataSelected.value = selectedRowsData[0]
|
||||||
console.log(data)
|
console.log(data)
|
||||||
}
|
}
|
||||||
const data = ref<any[]>([])
|
|
||||||
|
const onDataSubSelectionChanged = ({ selectedRowsData }: any) => {
|
||||||
|
dataSubSelected.value = selectedRowsData[0]
|
||||||
|
console.log(data)
|
||||||
|
}
|
||||||
|
|
||||||
const { onResult, onError, loading, refetch } = useQuery(
|
const { onResult, onError, loading, refetch } = useQuery(
|
||||||
queries.gangguan.rekap.gangguanDiselesaikanMobileAPKT,
|
queries.gangguan.rekap.gangguanDiselesaikanMobileAPKT,
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user