标签编辑
This commit is contained in:
@@ -0,0 +1,510 @@
|
||||
<template>
|
||||
<div class="ocr">
|
||||
<div class="table-page-search-wrapper">
|
||||
<!-- <search :flag="'1'" :url="url"/>-->
|
||||
<div class="ocr-search-header">
|
||||
<a-form layout="inline" @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.standNumber"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="'标题'">
|
||||
<j-input :placeholder="'请输入标题'" v-model="queryParams.standName"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item :label="'转换结果'">
|
||||
<a-select v-model="queryParams.transformation" :placeholder="$t('pleaseSelect')">
|
||||
<a-select-option :value="item.value" v-for="(item) in transOptions">{{item.label}}</a-select-option>
|
||||
</a-select>
|
||||
</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="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>
|
||||
<!-- 上传弹框-->
|
||||
<a-modal
|
||||
class="show-content"
|
||||
title="上传文件"
|
||||
:visible="fileVisible"
|
||||
:confirm-loading="confirmLoading"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
v-if="fileVisible"
|
||||
>
|
||||
<a-form-model
|
||||
class="tag-content"
|
||||
ref="fileForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
:label-col="labelCol"
|
||||
:wrapper-col="wrapperCol"
|
||||
>
|
||||
<a-form-model-item ref="file" label="文件" prop="file">
|
||||
<a-button type="primary" class="button-text"
|
||||
@click="fileUpload()">
|
||||
{{ (file === 'null' || file === '' ||
|
||||
file == null) ? '点击上传' : '查看已上传文件'
|
||||
}}
|
||||
</a-button>
|
||||
|
||||
<!-- <a-button @click="fileUpload" type="primary">点击上传</a-button>-->
|
||||
</a-form-model-item>
|
||||
<a-form-model-item ref="standNumber" label="编号" prop="standNumber">
|
||||
<a-input
|
||||
v-model="form.standNumber"
|
||||
placeholder="请输入编号"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
|
||||
<a-form-model-item ref="standName" label="名称" prop="standName">
|
||||
<a-input
|
||||
v-model="form.standName"
|
||||
placeholder="请输入名称"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item label="文本状态" prop="fileType">
|
||||
<j-dict-select-tag type="list" v-model="form.fileType" dictCode="file_type" placeholder="请选择文本状态" />
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
|
||||
</a-modal>
|
||||
<!-- 同步弹框-->
|
||||
<a-modal
|
||||
class="show-content"
|
||||
title="同步至文档库"
|
||||
v-if="toVisible"
|
||||
:visible="toVisible"
|
||||
:confirm-loading="confirmLoading"
|
||||
@ok="handleOkTo"
|
||||
@cancel="handleCancelTo"
|
||||
>
|
||||
<p style="text-align: center">该文件未进行校验,确定要同步至文档库?</p>
|
||||
</a-modal>
|
||||
<!-- 校核弹框-->
|
||||
<a-modal
|
||||
class="show-content"
|
||||
title="校核"
|
||||
v-if="checkVisible"
|
||||
:visible="checkVisible"
|
||||
:confirm-loading="confirmLoading"
|
||||
@ok="handleOkCheck"
|
||||
@cancel="handleCancelCheck"
|
||||
>
|
||||
<p style="text-align: center">确定对该文件未进行校验?</p>
|
||||
</a-modal>
|
||||
<div class="table-detail">
|
||||
<a-table bordered :data-source="tableSorce" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="tag-con-table" :pagination="ipagination" >
|
||||
|
||||
<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="tableSorce.length"
|
||||
title="Sure to delete?"
|
||||
@confirm="() => onDelete(record)"
|
||||
>
|
||||
<a class="action action-delete" href="javascript:;" @click="actionDelete(record)">删除</a>
|
||||
</a-popconfirm>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
<addForm
|
||||
ref="addFormRef"
|
||||
:url="url"
|
||||
:flag="'1'"
|
||||
/>
|
||||
<frameAssembly
|
||||
:url="url"
|
||||
ref="frameAssemblyRef"
|
||||
/>
|
||||
<ocr-upload ref="uploadFile" :disabled="disabled" @uploadSuccess="uploadSuccess"></ocr-upload>
|
||||
<!-- <uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"></uploadFile>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import search from '@/components/search/index'
|
||||
import tableData from '@/components/tableDate/index'
|
||||
import addForm from './modules/addForm'
|
||||
import frameAssembly from '@/components/frameAssembly/index'
|
||||
import ocrUpload from '@/components/ocrUpload/index'
|
||||
// import uploadFile from '@/components/uploadFile/file'
|
||||
export default {
|
||||
name: 'ocr',
|
||||
components:{
|
||||
search,
|
||||
tableData,
|
||||
addForm,
|
||||
frameAssembly,
|
||||
ocrUpload
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
labelCol: { span:4 },
|
||||
wrapperCol: { span: 18 },
|
||||
disabled:false,
|
||||
toVisible:false, //同步弹框
|
||||
checkVisible:false, //校核弹框
|
||||
file:'',
|
||||
form:{}, //表单数据
|
||||
rules:{
|
||||
file:[
|
||||
{ required: true, message: '请选择文件', trigger: 'blur' },
|
||||
],
|
||||
standNumber:[
|
||||
{ required: true, message: '请输入编号', trigger: 'blur' },
|
||||
],
|
||||
standName:[
|
||||
{ required: true, message: '请输入名称', trigger: 'blur' },
|
||||
],
|
||||
fileType:[
|
||||
{ required: true, message: '请选择文本状态', trigger: 'blur' },
|
||||
]
|
||||
},
|
||||
url: {
|
||||
seachList: 'document/bussDocumentLibraryEO/queryCondition', //搜索字段
|
||||
tableList: 'document/bussDocumentLibraryEO/queryPageInfo', //表格数据
|
||||
// getAddForm: 'document/bussDocumentLibraryEO/getAddForm', // 表单的字段
|
||||
// addInfo: 'document/bussDocumentLibraryEO/addInfo', //新增
|
||||
// updateInfo: 'document/bussDocumentLibraryEO/updateInfo', //编辑
|
||||
// getDocumentInfo: 'document/bussDocumentLibraryEO/getDocumentInfoById', //查看
|
||||
// deleteBatch: 'document/bussDocumentLibraryEO/deleteBatch' //删除
|
||||
},
|
||||
queryParams:{}, //搜索条件
|
||||
transOptions:[
|
||||
{
|
||||
value:1,
|
||||
label:'转换中',
|
||||
},
|
||||
{
|
||||
value:2,
|
||||
label:'转换完成',
|
||||
},
|
||||
{
|
||||
value:3,
|
||||
label:'转换失败',
|
||||
}
|
||||
],
|
||||
//列表数据
|
||||
tableSorce:[
|
||||
{
|
||||
id: '1',
|
||||
standNumber: 'sfsf1',
|
||||
standName:'下拉单选',
|
||||
fileType_dictText:'单选',
|
||||
fileName:'123.pdf',
|
||||
resultContent:'1',
|
||||
createTime:'2020-1-1',
|
||||
resultStatus:1
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
standNumber: 'sfsdfd2222',
|
||||
standName:'aaaa选',
|
||||
fileType_dictText:'sdf选',
|
||||
fileName:'sss.word',
|
||||
resultContent:'2',
|
||||
createTime:'2020-1-1',
|
||||
resultStatus:2
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
standNumber: 'sfsf1',
|
||||
standName:'下拉单选',
|
||||
fileType_dictText:'单选',
|
||||
fileName:'123.pdf',
|
||||
resultContent:'1',
|
||||
createTime:'2020-1-1',
|
||||
resultStatus:1
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
standNumber: 'sfsdfd2222',
|
||||
standName:'aaaa选',
|
||||
fileType_dictText:'sdf选',
|
||||
fileName:'sss.word',
|
||||
resultContent:'2',
|
||||
createTime:'2020-1-1',
|
||||
resultStatus:2
|
||||
},
|
||||
{
|
||||
id: '5',
|
||||
standNumber: 'sfsf1',
|
||||
standName:'下拉单选',
|
||||
fileType_dictText:'单选',
|
||||
fileName:'123.pdf',
|
||||
resultContent:'1',
|
||||
createTime:'2020-1-1',
|
||||
resultStatus:1
|
||||
},
|
||||
{
|
||||
id: '6',
|
||||
standNumber: 'sfsdfd2222',
|
||||
standName:'aaaa选',
|
||||
fileType_dictText:'sdf选',
|
||||
fileName:'sss.word',
|
||||
resultContent:'2',
|
||||
createTime:'2020-1-1',
|
||||
resultStatus:2
|
||||
},
|
||||
{
|
||||
id: '7',
|
||||
standNumber: 'sfsf1',
|
||||
standName:'下拉单选',
|
||||
fileType_dictText:'单选',
|
||||
fileName:'123.pdf',
|
||||
resultContent:'1',
|
||||
createTime:'2020-2-12',
|
||||
resultStatus:1
|
||||
},
|
||||
{
|
||||
id: '8',
|
||||
standNumber: 'sfsdfd2222',
|
||||
standName:'aaaa选',
|
||||
fileType_dictText:'sdf选',
|
||||
fileName:'sss.word',
|
||||
resultContent:'2',
|
||||
createTime:'2020-1-19',
|
||||
resultStatus:2
|
||||
},
|
||||
{
|
||||
id: '9',
|
||||
standNumber: 'sfsf1',
|
||||
standName:'下拉单选',
|
||||
fileType_dictText:'单选',
|
||||
fileName:'123.pdf',
|
||||
resultContent:'1',
|
||||
createTime:'2020-1-1',
|
||||
resultStatus:1
|
||||
},
|
||||
{
|
||||
id: '10',
|
||||
standNumber: 'sfsdfd2222',
|
||||
standName:'aaaa选',
|
||||
fileType_dictText:'sdf选',
|
||||
fileName:'sss.word',
|
||||
resultContent:'2',
|
||||
createTime:'2020-2-12',
|
||||
resultStatus:2
|
||||
},
|
||||
{
|
||||
id: '11',
|
||||
standNumber: 'sfsf1',
|
||||
standName:'下拉单选',
|
||||
fileType_dictText:'单选',
|
||||
fileName:'123.pdf',
|
||||
resultContent:'1',
|
||||
createTime:'2020-2-1',
|
||||
resultStatus:1
|
||||
},
|
||||
{
|
||||
id: '12',
|
||||
standNumber: 'sfsdfd2222',
|
||||
standName:'aaaa选',
|
||||
fileType_dictText:'sdf选',
|
||||
fileName:'sss.word',
|
||||
resultContent:'2',
|
||||
createTime:'2020-1-13',
|
||||
resultStatus:2
|
||||
},
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
title:'标准编号',
|
||||
key: 'standNumber',
|
||||
align:"center",
|
||||
dataIndex: 'standNumber'
|
||||
},
|
||||
{
|
||||
title:'标准名称',
|
||||
key: 'standName',
|
||||
align:"center",
|
||||
dataIndex: 'standName'
|
||||
},
|
||||
{
|
||||
title:'文本状态',
|
||||
key: 'fileType_dictText',
|
||||
align:"center",
|
||||
dataIndex: 'fileType_dictText'
|
||||
},
|
||||
{
|
||||
title:'文件名称',
|
||||
key: 'fileName',
|
||||
align:"center",
|
||||
dataIndex: 'fileName'
|
||||
},
|
||||
{
|
||||
title:'转换结果',
|
||||
key: 'resultContent',
|
||||
align:"center",
|
||||
dataIndex: 'resultContent'
|
||||
},
|
||||
{
|
||||
title:'转换时间',
|
||||
key: 'createTime',
|
||||
align:"center",
|
||||
sorter: true,
|
||||
dataIndex: 'createTime'
|
||||
},
|
||||
{
|
||||
title:'同步情况',
|
||||
key: 'resultStatus',
|
||||
align:"center",
|
||||
sorter: true,
|
||||
dataIndex: 'resultStatus'
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
dataIndex: 'action',
|
||||
scopedSlots: {customRender: 'action'},
|
||||
align: "center",
|
||||
width: 260
|
||||
}
|
||||
],
|
||||
ipagination: {
|
||||
defaultPageSize: 10,
|
||||
defaultCurrent: 1,
|
||||
pageSizeOptions: ['10', '20', '30', '40', '100'],
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
showTotal: (total, range) => `显示 ${range[0]} ~ ${range[1]} 条记录,共 ${total} 条记录`
|
||||
},
|
||||
total:0,
|
||||
selectedRowKeys:[],
|
||||
fileVisible:false,
|
||||
confirmLoading: false,
|
||||
}
|
||||
},
|
||||
props:{
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods:{
|
||||
//搜索
|
||||
searchQuery(){
|
||||
|
||||
},
|
||||
//清空搜索
|
||||
searchReset(){
|
||||
|
||||
},
|
||||
//上传
|
||||
handleUpload(){
|
||||
|
||||
this.fileVisible=true
|
||||
|
||||
},
|
||||
//调取已入库文件
|
||||
handleFileExport(){
|
||||
|
||||
},
|
||||
//批量删除
|
||||
handleDel(){
|
||||
|
||||
},
|
||||
//同步
|
||||
actionSynchron(){
|
||||
this.toVisible=true
|
||||
},
|
||||
//校核
|
||||
actionCheck(){
|
||||
this.checkVisible=true
|
||||
},
|
||||
//下载
|
||||
actionDown(){
|
||||
|
||||
},
|
||||
//删除
|
||||
actionDelete(){
|
||||
|
||||
},
|
||||
onDelete(){
|
||||
|
||||
},
|
||||
onSelectChange(){
|
||||
|
||||
},
|
||||
//上传确定按钮
|
||||
handleOk(){
|
||||
this.$refs.fileForm.validate((valid)=>{
|
||||
if(valid){
|
||||
console.log('succ')
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel(){
|
||||
this.fileVisible=false
|
||||
},
|
||||
//上传文件
|
||||
uploadSuccess(data) {
|
||||
console.log('updata',data)
|
||||
let attIdList = []
|
||||
// data.map(item => {
|
||||
// attIdList.push(item.id || data.name)
|
||||
// })
|
||||
// // /** 赋值给当前对应的表单文件 */
|
||||
// this.file = attIdList.join(',')
|
||||
},
|
||||
fileUpload(){
|
||||
this.$refs.uploadFile.visible=true
|
||||
},
|
||||
//同步至文档库确认
|
||||
handleOkTo(){
|
||||
this.toVisible=false
|
||||
},
|
||||
//同步至文档库取消
|
||||
handleCancelTo(){
|
||||
this.toVisible=false
|
||||
},
|
||||
//校核确认
|
||||
handleOkCheck(){
|
||||
this.checkVisible=false
|
||||
},
|
||||
//校核取消
|
||||
handleCancelCheck(){
|
||||
this.checkVisible=false
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.ocr{
|
||||
.table-detail{
|
||||
.action{
|
||||
margin-right: 10px;
|
||||
}
|
||||
.action-delete{
|
||||
color:red;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style lang="less">
|
||||
.show-content{
|
||||
.ant-modal-footer{
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,11 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'ocraddForm',
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
|
||||
</style>
|
||||
@@ -31,7 +31,7 @@
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="属性类型" prop="fieldShowType">
|
||||
<j-dict-select-tag type="list" v-model="form.fieldShowType" dictCode="attribute_type" placeholder="请选择属性类型" />
|
||||
<j-dict-select-tag type="list" v-model="form.fieldShowType" dictCode="field_show_type" placeholder="请选择属性类型" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="isTagContent">
|
||||
|
||||
Reference in New Issue
Block a user