|
|
|
@ -1,10 +1,14 @@ |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<h5 class="uploader-label"> |
|
|
|
{{ formInfo.preText }} <a href="#">{{ formInfo.name }} <i class="fa fa-question-circle"></i></a> |
|
|
|
{{ formInfo.preText }} |
|
|
|
<a href="javascript:void(0)" :id="'Tooltip-' + uniqueId"> |
|
|
|
{{ formInfo.name }} <i class="fa fa-question-circle"></i> |
|
|
|
</a> |
|
|
|
<strong v-if="party === 1"> - For You</strong> |
|
|
|
<strong v-if="party === 2"> - For Your Spouse</strong> |
|
|
|
</h5> |
|
|
|
<tooltip :text="formInfo.help" :target="'#Tooltip-' + uniqueId"></tooltip> |
|
|
|
<label :for="inputId" class="sr-only"> |
|
|
|
{{ formInfo.preText }} {{ formInfo.name }} |
|
|
|
<span v-if="party === 1"> - For You</span> |
|
|
|
@ -17,18 +21,18 @@ |
|
|
|
:multiple="true" |
|
|
|
:drop="true" |
|
|
|
:drop-directory="false" |
|
|
|
post-action="/post.method" |
|
|
|
put-action="/put.method" |
|
|
|
post-action="/poc/storage" |
|
|
|
@input-file="inputFile" |
|
|
|
@input-filter="inputFilter" |
|
|
|
:input-id="inputId" |
|
|
|
name="file" |
|
|
|
:class="['drop-zone', dragging ? 'dragging' : '']"> |
|
|
|
<div v-if="files.length === 0" class="placeholder"> |
|
|
|
<i class="fa fa-plus-circle"></i><br> |
|
|
|
<em>Drag and Drop the PDF document or JPG pages here,<br>or click here to Browse for files.</em> |
|
|
|
</div> |
|
|
|
<div v-else class="items"> |
|
|
|
<div v-for="(file, index) in files" v-bind:key="index" class="item"> |
|
|
|
<div v-else class="cards"> |
|
|
|
<div v-for="(file, index) in files" v-bind:key="index" class="card"> |
|
|
|
<item-tile |
|
|
|
:file="file" |
|
|
|
:index="index" |
|
|
|
@ -37,7 +41,7 @@ |
|
|
|
@moveup="moveUp(index)" |
|
|
|
@movedown="moveDown(index)"/> |
|
|
|
</div> |
|
|
|
<div class="item upload-button"> |
|
|
|
<div class="card upload-button"> |
|
|
|
<div class="upload-button-wrapper"> |
|
|
|
<i class="fa fa-plus-circle"></i> |
|
|
|
</div> |
|
|
|
@ -50,6 +54,7 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import VueUploadComponent from 'vue-upload-component' |
|
|
|
import { Tooltip } from 'uiv'; |
|
|
|
import ItemTile from './ItemTile' |
|
|
|
import Forms from "../utils/forms"; |
|
|
|
|
|
|
|
@ -66,17 +71,20 @@ export default { |
|
|
|
}, |
|
|
|
components: { |
|
|
|
FileUpload: VueUploadComponent, |
|
|
|
ItemTile |
|
|
|
ItemTile, |
|
|
|
Tooltip |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
inputId() { |
|
|
|
uniqueId() { |
|
|
|
if (this.party === 0) { |
|
|
|
return "Uploader-" + this.docType; |
|
|
|
return this.docType; |
|
|
|
} |
|
|
|
return "Uploader-" + this.docType + this.party; |
|
|
|
return this.docType + this.party; |
|
|
|
}, |
|
|
|
inputId() { |
|
|
|
return "Uploader-" + this.uniqueId; |
|
|
|
}, |
|
|
|
formInfo() { |
|
|
|
debugger; |
|
|
|
return Forms[this.docType]; |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -96,6 +104,7 @@ export default { |
|
|
|
console.log('status', newFile.xhr.status) |
|
|
|
} |
|
|
|
} |
|
|
|
this.$refs.upload.active = true; |
|
|
|
}, |
|
|
|
/** |
|
|
|
* Pretreatment |
|
|
|
@ -112,12 +121,12 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// Create a blob field |
|
|
|
// Create an objectURL field |
|
|
|
if (newFile) { |
|
|
|
newFile.blob = '' |
|
|
|
newFile.objectURL = '' |
|
|
|
let URL = window.URL || window.webkitURL |
|
|
|
if (URL && URL.createObjectURL) { |
|
|
|
newFile.blob = URL.createObjectURL(newFile.file) |
|
|
|
newFile.objectURL = URL.createObjectURL(newFile.file) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -158,19 +167,22 @@ export default { |
|
|
|
background-color: #F2E3F2; |
|
|
|
} |
|
|
|
|
|
|
|
.item { |
|
|
|
.cards { |
|
|
|
display: flex; |
|
|
|
flex-wrap: wrap; |
|
|
|
justify-content: left; |
|
|
|
} |
|
|
|
|
|
|
|
.card { |
|
|
|
flex: 0 1 160px; |
|
|
|
margin-bottom: 10px; |
|
|
|
width: 160px; |
|
|
|
display: inline-block; |
|
|
|
margin-right: 18px; |
|
|
|
|
|
|
|
&.upload-button { |
|
|
|
width: 15px; |
|
|
|
|
|
|
|
.upload-button-wrapper { |
|
|
|
position: relative; |
|
|
|
top: -110px; |
|
|
|
} |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
justify-content: center; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -178,6 +190,10 @@ export default { |
|
|
|
font-size: 3rem; |
|
|
|
margin-bottom: 8px; |
|
|
|
color: #365EBE; |
|
|
|
|
|
|
|
&:hover { |
|
|
|
cursor: pointer; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.placeholder { |
|
|
|
@ -188,13 +204,14 @@ export default { |
|
|
|
|
|
|
|
h5.uploader-label { |
|
|
|
display: block; |
|
|
|
margin-top: 12px; |
|
|
|
margin-bottom: 8px; |
|
|
|
margin-top: 30px; |
|
|
|
margin-bottom: 10px; |
|
|
|
font-weight: normal; |
|
|
|
font-size: 1em; |
|
|
|
|
|
|
|
a { |
|
|
|
font-weight: bold;; |
|
|
|
font-weight: bold; |
|
|
|
text-decoration: underline; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |