Update GraphQL queries in Monalisa Gangguan Rekap components
This commit is contained in:
parent
5068ba649d
commit
f82fc81362
@ -66,6 +66,7 @@ import { Workbook } from 'exceljs'
|
|||||||
import { useQuery } from '@vue/apollo-composable'
|
import { useQuery } from '@vue/apollo-composable'
|
||||||
import gql from 'graphql-tag'
|
import gql from 'graphql-tag'
|
||||||
import { getMonthName } from '@/utils/texts'
|
import { getMonthName } from '@/utils/texts'
|
||||||
|
import { queries } from '@/utils/graphql'
|
||||||
|
|
||||||
const currentYear = ref(new Date().getFullYear())
|
const currentYear = ref(new Date().getFullYear())
|
||||||
const currentMonth = ref(new Date().getMonth())
|
const currentMonth = ref(new Date().getMonth())
|
||||||
@ -105,61 +106,7 @@ const onExporting = (e: any) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// const monalisaDispatchingTimeGangguan = gql`
|
const { onResult, onError, loading, refetch } = useQuery(queries.monalisa.gangguan.rekap.dispatchingTimeGangguan, {
|
||||||
// query DaftarmonalisaDispatchingTimeGangguan(
|
|
||||||
// $regional: String
|
|
||||||
// $posko: Int
|
|
||||||
// $idUid: Int
|
|
||||||
// $idUp3: Int
|
|
||||||
// $bulan: Int
|
|
||||||
// $tahun: Int
|
|
||||||
// ) {
|
|
||||||
// monalisaDispatchingTimeGangguan(
|
|
||||||
// regional: $regional
|
|
||||||
// posko: $posko
|
|
||||||
// idUid: $idUid
|
|
||||||
// idUp3: $idUp3
|
|
||||||
// bulan: $bulan
|
|
||||||
// tahun: $tahun
|
|
||||||
// ) {
|
|
||||||
// jumlah_bulan
|
|
||||||
// jumlah_bulan_n_1
|
|
||||||
// jumlah_tahun
|
|
||||||
// jumlah_tahun_n_1
|
|
||||||
// nama_posko
|
|
||||||
// persen_bulan
|
|
||||||
// persen_tahun
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// `
|
|
||||||
|
|
||||||
const monalisaDispatchingTimeGangguan = gql`
|
|
||||||
query DaftarmonalisaDispatchingTimeGangguan(
|
|
||||||
$idUid: Int
|
|
||||||
$idUp3: Int
|
|
||||||
$idUlp: Int
|
|
||||||
$bulan: Int
|
|
||||||
$tahun: Int
|
|
||||||
) {
|
|
||||||
monalisaDispatchingTimeGangguan(
|
|
||||||
idUid: $idUid
|
|
||||||
idUp3: $idUp3
|
|
||||||
idUlp: $idUlp
|
|
||||||
bulan: $bulan
|
|
||||||
tahun: $tahun
|
|
||||||
) {
|
|
||||||
nama_ulp
|
|
||||||
mom_bulan_ini
|
|
||||||
mom_bulan_kemarin
|
|
||||||
persen_mom
|
|
||||||
yoy_tahun_ini
|
|
||||||
yoy_tahun_kemarin
|
|
||||||
persen_yoy
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`
|
|
||||||
|
|
||||||
const { onResult, onError, loading, refetch } = useQuery(monalisaDispatchingTimeGangguan, {
|
|
||||||
// regional: 0,
|
// regional: 0,
|
||||||
idUp3: 0,
|
idUp3: 0,
|
||||||
idUid: 0,
|
idUid: 0,
|
||||||
|
@ -66,6 +66,7 @@ import { Workbook } from 'exceljs'
|
|||||||
import { useQuery } from '@vue/apollo-composable'
|
import { useQuery } from '@vue/apollo-composable'
|
||||||
import gql from 'graphql-tag'
|
import gql from 'graphql-tag'
|
||||||
import { getMonthName } from '@/utils/texts'
|
import { getMonthName } from '@/utils/texts'
|
||||||
|
import { queries } from '@/utils/graphql'
|
||||||
|
|
||||||
const currentYear = ref(new Date().getFullYear())
|
const currentYear = ref(new Date().getFullYear())
|
||||||
const currentMonth = ref(new Date().getMonth())
|
const currentMonth = ref(new Date().getMonth())
|
||||||
@ -77,40 +78,8 @@ const showPane = ref(true)
|
|||||||
const data = ref<any[]>([])
|
const data = ref<any[]>([])
|
||||||
const dataDetail = ref<any>()
|
const dataDetail = ref<any>()
|
||||||
const showDetail = ref(false)
|
const showDetail = ref(false)
|
||||||
const monalisaRekapitulasiEnsGangguan = gql`
|
|
||||||
query DaftarmonalisaRekapitulasiEnsGangguan(
|
const { onResult, onError, loading, refetch } = useQuery(queries.monalisa.gangguan.rekap.rekapitulasiEnsGangguan, {
|
||||||
#$regional: String
|
|
||||||
$idUlp: Int
|
|
||||||
$idUid: Int
|
|
||||||
$idUp3: Int
|
|
||||||
$bulan: Int
|
|
||||||
$tahun: Int
|
|
||||||
) {
|
|
||||||
monalisaRekapitulasiEnsGangguan(
|
|
||||||
#regional: $regional
|
|
||||||
idUlp: $idUlp
|
|
||||||
idUid: $idUid
|
|
||||||
idUp3: $idUp3
|
|
||||||
bulan: $bulan
|
|
||||||
tahun: $tahun
|
|
||||||
) {
|
|
||||||
nama_regional
|
|
||||||
id_uid
|
|
||||||
nama_uid
|
|
||||||
id_up3
|
|
||||||
nama_up3
|
|
||||||
id_ulp
|
|
||||||
nama_ulp
|
|
||||||
mom_bulan_ini
|
|
||||||
mom_bulan_kemarin
|
|
||||||
persen_mom
|
|
||||||
yoy_tahun_ini
|
|
||||||
yoy_tahun_kemarin
|
|
||||||
persen_yoy
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`
|
|
||||||
const { onResult, onError, loading, refetch } = useQuery(monalisaRekapitulasiEnsGangguan, {
|
|
||||||
bulan: 10,
|
bulan: 10,
|
||||||
tahun: 2023,
|
tahun: 2023,
|
||||||
regional: '',
|
regional: '',
|
||||||
|
@ -51,6 +51,7 @@ import { saveAs } from 'file-saver'
|
|||||||
import { Workbook } from 'exceljs'
|
import { Workbook } from 'exceljs'
|
||||||
import { useQuery } from '@vue/apollo-composable'
|
import { useQuery } from '@vue/apollo-composable'
|
||||||
import gql from 'graphql-tag'
|
import gql from 'graphql-tag'
|
||||||
|
import { queries } from '@/utils/graphql'
|
||||||
|
|
||||||
const currentYear = ref(new Date().getFullYear())
|
const currentYear = ref(new Date().getFullYear())
|
||||||
const currentMonth = ref(new Date().getMonth())
|
const currentMonth = ref(new Date().getMonth())
|
||||||
@ -62,37 +63,7 @@ const showPane = ref(true)
|
|||||||
const data = ref<any[]>([])
|
const data = ref<any[]>([])
|
||||||
const dataDetail = ref<any>()
|
const dataDetail = ref<any>()
|
||||||
const showDetail = ref(false)
|
const showDetail = ref(false)
|
||||||
const monalisaGangguanBelumSelesai = gql`
|
const { onResult, onError, loading, refetch } = useQuery(queries.monalisa.gangguan.rekap.gangguanBelumSelesai, {
|
||||||
query DaftarmonalisaGangguanBelumSelesai(
|
|
||||||
#$regional: String
|
|
||||||
$idUlp: Int
|
|
||||||
$idUid: Int
|
|
||||||
$idUp3: Int
|
|
||||||
$bulan: Int
|
|
||||||
$tahun: Int
|
|
||||||
) {
|
|
||||||
monalisaGangguanBelumSelesai(
|
|
||||||
#regional: $regional
|
|
||||||
idUlp: $idUlp
|
|
||||||
idUid: $idUid
|
|
||||||
idUp3: $idUp3
|
|
||||||
bulan: $bulan
|
|
||||||
tahun: $tahun
|
|
||||||
) {
|
|
||||||
nama_regional
|
|
||||||
id_uid
|
|
||||||
nama_uid
|
|
||||||
id_up3
|
|
||||||
nama_up3
|
|
||||||
id_ulp
|
|
||||||
nama_ulp
|
|
||||||
jumlah_gangguan
|
|
||||||
jumlah_informasi
|
|
||||||
total
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`
|
|
||||||
const { onResult, onError, loading, refetch } = useQuery(monalisaGangguanBelumSelesai, {
|
|
||||||
regional: '',
|
regional: '',
|
||||||
idUlp: 0,
|
idUlp: 0,
|
||||||
idUid: 0,
|
idUid: 0,
|
||||||
|
@ -56,6 +56,7 @@ import { saveAs } from 'file-saver'
|
|||||||
import { Workbook } from 'exceljs'
|
import { Workbook } from 'exceljs'
|
||||||
import { useQuery } from '@vue/apollo-composable'
|
import { useQuery } from '@vue/apollo-composable'
|
||||||
import gql from 'graphql-tag'
|
import gql from 'graphql-tag'
|
||||||
|
import { queries } from '@/utils/graphql'
|
||||||
const currentYear = ref(new Date().getFullYear())
|
const currentYear = ref(new Date().getFullYear())
|
||||||
const currentMonth = ref(new Date().getMonth())
|
const currentMonth = ref(new Date().getMonth())
|
||||||
const lastYear = ref(currentYear.value - 1)
|
const lastYear = ref(currentYear.value - 1)
|
||||||
@ -66,31 +67,7 @@ const showPane = ref(true)
|
|||||||
const data = ref<any[]>([])
|
const data = ref<any[]>([])
|
||||||
const dataDetail = ref<any>()
|
const dataDetail = ref<any>()
|
||||||
const showDetail = ref(false)
|
const showDetail = ref(false)
|
||||||
const monalisaGangguanPerJenisGangguan = gql`
|
const { onResult, onError, loading, refetch } = useQuery(queries.monalisa.gangguan.rekap.gangguanPerJenisGangguan, {
|
||||||
query DaftarmonalisaGangguanPerJenisGangguan(
|
|
||||||
#$nama_regional: String
|
|
||||||
$idUid: Int
|
|
||||||
$idUp3: Int
|
|
||||||
$idUlp: Int
|
|
||||||
$bulan: Int
|
|
||||||
$tahun: Int
|
|
||||||
) {
|
|
||||||
monalisaGangguanPerJenisGangguan(
|
|
||||||
#nama_regional: $regional
|
|
||||||
idUid: $idUid
|
|
||||||
idUp3: $idUp3
|
|
||||||
idUlp: $idUlp
|
|
||||||
bulan: $bulan
|
|
||||||
tahun: $tahun
|
|
||||||
) {
|
|
||||||
id_jenis_gangguan
|
|
||||||
nama_jenis_gangguan
|
|
||||||
jumlah
|
|
||||||
persen
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`
|
|
||||||
const { onResult, onError, loading, refetch } = useQuery(monalisaGangguanPerJenisGangguan, {
|
|
||||||
bulan: 10,
|
bulan: 10,
|
||||||
tahun: 2023,
|
tahun: 2023,
|
||||||
regional: '',
|
regional: '',
|
||||||
|
@ -100,6 +100,7 @@ import { Workbook } from 'exceljs'
|
|||||||
import { useQuery } from '@vue/apollo-composable'
|
import { useQuery } from '@vue/apollo-composable'
|
||||||
import gql from 'graphql-tag'
|
import gql from 'graphql-tag'
|
||||||
import { getMonthName } from '@/utils/texts'
|
import { getMonthName } from '@/utils/texts'
|
||||||
|
import { queries } from '@/utils/graphql'
|
||||||
|
|
||||||
const currentYear = ref(new Date().getFullYear())
|
const currentYear = ref(new Date().getFullYear())
|
||||||
const currentMonth = ref(new Date().getMonth())
|
const currentMonth = ref(new Date().getMonth())
|
||||||
@ -110,45 +111,7 @@ const showPane = ref(true)
|
|||||||
const data = ref<any[]>([])
|
const data = ref<any[]>([])
|
||||||
const dataDetail = ref<any>()
|
const dataDetail = ref<any>()
|
||||||
const showDetail = ref(false)
|
const showDetail = ref(false)
|
||||||
const monalisaJumlahDurasiRptRctGangguan = gql`
|
const { onResult, onError, loading, refetch } = useQuery(queries.monalisa.gangguan.rekap.jumlahDurasiRptRctGangguan, {
|
||||||
query DaftarmonalisaJumlahDurasiRptRctGangguan(
|
|
||||||
#$regional: String
|
|
||||||
$idUlp: Int
|
|
||||||
$idUid: Int
|
|
||||||
$idUp3: Int
|
|
||||||
$bulan: Int
|
|
||||||
$tahun: Int
|
|
||||||
) {
|
|
||||||
monalisaJumlahDurasiRptRctGangguan(
|
|
||||||
#regional: $regional
|
|
||||||
idUlp: $idUlp
|
|
||||||
idUid: $idUid
|
|
||||||
idUp3: $idUp3
|
|
||||||
bulan: $bulan
|
|
||||||
tahun: $tahun
|
|
||||||
) {
|
|
||||||
id_uid
|
|
||||||
nama_uid
|
|
||||||
id_up3
|
|
||||||
nama_up3
|
|
||||||
id_ulp
|
|
||||||
nama_ulp
|
|
||||||
total_durasi_response_time_bulan_ini
|
|
||||||
count_durasi_response_time_bulan_ini
|
|
||||||
avg_durasi_response_time_bulan_ini
|
|
||||||
total_durasi_recovery_time_bulan_ini
|
|
||||||
count_durasi_recovery_time_bulan_ini
|
|
||||||
avg_durasi_recovery_time_bulan_ini
|
|
||||||
total_durasi_response_time_tahun_ini
|
|
||||||
count_durasi_response_time_tahun_ini
|
|
||||||
avg_durasi_response_time_tahun_ini
|
|
||||||
total_durasi_recovery_time_tahun_ini
|
|
||||||
count_durasi_recovery_time_tahun_ini
|
|
||||||
avg_durasi_recovery_time_tahun_ini
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`
|
|
||||||
const { onResult, onError, loading, refetch } = useQuery(monalisaJumlahDurasiRptRctGangguan, {
|
|
||||||
bulan: 10,
|
bulan: 10,
|
||||||
tahun: 2023,
|
tahun: 2023,
|
||||||
// regional: '',
|
// regional: '',
|
||||||
|
@ -90,6 +90,7 @@ import { saveAs } from 'file-saver'
|
|||||||
import { Workbook } from 'exceljs'
|
import { Workbook } from 'exceljs'
|
||||||
import { useQuery } from '@vue/apollo-composable'
|
import { useQuery } from '@vue/apollo-composable'
|
||||||
import gql from 'graphql-tag'
|
import gql from 'graphql-tag'
|
||||||
|
import { queries } from '@/utils/graphql'
|
||||||
|
|
||||||
const position = { of: '#data' }
|
const position = { of: '#data' }
|
||||||
const showIndicator = ref(true)
|
const showIndicator = ref(true)
|
||||||
@ -130,63 +131,7 @@ const tahunSekarang = ref(new Date().getFullYear())
|
|||||||
const bulanSekarang = ref(new Date().getMonth())
|
const bulanSekarang = ref(new Date().getMonth())
|
||||||
const tahunLalu = ref(tahunSekarang.value - 1)
|
const tahunLalu = ref(tahunSekarang.value - 1)
|
||||||
|
|
||||||
// const MONALISAJUMLAHKALIGANGGUAN = gql`
|
const { onResult, onError, loading, refetch } = useQuery(queries.monalisa.gangguan.rekap.jumlahKaliGangguan, {
|
||||||
// query DaftarMonalisaJumlahKaliGangguan(
|
|
||||||
// $regional: String
|
|
||||||
// $idUid: Int
|
|
||||||
// $idUp3: Int
|
|
||||||
// $idUlp: Int
|
|
||||||
// $bulan: Int
|
|
||||||
// $tahun: Int
|
|
||||||
// ) {
|
|
||||||
// monalisaJumlahKaliGangguan(
|
|
||||||
// regional: $regional
|
|
||||||
// idUid: $idUid
|
|
||||||
// idUp3: $idUp3
|
|
||||||
// $idUlp: $idUlp
|
|
||||||
// bulan: $bulan
|
|
||||||
// tahun: $tahun
|
|
||||||
// ) {
|
|
||||||
// jumlah_bulan
|
|
||||||
// jumlah_bulan_n_1
|
|
||||||
// jumlah_tahun
|
|
||||||
// jumlah_tahun_n_1
|
|
||||||
// nama_posko
|
|
||||||
// persen_bulan
|
|
||||||
// persen_tahun
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// `
|
|
||||||
|
|
||||||
const MONALISAJUMLAHKALIGANGGUAN = gql`
|
|
||||||
query DaftarMonalisaJumlahKaliGangguan(
|
|
||||||
$idUid: Int
|
|
||||||
$idUp3: Int
|
|
||||||
$idUlp: Int
|
|
||||||
$bulan: Int
|
|
||||||
$tahun: Int
|
|
||||||
) {
|
|
||||||
monalisaJumlahKaliGangguan(
|
|
||||||
idUid: $idUid
|
|
||||||
idUp3: $idUp3
|
|
||||||
idUlp: $idUlp
|
|
||||||
bulan: $bulan
|
|
||||||
tahun: $tahun
|
|
||||||
) {
|
|
||||||
nama_uid
|
|
||||||
nama_up3
|
|
||||||
nama_ulp
|
|
||||||
mom_bulan_ini
|
|
||||||
mom_bulan_kemarin
|
|
||||||
persen_mom
|
|
||||||
yoy_tahun_ini
|
|
||||||
yoy_tahun_kemarin
|
|
||||||
persen_yoy
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`
|
|
||||||
|
|
||||||
const { onResult, onError, loading, refetch } = useQuery(MONALISAJUMLAHKALIGANGGUAN, {
|
|
||||||
// regional: 0,
|
// regional: 0,
|
||||||
idUp3: 0,
|
idUp3: 0,
|
||||||
idUid: 0,
|
idUid: 0,
|
||||||
|
@ -66,6 +66,7 @@ import { Workbook } from 'exceljs'
|
|||||||
import { useQuery } from '@vue/apollo-composable'
|
import { useQuery } from '@vue/apollo-composable'
|
||||||
import gql from 'graphql-tag'
|
import gql from 'graphql-tag'
|
||||||
import { getMonthName } from '@/utils/texts'
|
import { getMonthName } from '@/utils/texts'
|
||||||
|
import { queries } from '@/utils/graphql'
|
||||||
|
|
||||||
const currentYear = ref(new Date().getFullYear())
|
const currentYear = ref(new Date().getFullYear())
|
||||||
const currentMonth = ref(new Date().getMonth())
|
const currentMonth = ref(new Date().getMonth())
|
||||||
@ -77,40 +78,7 @@ const showPane = ref(true)
|
|||||||
const data = ref<any[]>([])
|
const data = ref<any[]>([])
|
||||||
const dataDetail = ref<any>()
|
const dataDetail = ref<any>()
|
||||||
const showDetail = ref(false)
|
const showDetail = ref(false)
|
||||||
const monalisaRekapitulasiLaporUlangGangguan = gql`
|
const { onResult, onError, loading, refetch } = useQuery(queries.monalisa.gangguan.rekap.laporUlangGangguan, {
|
||||||
query DaftarmonalisaRekapitulasiLaporUlangGangguan(
|
|
||||||
#$regional: String
|
|
||||||
$idUlp: Int
|
|
||||||
$idUid: Int
|
|
||||||
$idUp3: Int
|
|
||||||
$bulan: Int
|
|
||||||
$tahun: Int
|
|
||||||
) {
|
|
||||||
monalisaRekapitulasiLaporUlangGangguan(
|
|
||||||
#regional: $regional
|
|
||||||
idUlp: $idUlp
|
|
||||||
idUid: $idUid
|
|
||||||
idUp3: $idUp3
|
|
||||||
bulan: $bulan
|
|
||||||
tahun: $tahun
|
|
||||||
) {
|
|
||||||
nama_regional
|
|
||||||
id_uid
|
|
||||||
nama_uid
|
|
||||||
id_up3
|
|
||||||
nama_up3
|
|
||||||
id_ulp
|
|
||||||
nama_ulp
|
|
||||||
mom_bulan_ini
|
|
||||||
mom_bulan_kemarin
|
|
||||||
persen_mom
|
|
||||||
yoy_tahun_ini
|
|
||||||
yoy_tahun_kemarin
|
|
||||||
persen_yoy
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`
|
|
||||||
const { onResult, onError, loading, refetch } = useQuery(monalisaRekapitulasiLaporUlangGangguan, {
|
|
||||||
bulan: 10,
|
bulan: 10,
|
||||||
tahun: 2023,
|
tahun: 2023,
|
||||||
regional: '',
|
regional: '',
|
||||||
|
@ -66,6 +66,7 @@ import { Workbook } from 'exceljs'
|
|||||||
import { useQuery } from '@vue/apollo-composable'
|
import { useQuery } from '@vue/apollo-composable'
|
||||||
import gql from 'graphql-tag'
|
import gql from 'graphql-tag'
|
||||||
import { getMonthName } from '@/utils/texts'
|
import { getMonthName } from '@/utils/texts'
|
||||||
|
import { queries } from '@/utils/graphql'
|
||||||
|
|
||||||
const currentYear = ref(new Date().getFullYear())
|
const currentYear = ref(new Date().getFullYear())
|
||||||
const currentMonth = ref(new Date().getMonth())
|
const currentMonth = ref(new Date().getMonth())
|
||||||
@ -76,61 +77,7 @@ const shading = ref(true)
|
|||||||
const showPane = ref(true)
|
const showPane = ref(true)
|
||||||
const data = ref<any[]>([])
|
const data = ref<any[]>([])
|
||||||
|
|
||||||
// const monalisaRecoveryTimeGangguan = gql`
|
const { onResult, onError, loading, refetch } = useQuery(queries.monalisa.gangguan.rekap.recoveryTimeGangguan, {
|
||||||
// query DaftarmonalisaRecoveryTimeGangguan(
|
|
||||||
// $regional: regional
|
|
||||||
// $posko: Int
|
|
||||||
// $idUid: Int
|
|
||||||
// $idUp3: Int
|
|
||||||
// $bulan: Int
|
|
||||||
// $tahun: Int
|
|
||||||
// ) {
|
|
||||||
// monalisaRecoveryTimeGangguan(
|
|
||||||
// regional: $regional
|
|
||||||
// posko: $posko
|
|
||||||
// idUid: $idUid
|
|
||||||
// idUp3: $idUp3
|
|
||||||
// bulan: $bulan
|
|
||||||
// tahun: $tahun
|
|
||||||
// ) {
|
|
||||||
// jumlah_bulan
|
|
||||||
// jumlah_bulan_n_1
|
|
||||||
// jumlah_tahun
|
|
||||||
// jumlah_tahun_n_1
|
|
||||||
// nama_posko
|
|
||||||
// persen_bulan
|
|
||||||
// persen_tahun
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// `
|
|
||||||
|
|
||||||
const monalisaRecoveryTimeGangguan = gql`
|
|
||||||
query DaftarmonalisaRecoveryTimeGangguan(
|
|
||||||
$idUid: Int
|
|
||||||
$idUp3: Int
|
|
||||||
$idUlp: Int
|
|
||||||
$bulan: Int
|
|
||||||
$tahun: Int
|
|
||||||
) {
|
|
||||||
monalisaRecoveryTimeGangguan(
|
|
||||||
idUid: $idUid
|
|
||||||
idUp3: $idUp3
|
|
||||||
idUlp: $idUlp
|
|
||||||
bulan: $bulan
|
|
||||||
tahun: $tahun
|
|
||||||
) {
|
|
||||||
nama_ulp
|
|
||||||
mom_bulan_ini
|
|
||||||
mom_bulan_kemarin
|
|
||||||
persen_mom
|
|
||||||
yoy_tahun_ini
|
|
||||||
yoy_tahun_kemarin
|
|
||||||
persen_yoy
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`
|
|
||||||
|
|
||||||
const { onResult, onError, loading, refetch } = useQuery(monalisaRecoveryTimeGangguan, {
|
|
||||||
// regional: 0,
|
// regional: 0,
|
||||||
idUp3: 0,
|
idUp3: 0,
|
||||||
idUid: 0,
|
idUid: 0,
|
||||||
|
@ -66,6 +66,7 @@ import { Workbook } from 'exceljs'
|
|||||||
import gql from 'graphql-tag'
|
import gql from 'graphql-tag'
|
||||||
import { useQuery } from '@vue/apollo-composable'
|
import { useQuery } from '@vue/apollo-composable'
|
||||||
import { getMonthName } from '@/utils/texts'
|
import { getMonthName } from '@/utils/texts'
|
||||||
|
import { queries } from '@/utils/graphql'
|
||||||
|
|
||||||
const currentYear = ref(new Date().getFullYear())
|
const currentYear = ref(new Date().getFullYear())
|
||||||
const currentMonth = ref(new Date().getMonth())
|
const currentMonth = ref(new Date().getMonth())
|
||||||
@ -76,61 +77,7 @@ const shading = ref(true)
|
|||||||
const showPane = ref(true)
|
const showPane = ref(true)
|
||||||
const data = ref<any[]>([])
|
const data = ref<any[]>([])
|
||||||
|
|
||||||
// const monalisaResponseTimeKeluhan = gql`
|
const { onResult, onError, loading, refetch } = useQuery(queries.monalisa.gangguan.rekap.responseTimeGangguan, {
|
||||||
// query DaftarmonalisaResponseTimeKeluhan(
|
|
||||||
// $regional: String
|
|
||||||
// $posko: Int
|
|
||||||
// $idUid: Int
|
|
||||||
// $idUp3: Int
|
|
||||||
// $bulan: Int
|
|
||||||
// $tahun: Int
|
|
||||||
// ) {
|
|
||||||
// monalisaResponseTimeKeluhan(
|
|
||||||
// regional: $regional
|
|
||||||
// posko: $posko
|
|
||||||
// idUid: $idUid
|
|
||||||
// idUp3: $idUp3
|
|
||||||
// bulan: $bulan
|
|
||||||
// tahun: $tahun
|
|
||||||
// ) {
|
|
||||||
// jumlah_bulan
|
|
||||||
// jumlah_bulan_n_1
|
|
||||||
// jumlah_tahun
|
|
||||||
// jumlah_tahun_n_1
|
|
||||||
// nama_posko
|
|
||||||
// persen_bulan
|
|
||||||
// persen_tahun
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// `
|
|
||||||
|
|
||||||
const monalisaResponseTimeKeluhan = gql`
|
|
||||||
query DaftarmonalisaResponseTimeKeluhan(
|
|
||||||
$idUid: Int
|
|
||||||
$idUp3: Int
|
|
||||||
$idUlp: Int
|
|
||||||
$bulan: Int
|
|
||||||
$tahun: Int
|
|
||||||
) {
|
|
||||||
monalisaResponseTimeKeluhan(
|
|
||||||
idUid: $idUid
|
|
||||||
idUp3: $idUp3
|
|
||||||
idUlp: $idUlp
|
|
||||||
bulan: $bulan
|
|
||||||
tahun: $tahun
|
|
||||||
) {
|
|
||||||
nama_ulp
|
|
||||||
mom_bulan_ini
|
|
||||||
mom_bulan_kemarin
|
|
||||||
persen_mom
|
|
||||||
yoy_tahun_ini
|
|
||||||
yoy_tahun_kemarin
|
|
||||||
persen_yoy
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`
|
|
||||||
|
|
||||||
const { onResult, onError, loading, refetch } = useQuery(monalisaResponseTimeKeluhan, {
|
|
||||||
// regional: 0,
|
// regional: 0,
|
||||||
idUp3: 0,
|
idUp3: 0,
|
||||||
idUid: 0,
|
idUid: 0,
|
||||||
@ -154,7 +101,7 @@ const filterData = (params: any) => {
|
|||||||
})
|
})
|
||||||
onResult((queryResult) => {
|
onResult((queryResult) => {
|
||||||
if (queryResult.data != undefined) {
|
if (queryResult.data != undefined) {
|
||||||
data.value = queryResult.data.monalisaResponseTimeKeluhan
|
data.value = queryResult.data.monalisaResponseTimeGangguan
|
||||||
}
|
}
|
||||||
console.log(queryResult.data)
|
console.log(queryResult.data)
|
||||||
console.log(queryResult.loading)
|
console.log(queryResult.loading)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//deploy vm
|
//deploy vm
|
||||||
import { ApolloClient, createHttpLink, InMemoryCache } from '@apollo/client/core'
|
import { ApolloClient, createHttpLink, gql, InMemoryCache } from '@apollo/client/core'
|
||||||
|
|
||||||
export const apolloClient = () => {
|
export const apolloClient = () => {
|
||||||
const httpLink = createHttpLink({
|
const httpLink = createHttpLink({
|
||||||
@ -21,3 +21,313 @@ export const apolloClient = () => {
|
|||||||
})
|
})
|
||||||
return apolloClient
|
return apolloClient
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const queries = {
|
||||||
|
monalisa: {
|
||||||
|
gangguan: {
|
||||||
|
rekap: {
|
||||||
|
dispatchingTimeGangguan: gql`
|
||||||
|
query DaftarmonalisaDispatchingTimeGangguan(
|
||||||
|
#$regional: String
|
||||||
|
$idUid: Int
|
||||||
|
$idUp3: Int
|
||||||
|
$idUlp: Int
|
||||||
|
$bulan: Int
|
||||||
|
$tahun: Int
|
||||||
|
) {
|
||||||
|
monalisaDispatchingTimeGangguan(
|
||||||
|
#regional: $regional
|
||||||
|
idUid: $idUid
|
||||||
|
idUp3: $idUp3
|
||||||
|
idUlp: $idUlp
|
||||||
|
bulan: $bulan
|
||||||
|
tahun: $tahun
|
||||||
|
) {
|
||||||
|
nama_ulp
|
||||||
|
mom_bulan_ini
|
||||||
|
mom_bulan_kemarin
|
||||||
|
persen_mom
|
||||||
|
yoy_tahun_ini
|
||||||
|
yoy_tahun_kemarin
|
||||||
|
persen_yoy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
rekapitulasiEnsGangguan: gql`
|
||||||
|
query DaftarmonalisaRekapitulasiEnsGangguan(
|
||||||
|
#$regional: String
|
||||||
|
$idUlp: Int
|
||||||
|
$idUid: Int
|
||||||
|
$idUp3: Int
|
||||||
|
$bulan: Int
|
||||||
|
$tahun: Int
|
||||||
|
) {
|
||||||
|
monalisaRekapitulasiEnsGangguan(
|
||||||
|
#regional: $regional
|
||||||
|
idUlp: $idUlp
|
||||||
|
idUid: $idUid
|
||||||
|
idUp3: $idUp3
|
||||||
|
bulan: $bulan
|
||||||
|
tahun: $tahun
|
||||||
|
) {
|
||||||
|
nama_regional
|
||||||
|
id_uid
|
||||||
|
nama_uid
|
||||||
|
id_up3
|
||||||
|
nama_up3
|
||||||
|
id_ulp
|
||||||
|
nama_ulp
|
||||||
|
mom_bulan_ini
|
||||||
|
mom_bulan_kemarin
|
||||||
|
persen_mom
|
||||||
|
yoy_tahun_ini
|
||||||
|
yoy_tahun_kemarin
|
||||||
|
persen_yoy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
gangguanBelumSelesai: gql`
|
||||||
|
query DaftarmonalisaGangguanBelumSelesai(
|
||||||
|
#$regional: String
|
||||||
|
$idUlp: Int
|
||||||
|
$idUid: Int
|
||||||
|
$idUp3: Int
|
||||||
|
$bulan: Int
|
||||||
|
$tahun: Int
|
||||||
|
) {
|
||||||
|
monalisaGangguanBelumSelesai(
|
||||||
|
#regional: $regional
|
||||||
|
idUlp: $idUlp
|
||||||
|
idUid: $idUid
|
||||||
|
idUp3: $idUp3
|
||||||
|
bulan: $bulan
|
||||||
|
tahun: $tahun
|
||||||
|
) {
|
||||||
|
nama_regional
|
||||||
|
id_uid
|
||||||
|
nama_uid
|
||||||
|
id_up3
|
||||||
|
nama_up3
|
||||||
|
id_ulp
|
||||||
|
nama_ulp
|
||||||
|
jumlah_gangguan
|
||||||
|
jumlah_informasi
|
||||||
|
total
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
gangguanPerJenisGangguan: gql`
|
||||||
|
query DaftarmonalisaGangguanPerJenisGangguan(
|
||||||
|
#$nama_regional: String
|
||||||
|
$idUid: Int
|
||||||
|
$idUp3: Int
|
||||||
|
$idUlp: Int
|
||||||
|
$bulan: Int
|
||||||
|
$tahun: Int
|
||||||
|
) {
|
||||||
|
monalisaGangguanPerJenisGangguan(
|
||||||
|
#nama_regional: $regional
|
||||||
|
idUid: $idUid
|
||||||
|
idUp3: $idUp3
|
||||||
|
idUlp: $idUlp
|
||||||
|
bulan: $bulan
|
||||||
|
tahun: $tahun
|
||||||
|
) {
|
||||||
|
id_jenis_gangguan
|
||||||
|
nama_jenis_gangguan
|
||||||
|
jumlah
|
||||||
|
persen
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
jumlahDurasiRptRctGangguan: gql`
|
||||||
|
query DaftarmonalisaJumlahDurasiRptRctGangguan(
|
||||||
|
#$regional: String
|
||||||
|
$idUlp: Int
|
||||||
|
$idUid: Int
|
||||||
|
$idUp3: Int
|
||||||
|
$bulan: Int
|
||||||
|
$tahun: Int
|
||||||
|
) {
|
||||||
|
monalisaJumlahDurasiRptRctGangguan(
|
||||||
|
#regional: $regional
|
||||||
|
idUlp: $idUlp
|
||||||
|
idUid: $idUid
|
||||||
|
idUp3: $idUp3
|
||||||
|
bulan: $bulan
|
||||||
|
tahun: $tahun
|
||||||
|
) {
|
||||||
|
id_uid
|
||||||
|
nama_uid
|
||||||
|
id_up3
|
||||||
|
nama_up3
|
||||||
|
id_ulp
|
||||||
|
nama_ulp
|
||||||
|
total_durasi_response_time_bulan_ini
|
||||||
|
count_durasi_response_time_bulan_ini
|
||||||
|
avg_durasi_response_time_bulan_ini
|
||||||
|
total_durasi_recovery_time_bulan_ini
|
||||||
|
count_durasi_recovery_time_bulan_ini
|
||||||
|
avg_durasi_recovery_time_bulan_ini
|
||||||
|
total_durasi_response_time_tahun_ini
|
||||||
|
count_durasi_response_time_tahun_ini
|
||||||
|
avg_durasi_response_time_tahun_ini
|
||||||
|
total_durasi_recovery_time_tahun_ini
|
||||||
|
count_durasi_recovery_time_tahun_ini
|
||||||
|
avg_durasi_recovery_time_tahun_ini
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
jumlahKaliGangguan: gql`
|
||||||
|
query DaftarMonalisaJumlahKaliGangguan(
|
||||||
|
#$regional: String
|
||||||
|
$idUid: Int
|
||||||
|
$idUp3: Int
|
||||||
|
$idUlp: Int
|
||||||
|
$bulan: Int
|
||||||
|
$tahun: Int
|
||||||
|
) {
|
||||||
|
monalisaJumlahKaliGangguan(
|
||||||
|
#regional: $regional
|
||||||
|
idUid: $idUid
|
||||||
|
idUp3: $idUp3
|
||||||
|
idUlp: $idUlp
|
||||||
|
bulan: $bulan
|
||||||
|
tahun: $tahun
|
||||||
|
) {
|
||||||
|
nama_uid
|
||||||
|
nama_up3
|
||||||
|
nama_ulp
|
||||||
|
mom_bulan_ini
|
||||||
|
mom_bulan_kemarin
|
||||||
|
persen_mom
|
||||||
|
yoy_tahun_ini
|
||||||
|
yoy_tahun_kemarin
|
||||||
|
persen_yoy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
laporUlangGangguan: gql`
|
||||||
|
query DaftarmonalisaRekapitulasiLaporUlangGangguan(
|
||||||
|
#$regional: String
|
||||||
|
$idUlp: Int
|
||||||
|
$idUid: Int
|
||||||
|
$idUp3: Int
|
||||||
|
$bulan: Int
|
||||||
|
$tahun: Int
|
||||||
|
) {
|
||||||
|
monalisaRekapitulasiLaporUlangGangguan(
|
||||||
|
#regional: $regional
|
||||||
|
idUlp: $idUlp
|
||||||
|
idUid: $idUid
|
||||||
|
idUp3: $idUp3
|
||||||
|
bulan: $bulan
|
||||||
|
tahun: $tahun
|
||||||
|
) {
|
||||||
|
nama_regional
|
||||||
|
id_uid
|
||||||
|
nama_uid
|
||||||
|
id_up3
|
||||||
|
nama_up3
|
||||||
|
id_ulp
|
||||||
|
nama_ulp
|
||||||
|
mom_bulan_ini
|
||||||
|
mom_bulan_kemarin
|
||||||
|
persen_mom
|
||||||
|
yoy_tahun_ini
|
||||||
|
yoy_tahun_kemarin
|
||||||
|
persen_yoy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
recoveryTimeGangguan: gql`
|
||||||
|
query DaftarmonalisaRecoveryTimeGangguan(
|
||||||
|
#$regional: regional
|
||||||
|
$idUid: Int
|
||||||
|
$idUp3: Int
|
||||||
|
$idUlp: Int
|
||||||
|
$bulan: Int
|
||||||
|
$tahun: Int
|
||||||
|
) {
|
||||||
|
monalisaRecoveryTimeGangguan(
|
||||||
|
#regional: $regional
|
||||||
|
idUid: $idUid
|
||||||
|
idUp3: $idUp3
|
||||||
|
idUlp: $idUlp
|
||||||
|
bulan: $bulan
|
||||||
|
tahun: $tahun
|
||||||
|
) {
|
||||||
|
nama_ulp
|
||||||
|
mom_bulan_ini
|
||||||
|
mom_bulan_kemarin
|
||||||
|
persen_mom
|
||||||
|
yoy_tahun_ini
|
||||||
|
yoy_tahun_kemarin
|
||||||
|
persen_yoy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
responseTimeGangguan: gql`
|
||||||
|
query DaftarmonalisaResponseTimeGangguan(
|
||||||
|
#regional: String
|
||||||
|
$idUid: Int
|
||||||
|
$idUp3: Int
|
||||||
|
$idUlp: Int
|
||||||
|
$bulan: Int
|
||||||
|
$tahun: Int
|
||||||
|
) {
|
||||||
|
monalisaResponseTimeGangguan(
|
||||||
|
#regional: $regional
|
||||||
|
idUid: $idUid
|
||||||
|
idUp3: $idUp3
|
||||||
|
idUlp: $idUlp
|
||||||
|
bulan: $bulan
|
||||||
|
tahun: $tahun
|
||||||
|
) {
|
||||||
|
nama_ulp
|
||||||
|
mom_bulan_ini
|
||||||
|
mom_bulan_kemarin
|
||||||
|
persen_mom
|
||||||
|
yoy_tahun_ini
|
||||||
|
yoy_tahun_kemarin
|
||||||
|
persen_yoy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
}
|
||||||
|
},
|
||||||
|
keluhan: {
|
||||||
|
rekap: {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
MONALISAJUMLAHKALIKELUHAN: gql`
|
||||||
|
query DaftarMonalisaJumlahKaliKeluhan(
|
||||||
|
#$regional: String
|
||||||
|
$idUlp: Int
|
||||||
|
$idUid: Int
|
||||||
|
$idUp3: Int
|
||||||
|
$bulan: Int
|
||||||
|
$tahun: Int
|
||||||
|
) {
|
||||||
|
monalisaJumlahKaliKeluhan(
|
||||||
|
#regional: $regional
|
||||||
|
idUlp: $idUlp
|
||||||
|
idUid: $idUid
|
||||||
|
idUp3: $idUp3
|
||||||
|
bulan: $bulan
|
||||||
|
tahun: $tahun
|
||||||
|
) {
|
||||||
|
jumlah_bulan
|
||||||
|
jumlah_bulan_n_1
|
||||||
|
jumlah_tahun
|
||||||
|
jumlah_tahun_n_1
|
||||||
|
nama_posko
|
||||||
|
persen_bulan
|
||||||
|
persen_tahun
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user