fix: anomali keluhan
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
/>
|
||||
</Filters>
|
||||
|
||||
<Anomali_LAPPKU_LPT :data="data" :loading="loadingData" :filters="filters" />
|
||||
<Anomali_LAPPKU_LPT :data="data" :loading="loadingData" :grouping="grouping" :filters="filters" />
|
||||
<Anomali_LAPPKU_LPP :data="dataSecond" :filters="filters" />
|
||||
</template>
|
||||
|
||||
@@ -43,6 +43,21 @@ const filters = ref({
|
||||
up3: 0
|
||||
})
|
||||
|
||||
const grouping = ref<any[]>([
|
||||
{
|
||||
data: '',
|
||||
caption: 'Semua Unit'
|
||||
},
|
||||
{
|
||||
data: 'nama_uid',
|
||||
caption: 'UID'
|
||||
},
|
||||
{
|
||||
data: 'nama_up3',
|
||||
caption: 'UP3'
|
||||
}
|
||||
])
|
||||
|
||||
const resetData = () => {
|
||||
data.value = []
|
||||
dataSecond.value = []
|
||||
@@ -53,6 +68,46 @@ const filterData = async (params: any) => {
|
||||
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