ocr表头

This commit is contained in:
caoyang
2022-02-24 17:04:18 +08:00
parent 252b72a6de
commit 00d879ba9e
5 changed files with 117 additions and 77 deletions
@@ -250,5 +250,5 @@
</script>
<style scoped>
@import '~@assets/less/common.less'
@import '~@assets/less/common.less';
</style>
+78 -57
View File
@@ -33,11 +33,20 @@
</a-form>
</div>
</div>
<div class="table-operator">
<a-button @click="handleUpload()" type="primary">上传</a-button>
<a-button @click="handleFileExport()" type="primary">调取已入库文件</a-button>
<a-button @click="handleDel()" type="primary">批量删除</a-button>
</div>
<div class="table-operator">
<div class="operator-text" @click="handleUpload">
<a-icon type="plus" />
上传
</div>
<div class="operator-text" @click="handleFileExport">
<a-icon type="export" />
调取已入库文件
</div>
<div class="operator-text" @click="handleDel">
<a-icon type="delete" />
批量删除
</div>
</div>
<!-- 上传弹框-->
<a-modal
class="show-content"
@@ -110,32 +119,44 @@
<p style="text-align: center">确定对该文件未进行校验?</p>
</a-modal>
<div class="table-detail">
<a-table bordered :data-source="dataSource" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="tag-con-table" :pagination="false" >
<a slot="fileName" slot-scope="text, record" @click="fileDetail(record)">{{ text }}</a>
<template slot="action" slot-scope="text, record">
<a class="action action-syn" href="javascript:;" @click="actionSynchron(record)">同步至文档库</a>
<a class="action action-check" href="javascript:;" @click="actionCheck(record)">校核</a>
<a class="action action-down" href="javascript:;" @click="actionDown(record)">下载</a>
<a-popconfirm
v-if="dataSource.length"
title="Sure to delete?"
@confirm="() => actionDelete(record)"
>
<a class="action action-delete" href="javascript:;">删除</a>
</a-popconfirm>
</template>
</a-table>
<div class="page" v-if="dataSource.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>
<tableData
:flag="'2'"
:OperationList="OperationList"
@actionSynchron="actionSynchron"
:url="url"
showAction
@actionCheck="actionCheck"
@actionDown="actionDown"
@onSelectChange="onSelectChange"
@actionDelete="actionDelete"
/>
<!-- <a-table bordered :data-source="dataSource" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="tag-con-table" :pagination="false" >-->
<!-- <a slot="fileName" slot-scope="text, record" @click="fileDetail(record)">{{ text }}</a>-->
<!-- <template slot="action" slot-scope="text, record">-->
<!-- <a class="action action-syn" href="javascript:;" @click="actionSynchron(record)">同步至文档库</a>-->
<!-- <a class="action action-check" href="javascript:;" @click="actionCheck(record)">校核</a>-->
<!-- <a class="action action-down" href="javascript:;" @click="actionDown(record)">下载</a>-->
<!-- <a-popconfirm-->
<!-- v-if="dataSource.length"-->
<!-- title="Sure to delete?"-->
<!-- @confirm="() => actionDelete(record)"-->
<!-- >-->
<!-- <a class="action action-delete" href="javascript:;">删除</a>-->
<!-- </a-popconfirm>-->
<!-- </template>-->
<!-- </a-table>-->
<!-- <div class="page" v-if="dataSource.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>
<addForm
ref="addFormRef"
@@ -178,6 +199,24 @@
},
data(){
return{
OperationList: [
{
text: '同步至文档库',
ClickEvent: 'actionSynchron'
},
{
text: '校核',
ClickEvent: 'actionCheck'
},
{
text: '下载',
ClickEvent: 'actionDown'
},
{
text: '删除',
ClickEvent: 'actionDelete'
}
],
pageSize:10,
labelCol: { span:4 },
wrapperCol: { span: 18 },
@@ -202,8 +241,9 @@
]
},
url: {
tableHeader: 'ocr/ocrRecord/getHeader', //表格头部字段
seachList: 'document/bussDocumentLibraryEO/queryCondition', //搜索字段
tableList: 'document/bussDocumentLibraryEO/queryPageInfo', //表格数据
tableList: 'ocr/ocrRecord/page', //表格数据
// getAddForm: 'document/bussDocumentLibraryEO/getAddForm', // 表单的字段
// addInfo: 'document/bussDocumentLibraryEO/addInfo', //新增
// updateInfo: 'document/bussDocumentLibraryEO/updateInfo', //编辑
@@ -383,10 +423,7 @@
onCancel() {},
});
}else{
this.$notification['warning']({
message: '请选择至少一条数据!',
description:'',
});
this.$message.warning('请选择至少一条数据!');
}
},
//同步
@@ -431,29 +468,11 @@
handleOk(){
this.$refs.fileForm.validate((valid)=>{
let params={ ...this.form }
// let formData = new FormData();
// console.log('formData',formData)
// formData.append('attId',this.form.attId);
// console.log('this.form.attId',this.form.attId)
// console.log('formData111',formData)
// formData.append('standName',this.form.standName);
// formData.append('standNumber',this.form.standNumber);
// formData.append('fileType',this.form.fileType);
let headers = {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
}
// console.log('params',formData)
if(valid) {
// axios.post(`ocr/OcrRestful/addOcrRecord`,params, { headers: headers })
// .then(res => {
// if (res.success) {
// this.loadData()
// }
// })
postAction(`ocr/OcrRestful/addOcrRecord`,params).then(res=>{
postAction(`ocr/ocrRecord/add`,params).then(res=>{
if(res.success){
this.$message.success(res.result)
this.$emit('ok')
this.loadData()
}
})
@@ -472,6 +491,7 @@
})
// /** 赋值给当前对应的表单文件 */
this.form.attId = attIdList.join(',')
console.log('form1111',this.form)
},
fileUpload(){
this.$refs.uploadFile.visible=true
@@ -519,6 +539,7 @@
</script>
<style lang="less" scoped>
@import '~@assets/less/common.less';
.ocr{
.table-detail{
.action{
@@ -5,9 +5,18 @@
<search :flag="'1'" :url="url"/>
</div>
<div class="table-operator">
<a-button @click="handleModule()" type="primary">拆分已入库文本</a-button>
<a-button @click="handleExport()" type="primary">导入拆分结果</a-button>
<a-button @click="handleDel()" type="danger">批量删除</a-button>
<div class="operator-text" @click="handleModule">
<a-icon type="plus" />
拆分已入库文本
</div>
<div class="operator-text" @click="handleExport">
<a-icon type="export" />
导入拆分结果
</div>
<div class="operator-text" @click="handleDel">
<a-icon type="delete" />
批量删除
</div>
</div>
<div class="splitting-table">
<tableData
@@ -132,7 +141,7 @@
</script>
<style lang="less" scoped>
@import '~@assets/less/common.less';
</style>
<style lang="less">
@@ -17,8 +17,11 @@
</a-row>
</a-form>
</div>
<div class="table-operator" style="border-top: 5px">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<div class="table-operator">
<div class="operator-text" @click="handleAdd">
<a-icon type="plus" />
{{$t('add')}}
</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-form-model
@@ -328,6 +331,7 @@
</script>
<style lang="less" scoped>
@import '~@assets/less/common.less';
.tag-content{
.tag-con-table{
.action-dict,.action-edit{
@@ -25,19 +25,24 @@
</a-row>
</a-form>
</div>
<div class="table-operator" style="border-top: 5px">
<a-popover placement="right" v-model="typeVisible" trigger="click">
<template slot="content" class="type-popover-content">
<div class="type-popover">
<p class="type type-input" @click="handleAddPop('input')">输入框类型</p>
<p class="type type-select" @click="handleAddPop('select')">下拉选类型</p>
</div>
</template>
<a-button type="primary">{{$t('add')}}</a-button>
</a-popover>
<a-button type="primary" @click="handleShow">展示区域管理</a-button>
</div>
<div class="table-operator">
<div class="operator-text">
<a-popover placement="right" v-model="typeVisible" trigger="click">
<template slot="content" class="type-popover-content">
<div class="type-popover">
<p class="type type-input" @click="handleAddPop('input')">输入框类型</p>
<p class="type type-select" @click="handleAddPop('select')">下拉选类型</p>
</div>
</template>
<a-icon type="plus" />
{{$t('add')}}
</a-popover>
</div>
<div class="operator-text" @click="handleShow">
<a-icon type="rocket" :rotate="45" />
展示区域管理
</div>
</div>
<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>
</a-drawer>
@@ -378,6 +383,7 @@
</script>
<style lang="less" scoped>
@import '~@assets/less/common.less';
.type-popover{
p{
margin:5px;