Merge branch 'dev-eko-vm' of https://gitea.callysta-engineering.com/APKT/eis into development
This commit is contained in:
commit
2f49e6cdd0
@ -2,14 +2,23 @@
|
|||||||
import Select from '@/components/Select.vue'
|
import Select from '@/components/Select.vue'
|
||||||
import DatePicker from '@/components/DatePicker.vue'
|
import DatePicker from '@/components/DatePicker.vue'
|
||||||
import InlineRadioGroup from '@/components/Form/InlineRadioGroup.vue'
|
import InlineRadioGroup from '@/components/Form/InlineRadioGroup.vue'
|
||||||
import { selectedUid, selectedUp3Ulp, selectedUlp, fetchUid, itemsUid, itemsUp3, itemsUlp } from './reference';
|
import {
|
||||||
import { onMounted, ref } from 'vue';
|
selectedUid,
|
||||||
const uidPlaceholder = 'Semua Unit Induk Distribusi/Wilayah';
|
selectedUp3Ulp,
|
||||||
const up3Placeholder = 'Semua Unit Pelaksanaan Pelayanan Pelanggan';
|
selectedUlp,
|
||||||
const ulpPlaceholder = 'Semua Unit Layanan Pelanggan';
|
fetchUid,
|
||||||
const uppp = ref({ id: 0, name: up3Placeholder });
|
itemsUid,
|
||||||
const uid = ref({ id: 0, name: uidPlaceholder });
|
itemsUp3,
|
||||||
const ulp = ref({ id: "", name: ulpPlaceholder });
|
itemsUlp
|
||||||
|
} from './reference'
|
||||||
|
import { onMounted, ref } from 'vue'
|
||||||
|
const uidPlaceholder = 'Semua Unit Induk Distribusi/Wilayah'
|
||||||
|
const up3Placeholder = 'Semua Unit Pelaksanaan Pelayanan Pelanggan'
|
||||||
|
const ulpPlaceholder = 'Semua Unit Layanan Pelanggan'
|
||||||
|
const uppp = ref({ id: 0, name: up3Placeholder })
|
||||||
|
const uid = ref({ id: 0, name: uidPlaceholder })
|
||||||
|
const up3 = ref({ id: 0, name: up3Placeholder })
|
||||||
|
const ulp = ref({ id: '', name: ulpPlaceholder })
|
||||||
const emit = defineEmits(['update:filters'])
|
const emit = defineEmits(['update:filters'])
|
||||||
const data = ref({
|
const data = ref({
|
||||||
uid: uid.value,
|
uid: uid.value,
|
||||||
@ -19,24 +28,24 @@ const data = ref({
|
|||||||
group: 1
|
group: 1
|
||||||
})
|
})
|
||||||
const setUid = (value: any) => {
|
const setUid = (value: any) => {
|
||||||
uid.value = value;
|
uid.value = value
|
||||||
selectedUid(value);
|
selectedUid(value)
|
||||||
uppp.value = { id: 0, name: up3Placeholder };
|
uppp.value = { id: 0, name: up3Placeholder }
|
||||||
data.value.uid = value;
|
data.value.uid = value
|
||||||
};
|
}
|
||||||
|
|
||||||
const setUp3 = (value: any) => {
|
const setUp3 = (value: any) => {
|
||||||
uppp.value = value;
|
uppp.value = value
|
||||||
selectedUp3Ulp(value);
|
selectedUp3Ulp(value)
|
||||||
ulp.value = { id: "", name: ulpPlaceholder };
|
ulp.value = { id: '', name: ulpPlaceholder }
|
||||||
data.value.up3 = value;
|
data.value.up3 = value
|
||||||
};
|
}
|
||||||
|
|
||||||
const setUlp = (value: any) => {
|
const setUlp = (value: any) => {
|
||||||
ulp.value = value;
|
ulp.value = value
|
||||||
selectedUlp(value);
|
selectedUlp(value)
|
||||||
data.value.posko = value;
|
data.value.posko = value
|
||||||
};
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
emit('update:filters', data.value)
|
emit('update:filters', data.value)
|
||||||
fetchUid()
|
fetchUid()
|
||||||
@ -45,38 +54,65 @@ onMounted(() => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
||||||
<label class="text-gray-800 font-semibold mb-2 sm:mb-0 block">Unit Induk Distribusi/Wilayah:</label>
|
<label class="text-gray-800 font-semibold mb-2 sm:mb-0 block"
|
||||||
|
>Unit Induk Distribusi/Wilayah:</label
|
||||||
|
>
|
||||||
|
|
||||||
<Select @update:selected="setUid($event)" :data="itemsUid" :placeholder="uidPlaceholder" />
|
<Select @update:selected="setUid($event)" :data="itemsUid" :placeholder="uidPlaceholder" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
||||||
<label class="text-gray-800 font-semibold mb-2 sm:mb-0 block">Unit Pelaksanaan Pelayanan Pelanggan:</label>
|
<label class="text-gray-800 font-semibold mb-2 sm:mb-0 block"
|
||||||
|
>Unit Pelaksanaan Pelayanan Pelanggan:</label
|
||||||
|
>
|
||||||
|
|
||||||
<Select @update:selected="setUp3($event)" :data="itemsUp3" :selected="up3" :placeholder="up3Placeholder" />
|
<Select
|
||||||
|
@update:selected="setUp3($event)"
|
||||||
|
:data="itemsUp3"
|
||||||
|
:selected="up3"
|
||||||
|
:placeholder="up3Placeholder"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
||||||
<label class="text-gray-800 font-semibold mb-2 sm:mb-0 block">Unit Layanan Pelanggan:</label>
|
<label class="text-gray-800 font-semibold mb-2 sm:mb-0 block">Unit Layanan Pelanggan:</label>
|
||||||
|
|
||||||
<Select @update:selected="setUlp($event)" :data="itemsUlp" :placeholder="ulpPlaceholder" />
|
<Select
|
||||||
|
@update:selected="setUlp($event)"
|
||||||
|
:selected="ulp"
|
||||||
|
:data="itemsUlp"
|
||||||
|
:placeholder="ulpPlaceholder"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
||||||
<label class="text-gray-800 font-semibold mb-2 sm:mb-0 block">Periode Tanggal:</label>
|
<label class="text-gray-800 font-semibold mb-2 sm:mb-0 block">Periode Tanggal:</label>
|
||||||
|
|
||||||
<DatePicker @update:date-value="(value) => {
|
<DatePicker
|
||||||
data.periode = value
|
@update:date-value="
|
||||||
}
|
(value) => {
|
||||||
" />
|
data.periode = value
|
||||||
|
}
|
||||||
|
"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
||||||
<label class="text-gray-800 font-semibold mb-2 sm:mb-0 block">Group By Kode Unit Distribusi:</label>
|
<label class="text-gray-800 font-semibold mb-2 sm:mb-0 block"
|
||||||
|
>Group By Kode Unit Distribusi:</label
|
||||||
|
>
|
||||||
|
|
||||||
<InlineRadioGroup @update:group-value="(value) => {
|
<InlineRadioGroup
|
||||||
data.group = value
|
@update:group-value="
|
||||||
console.log('data.group', value)
|
(value) => {
|
||||||
}" :radio-items="[{ id: 1, title: 'Tidak' }, { id: 2, title: 'Ya, Grupkan' }]" />
|
data.group = value
|
||||||
|
console.log('data.group', value)
|
||||||
|
}
|
||||||
|
"
|
||||||
|
:radio-items="[
|
||||||
|
{ id: 1, title: 'Tidak' },
|
||||||
|
{ id: 2, title: 'Ya, Grupkan' }
|
||||||
|
]"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,34 +1,46 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Select from '@/components/Select.vue'
|
import Select from '@/components/Select.vue'
|
||||||
import { selectedUid, selectedUp3Ulp,fetchRegional,fetchUid,fetchUidWithRegional, itemsUid, itemsUp3, itemsUlp,itemsRegional ,months, years} from './reference';
|
import {
|
||||||
import { onMounted, ref } from 'vue';
|
selectedUid,
|
||||||
import { getMonthName } from '@/utils/texts';
|
selectedUp3Ulp,
|
||||||
const uidPlaceholder = 'Semua Unit Induk Distribusi/Wilayah';
|
fetchRegional,
|
||||||
const up3Placholder = 'Semua Unit Pelaksanaan Pelayanan Pelanggan';
|
fetchUid,
|
||||||
const ulpPlaceholder = 'Semua Unit Layanan Pelanggan';
|
fetchUidByRegional,
|
||||||
const regionalPlaceholder = 'Semua Regional';
|
itemsUid,
|
||||||
const bulanPlaceholder = getMonthName(new Date().getMonth());
|
itemsUp3,
|
||||||
const tahunPlaceholder = new Date().getFullYear().toString();
|
itemsUlp,
|
||||||
const bulanSelected = new Date().getMonth();
|
itemsRegional,
|
||||||
const tahunSelected = new Date().getFullYear();
|
months,
|
||||||
const uppp = ref({ id: 0, name: up3Placholder });
|
years
|
||||||
const uid = ref({ id: 0, name: uidPlaceholder });
|
} from './reference'
|
||||||
const ulp = ref({ id: "", name: ulpPlaceholder });
|
import { onMounted, ref } from 'vue'
|
||||||
const bulan = ref({ id: bulanSelected, name: bulanPlaceholder });
|
import { getMonthName } from '@/utils/texts'
|
||||||
const tahun = ref({ id: tahunSelected, name: tahunPlaceholder });
|
const uidPlaceholder = 'Semua Unit Induk Distribusi/Wilayah'
|
||||||
const regional = ref({ id: 0, name: regionalPlaceholder });
|
const up3Placholder = 'Semua Unit Pelaksanaan Pelayanan Pelanggan'
|
||||||
|
const ulpPlaceholder = 'Semua Unit Layanan Pelanggan'
|
||||||
|
const regionalPlaceholder = 'Semua Regional'
|
||||||
|
const bulanPlaceholder = getMonthName(new Date().getMonth())
|
||||||
|
const tahunPlaceholder = new Date().getFullYear().toString()
|
||||||
|
const bulanSelected = new Date().getMonth()
|
||||||
|
const tahunSelected = new Date().getFullYear()
|
||||||
|
const uppp = ref({ id: 0, name: up3Placholder })
|
||||||
|
const uid = ref({ id: 0, name: uidPlaceholder })
|
||||||
|
const ulp = ref({ id: '', name: ulpPlaceholder })
|
||||||
|
const bulan = ref({ id: bulanSelected, name: bulanPlaceholder })
|
||||||
|
const tahun = ref({ id: tahunSelected, name: tahunPlaceholder })
|
||||||
|
const regional = ref({ id: 0, name: regionalPlaceholder })
|
||||||
const emit = defineEmits(['update:filters'])
|
const emit = defineEmits(['update:filters'])
|
||||||
// Find index of January
|
// Find index of January
|
||||||
const bulanIndex = months.findIndex(month => month.id === bulan.value.id);
|
const bulanIndex = months.findIndex((month) => month.id === bulan.value.id)
|
||||||
console.log(bulanSelected)
|
console.log(bulanSelected)
|
||||||
// Remove January if found
|
// Remove January if found
|
||||||
if (bulanIndex !== -1) {
|
if (bulanIndex !== -1) {
|
||||||
months.splice(bulanIndex, 1);
|
months.splice(bulanIndex, 1)
|
||||||
}
|
}
|
||||||
// Find index of current year
|
// Find index of current year
|
||||||
const tahunIndex = years.value.findIndex(year => year.id === tahun.value.id);
|
const tahunIndex = years.value.findIndex((year) => year.id === tahun.value.id)
|
||||||
if (tahunIndex !== -1) {
|
if (tahunIndex !== -1) {
|
||||||
years.value.splice(tahunIndex, 1);
|
years.value.splice(tahunIndex, 1)
|
||||||
}
|
}
|
||||||
const data = ref({
|
const data = ref({
|
||||||
regional: regional.value,
|
regional: regional.value,
|
||||||
@ -36,48 +48,46 @@ const data = ref({
|
|||||||
up3: uppp.value,
|
up3: uppp.value,
|
||||||
posko: ulp.value,
|
posko: ulp.value,
|
||||||
periode: '',
|
periode: '',
|
||||||
bulan : bulan.value,
|
bulan: bulan.value,
|
||||||
tahun : tahun.value
|
tahun: tahun.value
|
||||||
})
|
})
|
||||||
|
|
||||||
const setRegional = (value: any) => {
|
const setRegional = (value: any) => {
|
||||||
regional.value = value;
|
regional.value = value
|
||||||
fetchUid();
|
fetchUid()
|
||||||
// harusnya fetchUidWithRegional(value);
|
// harusnya fetchUidWithRegional(value);
|
||||||
selectedUid(value);
|
selectedUid(value)
|
||||||
uid.value = { id: 0, name: uidPlaceholder };
|
uid.value = { id: 0, name: uidPlaceholder }
|
||||||
data.value.regional = value;
|
data.value.regional = value
|
||||||
|
}
|
||||||
};
|
|
||||||
const setUid = (value: any) => {
|
const setUid = (value: any) => {
|
||||||
uid.value = value;
|
uid.value = value
|
||||||
selectedUid(value);
|
selectedUid(value)
|
||||||
uppp.value = { id: 0, name: up3Placholder };
|
uppp.value = { id: 0, name: up3Placholder }
|
||||||
data.value.uid = value;
|
data.value.uid = value
|
||||||
};
|
}
|
||||||
|
|
||||||
const setUp3 = (value: any) => {
|
const setUp3 = (value: any) => {
|
||||||
uppp.value = value;
|
uppp.value = value
|
||||||
selectedUp3Ulp(value);
|
selectedUp3Ulp(value)
|
||||||
ulp.value = { id: "", name: ulpPlaceholder };
|
ulp.value = { id: '', name: ulpPlaceholder }
|
||||||
data.value.up3 = value;
|
data.value.up3 = value
|
||||||
};
|
}
|
||||||
|
|
||||||
const setUlp = (value: any) => {
|
const setUlp = (value: any) => {
|
||||||
ulp.value = value;
|
ulp.value = value
|
||||||
selectedUp3Ulp(value);
|
selectedUp3Ulp(value)
|
||||||
data.value.posko = value;
|
data.value.posko = value
|
||||||
};
|
}
|
||||||
const setMonth = (value: any) => {
|
const setMonth = (value: any) => {
|
||||||
bulan.value = value;
|
bulan.value = value
|
||||||
data.value.bulan = value;
|
data.value.bulan = value
|
||||||
console.log(data.value)
|
console.log(data.value)
|
||||||
|
}
|
||||||
};
|
|
||||||
const setYear = (value: any) => {
|
const setYear = (value: any) => {
|
||||||
tahun.value = value;
|
tahun.value = value
|
||||||
data.value.tahun = value;
|
data.value.tahun = value
|
||||||
};
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
emit('update:filters', data.value)
|
emit('update:filters', data.value)
|
||||||
fetchRegional()
|
fetchRegional()
|
||||||
@ -88,25 +98,33 @@ onMounted(() => {
|
|||||||
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
||||||
<label class="text-gray-800 font-semibold mb-2 sm:mb-0 block">Regional:</label>
|
<label class="text-gray-800 font-semibold mb-2 sm:mb-0 block">Regional:</label>
|
||||||
|
|
||||||
<Select @update:selected="setRegional($event)" :data="itemsRegional" :placeholder="regionalPlaceholder" />
|
<Select
|
||||||
|
@update:selected="setRegional($event)"
|
||||||
|
:data="itemsRegional"
|
||||||
|
:placeholder="regionalPlaceholder"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
||||||
<label class="text-gray-800 font-semibold mb-2 sm:mb-0 block">Unit Induk Distribusi/Wilayah:</label>
|
<label class="text-gray-800 font-semibold mb-2 sm:mb-0 block"
|
||||||
|
>Unit Induk Distribusi/Wilayah:</label
|
||||||
|
>
|
||||||
|
|
||||||
<Select @update:selected="setUid($event)" :data="itemsUid" :placeholder="uidPlaceholder" />
|
<Select @update:selected="setUid($event)" :data="itemsUid" :placeholder="uidPlaceholder" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
||||||
<label class="text-gray-800 font-semibold mb-2 sm:mb-0 block">Unit Pelaksanaan Pelayanan Pelanggan:</label>
|
<label class="text-gray-800 font-semibold mb-2 sm:mb-0 block"
|
||||||
|
>Unit Pelaksanaan Pelayanan Pelanggan:</label
|
||||||
|
>
|
||||||
|
|
||||||
<Select @update:selected="setUp3($event)" :data="itemsUp3" :placeholder="up3Placholder" />
|
<Select @update:selected="setUp3($event)" :data="itemsUp3" :placeholder="up3Placholder" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
||||||
<label class="text-gray-800 font-semibold mb-2 sm:mb-0 block">Unit Layanan Pelanggan:</label>
|
<label class="text-gray-800 font-semibold mb-2 sm:mb-0 block">Unit Layanan Pelanggan:</label>
|
||||||
|
|
||||||
<Select @update:selected="setUlp($event)" :data="itemsUlp" :placeholder="ulpPlaceholder" />
|
<Select @update:selected="setUlp($event)" :data="itemsUlp" :placeholder="ulpPlaceholder" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
||||||
@ -118,4 +136,3 @@ onMounted(() => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -1,14 +1,22 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Select from '@/components/Select.vue'
|
import Select from '@/components/Select.vue'
|
||||||
import DatePicker from '@/components/DatePicker.vue'
|
import DatePicker from '@/components/DatePicker.vue'
|
||||||
import { selectedUid, selectedUp3Ulp, selectedUlp, fetchUid, itemsUid, itemsUp3, itemsUlp } from './reference';
|
import {
|
||||||
import { onMounted, ref, watch } from 'vue';
|
selectedUid,
|
||||||
const uidPlaceholder = 'Semua Unit Induk Distribusi/Wilayah';
|
selectedUp3Ulp,
|
||||||
const up3Placeholder = 'Semua Unit Pelaksanaan Pelayanan Pelanggan';
|
selectedUlp,
|
||||||
const ulpPlaceholder = 'Semua Unit Layanan Pelanggan';
|
fetchUid,
|
||||||
const up3 = ref({ id: 0, name: up3Placeholder });
|
itemsUid,
|
||||||
const uid = ref({ id: 0, name: uidPlaceholder });
|
itemsUp3,
|
||||||
const ulp = ref({ id: 0, name: ulpPlaceholder });
|
itemsUlp
|
||||||
|
} from './reference'
|
||||||
|
import { onMounted, ref, watch } from 'vue'
|
||||||
|
const uidPlaceholder = 'Semua Unit Induk Distribusi/Wilayah'
|
||||||
|
const up3Placeholder = 'Semua Unit Pelaksanaan Pelayanan Pelanggan'
|
||||||
|
const ulpPlaceholder = 'Semua Unit Layanan Pelanggan'
|
||||||
|
const up3 = ref({ id: 0, name: up3Placeholder })
|
||||||
|
const uid = ref({ id: 0, name: uidPlaceholder })
|
||||||
|
const ulp = ref({ id: 0, name: ulpPlaceholder })
|
||||||
const emit = defineEmits(['update:filters'])
|
const emit = defineEmits(['update:filters'])
|
||||||
|
|
||||||
const data = ref({
|
const data = ref({
|
||||||
@ -22,24 +30,24 @@ watch(data.value, (value) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const setUid = (value: any) => {
|
const setUid = (value: any) => {
|
||||||
uid.value = value;
|
uid.value = value
|
||||||
selectedUid(value);
|
selectedUid(value)
|
||||||
up3.value = { id: 0, name: up3Placeholder };
|
up3.value = { id: 0, name: up3Placeholder }
|
||||||
data.value.uid = value;
|
data.value.uid = value
|
||||||
};
|
}
|
||||||
|
|
||||||
const setUp3 = (value: any) => {
|
const setUp3 = (value: any) => {
|
||||||
up3.value = value;
|
up3.value = value
|
||||||
selectedUp3Ulp(value);
|
selectedUp3Ulp(value)
|
||||||
ulp.value = { id: 0, name: ulpPlaceholder };
|
ulp.value = { id: 0, name: ulpPlaceholder }
|
||||||
data.value.up3 = value;
|
data.value.up3 = value
|
||||||
};
|
}
|
||||||
|
|
||||||
const setUlp = (value: any) => {
|
const setUlp = (value: any) => {
|
||||||
ulp.value = value;
|
ulp.value = value
|
||||||
selectedUlp(value);
|
selectedUlp(value)
|
||||||
data.value.ulp = value;
|
data.value.ulp = value
|
||||||
};
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fetchUid()
|
fetchUid()
|
||||||
emit('update:filters', data.value)
|
emit('update:filters', data.value)
|
||||||
@ -48,29 +56,46 @@ onMounted(() => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
||||||
<label class="text-gray-800 font-semibold mb-2 sm:mb-0 block">Unit Induk Distribusi/Wilayah:</label>
|
<label class="text-gray-800 font-semibold mb-2 sm:mb-0 block"
|
||||||
|
>Unit Induk Distribusi/Wilayah:</label
|
||||||
|
>
|
||||||
|
|
||||||
<Select @update:selected="setUid($event)" :data="itemsUid" :placeholder="uidPlaceholder" />
|
<Select @update:selected="setUid($event)" :data="itemsUid" :placeholder="uidPlaceholder" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
||||||
<label class="text-gray-800 font-semibold mb-2 sm:mb-0 block">Unit Pelaksanaan Pelayanan Pelanggan:</label>
|
<label class="text-gray-800 font-semibold mb-2 sm:mb-0 block"
|
||||||
|
>Unit Pelaksanaan Pelayanan Pelanggan:</label
|
||||||
|
>
|
||||||
|
|
||||||
<Select @update:selected="setUp3($event)" :data="itemsUp3" :selected="up3" :placeholder="up3Placeholder" />
|
<Select
|
||||||
|
@update:selected="setUp3($event)"
|
||||||
|
:data="itemsUp3"
|
||||||
|
:selected="up3"
|
||||||
|
:placeholder="up3Placeholder"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
||||||
<label class="text-gray-800 font-semibold mb-2 sm:mb-0 block">Unit Layanan Pelanggan:</label>
|
<label class="text-gray-800 font-semibold mb-2 sm:mb-0 block">Unit Layanan Pelanggan:</label>
|
||||||
|
|
||||||
<Select @update:selected="setUlp($event)" :data="itemsUlp" :selected="ulp" :placeholder="ulpPlaceholder" />
|
<Select
|
||||||
|
@update:selected="setUlp($event)"
|
||||||
|
:data="itemsUlp"
|
||||||
|
:selected="ulp"
|
||||||
|
:placeholder="ulpPlaceholder"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
<div class="sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:items-center">
|
||||||
<label class="text-gray-800 font-semibold mb-2 sm:mb-0 block">Periode Tanggal:</label>
|
<label class="text-gray-800 font-semibold mb-2 sm:mb-0 block">Periode Tanggal:</label>
|
||||||
|
|
||||||
<DatePicker @update:date-value="(value) => {
|
<DatePicker
|
||||||
data.periode = value
|
@update:date-value="
|
||||||
}
|
(value) => {
|
||||||
" />
|
data.periode = value
|
||||||
|
}
|
||||||
|
"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -54,18 +54,16 @@ const fetchMedia = () => {
|
|||||||
}
|
}
|
||||||
const fetchUidByRegional = async (regional: number) => {
|
const fetchUidByRegional = async (regional: number) => {
|
||||||
if (regional == 0) {
|
if (regional == 0) {
|
||||||
itemsUid.value = [];
|
itemsUid.value = []
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
const res = await getUidRegional(regional)
|
const res = await getUidRegional(regional)
|
||||||
itemsUid.value = res.data.map((item: any) => (
|
itemsUid.value = res.data.map((item: any) => ({
|
||||||
{
|
id: item.id,
|
||||||
id: item.id,
|
name: item.nama.toUpperCase()
|
||||||
name: item.nama.toUpperCase(),
|
}))
|
||||||
}
|
|
||||||
));
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error fetching data:', error);
|
console.error('Error fetching data:', error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -73,25 +71,23 @@ const fetchUidByRegional = async (regional: number) => {
|
|||||||
const fetchUid = async () => {
|
const fetchUid = async () => {
|
||||||
try {
|
try {
|
||||||
const res = await getUid()
|
const res = await getUid()
|
||||||
itemsUid.value = res.data.map((item: any) => (
|
itemsUid.value = res.data.map((item: any) => ({
|
||||||
{
|
id: item.id,
|
||||||
id: item.id,
|
name: item.nama
|
||||||
name: item.nama,
|
}))
|
||||||
}
|
|
||||||
));
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error fetching data:', error);
|
console.error('Error fetching data:', error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const fetchDataUp3 = async (uid: number) => {
|
const fetchDataUp3 = async (uid: number) => {
|
||||||
if (uid == 0) {
|
if (uid == 0) {
|
||||||
itemsUp3.value = [];
|
itemsUp3.value = []
|
||||||
itemsUlp.value = [];
|
itemsUlp.value = []
|
||||||
itemsPosko.value = [];
|
itemsPosko.value = []
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
const res = await getUp3(uid);
|
const res = await getUp3(uid)
|
||||||
itemsUp3.value = res.data.map((item: any) => ({
|
itemsUp3.value = res.data.map((item: any) => ({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
name: item.nama
|
name: item.nama
|
||||||
@ -102,7 +98,6 @@ const fetchDataUp3 = async (uid: number) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const fetchDataUlp = async (up3: number) => {
|
const fetchDataUlp = async (up3: number) => {
|
||||||
|
|
||||||
if (up3 == 0) {
|
if (up3 == 0) {
|
||||||
itemsUlp.value = []
|
itemsUlp.value = []
|
||||||
} else {
|
} else {
|
||||||
@ -135,14 +130,12 @@ const fetchDataPosko = async (up3: number) => {
|
|||||||
const fetchRegional = async () => {
|
const fetchRegional = async () => {
|
||||||
try {
|
try {
|
||||||
const res = await getRegional()
|
const res = await getRegional()
|
||||||
itemsRegional.value = res.data.map((item: any) => (
|
itemsRegional.value = res.data.map((item: any) => ({
|
||||||
{
|
id: item.id,
|
||||||
id: item.id,
|
name: item.nama.toUpperCase()
|
||||||
name: item.nama.toUpperCase(),
|
}))
|
||||||
}
|
|
||||||
));
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error fetching data:', error);
|
console.error('Error fetching data:', error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,7 +160,6 @@ const selectedUlp = (value: any) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
|
||||||
selectedUid,
|
selectedUid,
|
||||||
selectedUp3Posko,
|
selectedUp3Posko,
|
||||||
selectedUp3Ulp,
|
selectedUp3Ulp,
|
||||||
|
@ -1,71 +1,161 @@
|
|||||||
<template>
|
<template>
|
||||||
<Filters @run-search="() => filterData(filters)" class="mb-4">
|
<Filters @run-search="() => filterData(filters)" class="mb-4">
|
||||||
<Type3 @update:filters="(value) => {
|
<Type3
|
||||||
filters = value
|
@update:filters="
|
||||||
|
(value) => {
|
||||||
|
filters = value
|
||||||
}
|
}
|
||||||
" />
|
"
|
||||||
</Filters>
|
/>
|
||||||
<div id="data">
|
</Filters>
|
||||||
<DxDataGrid class="max-h-[calc(100vh-140px)]" :show-column-lines="true" :show-row-lines="false" :show-borders="true"
|
<div id="data">
|
||||||
:row-alternation-enabled="true" :hover-state-enabled="true" @selection-changed="onSelectionChanged"
|
<DxDataGrid
|
||||||
:column-width="100" @exporting="onExporting" :allow-column-resizing="true" column-resizing-mode="widget"
|
class="max-h-[calc(100vh-140px)]"
|
||||||
:word-wrap-enabled="true">
|
:show-column-lines="true"
|
||||||
<DxSelection mode="single" />
|
:show-row-lines="false"
|
||||||
<DxPaging :enabled="false" />
|
:show-borders="true"
|
||||||
<DxScrolling column-rendering-mode="virtual" mode="virtual" />
|
:row-alternation-enabled="true"
|
||||||
<DxLoadPanel :position="position" :show-indicator="showIndicator" :show-pane="showPane" :shading="shading"
|
:hover-state-enabled="true"
|
||||||
v-if="loading" v-model:visible="loading" :enabled="true" />
|
@selection-changed="onSelectionChanged"
|
||||||
<DxSearchPanel :visible="true" :highlight-case-sensitive="true" />
|
:column-width="100"
|
||||||
<DxExport :enabled="true" :formats="['pdf', 'xlsx', 'document']" :allow-export-selected-data="false" />
|
@exporting="onExporting"
|
||||||
<DxColumnFixing :enabled="true" />
|
:allow-column-resizing="true"
|
||||||
|
column-resizing-mode="widget"
|
||||||
|
:word-wrap-enabled="true"
|
||||||
|
>
|
||||||
|
<DxSelection mode="single" />
|
||||||
|
<DxPaging :enabled="false" />
|
||||||
|
<DxScrolling column-rendering-mode="virtual" mode="virtual" />
|
||||||
|
<DxLoadPanel
|
||||||
|
:position="position"
|
||||||
|
:show-indicator="showIndicator"
|
||||||
|
:show-pane="showPane"
|
||||||
|
:shading="shading"
|
||||||
|
v-if="loading"
|
||||||
|
v-model:visible="loading"
|
||||||
|
:enabled="true"
|
||||||
|
/>
|
||||||
|
<DxSearchPanel :visible="true" :highlight-case-sensitive="true" />
|
||||||
|
<DxExport
|
||||||
|
:enabled="true"
|
||||||
|
:formats="['pdf', 'xlsx', 'document']"
|
||||||
|
:allow-export-selected-data="false"
|
||||||
|
/>
|
||||||
|
<DxColumnFixing :enabled="true" />
|
||||||
|
|
||||||
<DxColumn :width="170" alignment="center" data-field="nama_posko" caption="Nama Unit" css-class="custom-table-column" />
|
<DxColumn
|
||||||
<DxColumn alignment="center" caption="Total WO" css-class="custom-table-column">
|
:width="170"
|
||||||
<DxColumn alignment="center" caption="CC 123" css-class="custom-table-column">
|
alignment="center"
|
||||||
<DxColumn :width="150" alignment="center" data-field="total_wo_cc123" data-type="number" caption="a"
|
data-field="nama_posko"
|
||||||
css-class="custom-table-column" />
|
caption="Nama Unit"
|
||||||
</DxColumn>
|
css-class="custom-table-column"
|
||||||
<DxColumn alignment="center" caption="PLN Mobile" css-class="custom-table-column">
|
/>
|
||||||
<DxColumn :width="150" alignment="center" data-field="total_wo_pln_mobile" data-type="number" caption="b"
|
<DxColumn alignment="center" caption="Total WO" css-class="custom-table-column">
|
||||||
css-class="custom-table-column" />
|
<DxColumn alignment="center" caption="CC 123" css-class="custom-table-column">
|
||||||
</DxColumn>
|
<DxColumn
|
||||||
<DxColumn alignment="center" caption="COMCEN" css-class="custom-table-column">
|
:width="150"
|
||||||
<DxColumn :width="150" alignment="center" data-field="total_wo_comcen" data-type="number" caption="c"
|
alignment="center"
|
||||||
css-class="custom-table-column" />
|
data-field="total_wo_cc123"
|
||||||
</DxColumn>
|
data-type="number"
|
||||||
<DxColumn alignment="center" caption="Total" css-class="custom-table-column">
|
caption="a"
|
||||||
<DxColumn :width="150" alignment="center" data-field="total_wo" data-type="number" caption="d=b+c"
|
css-class="custom-table-column"
|
||||||
css-class="custom-table-column" />
|
/>
|
||||||
</DxColumn>
|
</DxColumn>
|
||||||
</DxColumn>
|
<DxColumn alignment="center" caption="PLN Mobile" css-class="custom-table-column">
|
||||||
<DxColumn alignment="center" caption="Rekomendasi sistem" css-class="custom-table-column">
|
<DxColumn
|
||||||
<DxColumn alignment="center" caption="Mendatangkan Petugas" css-class="custom-table-column">
|
:width="150"
|
||||||
<DxColumn :width="150" alignment="center" data-field="rekomendasi_sistem_mendatangkan_petugas" data-type="number" caption="e"
|
alignment="center"
|
||||||
css-class="custom-table-column" />
|
data-field="total_wo_pln_mobile"
|
||||||
</DxColumn>
|
data-type="number"
|
||||||
<DxColumn alignment="center" caption="Diberikan ke Pelanggan" css-class="custom-table-column">
|
caption="b"
|
||||||
<DxColumn :width="150" alignment="center" data-field="total_wo_loket" data-type="number" caption="f"
|
css-class="custom-table-column"
|
||||||
css-class="custom-table-column" />
|
/>
|
||||||
</DxColumn>
|
</DxColumn>
|
||||||
</DxColumn>
|
<DxColumn alignment="center" caption="COMCEN" css-class="custom-table-column">
|
||||||
<DxColumn alignment="center" caption="DLPD" css-class="custom-table-column">
|
<DxColumn
|
||||||
<DxColumn :width="150" alignment="center" data-field="dlpd" data-type="number" caption="g"
|
:width="150"
|
||||||
css-class="custom-table-column" />
|
alignment="center"
|
||||||
</DxColumn>
|
data-field="total_wo_comcen"
|
||||||
<DxColumn alignment="center" caption="Histori P2TL" css-class="custom-table-column">
|
data-type="number"
|
||||||
<DxColumn :width="150" alignment="center" data-field="history_p2ti" data-type="number" caption="h"
|
caption="c"
|
||||||
css-class="custom-table-column" />
|
css-class="custom-table-column"
|
||||||
</DxColumn>
|
/>
|
||||||
|
</DxColumn>
|
||||||
</DxDataGrid>
|
<DxColumn alignment="center" caption="Total" css-class="custom-table-column">
|
||||||
</div>
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field="total_wo"
|
||||||
|
data-type="number"
|
||||||
|
caption="d=b+c"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
/>
|
||||||
|
</DxColumn>
|
||||||
|
</DxColumn>
|
||||||
|
<DxColumn alignment="center" caption="Rekomendasi sistem" css-class="custom-table-column">
|
||||||
|
<DxColumn alignment="center" caption="Mendatangkan Petugas" css-class="custom-table-column">
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field="rekomendasi_sistem_mendatangkan_petugas"
|
||||||
|
data-type="number"
|
||||||
|
caption="e"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
/>
|
||||||
|
</DxColumn>
|
||||||
|
<DxColumn
|
||||||
|
alignment="center"
|
||||||
|
caption="Diberikan ke Pelanggan"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
>
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field="total_wo_loket"
|
||||||
|
data-type="number"
|
||||||
|
caption="f"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
/>
|
||||||
|
</DxColumn>
|
||||||
|
</DxColumn>
|
||||||
|
<DxColumn alignment="center" caption="DLPD" css-class="custom-table-column">
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field="dlpd"
|
||||||
|
data-type="number"
|
||||||
|
caption="g"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
/>
|
||||||
|
</DxColumn>
|
||||||
|
<DxColumn alignment="center" caption="Histori P2TL" css-class="custom-table-column">
|
||||||
|
<DxColumn
|
||||||
|
:width="150"
|
||||||
|
alignment="center"
|
||||||
|
data-field="history_p2ti"
|
||||||
|
data-type="number"
|
||||||
|
caption="h"
|
||||||
|
css-class="custom-table-column"
|
||||||
|
/>
|
||||||
|
</DxColumn>
|
||||||
|
</DxDataGrid>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref } from 'vue'
|
import { onMounted, ref } from 'vue'
|
||||||
import { useFiltersStore } from '@/stores/filters'
|
import { useFiltersStore } from '@/stores/filters'
|
||||||
import { DxDataGrid } from 'devextreme-vue'
|
import { DxDataGrid } from 'devextreme-vue'
|
||||||
import { DxColumn, DxColumnFixing, DxExport, DxLoadPanel, DxPaging, DxScrolling, DxSearchPanel, DxSelection } from 'devextreme-vue/data-grid'
|
import {
|
||||||
|
DxColumn,
|
||||||
|
DxColumnFixing,
|
||||||
|
DxExport,
|
||||||
|
DxLoadPanel,
|
||||||
|
DxPaging,
|
||||||
|
DxScrolling,
|
||||||
|
DxSearchPanel,
|
||||||
|
DxSelection
|
||||||
|
} 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'
|
||||||
import { exportDataGrid as exportToExcel } from 'devextreme/excel_exporter'
|
import { exportDataGrid as exportToExcel } from 'devextreme/excel_exporter'
|
||||||
@ -80,38 +170,45 @@ const showIndicator = ref(true)
|
|||||||
const shading = ref(true)
|
const shading = ref(true)
|
||||||
const showPane = ref(true)
|
const showPane = ref(true)
|
||||||
const dataDetail = ref<any>()
|
const dataDetail = ref<any>()
|
||||||
|
const data = ref<any[]>([])
|
||||||
const showDetail = ref(false)
|
const showDetail = ref(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()
|
||||||
|
|
||||||
exportToPdf({
|
exportToPdf({
|
||||||
jsPDFDocument: doc,
|
jsPDFDocument: doc,
|
||||||
component: e.component,
|
component: e.component,
|
||||||
indent: 5,
|
indent: 5
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
doc.save(`.pdf`)
|
doc.save(`.pdf`)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
const workbook = new Workbook()
|
const workbook = new Workbook()
|
||||||
const worksheet = workbook.addWorksheet('Employees')
|
const worksheet = workbook.addWorksheet('Employees')
|
||||||
|
|
||||||
exportToExcel({
|
exportToExcel({
|
||||||
component: e.component,
|
component: e.component,
|
||||||
worksheet,
|
worksheet,
|
||||||
autoFilterEnabled: true,
|
autoFilterEnabled: true
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
workbook.xlsx.writeBuffer().then((buffer: any) => {
|
workbook.xlsx.writeBuffer().then((buffer: any) => {
|
||||||
saveAs(new Blob([buffer], { type: 'application/octet-stream' }), 'DataGrid.xlsx')
|
saveAs(new Blob([buffer], { type: 'application/octet-stream' }), 'DataGrid.xlsx')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
e.cancel = true
|
e.cancel = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const GET_laporanCttKwhPeriksa = gql`
|
const GET_laporanCttKwhPeriksa = gql`
|
||||||
query laporanCttKwhPeriksa($dateFrom: Date!, $dateTo: Date!, $posko: String, $idUid: Int, $idUp3: Int) {
|
query laporanCttKwhPeriksa(
|
||||||
|
$dateFrom: Date!
|
||||||
|
$dateTo: Date!
|
||||||
|
$posko: String
|
||||||
|
$idUid: Int
|
||||||
|
$idUp3: Int
|
||||||
|
) {
|
||||||
laporanCttKwhPeriksa(
|
laporanCttKwhPeriksa(
|
||||||
dateFrom: $dateFrom
|
dateFrom: $dateFrom
|
||||||
dateTo: $dateTo
|
dateTo: $dateTo
|
||||||
@ -119,65 +216,66 @@ const GET_laporanCttKwhPeriksa = gql`
|
|||||||
idUid: $idUid
|
idUid: $idUid
|
||||||
idUp3: $idUp3
|
idUp3: $idUp3
|
||||||
) {
|
) {
|
||||||
dlpd
|
dlpd
|
||||||
history_p2ti
|
history_p2ti
|
||||||
nama_posko
|
nama_posko
|
||||||
rekomendasi_sistem_mendatangkan_petugas
|
rekomendasi_sistem_mendatangkan_petugas
|
||||||
total_wo
|
total_wo
|
||||||
total_wo_cc123
|
total_wo_cc123
|
||||||
total_wo_comcen
|
total_wo_comcen
|
||||||
total_wo_loket
|
total_wo_loket
|
||||||
total_wo_pln_mobile
|
total_wo_pln_mobile
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
const filterData = (params: any) => {
|
const filterData = (params: any) => {
|
||||||
const { posko, uid, up3 } = params
|
const { posko, uid, up3 } = params
|
||||||
const dateValue = params.periode.split(' s/d ')
|
const dateValue = params.periode.split(' s/d ')
|
||||||
refetch({
|
refetch({
|
||||||
dateFrom: dateValue[0] ? dateValue[0].split('-').reverse().join('-') : new Date().toISOString().slice(0, 10),
|
dateFrom: dateValue[0]
|
||||||
dateTo: dateValue[1] ? dateValue[1].split('-').reverse().join('-') : new Date().toISOString().slice(0, 10),
|
? dateValue[0].split('-').reverse().join('-')
|
||||||
posko: posko ? posko.id : "",
|
: new Date().toISOString().slice(0, 10),
|
||||||
idUid: uid ? uid.id : 0,
|
dateTo: dateValue[1]
|
||||||
idUp3: up3 ? up3.id : 0
|
? dateValue[1].split('-').reverse().join('-')
|
||||||
})
|
: new Date().toISOString().slice(0, 10),
|
||||||
onResult((queryResult) => {
|
posko: posko ? posko.id : '',
|
||||||
if (queryResult.data != undefined) {
|
idUid: uid ? uid.id : 0,
|
||||||
queryResult.data.daftarGangguanDialihkanKePoskoLain.forEach((item: any) => {
|
idUp3: up3 ? up3.id : 0
|
||||||
data.value = [
|
})
|
||||||
...data.value,
|
onResult((queryResult) => {
|
||||||
{
|
if (queryResult.data != undefined) {
|
||||||
...item,
|
queryResult.data.daftarGangguanDialihkanKePoskoLain.forEach((item: any) => {
|
||||||
}
|
data.value = [
|
||||||
]
|
...data.value,
|
||||||
})
|
{
|
||||||
}
|
...item
|
||||||
console.log(queryResult.data)
|
}
|
||||||
console.log(queryResult.loading)
|
]
|
||||||
console.log(queryResult.networkStatus)
|
})
|
||||||
})
|
|
||||||
onError((error) => {
|
|
||||||
console.log(error)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const { onResult, onError, loading, refetch } = useQuery(
|
|
||||||
GET_laporanCttKwhPeriksa,
|
|
||||||
{
|
|
||||||
dateFrom: new Date().toISOString().slice(0, 10),
|
|
||||||
dateTo: new Date().toISOString().slice(0, 10),
|
|
||||||
posko: '',
|
|
||||||
idUid: 0,
|
|
||||||
idUp3: 0
|
|
||||||
}
|
}
|
||||||
)
|
console.log(queryResult.data)
|
||||||
|
console.log(queryResult.loading)
|
||||||
|
console.log(queryResult.networkStatus)
|
||||||
|
})
|
||||||
|
onError((error) => {
|
||||||
|
console.log(error)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const { onResult, onError, loading, refetch } = useQuery(GET_laporanCttKwhPeriksa, {
|
||||||
|
dateFrom: new Date().toISOString().slice(0, 10),
|
||||||
|
dateTo: new Date().toISOString().slice(0, 10),
|
||||||
|
posko: '',
|
||||||
|
idUid: 0,
|
||||||
|
idUp3: 0
|
||||||
|
})
|
||||||
|
|
||||||
const onSelectionChanged = ({ selectedRowsData }: any) => {
|
const onSelectionChanged = ({ selectedRowsData }: any) => {
|
||||||
const data = selectedRowsData[0]
|
const data = selectedRowsData[0]
|
||||||
dataDetail.value = data
|
dataDetail.value = data
|
||||||
console.log(data)
|
console.log(data)
|
||||||
}
|
}
|
||||||
const showData = () => {
|
const showData = () => {
|
||||||
showDetail.value = true
|
showDetail.value = true
|
||||||
}
|
}
|
||||||
const filters = ref()
|
const filters = ref()
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user