[update OCR识别] 暂无搜索
This commit is contained in:
@@ -1,5 +1,36 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<!--标准号/标准名称-->
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="$t('standardSelect.standardNumOrName')">
|
||||
<a-input :placeholder="$t('pleaseEnter') + $t('standardSelect.standardNumOrName')"
|
||||
v-model="queryParam.serialNumberOrName"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--转换状态-->
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="$t('docTool.ocrTextRecognition.conversionStatus')">
|
||||
<j-dict-select-tag
|
||||
class="box-input"
|
||||
v-model="queryParam.splitStatus"
|
||||
:placeholder="$t('pleaseSelect') + $t('docTool.ocrTextRecognition.conversionStatus')"
|
||||
:type="'select'"
|
||||
:triggerChange="false"
|
||||
dictCode="transition_status" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<div style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 8px" v-has="'split:sarFileSplitInfo:search'">
|
||||
{{ $t('query') }}
|
||||
</a-button>
|
||||
<a-button type="primary" @click="searchReset" icon="reload" ghost>{{ $t('reset') }}</a-button>
|
||||
</div>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<!-- 上传 -->
|
||||
<a-button icon="plus" type="primary" @click="handleAdd" v-has="'docTool:ocrTextRecognition:add'">{{$t('docTool.ocrTextRecognition.upload') }}</a-button>
|
||||
@@ -16,11 +47,16 @@
|
||||
:pagination="ipagination"
|
||||
:scroll="{x: '100%', y: yScrollHeight}"
|
||||
:loading="loading"
|
||||
:operation-list="operationList"
|
||||
@change="handleTableChange"
|
||||
@operationClick="operationClick">
|
||||
@change="handleTableChange">
|
||||
|
||||
<!--跳转标准详情-->
|
||||
<template v-slot:action="{text, record}">
|
||||
<!--获取文件-->
|
||||
<a @click="handleDownload(record)"
|
||||
v-has="'docTool:ocrTextRecognition:download'"
|
||||
:disabled="record.resultContent !== OcrConvertStateEnums.CONVERTED.value">{{ $t('docTool.ocrTextRecognition.getFile') }}</a>
|
||||
</template>
|
||||
|
||||
<!--转换状态-->
|
||||
<template v-slot:tag="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
@@ -29,6 +65,14 @@
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<!--跳转详情-->
|
||||
<template v-slot:toDetail="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<div class="table-text can-click-table-text" v-if="text || text === 0" @click="toStandardDetail(record)">{{ text }}</div>
|
||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</j-table>
|
||||
</div>
|
||||
<!-- 新增、编辑弹框 -->
|
||||
@@ -41,6 +85,7 @@ import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||
import JTable from '@comp/jero/JTable'
|
||||
import OcrTextRecognitionModal from '@views/documentTool/ocrTextRecognition/modules/OcrTextRecognitionModal'
|
||||
import { downloadFile, getAction, postAction } from '@api/manage'
|
||||
import { OcrConvertStateEnums } from '@/enums/commonEnums'
|
||||
|
||||
export default {
|
||||
name: 'OcrTextRecognition',
|
||||
@@ -48,6 +93,7 @@ export default {
|
||||
mixins: [JeroListMixin],
|
||||
data () {
|
||||
return {
|
||||
OcrConvertStateEnums,
|
||||
url: {
|
||||
list: '/laws/ocr/OCRRestful/getAllOcrResult',
|
||||
deleteBatch: '/laws/ocr/OCRRestful/deleteOcrRecord'
|
||||
@@ -73,14 +119,14 @@ export default {
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'standNumber',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'toDetail' }
|
||||
},
|
||||
{ // 标准名称
|
||||
title: this.$t('docTool.ocrTextRecognition.standardName'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'standName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'toDetail' }
|
||||
},
|
||||
{ // 文本状态
|
||||
title: this.$t('docTool.ocrTextRecognition.textStatus'),
|
||||
@@ -93,7 +139,7 @@ export default {
|
||||
title: this.$t('docTool.ocrTextRecognition.conversionResults'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'resultContent',
|
||||
dataIndex: 'resultContent_dictText',
|
||||
scopedSlots: { customRender: 'tag' }
|
||||
},
|
||||
{ // 消耗时间
|
||||
@@ -110,36 +156,20 @@ export default {
|
||||
fixed: 'right',
|
||||
width: 200
|
||||
}
|
||||
],
|
||||
operationList: [
|
||||
// 获取文件
|
||||
{
|
||||
text: this.$t('docTool.ocrTextRecognition.getFile'),
|
||||
clickEvent: 'handleDownload',
|
||||
has: 'docTool:ocrTextRecognition:download',
|
||||
show: (record) => {
|
||||
return record.resultContent !== '转换中'
|
||||
}
|
||||
},
|
||||
// 编辑
|
||||
{
|
||||
text: this.$t('edit'),
|
||||
clickEvent: 'handleEdit',
|
||||
has: 'docTool:ocrTextRecognition:edit'
|
||||
}
|
||||
// 删除
|
||||
// {
|
||||
// text: this.$t('delete'),
|
||||
// clickEvent: 'handleDelete',
|
||||
// has: 'split:sarFileSplitInfo:release'
|
||||
// }
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
console.log(this.$refs.modalForm)
|
||||
},
|
||||
methods: {
|
||||
// 跳转详情
|
||||
toStandardDetail () {
|
||||
const { standardId } = this.info.data.processStandardInterpret
|
||||
this.$openPageNewSheet({
|
||||
path: '/standardRegulationLibrary/foreignStandardDetailPage',
|
||||
query: {
|
||||
id: standardId
|
||||
}
|
||||
})
|
||||
},
|
||||
loadData (arg) {
|
||||
if (!this.url.list) {
|
||||
this.$message.warning('请设置url.list属性!')
|
||||
@@ -171,9 +201,9 @@ export default {
|
||||
downloadFile(`/sys/common/download/${data.wordAttId}`, data.docRealName)
|
||||
},
|
||||
getTagColor (row) {
|
||||
if (row.resultContent === '转换成功') {
|
||||
if (row.resultContent === OcrConvertStateEnums.CONVERTED.value) {
|
||||
return 'green'
|
||||
} else if (row.resultContent === '转换中') {
|
||||
} else if (row.resultContent === OcrConvertStateEnums.CONVERTING.value) {
|
||||
return 'blue'
|
||||
} else {
|
||||
return 'red'
|
||||
|
||||
Reference in New Issue
Block a user