Loop to upload DRP docs
This commit is contained in:
parent
0e52d2d93c
commit
873f5339fb
@ -12,7 +12,7 @@
|
|||||||
title="Upload Dokumen Pendukung"
|
title="Upload Dokumen Pendukung"
|
||||||
>
|
>
|
||||||
<template #content>
|
<template #content>
|
||||||
<PopUpUploadDokumenPendukung :drpId="selectedDrpId" :drpTahun="selectedDrpTahun" @addDokumenRKAP="addDokumenRKAP" @addDokumenPendukung="addDokumenPendukung" />
|
<PopUpUploadDokumenPendukung v-if="isPopupUploadDokumenPendukung" :drpId="selectedDrpId" :drpTahun="selectedDrpTahun" @addDokumenRKAP="addDokumenRKAP" @addDokumenPendukung="addDokumenPendukung" />
|
||||||
</template>
|
</template>
|
||||||
<DxToolbarItem
|
<DxToolbarItem
|
||||||
widget="dxButton"
|
widget="dxButton"
|
||||||
@ -176,6 +176,7 @@ const approveStatus = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
const URL = process.env.VUE_APP_ROOT_API + "/drp";
|
const URL = process.env.VUE_APP_ROOT_API + "/drp";
|
||||||
|
const URL_UPLOAD = process.env.VUE_APP_ROOT_API + "/drp/upload/dokumen";
|
||||||
|
|
||||||
const dataSource = new CustomStore({
|
const dataSource = new CustomStore({
|
||||||
key: "id",
|
key: "id",
|
||||||
@ -276,6 +277,11 @@ export default {
|
|||||||
save() {
|
save() {
|
||||||
|
|
||||||
const dataDrpDokumen = this.dataDrpDokumen.map(item => {
|
const dataDrpDokumen = this.dataDrpDokumen.map(item => {
|
||||||
|
|
||||||
|
http.post(URL_UPLOAD, item.formData)
|
||||||
|
.then((res) => res.json())
|
||||||
|
.then((json) => console.log(json))
|
||||||
|
|
||||||
return {
|
return {
|
||||||
jenisDokumenId : item.jenisDokumenId,
|
jenisDokumenId : item.jenisDokumenId,
|
||||||
filename : item.filename,
|
filename : item.filename,
|
||||||
@ -284,6 +290,11 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const dataDrpDokumenPendukung = this.dataDrpDokumenPendukung.map(item => {
|
const dataDrpDokumenPendukung = this.dataDrpDokumenPendukung.map(item => {
|
||||||
|
|
||||||
|
http.post(URL_UPLOAD, item.formData)
|
||||||
|
.then((res) => res.json())
|
||||||
|
.then((json) => console.log(json))
|
||||||
|
|
||||||
return {
|
return {
|
||||||
jenisDokumenId : item.jenisDokumenId,
|
jenisDokumenId : item.jenisDokumenId,
|
||||||
filename : item.filename,
|
filename : item.filename,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user