dashboard.blade.php
3.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Demo</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
<link rel="stylesheet" href="{{ asset('AdminLTE/plugins/fontawesome-free/css/all.min.css') }}">
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
<link rel="stylesheet" href="{{ asset('AdminLTE/plugins/sweetalert2-theme-bootstrap-4/bootstrap-4.min.css') }}">
<link rel="stylesheet" href="{{ asset('AdminLTE/plugins/icheck-bootstrap/icheck-bootstrap.min.css') }}">
<link rel="stylesheet" href="{{ asset('AdminLTE/dist/css/adminlte.min.css') }}">
<link rel="stylesheet" href="{{ asset('AdminLTE/plugins/summernote/summernote-bs4.min.css') }}">
<link rel="stylesheet" href="https://code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jquery-datetime-picker@2.5.11/jquery.datetimepicker.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/1.6.8/axios.min.js"></script>
<script src="{{ asset("assets/js/vue.min.js") }}"></script>
</head>
<body id="adminlte" class="hold-transition sidebar-mini sidebar-collapse layout-fixed custom-scrollbar sidebar-collapse">
<div class="wrapper">
<nav class="main-header navbar navbar-expand navbar-white navbar-light position-relative">
</nav>
<div class="content-wrapper position-relative">
<section class="contents">
<div id="app" class="">
<div class="card p-2 p-md-3">
<h4 class="text-bold color-main">FAX受信</h4>
<div class="row"><div class="col">
<button class="btn btn-primary" @click="$refs.pdf.click()"><i class="fas fa-upload"></i>Upload</button>
<input type="file" ref="pdf" accept=".pdf" style="display:none" @change="upload_pdf">
</div></div>
</div>
</div>
</section>
</div>
</div>
<script type="text/javascript">
var app = new Vue({
el : '#app',
data:{
ocr : {!! json_encode($ocr) !!},
ocr_window : null
},
mounted() {
},
methods:{
upload_pdf(e){
const file = e.target.files[0];
if(!file) return;
let formData = new FormData();
formData.append('attached_file', file);
axios.post("{{route('import_pdf')}}", formData, {
headers:{
'Content-Type':'multipart/form-data'
}
}).then(res => {
this.ocr=res.data.ocr
if(res.data.status) alert('Upload thành công');
else alert('Upload false');
}).finally(() => {
this.$refs.pdf.value = '';
});
}
}
})
</script>
</body>
</html>