+
{{ data.text }}
-+
{{ isNumber(data.text) ? formatPercentage(data.text) : data.text }}
-+
+ {{ + isNumber(data.text) + ? data.column.caption == '%' + ? formatPercentage(data.text) + : formatNumber(data.text) + : data.text + }} +
+ + + ++ {{ + isNumber(data.text) + ? data.column.caption == '%' + ? formatPercentage(data.text) + : formatNumber(data.text) + : data.text + }} +
+ + + ++ {{ + isNumber(data.text) + ? data.column.caption == '%' + ? formatPercentage(data.text) + : formatNumber(data.text) + : data.text + }} +
+ + + +{{ isNumber(data.text) ? data.column.caption == '%' @@ -233,7 +269,7 @@
-+
{{ parseInt(data.text) ? formatWaktu(data.text) : '-' }}
@@ -659,6 +695,13 @@ const reportMeta = ref({ up3: { id: 0, name: 'Semua Unit Pelaksanaan Pelayanan Pelanggan' }, periode: '' }) +const agreeToShowDialog = ref(false) +const progressSelected = ref(0) + +const setAgreementDialog = (status: boolean, progress: number) => { + agreeToShowDialog.value = status + progressSelected.value = progress +} const getDetail = async () => { const dateValue = filters.value.periode.split(' s/d ') @@ -678,7 +721,7 @@ const getDetail = async () => { idUlp: ref?.id_ulp ? ref?.id_ulp : 0, namaRegional: ref?.nama_regional ? ref?.nama_regional : '', media: ref?.media ? ref?.media : '', - isSelesai: 0, + isSelesai: progressSelected.value, tanggal: '', namaIssuetype: '', namaSubissuetype: '' @@ -710,8 +753,10 @@ const showDetail = () => { clearSelection() dataSub.value = [] dataSubSelected.value = null - dialogDetail.value = true - getDetail() + if (agreeToShowDialog.value) { + dialogDetail.value = true + getDetail() + } } const closeDialog = () => { dialogDetail.value = false @@ -738,18 +783,23 @@ const onExportingDetail = (e: any) => { const onSelectionChanged = ({ selectedRowsData }: any) => { if (selectedRowsData[0] != undefined) { dataSelected.value = selectedRowsData[0] + showDetail() } - showDetail() } const onDataSubSelectionChanged = ({ selectedRowsData }: any) => { if (selectedRowsData[0] != undefined) { dataSubSelected.value = selectedRowsData[0] } - console.log(dataSubSelected) +} + +const resetData = () => { + data.value = [] + dataSub.value = [] } const filterData = async (params: any) => { + resetData() const dateValue = params.periode.split(' s/d ') const { posko, uid, up3 } = params diff --git a/src/components/Pages/Gangguan/Rekap/RGangguan_RatingPerRegu.vue b/src/components/Pages/Gangguan/Rekap/RGangguan_RatingPerRegu.vue index f284c90..5aae0ea 100755 --- a/src/components/Pages/Gangguan/Rekap/RGangguan_RatingPerRegu.vue +++ b/src/components/Pages/Gangguan/Rekap/RGangguan_RatingPerRegu.vue @@ -77,7 +77,7 @@ data-type="number" caption="Total" css-class="custom-table-column" - cell-template="formatNumber" + cell-template="formatNumberLaporanTotal" />+
{{ data.text }}
-+
{{ parseFloat(data.text) ? formatPercentage(data.text) : '0%' }}
-+
+ {{ + isNumber(data.text) + ? data.column.caption == '%' + ? formatPercentage(data.text) + : formatNumber(data.text) + : data.text + }} +
+ + + ++ {{ + isNumber(data.text) + ? data.column.caption == '%' + ? formatPercentage(data.text) + : formatNumber(data.text) + : data.text + }} +
+ + + ++ {{ + isNumber(data.text) + ? data.column.caption == '%' + ? formatPercentage(data.text) + : formatNumber(data.text) + : data.text + }} +
+ + + +{{ isNumber(data.text) ? data.column.caption == '%' @@ -223,7 +259,7 @@
-+
{{ parseInt(data.text) ? formatWaktu(data.text) : '-' }}
@@ -650,6 +686,13 @@ const reportMeta = ref({ posko: { id: 0, name: 'Semua Posko' }, periode: '' }) +const agreeToShowDialog = ref(false) +const progressSelected = ref(0) + +const setAgreementDialog = (status: boolean, progress: number) => { + agreeToShowDialog.value = status + progressSelected.value = progress +} const getDetail = async () => { const dateValue = filters.value.periode.split(' s/d ') @@ -669,7 +712,7 @@ const getDetail = async () => { idUlp: ref?.id_ulp ? ref?.id_ulp : 0, namaRegional: ref?.nama_regional ? ref?.nama_regional : '', media: ref?.media ? ref?.media : '', - isSelesai: 0, + isSelesai: progressSelected.value, tanggal: '', namaIssuetype: '', namaSubissuetype: '' @@ -703,8 +746,10 @@ const showDetail = () => { clearSelection() dataSub.value = [] dataSubSelected.value = null - dialogDetail.value = true - getDetail() + if (agreeToShowDialog.value) { + dialogDetail.value = true + getDetail() + } } const closeDialog = () => { @@ -732,18 +777,23 @@ const onExportingDetail = (e: any) => { const onDataSelectionChanged = ({ selectedRowsData }: any) => { if (selectedRowsData[0] != undefined) { dataSelected.value = selectedRowsData[0] + showDetail() } - showDetail() } const onDataSubSelectionChanged = ({ selectedRowsData }: any) => { if (selectedRowsData[0] != undefined) { dataSubSelected.value = selectedRowsData[0] } - console.log(dataSubSelected) +} + +const resetData = () => { + data.value = [] + dataSub.value = [] } const filterData = async (params: any) => { + resetData() const dateValue = params.periode.split(' s/d ') const { posko, uid, up3 } = params