ocr识别修改
This commit is contained in:
@@ -80,7 +80,7 @@
|
||||
import { getAction, postAction, deleteAction, putAction } from '@/api/manage'
|
||||
import eventBUs from '../../../common/event'
|
||||
import search from '@/components/search/index'
|
||||
import tableData from '@/components/tableDate/index'
|
||||
import tableData from '@/components/coTable/index'
|
||||
export default {
|
||||
name:'collection',
|
||||
components:{
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<!-- 上传弹框-->
|
||||
<a-modal
|
||||
class="show-content"
|
||||
title="上传文件"
|
||||
:title="$t('UploadFile')"
|
||||
:visible="fileVisible"
|
||||
:confirm-loading="confirmLoading"
|
||||
@ok="modalOk"
|
||||
@@ -41,26 +41,26 @@
|
||||
<!-- 同步弹框-->
|
||||
<a-modal
|
||||
class="show-content"
|
||||
title="同步至文档库"
|
||||
:title="$t('SyncLibrary')"
|
||||
v-if="toVisible"
|
||||
:visible="toVisible"
|
||||
:confirm-loading="confirmLoading"
|
||||
@ok="handleOkTo"
|
||||
@cancel="handleCancelTo"
|
||||
>
|
||||
<p style="text-align: center">该文件未进行校验,确定要同步至文档库?</p>
|
||||
<p style="text-align: center">{{$t('sureSynchronize')}}</p>
|
||||
</a-modal>
|
||||
<!-- 校核弹框-->
|
||||
<a-modal
|
||||
class="show-content"
|
||||
title="校核"
|
||||
:title="$t('check')"
|
||||
v-if="checkVisible"
|
||||
:visible="checkVisible"
|
||||
:confirm-loading="confirmLoading"
|
||||
@ok="handleOkCheck"
|
||||
@cancel="handleCancelCheck"
|
||||
>
|
||||
<p style="text-align: center">确定对该文件未进行校验?</p>
|
||||
<p style="text-align: center">{{$t('sureVerified')}}</p>
|
||||
</a-modal>
|
||||
<div class="table-detail">
|
||||
<tableData
|
||||
@@ -86,9 +86,9 @@
|
||||
|
||||
<script>
|
||||
import { axios } from '@/utils/request'
|
||||
import { getAction, postAction, deleteAction } from '@/api/manage'
|
||||
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
||||
import search from '@/components/search/index'
|
||||
import tableData from '@/components/tableDate/index'
|
||||
import tableData from '@/components/ocrTable/index'
|
||||
import addForm from '@/components/ocrAddForm/index'
|
||||
import docTable from './modules/docTable'
|
||||
import ocrUpload from '@/components/ocrUpload/index'
|
||||
@@ -108,21 +108,21 @@
|
||||
return{
|
||||
OperationList: [
|
||||
{
|
||||
text: '同步至文档库',
|
||||
text: this.$t('SyncLibrary'),
|
||||
ClickEvent: 'actionSynchron'
|
||||
},
|
||||
}, //同步至文档库
|
||||
{
|
||||
text: '校核',
|
||||
text: this.$t('check'),
|
||||
ClickEvent: 'actionCheck'
|
||||
},
|
||||
}, //校核
|
||||
{
|
||||
text: '下载',
|
||||
text: this.$t('download'),
|
||||
ClickEvent: 'actionDown'
|
||||
},
|
||||
}, //下载
|
||||
{
|
||||
text: '删除',
|
||||
text: this.$t('delete'),
|
||||
ClickEvent: 'actionDelete'
|
||||
}
|
||||
} //删除
|
||||
],
|
||||
pageSize:10,
|
||||
labelCol: { span:4 },
|
||||
@@ -189,7 +189,7 @@
|
||||
}
|
||||
if(this.selectedIds){
|
||||
this.$confirm({
|
||||
title: '确认要批量删除?',
|
||||
title: this.$t('ConfirmBatchDeletion'),
|
||||
content: '',
|
||||
onOk:
|
||||
async () => {
|
||||
@@ -205,7 +205,7 @@
|
||||
onCancel() {},
|
||||
});
|
||||
}else{
|
||||
this.$message.warning('请选择至少一条数据!');
|
||||
this.$message.warning(this.$t('selectLeastOne'));
|
||||
}
|
||||
},
|
||||
//同步
|
||||
@@ -228,11 +228,8 @@
|
||||
},
|
||||
//下载
|
||||
actionDown(val){
|
||||
if(val.resultContent=='转换成功'){
|
||||
|
||||
}else{
|
||||
this.$message.warning('未转换成功或已同步至文档库')
|
||||
}
|
||||
console.log()
|
||||
downloadFile('/sys/common/download', val.fileName, { id: val.id })
|
||||
},
|
||||
//删除
|
||||
actionDelete(record){
|
||||
@@ -240,7 +237,7 @@
|
||||
id:record.id
|
||||
}
|
||||
this.$confirm({
|
||||
title: '确认删除?',
|
||||
title: this.$t('ConfirmDelete'),
|
||||
content: '',
|
||||
onOk:
|
||||
async () => {
|
||||
@@ -262,7 +259,6 @@
|
||||
},
|
||||
onSelectChange(selectedRowKeys,selectedRows){
|
||||
this.selectedIds=selectedRowKeys.join(',')
|
||||
// console.log('seIds',this.selectedIds)
|
||||
|
||||
},
|
||||
//上传确定按钮
|
||||
|
||||
@@ -12,26 +12,6 @@
|
||||
<div class="doc-table-content">
|
||||
<div class="doc-header">
|
||||
<search :url="url" :flag="'condition'"></search>
|
||||
<!-- <a-form layout="inline" v-model="queryParams" @keyup.enter.native="searchQuery(queryParams)">-->
|
||||
<!-- <a-row :gutter="24">-->
|
||||
<!-- <a-col :md="6" :sm="12">-->
|
||||
<!-- <a-form-item :label="'编号'">-->
|
||||
<!-- <j-input :placeholder="'请输入编号'" v-model="queryParams.serialNumber"></j-input>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- <a-col :md="6" :sm="12">-->
|
||||
<!-- <a-form-item :label="'标题'">-->
|
||||
<!-- <j-input :placeholder="'请输入标题'" v-model="queryParams.title"></j-input>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- <a-col :md="6" :sm="8">-->
|
||||
<!-- <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">-->
|
||||
<!-- <a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button>-->
|
||||
<!-- <a-button @click="searchReset" icon="reload" style="margin-left: 8px">清空</a-button>-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- </a-row>-->
|
||||
<!-- </a-form>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="doc-table-detail">
|
||||
@@ -39,26 +19,10 @@
|
||||
:flag="'header'"
|
||||
:url="url"
|
||||
:showAction="false"
|
||||
:OperationList="OperationList"
|
||||
@onSelectChange="onSelectChange"
|
||||
/>
|
||||
</div>
|
||||
<!-- <a-table bordered :data-source="tableSource" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="tag-con-table" :pagination="false" >-->
|
||||
<!-- <span slot="num" slot-scope="text,records,index">-->
|
||||
<!-- {{ (queryParams.pageNo-1)*queryParams.pageSize+Number(index)+1 }}-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-table>-->
|
||||
<!-- <div class="page" v-if="tableSource.length > 0">-->
|
||||
<!-- <a-pagination-->
|
||||
<!-- :show-total="total => `共 ${total} 条`"-->
|
||||
<!-- show-quick-jumper-->
|
||||
<!-- show-size-changer-->
|
||||
<!-- :page-size.sync="queryParams.pageSize"-->
|
||||
<!-- :total="total"-->
|
||||
<!-- @change="onChangePage"-->
|
||||
<!-- @showSizeChange="SizeChange"-->
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="doc-table-footer">
|
||||
<a-button type="primary" class="btn-export" @click="tableExport">导入</a-button>
|
||||
<a-button type="primary" @click="onClose">取消</a-button>
|
||||
@@ -70,7 +34,7 @@
|
||||
<script>
|
||||
import { getAction, postAction, deleteAction } from '@/api/manage'
|
||||
import search from '@/components/search/index'
|
||||
import tableData from '@/components/tableDate/index'
|
||||
import tableData from '@/components/ocrTable/docTable'
|
||||
export default {
|
||||
name: 'docTable',
|
||||
components:{
|
||||
@@ -158,7 +122,8 @@
|
||||
tableList: 'document/bussDocumentLibraryEO/ocrPageInfo', //表格数据
|
||||
// getAddForm: 'ocr/ocrRecord/getForm', // 表单的字段
|
||||
// addInfo: 'ocr/OcrRestful/addOcrRecord', //新增
|
||||
}
|
||||
},
|
||||
rowId:''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -193,9 +158,13 @@
|
||||
searchReset(){
|
||||
|
||||
},
|
||||
onSelectChange(rowKeys){
|
||||
|
||||
console.log('key',rowKeys)
|
||||
onSelectChange(rowKeys,rows){
|
||||
if(rowKeys.length>1){
|
||||
this.$message.warning('只能选择一条数据')
|
||||
}else{
|
||||
this.rowId=rowKeys[0]
|
||||
this.rows=rows[0]
|
||||
}
|
||||
},
|
||||
//点击页数
|
||||
onChangePage(page,pageSize){
|
||||
@@ -209,7 +178,45 @@
|
||||
},
|
||||
//导入按钮
|
||||
tableExport(){
|
||||
// this.$emit('exportVisible',true)
|
||||
if(this.rows.length>1){
|
||||
this.$message.warning('只能选择一条数据')
|
||||
}else {
|
||||
if(this.rows.file_name){
|
||||
let name = this.rows.file_name.split('.')
|
||||
let nameSuffix=name[name.length-1]
|
||||
if(nameSuffix.toLowerCase()=='pdf'){
|
||||
let params = {
|
||||
attId: this.rows.connect_id,
|
||||
standName: this.rows.title,
|
||||
standNumber: this.rows.serial_number
|
||||
}
|
||||
if(this.rows.text_info=='发布稿(必读)'){
|
||||
params.fileType='1'
|
||||
}else if(this.rows.text_info=='增补件(必读)'){
|
||||
params.fileType='2'
|
||||
}else if(this.rows.text_info=='报批稿'){
|
||||
params.fileType='3'
|
||||
}else if(this.rows.text_info=='征求意见稿'){
|
||||
params.fileType='4'
|
||||
}else if(this.rows.text_info=='测试程序'){
|
||||
params.fileType='5'
|
||||
}else if(this.rows.text_info=='相关资料'){
|
||||
params.fileType='6'
|
||||
}
|
||||
postAction(`ocr/OcrRestful/addOcrRecord`, params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
// this.$emit('exportVisible',true)
|
||||
}else{
|
||||
this.$message.warning('只能导入pdf文件')
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
<script>
|
||||
import { getAction, postAction, deleteAction, putAction } from '@/api/manage'
|
||||
import search from '@/components/search/index'
|
||||
import tableData from '@/components/tableDate/index'
|
||||
import tableData from '@/components/coTable/index'
|
||||
import subArea from './module/subArea'
|
||||
import eventBUs from '../../../common/event'
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user