Dung Diego

up

......@@ -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>
......
......@@ -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');
......