|
@@ -47,7 +47,11 @@
|
|
<script>
|
|
<script>
|
|
import Cropper from "cropperjs";
|
|
import Cropper from "cropperjs";
|
|
import db from "@/plugins/db";
|
|
import db from "@/plugins/db";
|
|
-import { getPreUploadFiles } from "../../../plugins/imageOcr";
|
|
|
|
|
|
+import {
|
|
|
|
+ getPreUploadFiles,
|
|
|
|
+ renamePreUploadJsonFile
|
|
|
|
+} from "../../../plugins/imageOcr";
|
|
|
|
+import { evokeScanner } from "../../../plugins/scanner";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "ocr-area-set",
|
|
name: "ocr-area-set",
|
|
@@ -69,8 +73,15 @@ export default {
|
|
this.modalIsShow = true;
|
|
this.modalIsShow = true;
|
|
},
|
|
},
|
|
async dialogOpened() {
|
|
async dialogOpened() {
|
|
|
|
+ await this.evokeScanExe();
|
|
await this.initData();
|
|
await this.initData();
|
|
this.initCropper();
|
|
this.initCropper();
|
|
|
|
+ renamePreUploadJsonFile(this.GLOBAL.input);
|
|
|
|
+ },
|
|
|
|
+ async evokeScanExe() {
|
|
|
|
+ await evokeScanner(this.GLOBAL.input).catch(error => {
|
|
|
|
+ console.error(error);
|
|
|
|
+ });
|
|
},
|
|
},
|
|
async initData() {
|
|
async initData() {
|
|
const ocrArea = await db.getDict("ocrArea", "").catch(() => {});
|
|
const ocrArea = await db.getDict("ocrArea", "").catch(() => {});
|