fix: anomali gangguan
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
:data="data"
|
||||
:filters="filters"
|
||||
:loading-data="loadingData"
|
||||
:grouping="grouping"
|
||||
@update:loading-sub-data="loadingData = $event"
|
||||
/>
|
||||
<Anomali_LAPPGU_LPP :data="dataSecond" :filters="filters" />
|
||||
@@ -60,11 +61,66 @@ const resetData = () => {
|
||||
dataSecond.value = []
|
||||
}
|
||||
|
||||
const grouping = ref<any[]>([
|
||||
{
|
||||
data: '',
|
||||
caption: 'Semua Unit'
|
||||
},
|
||||
{
|
||||
data: 'nama_uid',
|
||||
caption: 'UID'
|
||||
},
|
||||
{
|
||||
data: 'nama_up3',
|
||||
caption: 'UP3'
|
||||
}
|
||||
])
|
||||
|
||||
const filterData = async (params: any) => {
|
||||
resetData()
|
||||
const { ulp, uid, up3, jenisLaporan } = params
|
||||
console.table('LAPPGU', 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]
|
||||
|
Reference in New Issue
Block a user