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,
|
colProps,
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
|
rules: [{ required: true, message: '请输入设备序列号!' }],
|
||||||
},
|
},
|
||||||
table: {
|
table: {
|
||||||
},
|
},
|
||||||
|
@ -288,15 +288,25 @@
|
|||||||
pdfView.value.show();
|
pdfView.value.show();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let wallCode = null;
|
||||||
const handleCapture = (base64ImageString: any) => {
|
const handleCapture = (base64ImageString: any) => {
|
||||||
isLoading.value = true;
|
isLoading.value = true;
|
||||||
OCRService.importByOCR(base64ImageString).then(
|
OCRService.importByOCR(base64ImageString, wallCode).then(
|
||||||
(res: any) => {
|
(res: any) => {
|
||||||
|
if (res === "") {
|
||||||
|
isLoading.value = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
const data = JSON.parse(res);
|
const data = JSON.parse(res);
|
||||||
if (data.length === 0) {
|
if (data.length === 0) {
|
||||||
isLoading.value = false;
|
isLoading.value = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (data[0].length > 5) {
|
||||||
|
wallCode = data[0].code.substring(0, data.length - 5);
|
||||||
|
} else {
|
||||||
|
wallCode = null;
|
||||||
|
}
|
||||||
if (ocrData === null) {
|
if (ocrData === null) {
|
||||||
const record = {
|
const record = {
|
||||||
name: '',
|
name: '',
|
||||||
|
Loading…
Reference in New Issue
Block a user