ocr优化
This commit is contained in:
parent
8278cd5b25
commit
f9669b685f
|
|
@ -289,7 +289,7 @@ export default {
|
|||
if (firstFile.response?.ocrResult) {
|
||||
const ocrResult = firstFile.response.ocrResult
|
||||
if (ocrResult.status_code === 200) {
|
||||
const chat_res = ocrResult.data?.chat_res
|
||||
const chat_res = ocrResult.data
|
||||
if (chat_res && typeof chat_res === 'object') {
|
||||
Object.keys(chat_res).forEach(key => {
|
||||
const formField = this.ocrResultParams[key]
|
||||
|
|
|
|||
|
|
@ -398,7 +398,7 @@ export default {
|
|||
if (firstFile.response?.ocrResult) {
|
||||
const ocrResult = firstFile.response.ocrResult
|
||||
if (ocrResult.status_code === 200) {
|
||||
const chat_res = ocrResult.data?.chat_res
|
||||
const chat_res = ocrResult.data
|
||||
if (chat_res && typeof chat_res === 'object') {
|
||||
Object.keys(chat_res).forEach(key => {
|
||||
const formField = this.ocrResultParams[key]
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ export default {
|
|||
try {
|
||||
const firstFile = files[0]
|
||||
if (firstFile.response?.ocrResult?.status_code === 200) {
|
||||
const chatRes = firstFile.response.ocrResult.data?.chat_res
|
||||
const chatRes = firstFile.response.ocrResult.data
|
||||
if (chatRes) {
|
||||
Object.keys(chatRes).forEach(key => {
|
||||
const field = this.ocrResultParams[key]
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ export default {
|
|||
try {
|
||||
const firstFile = files[0]
|
||||
if (firstFile.response?.ocrResult?.status_code === 200) {
|
||||
const chatRes = firstFile.response.ocrResult.data?.chat_res
|
||||
const chatRes = firstFile.response.ocrResult.data
|
||||
if (chatRes && typeof chatRes === 'object') {
|
||||
Object.keys(chatRes).forEach(key => {
|
||||
const formField = this.ocrResultParams[key]
|
||||
|
|
|
|||
|
|
@ -361,7 +361,7 @@ export default {
|
|||
if (firstFile.response?.ocrResult) {
|
||||
const ocrResult = firstFile.response.ocrResult;
|
||||
if (ocrResult.status_code === 200) {
|
||||
const chat_res = ocrResult.data?.chat_res;
|
||||
const chat_res = ocrResult.data;
|
||||
if (chat_res && typeof chat_res === 'object') {
|
||||
// 映射识别结果到表单字段
|
||||
Object.keys(chat_res).forEach(key => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue