From 058509b29c670f379ae980e6f23c33bed6db4635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Czouyf=E2=80=9D?= <80906036@qq.com> Date: Wed, 18 Dec 2024 10:31:20 +0800 Subject: [PATCH] 1 --- src/renderer/public/cropImgTest/single.json | 203 ++++++++++++++++++ .../src/components/choose-textbook/index.vue | 14 +- .../questionUpload/index.vue | 2 +- src/renderer/src/views/model/index.vue | 4 +- 4 files changed, 219 insertions(+), 4 deletions(-) create mode 100644 src/renderer/public/cropImgTest/single.json diff --git a/src/renderer/public/cropImgTest/single.json b/src/renderer/public/cropImgTest/single.json new file mode 100644 index 0000000..fdefcd9 --- /dev/null +++ b/src/renderer/public/cropImgTest/single.json @@ -0,0 +1,203 @@ +{ + "words_result": [ + { + "type": "print", + "location": { + "top": 8, + "left": 11, + "width": 485, + "height": 18 + }, + "words": "(1)风华正茂:" + }, + { + "type": "print", + "location": { + "top": 37, + "left": 11, + "width": 485, + "height": 18 + }, + "words": "(2)书生意气:" + }, + { + "type": "print", + "location": { + "top": 67, + "left": 11, + "width": 484, + "height": 18 + }, + "words": "(3)指点江山:" + }, + { + "type": "print", + "location": { + "top": 96, + "left": 11, + "width": 485, + "height": 18 + }, + "words": "(4)峥嵘岁月:" + }, + { + "type": "print", + "location": { + "top": 125, + "left": 10, + "width": 180, + "height": 17 + }, + "words": "[答案](1)风采才华正盛。" + }, + { + "type": "print", + "location": { + "top": 155, + "left": 11, + "width": 179, + "height": 16 + }, + "words": "(2)词中指同学们意气奔放。" + }, + { + "type": "print", + "location": { + "top": 185, + "left": 12, + "width": 118, + "height": 16 + }, + "words": "(3)评论国家大事。" + }, + { + "type": "print", + "location": { + "top": 214, + "left": 12, + "width": 376, + "height": 16 + }, + "words": "(4)不寻常的日子。峥嵘,这里是不平凡、 不寻常的意思。" + } + ], + "formula_result": [], + "img_direction": 0, + "results": [ + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 11, + "height": 18, + "width": 485, + "top": 8 + }, + "word": "(1)风华正茂:", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 11, + "height": 18, + "width": 485, + "top": 37 + }, + "word": "(2)书生意气:", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 11, + "height": 18, + "width": 484, + "top": 67 + }, + "word": "(3)指点江山:", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 11, + "height": 18, + "width": 485, + "top": 96 + }, + "word": "(4)峥嵘岁月:", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 10, + "height": 17, + "width": 180, + "top": 125 + }, + "word": "[答案](1)风采才华正盛。", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 11, + "height": 16, + "width": 179, + "top": 155 + }, + "word": "(2)词中指同学们意气奔放。", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 12, + "height": 16, + "width": 118, + "top": 185 + }, + "word": "(3)评论国家大事。", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 12, + "height": 16, + "width": 376, + "top": 214 + }, + "word": "(4)不寻常的日子。峥嵘,这里是不平凡、 不寻常的意思。", + "line_probability": {} + } + } + ], + "layouts_num": 0, + "results_num": 8, + "log_id": 1868923976840586200 +} \ No newline at end of file diff --git a/src/renderer/src/components/choose-textbook/index.vue b/src/renderer/src/components/choose-textbook/index.vue index 7e766f8..0151f5b 100644 --- a/src/renderer/src/components/choose-textbook/index.vue +++ b/src/renderer/src/components/choose-textbook/index.vue @@ -7,7 +7,7 @@
orc 使用说明
+orc 使用说明(填空题暂无法整题识别)
1、本地浏览
2、获取剪贴板图片
3、整题识别:可识别整张图片,自动填充到对应内容。
diff --git a/src/renderer/src/views/model/index.vue b/src/renderer/src/views/model/index.vue index a10a761..90e469c 100644 --- a/src/renderer/src/views/model/index.vue +++ b/src/renderer/src/views/model/index.vue @@ -402,8 +402,8 @@ const changeBook = async(data) => { let cata = parseCataByNode(data.node) currentNode.value = data.node uploadData.value.levelFirstId = cata[0] - uploadData.value.levelSecondId = cata[1]==null||cata[1]== undefined ? '' : cata[1] - uploadData.value.levelThirdId = cata[2]==null||cata[2]== undefined ? '' : cata[2] + uploadData.value.levelSecondId = cata[1] ?? '' + uploadData.value.levelThirdId = cata[2] ?? '' uploadData.value.textbookId = data.textBook.curBookId getModelInfo({cataid: currentNode.value.id}).then(res=>{ console.log(res)