mirror of
https://git.hmsn.ink/kospo/svcm/oa.git
synced 2026-03-20 03:02:31 +09:00
fix : 파일 다운로드 기능 추가 확인 필요
This commit is contained in:
@@ -26,6 +26,7 @@ const params = reactive({
|
|||||||
regNm: '',
|
regNm: '',
|
||||||
regDt: '',
|
regDt: '',
|
||||||
reason: '',
|
reason: '',
|
||||||
|
contAtts: [],
|
||||||
page: 1,
|
page: 1,
|
||||||
row: 10,
|
row: 10,
|
||||||
flexColumn: [],
|
flexColumn: [],
|
||||||
@@ -51,6 +52,7 @@ const completedPriceDataParams = reactive({
|
|||||||
svyDt:'',
|
svyDt:'',
|
||||||
reason:'',
|
reason:'',
|
||||||
estimates: [],
|
estimates: [],
|
||||||
|
contAtts: [],
|
||||||
page: 1,
|
page: 1,
|
||||||
row: 5,
|
row: 5,
|
||||||
})
|
})
|
||||||
@@ -100,7 +102,9 @@ function getDetailList(arg){
|
|||||||
completedPriceDataParams.contAmt = arg.contAmt
|
completedPriceDataParams.contAmt = arg.contAmt
|
||||||
// completedPriceDataParams.svyDt = arg.signDt 계약체결일 todo
|
// completedPriceDataParams.svyDt = arg.signDt 계약체결일 todo
|
||||||
completedPriceDataParams.reason = arg.reason
|
completedPriceDataParams.reason = arg.reason
|
||||||
|
params.contAtts = arg.contAtts
|
||||||
params.contStatCd = arg.contStatCd
|
params.contStatCd = arg.contStatCd
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -222,6 +226,15 @@ const onChangeSign = async() => {
|
|||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const onPrcsFileDownload = async (contNo: string, fileOrd: number, logiFnm: string) => {
|
||||||
|
const link = document.createElement('a')
|
||||||
|
link.href = `https://svcm.hmsn.ink/api/prcs/${contNo}/${fileOrd}` //todo
|
||||||
|
link.setAttribute('download', logiFnm)
|
||||||
|
link.setAttribute('target', '_blank')
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click()
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -493,29 +506,28 @@ const onChangeSign = async() => {
|
|||||||
<td>첨부파일</td>
|
<td>첨부파일</td>
|
||||||
<td colspan="1">
|
<td colspan="1">
|
||||||
<VButton color="info" @click="showFileInputs = !showFileInputs">
|
<VButton color="info" @click="showFileInputs = !showFileInputs">
|
||||||
등록
|
첨부파일 확인
|
||||||
</VButton>
|
</VButton>
|
||||||
</td>
|
</td>
|
||||||
<td colspan="5">
|
<td colspan="5">
|
||||||
<!-- 첨부파일 입력영역: 등록 버튼 클릭 시 토글 -->
|
<!-- 첨부파일 입력영역: 등록 버튼 클릭 시 토글 -->
|
||||||
<div v-if="showFileInputs" class="file-upload-list" style="margin-top:10px;">
|
<div v-if="showFileInputs" class="file-upload-list" style="margin-top:10px;">
|
||||||
<div
|
<VField>
|
||||||
v-for="(input, idx) in fileInputs"
|
<VControl>
|
||||||
:key="idx"
|
<div
|
||||||
style="display: flex; align-items: center; margin-bottom: 8px;"
|
v-for="f in params.contAtts"
|
||||||
>
|
:key="f.logiFnm"
|
||||||
<!-- 파일선택 -->
|
class="content estimate-file-wrapper"
|
||||||
<label class="file-label" style="margin-right: 10px;">
|
>
|
||||||
<input
|
<div class="estimate-file-name ml-2">
|
||||||
type="file"
|
{{ f.logiFnm }}{{" ("}}{{Math.ceil(f.size / 1024)}}kb{{")"}}
|
||||||
class="file-input"
|
</div>
|
||||||
@change="e => handleFileChange(e, idx)"
|
<div>
|
||||||
/>
|
<i class="fa fa-download estimate-file-download pr-2" @click="onPrcsFileDownload(f.contNo, f.fileOrd, f.logiFnm)" />
|
||||||
<span class="file-cta">파일선택</span>
|
</div>
|
||||||
</label>
|
</div>
|
||||||
<span style="flex:1; margin-right: 10px;">{{ input.file ? input.file.name : '첨부된 파일 없음' }}</span>
|
</VControl>
|
||||||
<span style="flex:2; color: #666;">{{ input.description }}</span>
|
</VField>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user