diff --git a/src/pages/app/PriceInsert.vue b/src/pages/app/PriceInsert.vue index f1797f1..6553e52 100644 --- a/src/pages/app/PriceInsert.vue +++ b/src/pages/app/PriceInsert.vue @@ -1,6 +1,6 @@ @@ -439,20 +476,62 @@ function onInput(row, column){ 첨부파일 - - - - 파일 첨부 - + + - - {{ fileName }} + multiple + @change="(e) => onFileChange(e)" + > + + + 파일업로드 + + + + + + {{ f.logiFnm }} + + + {{ Math.ceil(f.size / 1024) }}kb + + + + + + + + + 첨부파일 + + + + + + + {{ f.logiFnm }} + + + {{ Math.ceil(f.size / 1024) }}kb + + + + + + + + @@ -532,5 +611,4 @@ function onInput(row, column){ background-color: var(--primary); } } - \ No newline at end of file diff --git a/src/scss/vuero-css/_vuerofile.scss b/src/scss/vuero-css/_vuerofile.scss new file mode 100644 index 0000000..7df4060 --- /dev/null +++ b/src/scss/vuero-css/_vuerofile.scss @@ -0,0 +1,38 @@ +.estimate-file-wrapper { + display:flex; + justify-content: space-between; + border:1px solid #ccc; + border-radius:5px; + padding:10px 20px; + margin-bottom:10px; + .estimate-file-download, .estimate-file-delete { + font-size: 15px; + line-height: 40px; + padding-left: 30px; + cursor: pointer; + } + .estimate-file-img { + font-size: 40px; + padding-right: 50px; + } + .estimate-file-name { + width: 400px; + line-height: 40px; + } + .estimate-file-size { + width: 200px; + line-height: 40px; + } +} + +.estimate-file-download, .estimate-file-delete, .fa-plus-circle { + &:hover { + color: var(--primary); + } +} + +.file-trigger { + margin-left: 10px; + height:15px; + padding:10px 10px; +} \ No newline at end of file diff --git a/src/scss/vuero-css/all.scss b/src/scss/vuero-css/all.scss index 81d0367..3d307e2 100644 --- a/src/scss/vuero-css/all.scss +++ b/src/scss/vuero-css/all.scss @@ -1,2 +1,3 @@ @import './vuerosearch'; @import './vuerotable'; +@import './vuerofile'; diff --git a/src/service/priceApi.ts b/src/service/priceApi.ts index 5a5c900..c789c4a 100644 --- a/src/service/priceApi.ts +++ b/src/service/priceApi.ts @@ -70,15 +70,15 @@ export async function getDetailPrcs(params) { } /** - * 가격조사서 다운로드 Todo + * 가격조사서 다운로드 * @param {object} params * @property {string} params.prcsNo - 가격조사번호 * @property {string} params.fileOrd - 파일순서 * @returns */ -export async function getPrcsFileDown(params) { +export async function getPrcsFileDown(prcsNo, fileOrd) { try { - const result = await axios.get(`/api/prcs/${params}`) + const result = await axios.get(`/api/prcs/${prcsNo}/${fileOrd}`) return result.data } catch (e) { throw new Error(e) @@ -86,15 +86,15 @@ export async function getPrcsFileDown(params) { } /** - * 가격조사서 첨부파일 삭제 Todo + * 가격조사서 첨부파일 삭제 * @param {object} params * @property {string} params.prcsNo - 가격조사번호 * @property {string} params.fileOrd - 파일순서 * @returns */ -export async function deletePrcsFile(params) { +export async function deletePrcsFile(prcsNo, fileOrd) { try { - const result = await axios.delete(`/api/prcs/${params}`) + const result = await axios.delete(`/api/prcs/${prcsNo}/${fileOrd}`) return result.data } catch (e) { throw new Error(e)