fix: export pdf in daftar gangguan dialihkan ke posko lain
This commit is contained in:
parent
0d5e1451a0
commit
fd08049392
@ -8,7 +8,6 @@
|
||||
ref="dataGridRef"
|
||||
:allow-column-reordering="true"
|
||||
class="max-h-[calc(100vh-140px)] mb-10"
|
||||
:remote-operations="true"
|
||||
:data-source="data"
|
||||
key-expr="no_laporan"
|
||||
:show-column-lines="true"
|
||||
@ -375,10 +374,6 @@ const dialogDetail = ref(false)
|
||||
const loading = ref(false)
|
||||
const closeDialog = () => (dialogDetail.value = false)
|
||||
|
||||
const bufferTest = () => {
|
||||
console.log('Buffer Test')
|
||||
}
|
||||
|
||||
const resetData = () => {
|
||||
data.value = []
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ import { formatWaktu } from '@/components/Form/FiltersType/reference'
|
||||
import { setHeaderStyle } from '@/report/utils/xlsx'
|
||||
|
||||
const reportName = 'Daftar Gangguan Dialihkan Ke Posko Lain'
|
||||
const fontSize = 5
|
||||
const fontSize = 4
|
||||
const docxFontSize = 6
|
||||
|
||||
const formatMetaData = (reportMeta: any) => {
|
||||
@ -58,7 +58,7 @@ const exportToPDF = (reportMeta: any, data: any) => {
|
||||
head: [
|
||||
['PT. PLN(Persero)', '', ''],
|
||||
[
|
||||
{ content: 'UNIT INDUK', styles: { cellWidth: 25 } },
|
||||
{ content: 'UNIT INDUK', styles: { cellWidth: 35 } },
|
||||
{ content: ':', styles: { cellWidth: 1 } },
|
||||
reportMeta.value.uid
|
||||
? reportMeta.value.uid.name.toUpperCase()
|
||||
@ -102,7 +102,7 @@ const exportToPDF = (reportMeta: any, data: any) => {
|
||||
halign: 'center'
|
||||
},
|
||||
theme: 'plain',
|
||||
startY: 18
|
||||
startY: 25
|
||||
})
|
||||
|
||||
autoTable(doc, {
|
||||
@ -175,7 +175,7 @@ const exportToPDF = (reportMeta: any, data: any) => {
|
||||
})
|
||||
}
|
||||
},
|
||||
startY: 23
|
||||
startY: 35
|
||||
})
|
||||
|
||||
autoTable(doc, {
|
||||
@ -262,7 +262,10 @@ const exportToXLSX = (reportMeta: any, e: any) => {
|
||||
component: e.component,
|
||||
worksheet,
|
||||
autoFilterEnabled: true,
|
||||
topLeftCell: { row: 10, column: 1 }
|
||||
topLeftCell: { row: 10, column: 1 },
|
||||
loadPanel: {
|
||||
enabled: false
|
||||
}
|
||||
}).then(() => {
|
||||
workbook.xlsx.writeBuffer().then((buffer: any) => {
|
||||
saveAs(new Blob([buffer], { type: 'application/octet-stream' }), `Laporan ${reportName}.xlsx`)
|
||||
|
Loading…
x
Reference in New Issue
Block a user