Merge branch 'dev-defuj' of github.com:defuj/eis into dev-bagus
This commit is contained in:
@@ -277,7 +277,10 @@
|
||||
</DxColumn>
|
||||
|
||||
<template #formatNumberPLNMobileMarking="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="setParameterRequest('PLN Mobile', 1)">
|
||||
<p
|
||||
class="text-right cursor-pointer"
|
||||
@click="setParameterRequest({ media: 'PLN Mobile', marking: 1 })"
|
||||
>
|
||||
{{
|
||||
isNumber(data.text)
|
||||
? data.column.caption == '%'
|
||||
@@ -289,7 +292,10 @@
|
||||
</template>
|
||||
|
||||
<template #formatNumberPLNMobileNonMarking="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="setParameterRequest('PLN Mobile', 2)">
|
||||
<p
|
||||
class="text-right cursor-pointer"
|
||||
@click="setParameterRequest({ media: 'PLN Mobile', marking: 2 })"
|
||||
>
|
||||
{{
|
||||
isNumber(data.text)
|
||||
? data.column.caption == '%'
|
||||
@@ -301,7 +307,10 @@
|
||||
</template>
|
||||
|
||||
<template #formatNumberCCMarking="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="setParameterRequest('Call PLN 123', 1)">
|
||||
<p
|
||||
class="text-right cursor-pointer"
|
||||
@click="setParameterRequest({ media: 'Call PLN 123', marking: 1 })"
|
||||
>
|
||||
{{
|
||||
isNumber(data.text)
|
||||
? data.column.caption == '%'
|
||||
@@ -313,7 +322,10 @@
|
||||
</template>
|
||||
|
||||
<template #formatNumberCCNonMarking="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="setParameterRequest('Call PLN 123', 2)">
|
||||
<p
|
||||
class="text-right cursor-pointer"
|
||||
@click="setParameterRequest({ media: 'Call PLN 123', marking: 2 })"
|
||||
>
|
||||
{{
|
||||
isNumber(data.text)
|
||||
? data.column.caption == '%'
|
||||
@@ -325,7 +337,7 @@
|
||||
</template>
|
||||
|
||||
<template #formatNumberTotalMarking="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="setParameterRequest('', 1)">
|
||||
<p class="text-right cursor-pointer" @click="setParameterRequest({ media: '', marking: 1 })">
|
||||
{{
|
||||
isNumber(data.text)
|
||||
? data.column.caption == '%'
|
||||
@@ -337,7 +349,7 @@
|
||||
</template>
|
||||
|
||||
<template #formatNumberTotalNonMarking="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="setParameterRequest('', 2)">
|
||||
<p class="text-right cursor-pointer" @click="setParameterRequest({ media: '', marking: 2 })">
|
||||
{{
|
||||
isNumber(data.text)
|
||||
? data.column.caption == '%'
|
||||
@@ -349,7 +361,10 @@
|
||||
</template>
|
||||
|
||||
<template #formatNumber="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="setParameterRequest(null, null)">
|
||||
<p
|
||||
class="text-right cursor-pointer"
|
||||
@click="setParameterRequest({ media: null, marking: null })"
|
||||
>
|
||||
{{
|
||||
isNumber(data.text)
|
||||
? data.column.caption == '%'
|
||||
@@ -361,19 +376,25 @@
|
||||
</template>
|
||||
|
||||
<template #formatPercentage="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="setParameterRequest(null, null)">
|
||||
<p
|
||||
class="text-right cursor-pointer"
|
||||
@click="setParameterRequest({ media: null, marking: null })"
|
||||
>
|
||||
{{ isNumber(data.text) ? formatPercentage(data.text) : data.text }}
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<template #formatText="{ data }">
|
||||
<p class="text-left cursor-pointer" @click="setParameterRequest(null, null)">
|
||||
<p
|
||||
class="text-left cursor-pointer"
|
||||
@click="setParameterRequest({ media: null, marking: null })"
|
||||
>
|
||||
{{ data.text }}
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<template #formatTime="{ data }">
|
||||
<p class="!text-right" @click="setParameterRequest(null, null)">
|
||||
<p class="!text-right" @click="setParameterRequest({ media: null, marking: null })">
|
||||
{{ parseInt(data.text) ? formatWaktu(data.text) : '-' }}
|
||||
</p>
|
||||
</template>
|
||||
@@ -788,7 +809,7 @@
|
||||
:width="150"
|
||||
alignment="center"
|
||||
data-field="tindakan"
|
||||
caption="Tindaan"
|
||||
caption="Tindakan"
|
||||
css-class="custom-table-column"
|
||||
cell-template="formatText"
|
||||
/>
|
||||
@@ -1022,8 +1043,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</DetailDialog>
|
||||
|
||||
<BufferDialog v-if="loading || loadingSubData" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@@ -1053,17 +1072,13 @@ import BufferDialog from '@/components/Dialogs/BufferDialog.vue'
|
||||
|
||||
const position = { of: '#data' }
|
||||
const showIndicator = ref(true)
|
||||
const loading = ref(computed(() => props.loading))
|
||||
const shading = ref(true)
|
||||
const showPane = ref(true)
|
||||
const props = defineProps({
|
||||
data: Array as () => any[],
|
||||
filters: Object as () => any,
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
filters: Object as () => any
|
||||
})
|
||||
const emit = defineEmits(['update:loadingSubData'])
|
||||
const filters = ref<any>(computed(() => props.filters))
|
||||
const data = computed(() => props.data)
|
||||
const dataSub = ref<any[]>([])
|
||||
@@ -1074,15 +1089,16 @@ const closedialogDetail = () => (dialogDetail.value = false)
|
||||
const loadingData = ref(false)
|
||||
const loadingSubData = ref(false)
|
||||
const agreeToShowDialog = ref(false)
|
||||
const mediaSelected = ref<any>(null)
|
||||
const markingSelected = ref<any>(null)
|
||||
const reportMeta = ref<any>(computed(() => props.filters))
|
||||
const parameterRequest = ref<any>({
|
||||
media: null,
|
||||
marking: null
|
||||
})
|
||||
|
||||
const setParameterRequest = (media: any, marking: any) => {
|
||||
mediaSelected.value = media
|
||||
markingSelected.value = marking
|
||||
|
||||
if (media != null && marking != null) {
|
||||
const setParameterRequest = (data: any) => {
|
||||
parameterRequest.value = data
|
||||
const parameter = parameterRequest.value
|
||||
if (parameter.media != null && parameter.marking != null) {
|
||||
agreeToShowDialog.value = true
|
||||
} else {
|
||||
agreeToShowDialog.value = false
|
||||
@@ -1096,11 +1112,7 @@ const resetData = () => {
|
||||
|
||||
const getDetail = async () => {
|
||||
resetData()
|
||||
const { ulp, uid, up3, jenisLaporan, periode } = filters.value
|
||||
console.table('LAPPGU', jenisLaporan)
|
||||
console.log('Media', mediaSelected.value)
|
||||
console.log('isMarking', markingSelected.value)
|
||||
console.log('periode', periode)
|
||||
const { jenisLaporan, periode } = filters.value
|
||||
|
||||
const dateValue = periode.split(' s/d ')
|
||||
const selected = dataSelected.value
|
||||
@@ -1115,11 +1127,12 @@ const getDetail = async () => {
|
||||
idUid: selected?.id_uid ? selected?.id_uid : 0,
|
||||
idUp3: selected?.id_up3 ? selected?.id_up3 : 0,
|
||||
namaRegional: '',
|
||||
media: mediaSelected.value,
|
||||
isMarking: markingSelected.value
|
||||
media: parameterRequest.value?.media,
|
||||
isMarking: parameterRequest.value?.marking
|
||||
}
|
||||
|
||||
loadingSubData.value = true
|
||||
emit('update:loadingSubData', true)
|
||||
await requestGraphQl(
|
||||
jenisLaporan.name == 'Laporan Berulang Unit'
|
||||
? queries.anomali.gangguan.unitBerulangDetail
|
||||
@@ -1147,6 +1160,7 @@ const getDetail = async () => {
|
||||
.finally(() => {
|
||||
loadingSubData.value = false
|
||||
dialogDetail.value = true
|
||||
emit('update:loadingSubData', false)
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user