[update OCR识别] 完善
This commit is contained in:
@@ -568,7 +568,8 @@ module.exports = {
|
|||||||
conversionStatus: 'Transition state',
|
conversionStatus: 'Transition state',
|
||||||
timeConsuming: 'Time consumption (seconds)',
|
timeConsuming: 'Time consumption (seconds)',
|
||||||
file: 'File',
|
file: 'File',
|
||||||
uploadPdf: 'Upload PDF'
|
uploadPdf: 'Upload PDF',
|
||||||
|
manuallySearch: 'Manually search'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 业务支持
|
// 业务支持
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<a-col :md="6" :sm="12">
|
<a-col :md="6" :sm="12">
|
||||||
<a-form-item :label="$t('standardSelect.standardNumOrName')">
|
<a-form-item :label="$t('standardSelect.standardNumOrName')">
|
||||||
<a-input :placeholder="$t('pleaseEnter') + $t('standardSelect.standardNumOrName')"
|
<a-input :placeholder="$t('pleaseEnter') + $t('standardSelect.standardNumOrName')"
|
||||||
v-model="queryParam.serialNumberOrName"></a-input>
|
v-model="queryParam.standardNumberAndName"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<!--转换状态-->
|
<!--转换状态-->
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<a-form-item :label="$t('docTool.ocrTextRecognition.conversionStatus')">
|
<a-form-item :label="$t('docTool.ocrTextRecognition.conversionStatus')">
|
||||||
<j-dict-select-tag
|
<j-dict-select-tag
|
||||||
class="box-input"
|
class="box-input"
|
||||||
v-model="queryParam.splitStatus"
|
v-model="queryParam.resultContent"
|
||||||
:placeholder="$t('pleaseSelect') + $t('docTool.ocrTextRecognition.conversionStatus')"
|
:placeholder="$t('pleaseSelect') + $t('docTool.ocrTextRecognition.conversionStatus')"
|
||||||
:type="'select'"
|
:type="'select'"
|
||||||
:triggerChange="false"
|
:triggerChange="false"
|
||||||
@@ -139,7 +139,7 @@ export default {
|
|||||||
title: this.$t('docTool.ocrTextRecognition.conversionResults'),
|
title: this.$t('docTool.ocrTextRecognition.conversionResults'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 180,
|
width: 180,
|
||||||
dataIndex: 'resultContent_dictText',
|
dataIndex: 'resultContentDictText',
|
||||||
scopedSlots: { customRender: 'tag' }
|
scopedSlots: { customRender: 'tag' }
|
||||||
},
|
},
|
||||||
{ // 消耗时间
|
{ // 消耗时间
|
||||||
@@ -161,12 +161,12 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 跳转详情
|
// 跳转详情
|
||||||
toStandardDetail () {
|
toStandardDetail (record) {
|
||||||
const { standardId } = this.info.data.processStandardInterpret
|
const { standNumber } = record
|
||||||
this.$openPageNewSheet({
|
this.$openPageNewSheet({
|
||||||
path: '/standardRegulationLibrary/foreignStandardDetailPage',
|
path: '/standardRegulationLibrary/foreignStandardDetailPage',
|
||||||
query: {
|
query: {
|
||||||
id: standardId
|
standardNumber: standNumber
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -34,18 +34,9 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
<!--文本状态-->
|
<!--文本状态-->
|
||||||
<a-form-item :label="$t('docTool.ocrTextRecognition.textStatus')">
|
<a-form-item :label="$t('docTool.ocrTextRecognition.textStatus')">
|
||||||
<!-- TODO 现在是传文字,应该后续要改成数据字典-->
|
<j-dict-select-tag :options="fileTypeList"
|
||||||
<!--<j-dict-select-tag dict-code="decomposition_source"-->
|
:placeholder="$t('pleaseSelect') + $t('docTool.ocrTextRecognition.textStatus')"
|
||||||
<!-- :placeholder="$t('pleaseSelect') + $t('docTool.ocrTextRecognition.textStatus')"-->
|
v-decorator="['fileType', validatorRules.fileType]"/>
|
||||||
<!-- v-decorator.trim="['fileType', validatorRules.fileType]"/>-->
|
|
||||||
<a-select
|
|
||||||
:placeholder="$t('pleaseSelect') + $t('docTool.ocrTextRecognition.textStatus')"
|
|
||||||
v-decorator="['fileType', validatorRules.fileType]"
|
|
||||||
show-search
|
|
||||||
:filter-option="filterOption"
|
|
||||||
>
|
|
||||||
<a-select-option v-for="item in fileTypeList" :key="item.value" :value="item.value">{{ item.text || item.label }}</a-select-option>
|
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<!--上传文件-->
|
<!--上传文件-->
|
||||||
<a-form-item :label="$t('docTool.ocrTextRecognition.uploadPdf')">
|
<a-form-item :label="$t('docTool.ocrTextRecognition.uploadPdf')">
|
||||||
@@ -67,7 +58,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import { getFileInfo } from '@api/api'
|
import { ajaxGetDictItems, getFileInfo } from '@api/api'
|
||||||
import { postAction } from '@api/manage'
|
import { postAction } from '@api/manage'
|
||||||
import pick from 'lodash.pick'
|
import pick from 'lodash.pick'
|
||||||
import OcrSelectStandard from '@views/documentTool/ocrTextRecognition/modules/OcrSelectStandard'
|
import OcrSelectStandard from '@views/documentTool/ocrTextRecognition/modules/OcrSelectStandard'
|
||||||
@@ -85,18 +76,7 @@ export default {
|
|||||||
edit: '/laws/ocr/OCRRestful/updateOcrRecord'
|
edit: '/laws/ocr/OCRRestful/updateOcrRecord'
|
||||||
},
|
},
|
||||||
// 文本状态下拉
|
// 文本状态下拉
|
||||||
fileTypeList: [
|
fileTypeList: [],
|
||||||
{ label: '修改单', value: '修改单' },
|
|
||||||
{ label: 'TBT通报文件', value: 'TBT通报文件' },
|
|
||||||
{ label: '草稿', value: '草稿' },
|
|
||||||
{ label: '报批稿', value: '报批稿' },
|
|
||||||
{ label: '发布稿(原文)', value: '发布稿(原文)' },
|
|
||||||
{ label: '相关文件', value: '相关文件' },
|
|
||||||
{ label: '关联文件', value: '关联文件' },
|
|
||||||
{ label: '征求意见稿', value: '征求意见稿' },
|
|
||||||
{ label: '发布稿(译文)', value: '发布稿(译文)' },
|
|
||||||
{ label: '送审稿', value: '送审稿' }
|
|
||||||
],
|
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
validatorRules: {
|
validatorRules: {
|
||||||
// 文件
|
// 文件
|
||||||
@@ -115,6 +95,15 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 初始化文本状态下拉,排除其他选项
|
||||||
|
initFileTypeList () {
|
||||||
|
ajaxGetDictItems('process_manuscript').then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
const data = res.result || []
|
||||||
|
this.fileTypeList = data.filter(item => item.value !== 'other_file')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 打开选择标准弹框
|
// 打开选择标准弹框
|
||||||
openSelectStandard () {
|
openSelectStandard () {
|
||||||
this.$refs.selectStandard.open()
|
this.$refs.selectStandard.open()
|
||||||
@@ -127,13 +116,14 @@ export default {
|
|||||||
attId: data.id,
|
attId: data.id,
|
||||||
standName: data.standardName,
|
standName: data.standardName,
|
||||||
standNumber: data.standardNumber,
|
standNumber: data.standardNumber,
|
||||||
fileType: data.standardFileType_dictText
|
fileType: data.standardFileType5
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
add () {
|
add () {
|
||||||
this.edit()
|
this.edit()
|
||||||
},
|
},
|
||||||
edit (record) {
|
edit (record) {
|
||||||
|
this.initFileTypeList()
|
||||||
this.model = Object.assign({}, record)
|
this.model = Object.assign({}, record)
|
||||||
console.log(record)
|
console.log(record)
|
||||||
this.visible = true
|
this.visible = true
|
||||||
|
|||||||
+2
-1
@@ -230,7 +230,8 @@ export default {
|
|||||||
// 获取数据
|
// 获取数据
|
||||||
initDetailData () {
|
initDetailData () {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.operateApiFunc.getDetailData({ id: this.$route.query.id, type: 1 }).then(res => {
|
const { id, standardNumber } = this.$route.query
|
||||||
|
this.operateApiFunc.getDetailData({ id, standardNumber, type: 1 }).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.detailData = Object.assign({}, res.result || {})
|
this.detailData = Object.assign({}, res.result || {})
|
||||||
this.fileField.forEach(item => {
|
this.fileField.forEach(item => {
|
||||||
|
|||||||
Reference in New Issue
Block a user