Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Dung Diego
/
ocr-tool
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Authored by
Dung Diego
2026-07-16 14:01:44 +0700
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Commit
4d5852f0a991620b907ff16288ebac439bd7199a
4d5852f0
1 parent
090710d2
up
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
3 deletions
resources/views/dashboard.blade.php
resources/views/ocr/ocr_pdf.blade.php
resources/views/dashboard.blade.php
View file @
4d5852f
...
...
@@ -51,6 +51,32 @@
<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
class=
"row mt-3"
>
<div
class=
"col"
v-for=
"(value, key) in order"
>
<span>
{{ key }} {{ value }}
</span>
</div>
</div>
<div
class=
"row mt-3"
>
<div
class=
"col"
>
<table>
<thead>
<tr>
<th
v-for=
"(value, key) in items[0]"
:key=
"key"
>
{{ key }}
</th>
</tr>
</thead>
<tbody>
<tr
v-for=
"(item, index) in items"
:key=
"index"
>
<td
v-for=
"(value, key) in items[0]"
:key=
"key"
>
{{ item[key] }}
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
...
...
@@ -63,7 +89,8 @@
data
:{
isLoading
:
false
,
ocr
:
{
!!
json_encode
(
$ocr
)
!!
},
ocr_window
:
null
ocr_window
:
null
,
order
:{},
table
:[]
},
mounted
()
{
},
...
...
@@ -141,7 +168,7 @@ function appendFormData(form, obj, parentKey = "") {
this
.
handle_map_field
(
e
.
data
.
template_field
,
e
.
data
.
text
)
}
if
(
e
.
data
.
type
===
'mapping-customer'
){
this
.
handle_map_
customer
(
e
.
data
.
customer
)
this
.
handle_map_
template
(
e
.
data
.
template
)
}
});
...
...
@@ -151,6 +178,12 @@ function appendFormData(form, obj, parentKey = "") {
}
});
},
handle_map_field
(
template_field
,
text
){
},
handle_map_template
(
template
){
},
}
})
</script>
...
...
resources/views/ocr/ocr_pdf.blade.php
View file @
4d5852f
...
...
@@ -375,7 +375,7 @@
width
:
x2
-
x1
,
height
:
y2
-
y1
}
window
.
opener
.
postMessage
({
type
:
'mapping-
customer'
,
customer
:
ocr_field
.
text
},
'*'
);
window
.
opener
.
postMessage
({
type
:
'mapping-
template'
,
template
:
ocr_field
},
'*'
);
},
async
ocr_map_field
(
mst_field
,
ocr_field
,
coordinate
=
undefined
){
if
(
!!
this
.
disable
)
return
...
...
Please
register
or
sign in
to post a comment