diff --git a/src/renderer/public/cropImgTest/single1.json b/src/renderer/public/cropImgTest/single1.json new file mode 100644 index 0000000..e8bd920 --- /dev/null +++ b/src/renderer/public/cropImgTest/single1.json @@ -0,0 +1,540 @@ +{ + "img_direction": 0, + "results": [ + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 96, + "height": 33, + "width": 943, + "top": 15 + }, + "word": "11.(2023广东卷,2)党的二十大审议通过了《中国共产党章程(修正案)》,把党的十九大以", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 48, + "height": 33, + "width": 991, + "top": 58 + }, + "word": "来习近平新时代中国特色社会主义思想新发展写入党章,以更好反映以习近平同志为核心的", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 48, + "height": 32, + "width": 741, + "top": 101 + }, + "word": "党中央推进党的理论创新、实践创新、制度创新成果。这一修改()", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 95, + "height": 32, + "width": 720, + "top": 144 + }, + "word": "①全面具体地总结了党的十八大以来党和国家各项事业的伟大成就", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 836, + "height": 32, + "width": 203, + "top": 145 + }, + "word": "②为更好坚持和发", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 46, + "height": 33, + "width": 994, + "top": 187 + }, + "word": "展中国特色社会主义提供了制度保障和法律依据③更加彰显习近平新时代中国特色社会主", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 50, + "height": 32, + "width": 325, + "top": 229 + }, + "word": "义思想的真理力量和实践伟力", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 395, + "height": 33, + "width": 644, + "top": 229 + }, + "word": "④适应形势和任务的发展变化,有利于更好发挥党章的规范", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 50, + "height": 32, + "width": 128, + "top": 272 + }, + "word": "和指导作用", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 96, + "height": 32, + "width": 88, + "top": 315 + }, + "word": "A.①②", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 326, + "height": 32, + "width": 87, + "top": 314 + }, + "word": "B.①④", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 555, + "height": 31, + "width": 84, + "top": 316 + }, + "word": "C.②③", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 779, + "height": 32, + "width": 88, + "top": 317 + }, + "word": "D.③④", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 94, + "height": 33, + "width": 942, + "top": 358 + }, + "word": "【试题立意】本题以党的二十大对党章修改为背景,考查对习近平新时代中国特色社会主", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 51, + "height": 33, + "width": 871, + "top": 401 + }, + "word": "义思想的理解,引导学生认同习近平新时代中国特色社会主义思想,坚定理论自信。", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 95, + "height": 33, + "width": 942, + "top": 443 + }, + "word": "【能力解读】本题主要考查了对党的二十大审议通过了《中国共产党章程(修正案)》的关键", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 52, + "height": 33, + "width": 821, + "top": 487 + }, + "word": "信息的获取与加工能力,以及对其所体现道理的辨识与判断、推理与论证能力。", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 272, + "height": 27, + "width": 181, + "top": 542 + }, + "word": "筛选加工关键信息", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 795, + "height": 27, + "width": 113, + "top": 542 + }, + "word": "辨识与判断", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 63, + "height": 29, + "width": 602, + "top": 586 + }, + "word": "党的二十大与时俱进,审议通过了《中国共产党章程(修正案)》 ,使", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 681, + "height": 28, + "width": 343, + "top": 586 + }, + "word": "适应形势和任务的发展变化,有利于", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 62, + "height": 28, + "width": 196, + "top": 625 + }, + "word": "之随着时代丰富发展", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 680, + "height": 29, + "width": 297, + "top": 624 + }, + "word": "更好发挥党章的规范和指导作用", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 59, + "height": 28, + "width": 606, + "top": 674 + }, + "word": "《中国共产党章程(修正案)》把党的十九大以来习近平新时代中国", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 681, + "height": 30, + "width": 344, + "top": 692 + }, + "word": "更加彰显习近平新时代中国特色社会", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 61, + "height": 29, + "width": 602, + "top": 713 + }, + "word": "特色社会主义思想新发展写入党章,以更好反映以习近平同志为", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 682, + "height": 29, + "width": 295, + "top": 731 + }, + "word": "主义思想的真理力量和实践伟力", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 61, + "height": 29, + "width": 541, + "top": 751 + }, + "word": "核心的党中央推进党的理论创新、实践创新、制度创新成果", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 95, + "height": 31, + "width": 135, + "top": 808 + }, + "word": "【误项排除】", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 60, + "height": 26, + "width": 49, + "top": 863 + }, + "word": "选项", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 522, + "height": 27, + "width": 114, + "top": 863 + }, + "word": "排除的原因", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 122, + "height": 29, + "width": 902, + "top": 906 + }, + "word": "材料强调的是把党的十九大以来习近平新时代中国特色社会主义思想新发展写入党章,不涉及总", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 68, + "height": 27, + "width": 31, + "top": 927 + }, + "word": "①", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 124, + "height": 29, + "width": 594, + "top": 945 + }, + "word": "结党的十八大以来党和国家各项事业的伟大成就,①不符合题意", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 122, + "height": 28, + "width": 902, + "top": 992 + }, + "word": "《中国共产党章程(修正案)》是管党治党的总章程、总规矩,是中国共产党最根本的党内法规,不能", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 70, + "height": 26, + "width": 29, + "top": 1012 + }, + "word": "②", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 124, + "height": 28, + "width": 699, + "top": 1030 + }, + "word": "为更好坚持和发展中国特色社会主义提供制度保障和法律依据,②说法错误", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 97, + "height": 30, + "width": 108, + "top": 1085 + }, + "word": "【答案】D", + "line_probability": {} + } + } + ], + "layouts_num": 0, + "results_num": 38, + "log_id": 1869631874868290300 +} \ No newline at end of file diff --git a/src/renderer/public/cropImgTest/single2.json b/src/renderer/public/cropImgTest/single2.json new file mode 100644 index 0000000..180f7c5 --- /dev/null +++ b/src/renderer/public/cropImgTest/single2.json @@ -0,0 +1,176 @@ +{ + "img_direction": 0, + "results": [ + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 14, + "height": 58, + "width": 727, + "top": 2 + }, + "word": "(四川成都锦江区校级自主招生)九年级1班在课外活动时,", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 14, + "height": 54, + "width": 730, + "top": 51 + }, + "word": "甲、乙、丙三位同学进行乒乓球练习,为确定哪两位同学先打", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 11, + "height": 51, + "width": 731, + "top": 101 + }, + "word": "球,甲、乙、丙三位同学用“手心、手背”游戏(游戏时,“手心向", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 11, + "height": 47, + "width": 731, + "top": 151 + }, + "word": "上”简称手心;“手背向上”简称手背)来决定.游戏规则是:每", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 10, + "height": 42, + "width": 731, + "top": 201 + }, + "word": "人每次同时随机伸出一只手,出手心或手背.若出现“两同一", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 10, + "height": 40, + "width": 729, + "top": 249 + }, + "word": "异”(即两手心、一手背或两手背、一手心)的情况,则同出手心", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 9, + "height": 38, + "width": 729, + "top": 297 + }, + "word": "或手背的两个人先打球,另一人做裁判;否则继续进行,直到", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 11, + "height": 32, + "width": 255, + "top": 348 + }, + "word": "出现“两同一异”为止.", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 10, + "height": 34, + "width": 726, + "top": 393 + }, + "word": "(1)请你列出甲、乙、丙三位同学运用“手心、手背”游戏,出手", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 7, + "height": 37, + "width": 723, + "top": 439 + }, + "word": "一次出现的所有等可能情况(用A表示手心,用B表示手背);", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 8, + "height": 36, + "width": 724, + "top": 485 + }, + "word": "(2)求甲、乙、丙三位同学运用“手心、手背”游戏,出手一次出", + "line_probability": {} + } + }, + { + "chars": [], + "words_type": "print", + "words": { + "words_location": { + "left": 6, + "height": 34, + "width": 257, + "top": 529 + }, + "word": "现“两同一异”的概率.", + "line_probability": {} + } + } + ], + "layouts_num": 0, + "results_num": 12, + "log_id": 1869573563121265400 +} \ No newline at end of file diff --git a/src/renderer/src/api/education/entpCourseWork.js b/src/renderer/src/api/education/entpCourseWork.js index 25f61e2..f243df1 100644 --- a/src/renderer/src/api/education/entpCourseWork.js +++ b/src/renderer/src/api/education/entpCourseWork.js @@ -135,4 +135,18 @@ export function getJYPath(url,config) { method: config.method||"get", params: config.params }) +} + + +/** + * @desc: 百度识图转发 + * @return: {*} + * @param {*} data + */ +export function getOcrContent(data) { + return request({ + url: '/ocr/exam', + method: 'post', + data: data + }) } \ 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 0151f5b..c57f831 100644 --- a/src/renderer/src/components/choose-textbook/index.vue +++ b/src/renderer/src/components/choose-textbook/index.vue @@ -184,7 +184,7 @@ const renderContent = (h, { node, data, store }) => { 'span', { style: { - color: data.bookId==''||data.bookId=='0' ? '#758CAE' : 'black', + color: data.bookId==''||data.bookId=='0' ? '#A5B3CA' : 'black', }, }, node.label diff --git a/src/renderer/src/hooks/useProcessList.js b/src/renderer/src/hooks/useProcessList.js index bb2b0c3..c9f1e07 100644 --- a/src/renderer/src/hooks/useProcessList.js +++ b/src/renderer/src/hooks/useProcessList.js @@ -299,21 +299,28 @@ export const processList = (row, aloneOption=false) => { if(!aloneOption && j%2== 0){ tmp += ''; } - row[i].workdescFormat = tmp + row[i].workdescFormat = tmp; // 处理[答案显示] - 转换ABCD let arr2Char = workAnswerArr .map((item) => { return String.fromCharCode(65 + Number(item)) }) - .join('') - row[i].workanswerFormat = arr2Char + .join(''); + row[i].workanswerFormat = arr2Char; } else if (row[i].worktype == '填空题') { // 处理[选项显示] - 填空题中无选项, 故置空 - row[i].workdescFormat = '' + row[i].workdescFormat = ''; // 处理[答案显示] - 逗号连接 - row[i].workanswerFormat = workAnswerArr.join('、') + + // 当[答案显示]为 [
/g, ''); - examItem = ocrTxt; - } + ocrTxt = ocrTxt.replace(/