mirror of
http://git.xinwangdao.com/cnnc-embedded-parts-detect/detect-embeded.git
synced 2025-06-24 13:34:13 +08:00
fixed
This commit is contained in:
parent
1c20402de7
commit
c64df82202
@ -60,6 +60,7 @@ export const schema = {
|
||||
},
|
||||
colProps,
|
||||
component: 'Input',
|
||||
rules: [{ required: true, message: '请输入设备序列号!' }],
|
||||
},
|
||||
table: {
|
||||
},
|
||||
|
@ -288,15 +288,25 @@
|
||||
pdfView.value.show();
|
||||
};
|
||||
|
||||
let wallCode = null;
|
||||
const handleCapture = (base64ImageString: any) => {
|
||||
isLoading.value = true;
|
||||
OCRService.importByOCR(base64ImageString).then(
|
||||
OCRService.importByOCR(base64ImageString, wallCode).then(
|
||||
(res: any) => {
|
||||
if (res === "") {
|
||||
isLoading.value = false;
|
||||
return;
|
||||
}
|
||||
const data = JSON.parse(res);
|
||||
if (data.length === 0) {
|
||||
isLoading.value = false;
|
||||
return;
|
||||
}
|
||||
if (data[0].length > 5) {
|
||||
wallCode = data[0].code.substring(0, data.length - 5);
|
||||
} else {
|
||||
wallCode = null;
|
||||
}
|
||||
if (ocrData === null) {
|
||||
const record = {
|
||||
name: '',
|
||||
|
Loading…
Reference in New Issue
Block a user