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
+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{