ocr已入库文件导入

This commit is contained in:
caoyang
2022-03-02 14:56:31 +08:00
parent 31d431d2f4
commit cb423beb93
12 changed files with 40 additions and 29 deletions
+6
View File
@@ -393,5 +393,11 @@ module.exports = {
sureVerified:'Are you sure this file is not verified?', sureVerified:'Are you sure this file is not verified?',
sureSynchronize:'The file has not been verified. Are you sure you want to synchronize to the document library?', sureSynchronize:'The file has not been verified. Are you sure you want to synchronize to the document library?',
UploadFile:'Upload file', UploadFile:'Upload file',
TagItemManagement:'Tag item management',
LabelContentManagement:'Label content management',
InputBoxType:'Input box type',
DropDownType:'Drop down type',
ExhibitionAreaManagement:'Exhibition area management',
NewLabelItem:'New label item',
} }
+6 -1
View File
@@ -397,6 +397,11 @@ module.exports = {
sureVerified:'确定对该文件未进行校验?', sureVerified:'确定对该文件未进行校验?',
sureSynchronize:'该文件未进行校验,确定要同步至文档库?', sureSynchronize:'该文件未进行校验,确定要同步至文档库?',
UploadFile:'上传文件', UploadFile:'上传文件',
TagItemManagement:'标签项管理',
LabelContentManagement:'标签内容管理',
InputBoxType:'输入框类型',
DropDownType:'下拉选类型',
ExhibitionAreaManagement:'展示区域管理',
NewLabelItem:'新增标签项',
} }
+1 -1
View File
@@ -105,7 +105,7 @@
var context = canvas.getContext('2d') var context = canvas.getContext('2d')
context.font = fontStyle || '14px' // 设置字体样式 context.font = fontStyle || '14px' // 设置字体样式
var dimension = context.measureText(text) var dimension = context.measureText(text)
return dimension.width + 40 return dimension.width + 70
}, },
getData() { getData() {
let params = { let params = {
@@ -3,7 +3,7 @@
<div class="box"> <div class="box">
<a-table <a-table
class="table" class="table"
:rowKey="(record,index)=>{return index}" rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="false" :pagination="false"
:scroll="{x: true}" :scroll="{x: true}"
@@ -228,7 +228,7 @@
}, },
//下载 //下载
actionDown(val){ actionDown(val){
console.log() // console.log()
downloadFile('/sys/common/download', val.fileName, { id: val.id }) downloadFile('/sys/common/download', val.fileName, { id: val.id })
}, },
//删除 //删除
@@ -35,6 +35,7 @@
import { getAction, postAction, deleteAction } from '@/api/manage' import { getAction, postAction, deleteAction } from '@/api/manage'
import search from '@/components/search/index' import search from '@/components/search/index'
import tableData from '@/components/ocrTable/docTable' import tableData from '@/components/ocrTable/docTable'
import eventBUs from '../../../../common/event'
export default { export default {
name: 'docTable', name: 'docTable',
components:{ components:{
@@ -186,7 +187,7 @@
let nameSuffix=name[name.length-1] let nameSuffix=name[name.length-1]
if(nameSuffix.toLowerCase()=='pdf'){ if(nameSuffix.toLowerCase()=='pdf'){
let params = { let params = {
attId: this.rows.connect_id, attId: this.rows.id,
standName: this.rows.title, standName: this.rows.title,
standNumber: this.rows.serial_number standNumber: this.rows.serial_number
} }
@@ -206,6 +207,7 @@
postAction(`ocr/OcrRestful/addOcrRecord`, params).then(res => { postAction(`ocr/OcrRestful/addOcrRecord`, params).then(res => {
if (res.success) { if (res.success) {
this.$message.success(res.message) this.$message.success(res.message)
eventBUs.$emit('searchReset')
} else { } else {
this.$message.warning(res.message) this.$message.warning(res.message)
} }
@@ -152,7 +152,7 @@
}, },
OperationList: [ OperationList: [
{ {
text: '取消订阅', text: this.$t('CancelSubscribe'),
ClickEvent: 'onCancel' ClickEvent: 'onCancel'
} }
], ],
@@ -3,8 +3,8 @@
<onl-cgform-tag-form ref="realForm" @ok="submitCallback" :isTagContent="isTagContent" :editData="editData" :editId=editId :submitEdit="submitEdit" :disabled="disableSubmit" normal> </onl-cgform-tag-form> <onl-cgform-tag-form ref="realForm" @ok="submitCallback" :isTagContent="isTagContent" :editData="editData" :editId=editId :submitEdit="submitEdit" :disabled="disableSubmit" normal> </onl-cgform-tag-form>
<div class="drawer-footer"> <div class="drawer-footer">
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">保存</a-button> <a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">{{$t('preservation')}}</a-button>
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button> <a-button @click="handleCancel" style="margin-bottom: 0;">{{$t('close')}}</a-button>
</div> </div>
</div> </div>
</template> </template>
@@ -20,7 +20,6 @@
}, },
data () { data () {
return { return {
title:"操作",
width:800, width:800,
visible: false, visible: false,
disableSubmit: false disableSubmit: false
@@ -1,16 +1,16 @@
<template> <template>
<div class="tags"> <div class="tags">
<a-card :bordered="false"> <a-card :bordered="false">
<div class="tag-tab"> <div class="tag-tab">
<a-tabs type="card" @change="callback"> <a-tabs type="card" @change="callback">
<a-tab-pane key="1" tab="标签项管理"> <a-tab-pane key="1" :tab="$t('TagItemManagement')">
<tag-item></tag-item> <tag-item></tag-item>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="2" tab="标签内容管理"> <a-tab-pane key="2" :tab="$t('LabelContentManagement')">
<tag-content></tag-content> <tag-content></tag-content>
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
</div> </div>
</a-card> </a-card>
</div> </div>
</template> </template>
@@ -2,7 +2,6 @@
<div class="tab-table"> <div class="tab-table">
<a-table <a-table
ref="table" ref="table"
bordered
size="middle" size="middle"
rowKey="id" rowKey="id"
:columns="columns" :columns="columns"
@@ -23,7 +23,7 @@
{{$t('add')}} {{$t('add')}}
</div> </div>
</div> </div>
<a-modal class="show-content" v-model="contentVisible" :visible="contentVisible" title="新增" ok-text="保存" cancel-text="取消" @ok="hideModal" @cancel="cancelModel" v-if="contentVisible"> <a-modal class="show-content" v-model="contentVisible" :visible="contentVisible" :title="$t('add')" :ok-text="$t('preservation')" :cancel-text="$t('cancel')" @ok="hideModal" @cancel="cancelModel" v-if="contentVisible">
<a-form-model <a-form-model
class="tag-content" class="tag-content"
ref="ruleForm" ref="ruleForm"
@@ -30,8 +30,8 @@
<a-popover placement="right" v-model="typeVisible" trigger="click"> <a-popover placement="right" v-model="typeVisible" trigger="click">
<template slot="content" class="type-popover-content"> <template slot="content" class="type-popover-content">
<div class="type-popover"> <div class="type-popover">
<p class="type type-input" @click="handleAddPop('input')">输入框类型</p> <p class="type type-input" @click="handleAddPop('input')">{{$t('InputBoxType')}}</p>
<p class="type type-select" @click="handleAddPop('select')">下拉选类型</p> <p class="type type-select" @click="handleAddPop('select')">{{$t('DropDownType')}}</p>
</div> </div>
</template> </template>
<a-icon type="plus" /> <a-icon type="plus" />
@@ -40,22 +40,22 @@
</div> </div>
<div class="operator-text" @click="handleShow"> <div class="operator-text" @click="handleShow">
<a-icon type="rocket" :rotate="45" /> <a-icon type="rocket" :rotate="45" />
展示区域管理 {{$t('ExhibitionAreaManagement')}}
</div> </div>
</div> </div>
<a-drawer class="show-drawer" :title="titleTag" placement="right" width="1000px" @close="close" :visible="drawerVisible" :after-visible-change="afterVisibleChange" > <a-drawer class="show-drawer" :title="titleTag" placement="right" width="1000px" @close="close" :visible="drawerVisible" :after-visible-change="afterVisibleChange" >
<new-drawer v-if="drawerVisible&&editFlag" :drawerVisible="drawerVisible" :isTagContent="isTagContent" :editData="editData" :editId="editId" :submitEdit="submitEdit" @closeTag="closeTag" ></new-drawer> <new-drawer v-if="drawerVisible&&editFlag" :drawerVisible="drawerVisible" :isTagContent="isTagContent" :editData="editData" :editId="editId" :submitEdit="submitEdit" @closeTag="closeTag" ></new-drawer>
</a-drawer> </a-drawer>
<a-modal class="show-area" v-model="areaVisible" title="展示区域管理" :footer="null" @cancel="hideModal"> <a-modal class="show-area" v-model="areaVisible" :title="$t('ExhibitionAreaManagement')" :footer="null" @cancel="hideModal">
<area-manage v-if="areaVisible" @diaHide="diaHide" :areaTable="areaTable" @submitOk="submitOk" @deleteOk="deleteOk" @updateOk="updateOk"></area-manage> <area-manage v-if="areaVisible" @diaHide="diaHide" :areaTable="areaTable" @submitOk="submitOk" @deleteOk="deleteOk" @updateOk="updateOk"></area-manage>
</a-modal> </a-modal>
<div class="tag-doc-tab"> <div class="tag-doc-tab">
<a-spin :spinning="spinning" tip="Loading..."> <a-spin :spinning="spinning" tip="Loading...">
<a-tabs default-active-key="1" @change="callbackTab"> <a-tabs default-active-key="1" @change="callbackTab">
<a-tab-pane key="1" tab="文档库"> <a-tab-pane key="1" :tab="$t('DocumentLibrary')">
<tabTable :tableData="tableData" :columns="taglabColumns" @visibleEd="visibleEd" @visibleDelete="visibleDelete" @queryParams="queryParams" :total="total"></tabTable> <tabTable :tableData="tableData" :columns="taglabColumns" @visibleEd="visibleEd" @visibleDelete="visibleDelete" @queryParams="queryParams" :total="total"></tabTable>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="2" tab="文档拆分" force-render> <a-tab-pane key="2" :tab="$t('DocumentSplitting')" force-render>
<tabTable :tableData="tableData" :columns="taglabColumns" @visibleEd="visibleEd" @visibleDelete="visibleDelete" @queryParams="queryParams" :total="total"></tabTable> <tabTable :tableData="tableData" :columns="taglabColumns" @visibleEd="visibleEd" @visibleDelete="visibleDelete" @queryParams="queryParams" :total="total"></tabTable>
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
@@ -85,7 +85,7 @@
page:1, page:1,
pageSize:10, pageSize:10,
}, },
titleTag:'新增标签项', titleTag:this.$t('NewLabelItem'),
typeVisible:false, typeVisible:false,
isTagContent:false, isTagContent:false,
editData:{}, //编辑的数据 editData:{}, //编辑的数据
@@ -349,7 +349,7 @@
}, },
handleAddPop(val){ handleAddPop(val){
this.drawerVisible=true this.drawerVisible=true
this.titleTag='新增标签项' this.titleTag=this.$t('NewLabelItem')
this.submitEdit='add' this.submitEdit='add'
if(val=='input'){ if(val=='input'){
this.typeVisible=false this.typeVisible=false