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 11:58:28 +0700
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Commit
fb100ea14111a9ba0a2d64f5946617c48492f6fe
fb100ea1
1 parent
d6e1b884
up
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
resources/views/ocr/ocr_pdf.blade.php
routes/web.php
resources/views/ocr/ocr_pdf.blade.php
View file @
fb100ea
...
...
@@ -8,7 +8,6 @@
<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"
>
<link
rel=
"stylesheet"
href=
"{{ asset('css/app.css') }}"
>
<link
rel=
"stylesheet"
href=
"{{ asset('css/custom2.css') }}?v={{ filemtime(public_path('css/custom2.css')) }}"
>
<link
rel=
"stylesheet"
href=
"{{ asset('css/select2_multiple.css') }}"
>
<style>
...
...
@@ -72,7 +71,7 @@
<div
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>
<div
class=
"pdf-container"
:style=
"{width: this.ocr.mst_template.image.width*0.3155 + 'px',height: this.ocr.mst_template.image.height*0.3155 + 'px'}"
>
<div
class=
"text-center"
@
mousedown=
"ocr_start_select"
@
mousemove=
"ocr_move_select"
@
mouseup=
"ocr_end_select"
>
<img
:src=
"`{{route('
order.
show_pdf')}}?file_path=`+ocr.image_path"
class=
"img-fluid border"
draggable=
"false"
/>
<img
:src=
"`{{route('show_pdf')}}?file_path=`+ocr.image_path"
class=
"img-fluid border"
draggable=
"false"
/>
<div
@
click
.
stop=
"ocr_open_field(index)"
class=
"ocr ocr-field"
:class=
"{'ocr-disable-pointer': ocr_handler.drag.selecting > 0}"
v-for=
"(ocr_field,index) in ocr.json_data.ocr_cells"
:data-index=
"index"
:title=
"ocr_field.text"
:style=
"{position: 'absolute',left: ocr_field.style.left + 'px',top: ocr_field.style.top + 'px',width: ocr_field.style.width + 'px',
...
...
@@ -127,7 +126,7 @@
</div>
</div>
<div
v-for=
"page_num in (ocr.json_data.page_total - 1)"
:key=
"page_num"
:style=
"{width: ocr.mst_template.image.width * 0.3155 + 'px',height: ocr.mst_template.image.height * 0.3155 + 'px'}"
>
<img
:src=
"`{{ route('
order.
show_pdf') }}?file_path=` + ocr.image_path.replace(/\.jpg$/, `_${page_num}.jpg`)"
class=
"img-fluid border"
draggable=
"false"
/>
<img
:src=
"`{{ route('show_pdf') }}?file_path=` + ocr.image_path.replace(/\.jpg$/, `_${page_num}.jpg`)"
class=
"img-fluid border"
draggable=
"false"
/>
</div>
</div>
...
...
routes/web.php
View file @
fb100ea
...
...
@@ -15,5 +15,6 @@
*/
Route
::
get
(
'/'
,
[
OcrController
::
class
,
'index'
]);
Route
::
post
(
'/show-pdf'
,
[
OcrController
::
class
,
'show_pdf'
])
->
name
(
'show_pdf'
);
Route
::
post
(
'/preview-pdf'
,
[
OcrController
::
class
,
'preview_pdf'
])
->
name
(
'preview_pdf'
);
Route
::
post
(
'/import-pdf'
,
[
OcrController
::
class
,
'import_pdf'
])
->
name
(
'import_pdf'
);
...
...
Please
register
or
sign in
to post a comment