ocr识别修改
This commit is contained in:
@@ -94,7 +94,7 @@ module.exports = {
|
|||||||
newUser:'new user',
|
newUser:'new user',
|
||||||
ExistingUsers:'Existing users',
|
ExistingUsers:'Existing users',
|
||||||
total:'total',
|
total:'total',
|
||||||
strip:'',
|
strip:'data',
|
||||||
RoleCode:'Role code',
|
RoleCode:'Role code',
|
||||||
createTime:'create time',
|
createTime:'create time',
|
||||||
userName:'user name',
|
userName:'user name',
|
||||||
@@ -386,4 +386,12 @@ module.exports = {
|
|||||||
DocumentLibrary:'Document Library',
|
DocumentLibrary:'Document Library',
|
||||||
DocumentComparisonLibrary:'Document comparison Library',
|
DocumentComparisonLibrary:'Document comparison Library',
|
||||||
weekly:'weekly',
|
weekly:'weekly',
|
||||||
|
SyncLibrary:'Sync to document library',
|
||||||
|
check:'check',
|
||||||
|
enName:'English name',
|
||||||
|
selectLeastOne:'Please select at least one piece of data',
|
||||||
|
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?',
|
||||||
|
UploadFile:'Upload file',
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -390,4 +390,13 @@ module.exports = {
|
|||||||
DocumentLibrary:'文档库',
|
DocumentLibrary:'文档库',
|
||||||
DocumentComparisonLibrary:'文档对比库',
|
DocumentComparisonLibrary:'文档对比库',
|
||||||
weekly:'周报',
|
weekly:'周报',
|
||||||
|
SyncLibrary:'同步至文档库',
|
||||||
|
check:'校核',
|
||||||
|
enName:'英文名称',
|
||||||
|
selectLeastOne:'请选择至少一条数据',
|
||||||
|
sureVerified:'确定对该文件未进行校验?',
|
||||||
|
sureSynchronize:'该文件未进行校验,确定要同步至文档库?',
|
||||||
|
UploadFile:'上传文件',
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,225 @@
|
|||||||
|
<template>
|
||||||
|
<div style="height: 100%">
|
||||||
|
<div class="box">
|
||||||
|
<a-table
|
||||||
|
class="table"
|
||||||
|
rowKey="id"
|
||||||
|
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||||
|
:pagination="false"
|
||||||
|
:scroll="{x: true}"
|
||||||
|
:data-source="dataSource"
|
||||||
|
:loading="loading"
|
||||||
|
:columns="columns"
|
||||||
|
@change="tableOnChange"
|
||||||
|
>
|
||||||
|
<span slot="operation" slot-scope="record">
|
||||||
|
<a class="text" v-for="(ol,index) in OperationList"
|
||||||
|
@click="OperationClick(ol,record)">
|
||||||
|
{{ol.text}}
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
</a-table>
|
||||||
|
</div>
|
||||||
|
<div class="page" v-if="dataSource.length > 0">
|
||||||
|
<a-pagination
|
||||||
|
:show-total="total => $t('total')+` ${total} ` +$t('strip')"
|
||||||
|
show-quick-jumper
|
||||||
|
show-size-changer
|
||||||
|
:page-size.sync="pageSize"
|
||||||
|
:total="total"
|
||||||
|
@change="onChange"
|
||||||
|
@showSizeChange="SizeChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import eventBUs from '../../common/event'
|
||||||
|
import { getAction, postAction } from '@/api/manage'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'coTable',
|
||||||
|
props: {
|
||||||
|
//接口
|
||||||
|
url: {
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
},
|
||||||
|
// 操作按钮
|
||||||
|
OperationList: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
},
|
||||||
|
flag: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
//是否显示操作;默认不显示
|
||||||
|
showAction: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
jsonBody: [],
|
||||||
|
checkboxList: [],
|
||||||
|
tableAll: false,
|
||||||
|
indeterminate: false,
|
||||||
|
columns: [],
|
||||||
|
selectedRowKeys: [],
|
||||||
|
dataSource: [],
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0,
|
||||||
|
searchParmes: {},
|
||||||
|
loading: false,
|
||||||
|
orderBy: '1',
|
||||||
|
orderByField: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
eventBUs.$on('searchQuery', search => {
|
||||||
|
Object.keys(search).forEach(res => {
|
||||||
|
if (search[res] instanceof Array) {
|
||||||
|
search[res] = search[res].join(',')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.searchParmes = search
|
||||||
|
this.getData()
|
||||||
|
this.getTableList()
|
||||||
|
})
|
||||||
|
eventBUs.$on('searchReset', target => {
|
||||||
|
this.searchParmes = {}
|
||||||
|
this.getData()
|
||||||
|
this.getTableList()
|
||||||
|
})
|
||||||
|
this.getData()
|
||||||
|
this.getTableList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
getTextWith(text, fontStyle) {
|
||||||
|
var canvas = document.createElement('canvas')
|
||||||
|
var context = canvas.getContext('2d')
|
||||||
|
context.font = fontStyle || '14px' // 设置字体样式
|
||||||
|
var dimension = context.measureText(text)
|
||||||
|
return dimension.width + 40
|
||||||
|
},
|
||||||
|
getData() {
|
||||||
|
let params = {
|
||||||
|
flag: this.flag
|
||||||
|
}
|
||||||
|
getAction(this.url.tableHeader, params).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
var jsonHead = res.result
|
||||||
|
this.columns = []
|
||||||
|
jsonHead.forEach((res, index) => {
|
||||||
|
this.columns.push({
|
||||||
|
title: res.db_field_txt,
|
||||||
|
dataIndex: res.db_field_name,
|
||||||
|
align: 'center',
|
||||||
|
ellipsis: true,
|
||||||
|
sorter: res.sort
|
||||||
|
})
|
||||||
|
if (res.click) {
|
||||||
|
this.columns[index].scopedSlots = {
|
||||||
|
customRender: 'detailClick'
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.columns[index].scopedSlots = {
|
||||||
|
customRender: 'detailText'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let width = 0
|
||||||
|
if (this.OperationList.length > 0) {
|
||||||
|
for (let i = 0; i < this.OperationList.length; i++) {
|
||||||
|
width += this.getTextWith(this.OperationList[i].text)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.showAction) {
|
||||||
|
this.columns.push({
|
||||||
|
title: this.$t('operation'),
|
||||||
|
align: 'center',
|
||||||
|
fixed: 'right',
|
||||||
|
width: width,
|
||||||
|
scopedSlots: { customRender: 'operation' }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
tableOnChange(pagination, filters, sorter) {
|
||||||
|
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
|
||||||
|
this.orderByField = sorter.columnKey
|
||||||
|
this.getTableList()
|
||||||
|
},
|
||||||
|
getTableList() {
|
||||||
|
let pageNo = JSON.parse(JSON.stringify(this.pageNo))
|
||||||
|
let pageSize = JSON.parse(JSON.stringify(this.pageSize))
|
||||||
|
let params = {
|
||||||
|
...this.searchParmes,
|
||||||
|
orderBy: this.orderBy,
|
||||||
|
orderByField: this.orderByField,
|
||||||
|
pageNo: pageNo + '',
|
||||||
|
pageSize: pageSize + ''
|
||||||
|
}
|
||||||
|
this.loading = true
|
||||||
|
postAction(this.url.tableList, params).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.dataSource = res.result.records
|
||||||
|
this.total = res.result.total
|
||||||
|
this.loading = false
|
||||||
|
} else {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onChange(page, pageSize) {
|
||||||
|
this.pageNo = page
|
||||||
|
this.getTableList()
|
||||||
|
},
|
||||||
|
SizeChange(page, pageSize) {
|
||||||
|
this.pageSize = pageSize
|
||||||
|
this.getTableList()
|
||||||
|
},
|
||||||
|
onSelectChange(value) {
|
||||||
|
this.selectedRowKeys = value
|
||||||
|
this.$emit('onSelectChange', value)
|
||||||
|
},
|
||||||
|
OperationClick(ol, item) {
|
||||||
|
this.$emit(ol.ClickEvent, item)
|
||||||
|
},
|
||||||
|
detailClick(item, index) {
|
||||||
|
this.$emit('detailClick', item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.table .ant-table-column-title {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-table td {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style scoped>
|
||||||
|
.box {
|
||||||
|
width: 100%;
|
||||||
|
height: calc(100% - 100px);
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page {
|
||||||
|
text-align: right;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
<a-col :span="24" v-if="item.field_show_type === '1'">
|
<a-col :span="24" v-if="item.field_show_type === '1'">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span class="Required" v-if="item.field_must_input == 0">*</span>
|
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||||
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
||||||
<span class="title-text-text">{{item.db_field_txt}}</span>
|
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
<a-col :span="24" v-else-if="item.field_show_type === '2'">
|
<a-col :span="24" v-else-if="item.field_show_type === '2'">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span class="Required" v-if="item.field_must_input == 0">*</span>
|
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||||
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
||||||
<span class="title-text-text">{{item.db_field_txt}}</span>
|
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
<a-col :span="24" v-else-if="item.field_show_type === '5'">
|
<a-col :span="24" v-else-if="item.field_show_type === '5'">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span class="Required" v-if="item.field_must_input == 0">*</span>
|
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||||
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
||||||
<span class="title-text-text">{{item.db_field_txt}}</span>
|
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<a-col :span="24" v-else-if="item.field_show_type === '6'">
|
<a-col :span="24" v-else-if="item.field_show_type === '6'">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span class="Required" v-if="item.field_must_input == 0">*</span>
|
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||||
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
||||||
<span class="title-text-text">{{item.db_field_txt}}</span>
|
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
<a-col :span="24" v-else-if="item.field_show_type === '2'">
|
<a-col :span="24" v-else-if="item.field_show_type === '2'">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span class="Required" v-if="item.field_must_input == 0">*</span>
|
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||||
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
||||||
<span class="title-text-text">{{item.db_field_txt}}</span>
|
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
<a-col :span="24" v-else-if="item.field_show_type === '3'">
|
<a-col :span="24" v-else-if="item.field_show_type === '3'">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span class="Required" v-if="item.field_must_input == 0">*</span>
|
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||||
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
||||||
<span class="title-text-text">{{item.db_field_txt}}</span>
|
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
<a-col :span="24" v-else-if="item.field_show_type === '4'">
|
<a-col :span="24" v-else-if="item.field_show_type === '4'">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span class="Required" v-if="item.field_must_input == 0">*</span>
|
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||||
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
||||||
<span class="title-text-text">{{item.db_field_txt}}</span>
|
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
<a-col :span="24" v-else-if="item.field_show_type === 'RADIO'">
|
<a-col :span="24" v-else-if="item.field_show_type === 'RADIO'">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span class="Required" v-if="item.field_must_input == 0">*</span>
|
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||||
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
||||||
<span class="title-text-text">{{item.db_field_txt}}</span>
|
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
<a-col :span="24" v-else-if="item.field_show_type === '8'">
|
<a-col :span="24" v-else-if="item.field_show_type === '8'">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span class="Required" v-if="item.field_must_input == 0">*</span>
|
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||||
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
||||||
<span class="title-text-text">{{item.db_field_txt}}</span>
|
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
<a-col :span="24" v-else-if="item.field_show_type === 'treeSelect'">
|
<a-col :span="24" v-else-if="item.field_show_type === 'treeSelect'">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span class="Required" v-if="item.field_must_input == 0">*</span>
|
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||||
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
||||||
<span class="title-text-text">{{item.db_field_txt}}</span>
|
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -164,7 +164,7 @@
|
|||||||
<a-col :span="24" v-else-if="item.field_show_type === '7'">
|
<a-col :span="24" v-else-if="item.field_show_type === '7'">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span class="Required" v-if="item.field_must_input == 0">*</span>
|
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||||
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
||||||
<span class="title-text-text">{{item.db_field_txt}}</span>
|
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -172,7 +172,7 @@
|
|||||||
<a-button type="primary" class="button-text"
|
<a-button type="primary" class="button-text"
|
||||||
@click="clickButtonToUpload(item.db_field_name)">
|
@click="clickButtonToUpload(item.db_field_name)">
|
||||||
{{ (formInline[item.db_field_name] === 'null' || formInline[item.db_field_name] === '' ||
|
{{ (formInline[item.db_field_name] === 'null' || formInline[item.db_field_name] === '' ||
|
||||||
formInline[item.db_field_name] == null) ? '点击上传' : '查看已上传文件'
|
formInline[item.db_field_name] == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||||
}}
|
}}
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
@@ -182,7 +182,7 @@
|
|||||||
<a-col :span="24" v-else-if="item.field_show_type === '9'">
|
<a-col :span="24" v-else-if="item.field_show_type === '9'">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span class="Required" v-if="item.field_must_input == 0">*</span>
|
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||||
@@ -196,7 +196,7 @@
|
|||||||
<a-col :span="24" v-else-if="item.field_show_type === '10'">
|
<a-col :span="24" v-else-if="item.field_show_type === '10'">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span class="Required" v-if="item.field_must_input == 0">*</span>
|
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||||
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
||||||
<span class="title-text-text">{{item.db_field_txt}}</span>
|
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -271,7 +271,9 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
sumber() {
|
sumber() {
|
||||||
|
console.log('vilidate',this.$refs.ruleForm1)
|
||||||
this.$refs.ruleForm1.validate(valid => {
|
this.$refs.ruleForm1.validate(valid => {
|
||||||
|
console.log('va',valid)
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let url = ''
|
let url = ''
|
||||||
if (this.formInline.id) {
|
if (this.formInline.id) {
|
||||||
@@ -321,8 +323,8 @@
|
|||||||
let rules = {}
|
let rules = {}
|
||||||
this.ruleList.forEach((res, index) => {
|
this.ruleList.forEach((res, index) => {
|
||||||
const rule = []
|
const rule = []
|
||||||
if (res.field_must_input == 0) {
|
if (res.field_must_input == 1) {
|
||||||
if (res.field_show_type === 'text') {
|
if (res.field_show_type === '1') {
|
||||||
rule.push({
|
rule.push({
|
||||||
required: true,
|
required: true,
|
||||||
message: res.db_field_txt + '不能为空',
|
message: res.db_field_txt + '不能为空',
|
||||||
@@ -347,7 +349,13 @@
|
|||||||
message: res.db_field_txt + '不能为空',
|
message: res.db_field_txt + '不能为空',
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
})
|
})
|
||||||
} else if (res.field_show_type === 'RADIO' || res.field_show_type === 'list') {
|
} else if (res.field_show_type === 'RADIO' || res.field_show_type === '3') {
|
||||||
|
rule.push({
|
||||||
|
required: true,
|
||||||
|
message: res.db_field_txt + '不能为空',
|
||||||
|
trigger: 'change'
|
||||||
|
})
|
||||||
|
}else if (res.field_show_type === '7') {
|
||||||
rule.push({
|
rule.push({
|
||||||
required: true,
|
required: true,
|
||||||
message: res.db_field_txt + '不能为空',
|
message: res.db_field_txt + '不能为空',
|
||||||
@@ -363,6 +371,7 @@
|
|||||||
this.$set(this, 'rules', rules)
|
this.$set(this, 'rules', rules)
|
||||||
this.isFormInline = true
|
this.isFormInline = true
|
||||||
this.confirmLoading = false
|
this.confirmLoading = false
|
||||||
|
console.log('rules',rules,this)
|
||||||
},
|
},
|
||||||
getForm() {
|
getForm() {
|
||||||
this.confirmLoading = true
|
this.confirmLoading = true
|
||||||
|
|||||||
@@ -0,0 +1,245 @@
|
|||||||
|
<template>
|
||||||
|
<div style="height: 100%">
|
||||||
|
<div class="box">
|
||||||
|
<a-table
|
||||||
|
class="table"
|
||||||
|
:rowKey="(record,index)=>{return index}"
|
||||||
|
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||||
|
:pagination="false"
|
||||||
|
:scroll="{x: true}"
|
||||||
|
:data-source="dataSource"
|
||||||
|
:loading="loading"
|
||||||
|
:columns="columns"
|
||||||
|
@change="tableOnChange"
|
||||||
|
>
|
||||||
|
<span slot="operation" slot-scope="record">
|
||||||
|
<a class="text" v-for="(ol,index) in OperationList"
|
||||||
|
@click="OperationClick(ol,record)">
|
||||||
|
<span v-if="ol.text==$t('SyncLibrary')">
|
||||||
|
{{record.resultContent=='转换成功'&&record.syncState=='未同步'?ol.text:''}}
|
||||||
|
</span>
|
||||||
|
<span v-if="ol.text==$t('check')">
|
||||||
|
{{record.resultContent=='转换成功'&&record.syncState=='未同步'?ol.text:''}}
|
||||||
|
</span>
|
||||||
|
<span v-if="ol.text==$t('download')">
|
||||||
|
{{record.resultContent=='转换成功'?ol.text:''}}
|
||||||
|
</span>
|
||||||
|
<span v-if="ol.text==$t('delete')">
|
||||||
|
{{record.resultContent=='转换成功'?ol.text:''}}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
<!-- <span slot="detailClick" slot-scope="text,record">-->
|
||||||
|
<!-- <a class="text" :title="text" @click="detailClick(record)">{{text}}</a>-->
|
||||||
|
<!-- </span>-->
|
||||||
|
<!-- <span slot="detailText" slot-scope="text,record">-->
|
||||||
|
<!-- <span class="text" :title="text">-->
|
||||||
|
<!-- {{text.length > 18?text.slice(0,17)+'...':text}}-->
|
||||||
|
<!-- </span>-->
|
||||||
|
<!-- </span>-->
|
||||||
|
|
||||||
|
</a-table>
|
||||||
|
</div>
|
||||||
|
<div class="page" v-if="dataSource.length > 0">
|
||||||
|
<a-pagination
|
||||||
|
:show-total="total => $t('total')+` ${total} ` +$t('strip')"
|
||||||
|
show-quick-jumper
|
||||||
|
show-size-changer
|
||||||
|
:page-size.sync="pageSize"
|
||||||
|
:total="total"
|
||||||
|
@change="onChange"
|
||||||
|
@showSizeChange="SizeChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import eventBUs from '../../common/event'
|
||||||
|
import { getAction, postAction } from '@/api/manage'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'docTable',
|
||||||
|
props: {
|
||||||
|
//接口
|
||||||
|
url: {
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
},
|
||||||
|
// 操作按钮
|
||||||
|
OperationList: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
},
|
||||||
|
flag: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
//是否显示操作;默认不显示
|
||||||
|
showAction: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
jsonBody: [],
|
||||||
|
checkboxList: [],
|
||||||
|
tableAll: false,
|
||||||
|
indeterminate: false,
|
||||||
|
columns: [],
|
||||||
|
selectedRowKeys: [],
|
||||||
|
dataSource: [],
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0,
|
||||||
|
searchParmes: {},
|
||||||
|
loading: false,
|
||||||
|
orderBy: '1',
|
||||||
|
orderByField: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
eventBUs.$on('searchQuery', search => {
|
||||||
|
Object.keys(search).forEach(res => {
|
||||||
|
if (search[res] instanceof Array) {
|
||||||
|
search[res] = search[res].join(',')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.searchParmes = search
|
||||||
|
this.getData()
|
||||||
|
this.getTableList()
|
||||||
|
})
|
||||||
|
eventBUs.$on('searchReset', target => {
|
||||||
|
this.searchParmes = {}
|
||||||
|
this.getData()
|
||||||
|
this.getTableList()
|
||||||
|
})
|
||||||
|
this.getData()
|
||||||
|
this.getTableList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
getTextWith(text, fontStyle) {
|
||||||
|
var canvas = document.createElement('canvas')
|
||||||
|
var context = canvas.getContext('2d')
|
||||||
|
context.font = fontStyle || '14px' // 设置字体样式
|
||||||
|
var dimension = context.measureText(text)
|
||||||
|
return dimension.width + 40
|
||||||
|
},
|
||||||
|
getData() {
|
||||||
|
let params = {
|
||||||
|
flag: this.flag
|
||||||
|
}
|
||||||
|
getAction(this.url.tableHeader, params).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
var jsonHead = res.result
|
||||||
|
this.columns = []
|
||||||
|
jsonHead.forEach((res, index) => {
|
||||||
|
this.columns.push({
|
||||||
|
title: res.db_field_txt,
|
||||||
|
dataIndex: res.db_field_name,
|
||||||
|
align: 'center',
|
||||||
|
ellipsis: true,
|
||||||
|
sorter: res.sort
|
||||||
|
})
|
||||||
|
if (res.click) {
|
||||||
|
this.columns[index].scopedSlots = {
|
||||||
|
customRender: 'detailClick'
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.columns[index].scopedSlots = {
|
||||||
|
customRender: 'detailText'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let width = 0
|
||||||
|
if (this.OperationList.length > 0) {
|
||||||
|
for (let i = 0; i < this.OperationList.length; i++) {
|
||||||
|
width += this.getTextWith(this.OperationList[i].text)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.showAction) {
|
||||||
|
this.columns.push({
|
||||||
|
title: this.$t('operation'),
|
||||||
|
align: 'center',
|
||||||
|
fixed: 'right',
|
||||||
|
width: width,
|
||||||
|
scopedSlots: { customRender: 'operation' }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
tableOnChange(pagination, filters, sorter) {
|
||||||
|
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
|
||||||
|
this.orderByField = sorter.columnKey
|
||||||
|
this.getTableList()
|
||||||
|
},
|
||||||
|
getTableList() {
|
||||||
|
let pageNo = JSON.parse(JSON.stringify(this.pageNo))
|
||||||
|
let pageSize = JSON.parse(JSON.stringify(this.pageSize))
|
||||||
|
let params = {
|
||||||
|
...this.searchParmes,
|
||||||
|
orderBy: this.orderBy,
|
||||||
|
orderByField: this.orderByField,
|
||||||
|
pageNo: pageNo + '',
|
||||||
|
pageSize: pageSize + ''
|
||||||
|
}
|
||||||
|
this.loading = true
|
||||||
|
postAction(this.url.tableList, params).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.dataSource = res.result.records
|
||||||
|
this.total = res.result.total
|
||||||
|
this.loading = false
|
||||||
|
} else {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onChange(page, pageSize) {
|
||||||
|
this.pageNo = page
|
||||||
|
this.getTableList()
|
||||||
|
},
|
||||||
|
SizeChange(page, pageSize) {
|
||||||
|
this.pageSize = pageSize
|
||||||
|
this.getTableList()
|
||||||
|
},
|
||||||
|
onSelectChange(value,rows) {
|
||||||
|
this.selectedRowKeys = value
|
||||||
|
this.$emit('onSelectChange', value, rows)
|
||||||
|
},
|
||||||
|
OperationClick(ol, item) {
|
||||||
|
this.$emit(ol.ClickEvent, item)
|
||||||
|
},
|
||||||
|
detailClick(item, index) {
|
||||||
|
this.$emit('detailClick', item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.table .ant-table-column-title {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-table td {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style scoped>
|
||||||
|
.box {
|
||||||
|
width: 100%;
|
||||||
|
height: calc(100% - 100px);
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page {
|
||||||
|
text-align: right;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,245 @@
|
|||||||
|
<template>
|
||||||
|
<div style="height: 100%">
|
||||||
|
<div class="box">
|
||||||
|
<a-table
|
||||||
|
class="table"
|
||||||
|
rowKey="id"
|
||||||
|
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||||
|
:pagination="false"
|
||||||
|
:scroll="{x: true}"
|
||||||
|
:data-source="dataSource"
|
||||||
|
:loading="loading"
|
||||||
|
:columns="columns"
|
||||||
|
@change="tableOnChange"
|
||||||
|
>
|
||||||
|
<span slot="operation" slot-scope="record">
|
||||||
|
<a class="text" v-for="(ol,index) in OperationList"
|
||||||
|
@click="OperationClick(ol,record)">
|
||||||
|
<span v-if="ol.text==$t('SyncLibrary')">
|
||||||
|
{{record.resultContent=='转换成功'&&record.syncState=='未同步'?ol.text:''}}
|
||||||
|
</span>
|
||||||
|
<span v-if="ol.text==$t('check')">
|
||||||
|
{{record.resultContent=='转换成功'&&record.syncState=='未同步'?ol.text:''}}
|
||||||
|
</span>
|
||||||
|
<span v-if="ol.text==$t('download')">
|
||||||
|
{{record.resultContent=='转换成功'?ol.text:''}}
|
||||||
|
</span>
|
||||||
|
<span v-if="ol.text==$t('delete')">
|
||||||
|
{{record.resultContent=='转换成功'?ol.text:''}}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
<span slot="detailClick" slot-scope="text,record">
|
||||||
|
<a class="text" :title="text" @click="detailClick(record)">{{text}}</a>
|
||||||
|
</span>
|
||||||
|
<!-- <span slot="detailText" slot-scope="text,record">-->
|
||||||
|
<!-- <span class="text" :title="text">-->
|
||||||
|
<!-- {{text.length > 18?text.slice(0,17)+'...':text}}-->
|
||||||
|
<!-- </span>-->
|
||||||
|
<!-- </span>-->
|
||||||
|
|
||||||
|
</a-table>
|
||||||
|
</div>
|
||||||
|
<div class="page" v-if="dataSource.length > 0">
|
||||||
|
<a-pagination
|
||||||
|
:show-total="total => $t('total')+` ${total} ` +$t('strip')"
|
||||||
|
show-quick-jumper
|
||||||
|
show-size-changer
|
||||||
|
:page-size.sync="pageSize"
|
||||||
|
:total="total"
|
||||||
|
@change="onChange"
|
||||||
|
@showSizeChange="SizeChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import eventBUs from '../../common/event'
|
||||||
|
import { getAction, postAction } from '@/api/manage'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ocrTable',
|
||||||
|
props: {
|
||||||
|
//接口
|
||||||
|
url: {
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
},
|
||||||
|
// 操作按钮
|
||||||
|
OperationList: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
},
|
||||||
|
flag: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
//是否显示操作;默认不显示
|
||||||
|
showAction: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
jsonBody: [],
|
||||||
|
checkboxList: [],
|
||||||
|
tableAll: false,
|
||||||
|
indeterminate: false,
|
||||||
|
columns: [],
|
||||||
|
selectedRowKeys: [],
|
||||||
|
dataSource: [],
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0,
|
||||||
|
searchParmes: {},
|
||||||
|
loading: false,
|
||||||
|
orderBy: '1',
|
||||||
|
orderByField: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
eventBUs.$on('searchQuery', search => {
|
||||||
|
Object.keys(search).forEach(res => {
|
||||||
|
if (search[res] instanceof Array) {
|
||||||
|
search[res] = search[res].join(',')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.searchParmes = search
|
||||||
|
this.getData()
|
||||||
|
this.getTableList()
|
||||||
|
})
|
||||||
|
eventBUs.$on('searchReset', target => {
|
||||||
|
this.searchParmes = {}
|
||||||
|
this.getData()
|
||||||
|
this.getTableList()
|
||||||
|
})
|
||||||
|
this.getData()
|
||||||
|
this.getTableList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
getTextWith(text, fontStyle) {
|
||||||
|
var canvas = document.createElement('canvas')
|
||||||
|
var context = canvas.getContext('2d')
|
||||||
|
context.font = fontStyle || '14px' // 设置字体样式
|
||||||
|
var dimension = context.measureText(text)
|
||||||
|
return dimension.width + 40
|
||||||
|
},
|
||||||
|
getData() {
|
||||||
|
let params = {
|
||||||
|
flag: this.flag
|
||||||
|
}
|
||||||
|
getAction(this.url.tableHeader, params).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
var jsonHead = res.result
|
||||||
|
this.columns = []
|
||||||
|
jsonHead.forEach((res, index) => {
|
||||||
|
this.columns.push({
|
||||||
|
title: res.db_field_txt,
|
||||||
|
dataIndex: res.db_field_name,
|
||||||
|
align: 'center',
|
||||||
|
ellipsis: true,
|
||||||
|
sorter: res.sort
|
||||||
|
})
|
||||||
|
if (res.click) {
|
||||||
|
this.columns[index].scopedSlots = {
|
||||||
|
customRender: 'detailClick'
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.columns[index].scopedSlots = {
|
||||||
|
customRender: 'detailText'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let width = 0
|
||||||
|
if (this.OperationList.length > 0) {
|
||||||
|
for (let i = 0; i < this.OperationList.length; i++) {
|
||||||
|
width += this.getTextWith(this.OperationList[i].text)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.showAction) {
|
||||||
|
this.columns.push({
|
||||||
|
title: this.$t('operation'),
|
||||||
|
align: 'center',
|
||||||
|
fixed: 'right',
|
||||||
|
width: width,
|
||||||
|
scopedSlots: { customRender: 'operation' }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
tableOnChange(pagination, filters, sorter) {
|
||||||
|
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
|
||||||
|
this.orderByField = sorter.columnKey
|
||||||
|
this.getTableList()
|
||||||
|
},
|
||||||
|
getTableList() {
|
||||||
|
let pageNo = JSON.parse(JSON.stringify(this.pageNo))
|
||||||
|
let pageSize = JSON.parse(JSON.stringify(this.pageSize))
|
||||||
|
let params = {
|
||||||
|
...this.searchParmes,
|
||||||
|
orderBy: this.orderBy,
|
||||||
|
orderByField: this.orderByField,
|
||||||
|
pageNo: pageNo + '',
|
||||||
|
pageSize: pageSize + ''
|
||||||
|
}
|
||||||
|
this.loading = true
|
||||||
|
postAction(this.url.tableList, params).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.dataSource = res.result.records
|
||||||
|
this.total = res.result.total
|
||||||
|
this.loading = false
|
||||||
|
} else {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onChange(page, pageSize) {
|
||||||
|
this.pageNo = page
|
||||||
|
this.getTableList()
|
||||||
|
},
|
||||||
|
SizeChange(page, pageSize) {
|
||||||
|
this.pageSize = pageSize
|
||||||
|
this.getTableList()
|
||||||
|
},
|
||||||
|
onSelectChange(value,rows) {
|
||||||
|
this.selectedRowKeys = value
|
||||||
|
this.$emit('onSelectChange', value, rows)
|
||||||
|
},
|
||||||
|
OperationClick(ol, item) {
|
||||||
|
this.$emit(ol.ClickEvent, item)
|
||||||
|
},
|
||||||
|
detailClick(item, index) {
|
||||||
|
this.$emit('detailClick', item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.table .ant-table-column-title {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-table td {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style scoped>
|
||||||
|
.box {
|
||||||
|
width: 100%;
|
||||||
|
height: calc(100% - 100px);
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page {
|
||||||
|
text-align: right;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
:remove='remove'
|
:remove='remove'
|
||||||
@change="handleChange">
|
@change="handleChange">
|
||||||
<p><a-icon style="font-size: 67px;color: #c0c4cc;" type="cloud-upload" /></p>
|
<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>
|
<p class="ant-upload-text" style="font-size: 14px;line-height: 30px">{{$t('clickUpload')}}</p>
|
||||||
</a-upload-dragger>
|
</a-upload-dragger>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</div>
|
</div>
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
fileList:[],
|
fileList:[],
|
||||||
fileTypeSatus:false,
|
fileTypeSatus:false,
|
||||||
headers:{},
|
headers:{},
|
||||||
title:'上传文件'
|
title:this.$t('UploadFile')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
|
|||||||
@@ -80,7 +80,7 @@
|
|||||||
import { getAction, postAction, deleteAction, putAction } from '@/api/manage'
|
import { getAction, postAction, deleteAction, putAction } from '@/api/manage'
|
||||||
import eventBUs from '../../../common/event'
|
import eventBUs from '../../../common/event'
|
||||||
import search from '@/components/search/index'
|
import search from '@/components/search/index'
|
||||||
import tableData from '@/components/tableDate/index'
|
import tableData from '@/components/coTable/index'
|
||||||
export default {
|
export default {
|
||||||
name:'collection',
|
name:'collection',
|
||||||
components:{
|
components:{
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<!-- 上传弹框-->
|
<!-- 上传弹框-->
|
||||||
<a-modal
|
<a-modal
|
||||||
class="show-content"
|
class="show-content"
|
||||||
title="上传文件"
|
:title="$t('UploadFile')"
|
||||||
:visible="fileVisible"
|
:visible="fileVisible"
|
||||||
:confirm-loading="confirmLoading"
|
:confirm-loading="confirmLoading"
|
||||||
@ok="modalOk"
|
@ok="modalOk"
|
||||||
@@ -41,26 +41,26 @@
|
|||||||
<!-- 同步弹框-->
|
<!-- 同步弹框-->
|
||||||
<a-modal
|
<a-modal
|
||||||
class="show-content"
|
class="show-content"
|
||||||
title="同步至文档库"
|
:title="$t('SyncLibrary')"
|
||||||
v-if="toVisible"
|
v-if="toVisible"
|
||||||
:visible="toVisible"
|
:visible="toVisible"
|
||||||
:confirm-loading="confirmLoading"
|
:confirm-loading="confirmLoading"
|
||||||
@ok="handleOkTo"
|
@ok="handleOkTo"
|
||||||
@cancel="handleCancelTo"
|
@cancel="handleCancelTo"
|
||||||
>
|
>
|
||||||
<p style="text-align: center">该文件未进行校验,确定要同步至文档库?</p>
|
<p style="text-align: center">{{$t('sureSynchronize')}}</p>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
<!-- 校核弹框-->
|
<!-- 校核弹框-->
|
||||||
<a-modal
|
<a-modal
|
||||||
class="show-content"
|
class="show-content"
|
||||||
title="校核"
|
:title="$t('check')"
|
||||||
v-if="checkVisible"
|
v-if="checkVisible"
|
||||||
:visible="checkVisible"
|
:visible="checkVisible"
|
||||||
:confirm-loading="confirmLoading"
|
:confirm-loading="confirmLoading"
|
||||||
@ok="handleOkCheck"
|
@ok="handleOkCheck"
|
||||||
@cancel="handleCancelCheck"
|
@cancel="handleCancelCheck"
|
||||||
>
|
>
|
||||||
<p style="text-align: center">确定对该文件未进行校验?</p>
|
<p style="text-align: center">{{$t('sureVerified')}}</p>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
<div class="table-detail">
|
<div class="table-detail">
|
||||||
<tableData
|
<tableData
|
||||||
@@ -86,9 +86,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { axios } from '@/utils/request'
|
import { axios } from '@/utils/request'
|
||||||
import { getAction, postAction, deleteAction } from '@/api/manage'
|
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
||||||
import search from '@/components/search/index'
|
import search from '@/components/search/index'
|
||||||
import tableData from '@/components/tableDate/index'
|
import tableData from '@/components/ocrTable/index'
|
||||||
import addForm from '@/components/ocrAddForm/index'
|
import addForm from '@/components/ocrAddForm/index'
|
||||||
import docTable from './modules/docTable'
|
import docTable from './modules/docTable'
|
||||||
import ocrUpload from '@/components/ocrUpload/index'
|
import ocrUpload from '@/components/ocrUpload/index'
|
||||||
@@ -108,21 +108,21 @@
|
|||||||
return{
|
return{
|
||||||
OperationList: [
|
OperationList: [
|
||||||
{
|
{
|
||||||
text: '同步至文档库',
|
text: this.$t('SyncLibrary'),
|
||||||
ClickEvent: 'actionSynchron'
|
ClickEvent: 'actionSynchron'
|
||||||
},
|
}, //同步至文档库
|
||||||
{
|
{
|
||||||
text: '校核',
|
text: this.$t('check'),
|
||||||
ClickEvent: 'actionCheck'
|
ClickEvent: 'actionCheck'
|
||||||
},
|
}, //校核
|
||||||
{
|
{
|
||||||
text: '下载',
|
text: this.$t('download'),
|
||||||
ClickEvent: 'actionDown'
|
ClickEvent: 'actionDown'
|
||||||
},
|
}, //下载
|
||||||
{
|
{
|
||||||
text: '删除',
|
text: this.$t('delete'),
|
||||||
ClickEvent: 'actionDelete'
|
ClickEvent: 'actionDelete'
|
||||||
}
|
} //删除
|
||||||
],
|
],
|
||||||
pageSize:10,
|
pageSize:10,
|
||||||
labelCol: { span:4 },
|
labelCol: { span:4 },
|
||||||
@@ -189,7 +189,7 @@
|
|||||||
}
|
}
|
||||||
if(this.selectedIds){
|
if(this.selectedIds){
|
||||||
this.$confirm({
|
this.$confirm({
|
||||||
title: '确认要批量删除?',
|
title: this.$t('ConfirmBatchDeletion'),
|
||||||
content: '',
|
content: '',
|
||||||
onOk:
|
onOk:
|
||||||
async () => {
|
async () => {
|
||||||
@@ -205,7 +205,7 @@
|
|||||||
onCancel() {},
|
onCancel() {},
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
this.$message.warning('请选择至少一条数据!');
|
this.$message.warning(this.$t('selectLeastOne'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//同步
|
//同步
|
||||||
@@ -228,11 +228,8 @@
|
|||||||
},
|
},
|
||||||
//下载
|
//下载
|
||||||
actionDown(val){
|
actionDown(val){
|
||||||
if(val.resultContent=='转换成功'){
|
console.log()
|
||||||
|
downloadFile('/sys/common/download', val.fileName, { id: val.id })
|
||||||
}else{
|
|
||||||
this.$message.warning('未转换成功或已同步至文档库')
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
//删除
|
//删除
|
||||||
actionDelete(record){
|
actionDelete(record){
|
||||||
@@ -240,7 +237,7 @@
|
|||||||
id:record.id
|
id:record.id
|
||||||
}
|
}
|
||||||
this.$confirm({
|
this.$confirm({
|
||||||
title: '确认删除?',
|
title: this.$t('ConfirmDelete'),
|
||||||
content: '',
|
content: '',
|
||||||
onOk:
|
onOk:
|
||||||
async () => {
|
async () => {
|
||||||
@@ -262,7 +259,6 @@
|
|||||||
},
|
},
|
||||||
onSelectChange(selectedRowKeys,selectedRows){
|
onSelectChange(selectedRowKeys,selectedRows){
|
||||||
this.selectedIds=selectedRowKeys.join(',')
|
this.selectedIds=selectedRowKeys.join(',')
|
||||||
// console.log('seIds',this.selectedIds)
|
|
||||||
|
|
||||||
},
|
},
|
||||||
//上传确定按钮
|
//上传确定按钮
|
||||||
|
|||||||
@@ -12,26 +12,6 @@
|
|||||||
<div class="doc-table-content">
|
<div class="doc-table-content">
|
||||||
<div class="doc-header">
|
<div class="doc-header">
|
||||||
<search :url="url" :flag="'condition'"></search>
|
<search :url="url" :flag="'condition'"></search>
|
||||||
<!-- <a-form layout="inline" v-model="queryParams" @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.serialNumber"></j-input>-->
|
|
||||||
<!-- </a-form-item>-->
|
|
||||||
<!-- </a-col>-->
|
|
||||||
<!-- <a-col :md="6" :sm="12">-->
|
|
||||||
<!-- <a-form-item :label="'标题'">-->
|
|
||||||
<!-- <j-input :placeholder="'请输入标题'" v-model="queryParams.title"></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>
|
</div>
|
||||||
<div class="doc-table-detail">
|
<div class="doc-table-detail">
|
||||||
@@ -39,26 +19,10 @@
|
|||||||
:flag="'header'"
|
:flag="'header'"
|
||||||
:url="url"
|
:url="url"
|
||||||
:showAction="false"
|
:showAction="false"
|
||||||
|
:OperationList="OperationList"
|
||||||
@onSelectChange="onSelectChange"
|
@onSelectChange="onSelectChange"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<!-- <a-table bordered :data-source="tableSource" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="tag-con-table" :pagination="false" >-->
|
|
||||||
<!-- <span slot="num" slot-scope="text,records,index">-->
|
|
||||||
<!-- {{ (queryParams.pageNo-1)*queryParams.pageSize+Number(index)+1 }}-->
|
|
||||||
<!-- </span>-->
|
|
||||||
<!-- </a-table>-->
|
|
||||||
<!-- <div class="page" v-if="tableSource.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>-->
|
|
||||||
<div class="doc-table-footer">
|
<div class="doc-table-footer">
|
||||||
<a-button type="primary" class="btn-export" @click="tableExport">导入</a-button>
|
<a-button type="primary" class="btn-export" @click="tableExport">导入</a-button>
|
||||||
<a-button type="primary" @click="onClose">取消</a-button>
|
<a-button type="primary" @click="onClose">取消</a-button>
|
||||||
@@ -70,7 +34,7 @@
|
|||||||
<script>
|
<script>
|
||||||
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/tableDate/index'
|
import tableData from '@/components/ocrTable/docTable'
|
||||||
export default {
|
export default {
|
||||||
name: 'docTable',
|
name: 'docTable',
|
||||||
components:{
|
components:{
|
||||||
@@ -158,7 +122,8 @@
|
|||||||
tableList: 'document/bussDocumentLibraryEO/ocrPageInfo', //表格数据
|
tableList: 'document/bussDocumentLibraryEO/ocrPageInfo', //表格数据
|
||||||
// getAddForm: 'ocr/ocrRecord/getForm', // 表单的字段
|
// getAddForm: 'ocr/ocrRecord/getForm', // 表单的字段
|
||||||
// addInfo: 'ocr/OcrRestful/addOcrRecord', //新增
|
// addInfo: 'ocr/OcrRestful/addOcrRecord', //新增
|
||||||
}
|
},
|
||||||
|
rowId:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -193,9 +158,13 @@
|
|||||||
searchReset(){
|
searchReset(){
|
||||||
|
|
||||||
},
|
},
|
||||||
onSelectChange(rowKeys){
|
onSelectChange(rowKeys,rows){
|
||||||
|
if(rowKeys.length>1){
|
||||||
console.log('key',rowKeys)
|
this.$message.warning('只能选择一条数据')
|
||||||
|
}else{
|
||||||
|
this.rowId=rowKeys[0]
|
||||||
|
this.rows=rows[0]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
//点击页数
|
//点击页数
|
||||||
onChangePage(page,pageSize){
|
onChangePage(page,pageSize){
|
||||||
@@ -209,7 +178,45 @@
|
|||||||
},
|
},
|
||||||
//导入按钮
|
//导入按钮
|
||||||
tableExport(){
|
tableExport(){
|
||||||
// this.$emit('exportVisible',true)
|
if(this.rows.length>1){
|
||||||
|
this.$message.warning('只能选择一条数据')
|
||||||
|
}else {
|
||||||
|
if(this.rows.file_name){
|
||||||
|
let name = this.rows.file_name.split('.')
|
||||||
|
let nameSuffix=name[name.length-1]
|
||||||
|
if(nameSuffix.toLowerCase()=='pdf'){
|
||||||
|
let params = {
|
||||||
|
attId: this.rows.connect_id,
|
||||||
|
standName: this.rows.title,
|
||||||
|
standNumber: this.rows.serial_number
|
||||||
|
}
|
||||||
|
if(this.rows.text_info=='发布稿(必读)'){
|
||||||
|
params.fileType='1'
|
||||||
|
}else if(this.rows.text_info=='增补件(必读)'){
|
||||||
|
params.fileType='2'
|
||||||
|
}else if(this.rows.text_info=='报批稿'){
|
||||||
|
params.fileType='3'
|
||||||
|
}else if(this.rows.text_info=='征求意见稿'){
|
||||||
|
params.fileType='4'
|
||||||
|
}else if(this.rows.text_info=='测试程序'){
|
||||||
|
params.fileType='5'
|
||||||
|
}else if(this.rows.text_info=='相关资料'){
|
||||||
|
params.fileType='6'
|
||||||
|
}
|
||||||
|
postAction(`ocr/OcrRestful/addOcrRecord`, params).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message)
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// this.$emit('exportVisible',true)
|
||||||
|
}else{
|
||||||
|
this.$message.warning('只能导入pdf文件')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,7 +84,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { getAction, postAction, deleteAction, putAction } from '@/api/manage'
|
import { getAction, postAction, deleteAction, putAction } from '@/api/manage'
|
||||||
import search from '@/components/search/index'
|
import search from '@/components/search/index'
|
||||||
import tableData from '@/components/tableDate/index'
|
import tableData from '@/components/coTable/index'
|
||||||
import subArea from './module/subArea'
|
import subArea from './module/subArea'
|
||||||
import eventBUs from '../../../common/event'
|
import eventBUs from '../../../common/event'
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -96,9 +96,9 @@
|
|||||||
dataIndex: 'itemText',
|
dataIndex: 'itemText',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('DictionaryEnName'),
|
title: this.$t('enName'),
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'itemValue',
|
dataIndex: 'enName',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('DataValue'),
|
title: this.$t('DataValue'),
|
||||||
|
|||||||
Reference in New Issue
Block a user