Merge branch 'dev-defuj' of github.com:defuj/eis into dev-bagus
This commit is contained in:
@ -23,7 +23,7 @@
|
||||
:allow-column-resizing="true"
|
||||
column-resizing-mode="widget"
|
||||
>
|
||||
<DxGrouping :auto-expand-all="false" />
|
||||
<DxGrouping :auto-expand-all="false" :context-menu-enabled="true" expand-mode="rowClick" />
|
||||
<DxSelection mode="single" />
|
||||
<!-- <DxPaging :page-size="40" :enabled="true" />
|
||||
<DxPager
|
||||
@ -320,13 +320,13 @@
|
||||
</DxColumn>
|
||||
|
||||
<template #formatText="{ data }">
|
||||
<p class="text-left cursor-pointer" @click="showDialogDataSelected()">
|
||||
<p class="text-left cursor-pointer" @click="showDetail()">
|
||||
{{ data.text }}
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<template #formatNumber="{ data }">
|
||||
<p class="text-right cursor-pointer" @click="showDialogDataSelected()">
|
||||
<p class="text-right cursor-pointer" @click="showDetail()">
|
||||
{{
|
||||
isNumber(data.text)
|
||||
? data.column.caption == '%'
|
||||
@ -338,7 +338,7 @@
|
||||
</template>
|
||||
|
||||
<template #formatTime="{ data }">
|
||||
<p @click="showDialogDataSelected()">
|
||||
<p @click="showDetail()">
|
||||
{{ parseInt(data.text) ? formatWaktu(data.text) : '-' }}
|
||||
</p>
|
||||
</template>
|
||||
@ -510,9 +510,9 @@
|
||||
</div>
|
||||
|
||||
<DetailDialog
|
||||
:open="dialogDataSelected"
|
||||
:open="dialogDetail"
|
||||
title="Detail Gangguan All"
|
||||
@on-close="closeDialogDataSelected"
|
||||
@on-close="closedialogDetail"
|
||||
:full-width="true"
|
||||
>
|
||||
<div class="w-full mb-4 lg:w-[70%] lg:float-left">
|
||||
@ -533,10 +533,10 @@
|
||||
column-resizing-mode="widget"
|
||||
>
|
||||
<DxSelection mode="single" />
|
||||
<DxPaging :page-size="5" :enabled="true" />
|
||||
<DxPaging :page-size="20" :enabled="true" />
|
||||
<DxPager
|
||||
:visible="true"
|
||||
:allowed-page-sizes="[5, 10, 20]"
|
||||
:allowed-page-sizes="[20, 50, 100]"
|
||||
display-mode="full"
|
||||
:show-page-size-selector="true"
|
||||
:show-info="true"
|
||||
@ -1038,12 +1038,13 @@ const data = ref<any[]>([])
|
||||
const dataSub = ref<any[]>([])
|
||||
const dataSelected = ref<any>(null)
|
||||
const dataSubSelected = ref<any>(null)
|
||||
const dialogDataSelected = ref(false)
|
||||
const closeDialogDataSelected = () => (dialogDataSelected.value = false)
|
||||
const dialogDetail = ref(false)
|
||||
const closedialogDetail = () => (dialogDetail.value = false)
|
||||
const loadingData = ref(false)
|
||||
const loadingSubData = ref(false)
|
||||
|
||||
const filterData = (params: any) => {
|
||||
loadingData.value = true
|
||||
const { posko, uid, up3 } = params
|
||||
const dateValue = params.periode.split(' s/d ')
|
||||
|
||||
@ -1102,8 +1103,6 @@ const getDetail = () => {
|
||||
query
|
||||
)
|
||||
|
||||
refetch(query)
|
||||
|
||||
onResult((queryResult) => {
|
||||
if (queryResult.data != undefined) {
|
||||
dataSub.value = queryResult.data.detailGangguan
|
||||
@ -1118,13 +1117,15 @@ const getDetail = () => {
|
||||
loadingSubData.value = value
|
||||
})
|
||||
}
|
||||
|
||||
const showDialogDataSelected = () => {
|
||||
const currentDataSelected = ref<any>(null)
|
||||
const showDetail = () => {
|
||||
if (dataSelected.value != null) {
|
||||
dataSub.value = []
|
||||
dataSubSelected.value = null
|
||||
dialogDataSelected.value = true
|
||||
getDetail()
|
||||
if (currentDataSelected.value == dataSelected.value) {
|
||||
dataSub.value = []
|
||||
dataSubSelected.value = null
|
||||
dialogDetail.value = true
|
||||
getDetail()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1262,8 +1263,11 @@ const onExporting = (e: any) => {
|
||||
}
|
||||
|
||||
const onDataSelectionChanged = ({ selectedRowsData }: any) => {
|
||||
dataSelected.value = selectedRowsData[0]
|
||||
showDialogDataSelected()
|
||||
if (dataSelected.value != selectedRowsData[0]) {
|
||||
dataSelected.value = selectedRowsData[0]
|
||||
currentDataSelected.value = selectedRowsData[0]
|
||||
showDetail()
|
||||
}
|
||||
}
|
||||
|
||||
const onDataSubSelectionChanged = ({ selectedRowsData }: any) => {
|
||||
|
Reference in New Issue
Block a user