[update OCR识别] 完善

This commit is contained in:
danshihao
2024-07-19 11:30:23 +08:00
parent 7eda2bda46
commit 8f22dbad07
3 changed files with 9 additions and 6 deletions
@@ -84,7 +84,7 @@
import { JeroListMixin } from '@/mixins/JeroListMixin' import { JeroListMixin } from '@/mixins/JeroListMixin'
import JTable from '@comp/jero/JTable' import JTable from '@comp/jero/JTable'
import OcrTextRecognitionModal from '@views/documentTool/ocrTextRecognition/modules/OcrTextRecognitionModal' import OcrTextRecognitionModal from '@views/documentTool/ocrTextRecognition/modules/OcrTextRecognitionModal'
import { downloadFile, getAction, postAction } from '@api/manage' import { downloadFile, getAction } from '@api/manage'
import { OcrConvertStateEnums } from '@/enums/commonEnums' import { OcrConvertStateEnums } from '@/enums/commonEnums'
export default { export default {
@@ -132,7 +132,7 @@ export default {
title: this.$t('docTool.ocrTextRecognition.textStatus'), title: this.$t('docTool.ocrTextRecognition.textStatus'),
align: 'center', align: 'center',
width: 180, width: 180,
dataIndex: 'fileType', dataIndex: 'fileTypeDictText',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, },
{ // 转换结果 { // 转换结果
@@ -182,7 +182,7 @@ export default {
const params = this.getQueryParams()// 查询条件 const params = this.getQueryParams()// 查询条件
console.log(params) console.log(params)
this.loading = true this.loading = true
postAction(this.url.list, params).then((res) => { getAction(this.url.list, params).then((res) => {
if (res.ok) { if (res.ok) {
this.dataSource = res.data.list this.dataSource = res.data.list
if (res.data.count) { if (res.data.count) {
@@ -127,7 +127,9 @@ export default {
// 标准结构树 // 标准结构树
standardStructureTree: [], standardStructureTree: [],
filters: { filters: {
fileSuffix: '.pdf' fileSuffix: '.pdf',
// 排除文本状态为其他的
excludeFileTypes: 'other_file'
}, },
// 默认查询参数 // 默认查询参数
defaultQueryParam: { defaultQueryParam: {
@@ -95,11 +95,12 @@ export default {
} }
}, },
methods: { methods: {
// 初始化文本状态下拉,排除其他选项 // 初始化文本状态下拉
initFileTypeList () { initFileTypeList () {
ajaxGetDictItems('process_manuscript').then((res) => { ajaxGetDictItems('process_manuscript').then((res) => {
if (res.success) { if (res.success) {
const data = res.result || [] const data = res.result || []
// 排除 其他 选项
this.fileTypeList = data.filter(item => item.value !== 'other_file') this.fileTypeList = data.filter(item => item.value !== 'other_file')
} }
}) })
@@ -116,7 +117,7 @@ export default {
attId: data.id, attId: data.id,
standName: data.standardName, standName: data.standardName,
standNumber: data.standardNumber, standNumber: data.standardNumber,
fileType: data.standardFileType5 fileType: data.standardFileType
}) })
}, },
add () { add () {