fix: all table and anomali gangguan petugas

This commit is contained in:
kur0nek-o
2024-04-17 17:57:28 +07:00
parent 00ff360e5b
commit 781e4403aa
70 changed files with 403 additions and 50 deletions

View File

@@ -22,6 +22,8 @@
<Anomali_LAPPGP_LPT
:data="data"
:filters="filters"
:grouping="grouping"
:loading-data="loadingData"
@update:data-sub="dataSub = $event"
@update:loading-sub-data="loadingSubData = $event"
@update:marking="marking = $event"
@@ -48,6 +50,21 @@ import { apolloClient } from '@/utils/api/api.graphql'
import { provideApolloClient } from '@vue/apollo-composable'
import BufferDialog from '@/components/Dialogs/BufferDialog.vue'
const grouping = ref<any[]>([
{
data: '',
caption: 'Semua Unit'
},
{
data: 'nama_uid',
caption: 'UID'
},
{
data: 'nama_up3',
caption: 'UP3'
}
])
const client = apolloClient()
provideApolloClient(client)
const data = ref<any[]>([])
@@ -76,6 +93,46 @@ const filterData = async (params: any) => {
const { ulp, uid, up3, jenisLaporan } = params
console.table('LAPPGP', jenisLaporan)
var groupList: any[] = [
{
data: '',
caption: 'Semua Unit'
},
{
data: 'nama_uid',
caption: 'UID'
},
{
data: 'nama_up3',
caption: 'UP3'
}
]
if (uid?.id != 0) {
groupList.forEach((item, index) => {
if (item.caption == 'Semua Unit') {
groupList.splice(index, 1)
}
})
if (up3?.id != 0) {
groupList.forEach((item, index) => {
if (item.caption == 'UID') {
groupList.splice(index, 1)
}
})
if (ulp?.id != 0) {
groupList.forEach((item, index) => {
if (item.caption == 'UP3') {
groupList.splice(index, 1)
}
})
}
}
}
grouping.value = groupList
const dateValue = params.periode.split(' s/d ')
const query = {
dateFrom: dateValue[0]