From 227795738dac693e0d6a42f4d9a2c9d2861c6678 Mon Sep 17 00:00:00 2001 From: zhutianqi Date: Tue, 23 Nov 2021 18:47:56 +0800 Subject: [PATCH] commit --- .../localTool/standardRecognition/index.vue | 2 +- .../domesticStandardsAndRegulations/index.vue | 56 ++++++++++++++++--- 2 files changed, 48 insertions(+), 10 deletions(-) diff --git a/src/pages/localTool/standardRecognition/index.vue b/src/pages/localTool/standardRecognition/index.vue index 669fd8666..73bb92c4c 100644 --- a/src/pages/localTool/standardRecognition/index.vue +++ b/src/pages/localTool/standardRecognition/index.vue @@ -1359,7 +1359,7 @@ export default { ) { this.isSubmit = true; this.uploadFilesdfEo.fileType = this.uploadFilesdfEo.fileType.toString(); - this.$http.post( + this.$http.post( "ocr/OCRRestful/addOcrRecord", this.uploadFilesdfEo, { diff --git a/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue b/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue index 5f8d49e99..a9f099601 100644 --- a/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue +++ b/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue @@ -1855,6 +1855,8 @@ }, data() { return { + OCRType: '', + OCRoptions: [], OCRDatas: [], OCRData: [], OCRLoading: false, @@ -2563,20 +2565,50 @@ } else if (this.OCRDatas.length === 0) { this.$message.warning('请选择一个文件') } else { - console.log(this.OCRDatas); - console.log(this.ocrList); - let json = { - standNumber: this.ocrList[0].standYear ? this.ocrList[0].standSortShow + ' ' + this.ocrList[0].standNumber + '-' + this.ocrList[0].standYear : this.ocrList[0].standSortShow + ' ' + this.ocrList[0].standNumber, - standName: this.ocrList[0].standName, - attId: this.OCRDatas[0].attId, - fileName: this.OCRDatas[0].name, - fileType: this.ocrList[0].name, + if (this.OCRType === '0') { + let json = { + standNumber: this.ocrList[0].standYear ? this.ocrList[0].standSortShow + ' ' + this.ocrList[0].standNumber + '-' + this.ocrList[0].standYear : this.ocrList[0].standSortShow + ' ' + this.ocrList[0].standNumber, + standName: this.ocrList[0].standName, + attId: this.OCRDatas[0].attId, + fileName: this.OCRDatas[0].fileName, + fileType: this.OCRDatas[0].useModel, + } + this.$http.post( + "ocr/OCRRestful/addOcrRecord", + json, + { + _this: this, + }, + (res) => { + this.OCRModel = false + if (res.ok) { + this.$message.success('OCR实别成功') + } else {} + }, + (e) => { + } + ); + } else if (this.OCRType === '1') { + let splitEo = {} + splitEo.standId = this.OCRDatas[0].standId + splitEo.fileType = this.OCRDatas[0].standFileClassify + splitEo.attId = this.OCRDatas[0].attId + splitEo.fileName = this.OCRDatas[0].fileName + this.$http.postData('lawss/sarFileSplitInfo/fileSplit', splitEo, { + _this: this + }, res => { + this.OCRModel = false + if (res.ok) { + this.$message.success('拆分成功') + } else {} + }, e => { + }) } - console.log(json); } }, OCRAdd (type) { let text = '' + this.OCRType = type if (type === '0') { text = 'OCR识别' this.OCRTitle = '选择OCR实别文件' @@ -2603,6 +2635,7 @@ this.OCRLoading = false } else { this.$message.warning('当前标准没有' + text + '文件') + this.this.OCRData = [] this.OCRLoading = false } } @@ -5265,6 +5298,11 @@ // await this.selectStandardMenu() this.treeReload = true // 从数据库中查询各下拉框数据 + this.$http.get('lawss/sarStandAttrDetails/getListData', '', { + _this: this + }, res => { + this.OCRoptions = res.data + }) this.$http.get('sys/dictype/getDicTypeListCode', '', { _this: this }, res => {