Showing
1 changed file
with
4 additions
and
1 deletions
| ... | @@ -24,6 +24,7 @@ | ... | @@ -24,6 +24,7 @@ |
| 24 | <div class="content-wrapper position-relative"> | 24 | <div class="content-wrapper position-relative"> |
| 25 | <section class="contents"> | 25 | <section class="contents"> |
| 26 | <div id="app" class=""> | 26 | <div id="app" class=""> |
| 27 | + <div v-if="isLoading" class="loading text-center"><div class="spinner-container"><div role="status" class="spinner-border text-primary"><span class="sr-only">Loading...</span></div></div></div> | ||
| 27 | <div class="card p-2 p-md-3"> | 28 | <div class="card p-2 p-md-3"> |
| 28 | <h4 class="text-bold color-main">FAX受信</h4> | 29 | <h4 class="text-bold color-main">FAX受信</h4> |
| 29 | <div class="row"><div class="col"> | 30 | <div class="row"><div class="col"> |
| ... | @@ -40,6 +41,7 @@ | ... | @@ -40,6 +41,7 @@ |
| 40 | var app = new Vue({ | 41 | var app = new Vue({ |
| 41 | el : '#app', | 42 | el : '#app', |
| 42 | data:{ | 43 | data:{ |
| 44 | + isLoading:false, | ||
| 43 | ocr : {!! json_encode($ocr) !!}, | 45 | ocr : {!! json_encode($ocr) !!}, |
| 44 | ocr_window : null | 46 | ocr_window : null |
| 45 | }, | 47 | }, |
| ... | @@ -52,7 +54,7 @@ | ... | @@ -52,7 +54,7 @@ |
| 52 | 54 | ||
| 53 | let formData = new FormData(); | 55 | let formData = new FormData(); |
| 54 | formData.append('attached_file', file); | 56 | formData.append('attached_file', file); |
| 55 | - | 57 | + this.isLoading=true; |
| 56 | axios.post("{{route('import_pdf')}}", formData, { | 58 | axios.post("{{route('import_pdf')}}", formData, { |
| 57 | headers:{ | 59 | headers:{ |
| 58 | 'Content-Type':'multipart/form-data' | 60 | 'Content-Type':'multipart/form-data' |
| ... | @@ -66,6 +68,7 @@ | ... | @@ -66,6 +68,7 @@ |
| 66 | else alert('Upload false'); | 68 | else alert('Upload false'); |
| 67 | }).finally(() => { | 69 | }).finally(() => { |
| 68 | this.$refs.pdf.value = ''; | 70 | this.$refs.pdf.value = ''; |
| 71 | + this.isLoading=false; | ||
| 69 | }); | 72 | }); |
| 70 | }, | 73 | }, |
| 71 | openPdfWindow(options = {}){ | 74 | openPdfWindow(options = {}){ | ... | ... |
-
Please register or sign in to post a comment