Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -183,7 +183,7 @@
|
||||
</div>
|
||||
</a-row>
|
||||
</div>
|
||||
<uploadFile ref="uploadFile" :disabled="disabled" @uploadSuccess="uploadSuccess"></uploadFile>
|
||||
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"></uploadFile>
|
||||
</a-form-model>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
@@ -0,0 +1,148 @@
|
||||
<template>
|
||||
<div class="ocr-upload">
|
||||
<a-modal v-model="visible" :maskClosable="false" :footer="[]" :title="title">
|
||||
<a-upload-dragger
|
||||
accept='*.*'
|
||||
:disabled="disabled"
|
||||
class="ant-upload-list"
|
||||
name="file"
|
||||
:file-list="myfileList"
|
||||
:multiple="true"
|
||||
:action = 'uploadAction'
|
||||
:headers="headers"
|
||||
:before-upload="beforeUpload"
|
||||
:remove='remove'
|
||||
@change="handleChange">
|
||||
<p><a-icon style="font-size: 67px;color: #c0c4cc;" type="cloud-upload" /></p>
|
||||
<p class="ant-upload-text" style="font-size: 14px;line-height: 30px">点击上传</p>
|
||||
</a-upload-dragger>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from "@/store/mutation-types"
|
||||
export default {
|
||||
name: 'ocrUpload',
|
||||
props:['disableds','disabled','thisFileUploadUrl','readonly','thisFileType'],
|
||||
data(){
|
||||
return{
|
||||
visible:false,
|
||||
uploadAction:window._CONFIG['domianURL']+"/sys/common/upload",
|
||||
downLoadFileUrl:window._CONFIG['domianURL']+'/sys/common/static',
|
||||
myfileList:[],
|
||||
fileList:[],
|
||||
fileTypeSatus:false,
|
||||
headers:{},
|
||||
title:'上传文件'
|
||||
}
|
||||
},
|
||||
created(){
|
||||
const token = Vue.ls.get(ACCESS_TOKEN);
|
||||
this.headers = {"X-Access-Token":token};
|
||||
this.containerId = 'container-ty-'+new Date().getTime();
|
||||
},
|
||||
mounted(){
|
||||
// console.log(this.thisFileType,this.thisFileSize,this.thisFileUploadUrl);
|
||||
},
|
||||
methods:{
|
||||
beforeUpload(file) {
|
||||
console.log(file)
|
||||
// let thisFileType = this.thisFileType.replace(/\s+/g, "");
|
||||
this.fileTypeSatus = true;
|
||||
this.$message.destroy()
|
||||
// 207M.doc文件大小超出100MB限制, 请压缩或降低文件质量!
|
||||
this.errorMessage = file.name + "文件大小超出100MB限制, 请压缩或降低文件质量!";
|
||||
|
||||
},
|
||||
remove(){
|
||||
this.fileTypeSatus = true;
|
||||
},
|
||||
handleChange(info) {
|
||||
console.log('info',info)
|
||||
let { file } = info;
|
||||
const status = info.file.status;
|
||||
info.fileList.forEach((val,index)=>{
|
||||
if(val.response && !val.response.result){
|
||||
this.$message.error(val.response.message);
|
||||
info.fileList.splice(index,1)
|
||||
}
|
||||
})
|
||||
if (this.fileTypeSatus) {
|
||||
if (file.size > 100000000) {
|
||||
this.$message.error(this.errorMessage)
|
||||
return
|
||||
}else {
|
||||
if (status === 'error') {
|
||||
this.$emit('uploadSuccess', this.fileList)
|
||||
this.$message.destroy()
|
||||
this.$message.error(`${info.file.name} 文件上传失败。`);
|
||||
} else if (status === 'removed') {
|
||||
this.myfileList = info.fileList;
|
||||
this.fileList = []
|
||||
this.myfileList.forEach((res) => {
|
||||
if (res.response) {
|
||||
this.fileList.push(res.response.result)
|
||||
} else {
|
||||
this.fileList.push(res)
|
||||
}
|
||||
})
|
||||
this.$emit('uploadSuccess', this.fileList)
|
||||
if(this.myfileList.length > 0){
|
||||
this.$message.destroy()
|
||||
this.$message.success(`${info.file.name} 删除成功。`);
|
||||
}
|
||||
} else if (status === 'done') {
|
||||
this.fileList = []
|
||||
this.myfileList = info.fileList;
|
||||
console.log('file3333',info.fileList)
|
||||
if (info.fileList.length > 20) {
|
||||
info.fileList.splice(20)
|
||||
// this.myfileList = info.fileList;
|
||||
|
||||
this.myfileList.forEach((res) => {
|
||||
if (res.response) {
|
||||
this.fileList.push(res.response.result)
|
||||
} else {
|
||||
this.fileList.push(res)
|
||||
}
|
||||
})
|
||||
console.log('file1111',this.fileList)
|
||||
this.$emit('uploadSuccess', this.fileList)
|
||||
this.$message.destroy()
|
||||
this.$message.error('最多只能上传二十个');
|
||||
return
|
||||
}
|
||||
console.log('my222',this.myfileList)
|
||||
this.myfileList.forEach((res) => {
|
||||
if (res.response) {
|
||||
this.fileList.push(res.response.result)
|
||||
console.log('flist',res.response)
|
||||
} else {
|
||||
this.fileList.push(res)
|
||||
}
|
||||
})
|
||||
|
||||
if(this.myfileList.length > 0){
|
||||
this.$emit('uploadSuccess', this.fileList)
|
||||
this.$message.destroy()
|
||||
this.$message.success(`${info.file.name} 文件上传成功。`);
|
||||
}
|
||||
} else if (status === 'uploading') {
|
||||
this.myfileList = info.fileList;
|
||||
this.$emit('uploadSuccess')
|
||||
// this.$message.success(`${info.file.name} 文件上传成功。`);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
this.$message.warning('不支持上传该类型的文件!')
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,508 @@
|
||||
<template>
|
||||
<div class="ocr">
|
||||
<a-card>
|
||||
<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="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"
|
||||
:url="url"
|
||||
:flag="'1'"
|
||||
/>
|
||||
<frameAssembly
|
||||
:url="url"
|
||||
ref="frameAssemblyRef"
|
||||
/>
|
||||
<doc-table v-if="drawVisible" :drawVisible="drawVisible" :drawTableSorce="drawTableSorce" @visible="docVisible"></doc-table>
|
||||
<ocr-upload ref="uploadFile" :disabled="disabled" @uploadSuccess="uploadSuccess"></ocr-upload>
|
||||
<!-- <uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"></uploadFile>-->
|
||||
</a-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction, deleteAction } from '@/api/manage'
|
||||
import search from '@/components/search/index'
|
||||
import tableData from '@/components/tableDate/index'
|
||||
import addForm from './modules/addForm'
|
||||
import docTable from './modules/docTable'
|
||||
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,
|
||||
docTable
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
pageSize:10,
|
||||
labelCol: { span:4 },
|
||||
wrapperCol: { span: 18 },
|
||||
disabled:false,
|
||||
drawVisible: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:'转换失败',
|
||||
}
|
||||
],
|
||||
//列表数据
|
||||
dataSource:[],
|
||||
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',
|
||||
slots: { title: 'customTitle' },
|
||||
scopedSlots: { customRender: 'fileName' },
|
||||
},
|
||||
{
|
||||
title:'转换结果',
|
||||
key: 'resultContent',
|
||||
align:"center",
|
||||
dataIndex: 'resultContent'
|
||||
},
|
||||
{
|
||||
title:'转换时间',
|
||||
key: 'createTime',
|
||||
align:"center",
|
||||
sorter: true,
|
||||
dataIndex: 'createTime'
|
||||
},
|
||||
{
|
||||
title:'同步情况',
|
||||
key: 'syncState',
|
||||
align:"center",
|
||||
sorter: true,
|
||||
dataIndex: 'syncState'
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
dataIndex: 'action',
|
||||
scopedSlots: {customRender: 'action'},
|
||||
align: "center",
|
||||
width: 260
|
||||
}
|
||||
],
|
||||
drawTableSorce:[
|
||||
{
|
||||
id: '1',
|
||||
standNumber: 'sfsf1',
|
||||
standName:'下拉单选',
|
||||
fileType_dictText:'单选',
|
||||
fileName:'123.pdf',
|
||||
fileInfo:'1',
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
standNumber: 'sfsdfd2222',
|
||||
standName:'aaaa选',
|
||||
fileType_dictText:'sdf选',
|
||||
fileName:'sss.word',
|
||||
fileInfo:'2',
|
||||
},
|
||||
],
|
||||
ipagination: {
|
||||
defaultPageSize: 10,
|
||||
defaultCurrent: 1,
|
||||
pageSizeOptions: ['10', '20', '30', '40', '100'],
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
showTotal: (total, range) => `共 ${total} 条`
|
||||
},
|
||||
total:0,
|
||||
selectedRowKeys:[],
|
||||
fileVisible:false,
|
||||
confirmLoading: false,
|
||||
queryParams:{
|
||||
pageNo:1,
|
||||
pageSize:10
|
||||
},
|
||||
selectedIds:'', //选择行id
|
||||
}
|
||||
},
|
||||
props:{
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.loadData()
|
||||
},
|
||||
methods:{
|
||||
//获取列表数据
|
||||
loadData(){
|
||||
console.log('22222')
|
||||
let params = this.queryParams
|
||||
console.log('33333')
|
||||
getAction(`ocr/ocrRecord/page`,params).then(res=> {
|
||||
if(res.success){
|
||||
this.total=res.result.total
|
||||
this.dataSource= [ ...res.result.records ]
|
||||
}
|
||||
})
|
||||
},
|
||||
//搜索
|
||||
searchQuery(){
|
||||
|
||||
},
|
||||
//清空搜索
|
||||
searchReset(){
|
||||
|
||||
},
|
||||
//上传
|
||||
handleUpload(){
|
||||
|
||||
this.fileVisible=true
|
||||
|
||||
},
|
||||
//调取已入库文件
|
||||
handleFileExport(){
|
||||
this.drawVisible=true
|
||||
},
|
||||
//批量删除
|
||||
handleDel(){
|
||||
let param={
|
||||
ids:this.selectedIds
|
||||
}
|
||||
if(this.selectedIds){
|
||||
this.$confirm({
|
||||
title: '确认要批量删除?',
|
||||
content: '',
|
||||
onOk:
|
||||
async () => {
|
||||
deleteAction(`ocr/ocrRecord/deleteBatch`, param).then(res => {
|
||||
if (res.success) {
|
||||
this.loadData()
|
||||
this.selectedRowKeys=[]
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
onCancel() {},
|
||||
});
|
||||
}else{
|
||||
this.$notification['warning']({
|
||||
message: '请选择至少一条数据!',
|
||||
description:'',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
//同步
|
||||
actionSynchron(){
|
||||
this.toVisible=true
|
||||
},
|
||||
//校核
|
||||
actionCheck(){
|
||||
this.checkVisible=true
|
||||
},
|
||||
//下载
|
||||
actionDown(){
|
||||
|
||||
},
|
||||
//删除
|
||||
actionDelete(record){
|
||||
let params={
|
||||
id:record.id
|
||||
}
|
||||
deleteAction(`ocr/ocrRecord/delete`,params).then(res=> {
|
||||
if(res.success){
|
||||
this.loadData()
|
||||
// console.log('res',res)
|
||||
}
|
||||
})
|
||||
},
|
||||
onDelete(){
|
||||
|
||||
},
|
||||
onSelectChange(selectedRowKeys,selectedRows){
|
||||
this.selectedRowKeys = selectedRowKeys;
|
||||
// console.log('selectedRows',selectedRowKeys,selectedRows)
|
||||
let ids=[]
|
||||
selectedRows.forEach(item=>{
|
||||
ids.push(item.id)
|
||||
})
|
||||
this.selectedIds=ids.join(',')
|
||||
// console.log('seIds',this.selectedIds)
|
||||
|
||||
},
|
||||
//上传确定按钮
|
||||
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
|
||||
},
|
||||
docVisible(val){
|
||||
this.drawVisible=val
|
||||
},
|
||||
//点击页数
|
||||
onChangePage(page,pageSize){
|
||||
this.queryParams.pageNo = page
|
||||
this.loadData()
|
||||
},
|
||||
//一页显示条数
|
||||
SizeChange(page,pageSize){
|
||||
this.queryParams.pageSize = pageSize
|
||||
this.loadData()
|
||||
},
|
||||
//文件详情跳转
|
||||
fileDetail(val){
|
||||
console.log('valtext',val)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.ocr{
|
||||
.table-detail{
|
||||
.action{
|
||||
margin-right: 10px;
|
||||
}
|
||||
.action-delete{
|
||||
color:red;
|
||||
}
|
||||
.page{
|
||||
text-align:right ;
|
||||
margin-top:20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</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>
|
||||
@@ -0,0 +1,151 @@
|
||||
<template>
|
||||
<div class="doc-table">
|
||||
<a-drawer
|
||||
class="doc-table-drawer"
|
||||
title="调取已入库文件"
|
||||
placement="right"
|
||||
:visible="visible"
|
||||
:after-visible-change="afterVisibleChange"
|
||||
@close="onClose"
|
||||
width="1100"
|
||||
>
|
||||
<div class="doc-table-content">
|
||||
<div class="doc-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">
|
||||
<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">
|
||||
<a-table bordered :data-source="tableSource" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="tag-con-table" :pagination="ipagination" >
|
||||
<span slot="num" slot-scope="text,records,index">
|
||||
{{ (ipagination.currentPage-1)*ipagination.pageSize+Number(index)+1 }}
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'docTable',
|
||||
props:{
|
||||
drawVisible:Boolean,
|
||||
drawTableSorce:Array,
|
||||
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
visible:false,
|
||||
queryParams:{
|
||||
pageNo:1,
|
||||
pageSize:10
|
||||
},
|
||||
currentPage:1,
|
||||
ipagination: {
|
||||
defaultPageSize: 10,
|
||||
defaultCurrent: 1,
|
||||
currentPage:1,
|
||||
pageSizeOptions: ['10', '20', '30', '40', '100'],
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
showTotal: (total, range) => `显示 ${range[0]} ~ ${range[1]} 条记录,共 ${total} 条记录`
|
||||
},
|
||||
total:0,
|
||||
selectedRowKeys:[],
|
||||
tableSource:[],
|
||||
//表头
|
||||
columns: [
|
||||
{
|
||||
title: '序号',
|
||||
key: 'num',
|
||||
align:"center",
|
||||
scopedSlots: { customRender: 'num' },
|
||||
width:80
|
||||
},
|
||||
{
|
||||
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: 'fileInfo',
|
||||
align:"center",
|
||||
dataIndex: 'fileInfo'
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.visible=this.drawVisible
|
||||
this.tableSource= [...this.drawTableSorce]
|
||||
},
|
||||
methods: {
|
||||
afterVisibleChange(val) {
|
||||
console.log('visible', val);
|
||||
},
|
||||
onClose() {
|
||||
this.visible = false;
|
||||
this.$emit('visible',false)
|
||||
},
|
||||
//搜索
|
||||
searchQuery(){
|
||||
|
||||
},
|
||||
//清空
|
||||
searchReset(){
|
||||
|
||||
},
|
||||
onSelectChange(){
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.doc-table-drawer{
|
||||
.ant-drawer-content-wrapper{
|
||||
|
||||
}
|
||||
}
|
||||
</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