拆分详情增加
This commit is contained in:
@@ -561,5 +561,6 @@ module.exports = {
|
||||
mergeTerms:'determine merger terms',
|
||||
documentSplitTemplate:'document split template',
|
||||
batSetting:'batch setting',
|
||||
selectDirectoryTerms:'please select the directory location to add terms',
|
||||
|
||||
}
|
||||
@@ -565,5 +565,6 @@ module.exports = {
|
||||
mergeTerms:'确定合并条款',
|
||||
documentSplitTemplate:'文档拆分模板',
|
||||
batSetting:'批量设置',
|
||||
selectDirectoryTerms:'请选择添加条款的目录位置',
|
||||
|
||||
}
|
||||
@@ -79,6 +79,10 @@
|
||||
showAction: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
type:{
|
||||
type:String,
|
||||
default:''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -190,6 +194,7 @@
|
||||
let pageSize = JSON.parse(JSON.stringify(this.pageSize))
|
||||
let params = {
|
||||
...this.searchParmes,
|
||||
type:this.type,
|
||||
orderBy: this.orderBy,
|
||||
orderByField: this.orderByField,
|
||||
pageNo: pageNo + '',
|
||||
|
||||
@@ -13,8 +13,19 @@
|
||||
@change="tableOnChange"
|
||||
>
|
||||
<span slot="showContent" slot-scope="text, record">
|
||||
<a class="content-show" href="javascript:;" :title="record.iterms_conditions" @click="showContent">{{record.iterms_conditions}}</a>
|
||||
<a-tooltip placement="top">
|
||||
<template slot="title">
|
||||
<span v-html="record.iterms_conditions"></span>
|
||||
|
||||
</template>
|
||||
<span class="content-show" href="javascript:;" @click="showContent">{{record.iterms_conditions&&record.iterms_conditions!=='null'?record.iterms_conditions.replace(/<.*?>/ig, ' ') : ''}}</span>
|
||||
</a-tooltip>
|
||||
</span>
|
||||
|
||||
<!-- <span slot="showContent" slot-scope="text, record">-->
|
||||
|
||||
<!-- <span class="content-show" href="javascript:;" :title="record.iterms_conditions" @click="showContent">{{record.iterms_conditions?record.iterms_conditions.replace(/<.*?>/ig, ' ') : '1111'}}</span>-->
|
||||
<!-- </span>-->
|
||||
<span slot="operation" slot-scope="record">
|
||||
<a v-for="(ol,index) in OperationList"
|
||||
@click="OperationClick(ol,record)">
|
||||
@@ -92,6 +103,12 @@
|
||||
orderByField: ''
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
menuId(oldValue,newValue){
|
||||
// console.log('oldnew',oldValue,newValue)
|
||||
this.getTableList()
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
eventBUs.$on('searchQuery', search => {
|
||||
Object.keys(search).forEach(res => {
|
||||
@@ -140,15 +157,9 @@
|
||||
})
|
||||
if(res.db_field_name=='iterms_conditions'){
|
||||
this.columns[index].width='35%'
|
||||
}
|
||||
if (res.click) {
|
||||
this.columns[index].scopedSlots = {
|
||||
customRender: 'showContent'
|
||||
}
|
||||
} else {
|
||||
this.columns[index].scopedSlots = {
|
||||
customRender: 'detailText'
|
||||
}
|
||||
}
|
||||
})
|
||||
// console.log('columns',this.columns)
|
||||
@@ -167,6 +178,7 @@
|
||||
scopedSlots: { customRender: 'operation' }
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -245,15 +257,7 @@
|
||||
height: calc(100% - 100px);
|
||||
overflow: auto;
|
||||
.content-show{
|
||||
width: 500px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
height: 60px;
|
||||
line-height: 20px;
|
||||
white-space: pre-wrap;
|
||||
/*text-align: center;*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,193 @@
|
||||
<template>
|
||||
<div class="ocr-upload">
|
||||
<!-- <a-modal v-model="visible" :maskClosable="false" :footer="[]" :title="title" class="ocr-upload-modal">-->
|
||||
<a-upload
|
||||
:accept='accept'
|
||||
:disabled="disabled"
|
||||
class="ant-upload-list"
|
||||
name="file"
|
||||
:list-type="listType"
|
||||
:file-list="myfileList"
|
||||
:multiple="false"
|
||||
:action = 'uploadAction'
|
||||
:headers="headers"
|
||||
:before-upload="beforeUpload"
|
||||
:remove='remove'
|
||||
:data="uploadData"
|
||||
:showUploadList="false"
|
||||
@change="handleChange">
|
||||
<!-- <p><a-icon style="font-size: 67px;color: #c0c4cc;" type="cloud-upload" /></p>-->
|
||||
<a-icon type="import" :rotate="-90" />{{ $t('import') }}
|
||||
<!-- <a-button type="primary" ghost class="ant-upload-text" style="font-size: 14px;line-height: 30px">{{$t('clickUpload')}}</a-button>-->
|
||||
</a-upload>
|
||||
<!-- </a-modal>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
// import store from '@/store'
|
||||
import { ACCESS_TOKEN } from "@/store/mutation-types"
|
||||
export default {
|
||||
name: 'SplitImport',
|
||||
props:['disableds','disabled','thisFileUploadUrl','readonly','thisFileType','title','listType','infoId','menuId'],
|
||||
data(){
|
||||
return{
|
||||
visible:false,
|
||||
// uploadAction:"http://10.0.1.25:8080/split/sarFileSplitItems/importSplitItems",
|
||||
uploadAction:window._CONFIG['domianURL']+"/split/sarFileSplitItems/importSplitItems",
|
||||
downLoadFileUrl:window._CONFIG['domianURL']+'/sys/common/static',
|
||||
myfileList:[],
|
||||
fileList:[],
|
||||
fileTypeSatus:false,
|
||||
headers:{},
|
||||
accept:'application/zip',
|
||||
uploadData:{
|
||||
},
|
||||
cut:''
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
},
|
||||
watch:{
|
||||
menuId(val1,val2){
|
||||
// console.log('val1111',val1,val2)
|
||||
}
|
||||
},
|
||||
created(){
|
||||
const token = Vue.ls.get(ACCESS_TOKEN);
|
||||
this.headers = {"X-Access-Token":token};
|
||||
this.containerId = 'container-ty-'+new Date().getTime();
|
||||
},
|
||||
mounted(){
|
||||
let long = localStorage.getItem('language')
|
||||
this.cut = ''
|
||||
if (long && long === 'zh-cn') {
|
||||
this.cut = 'cn'
|
||||
this.uploadData.cut='cn'
|
||||
} else if (long && long === 'en-us') {
|
||||
this.cut = 'en'
|
||||
this.uploadData.cut='en'
|
||||
}
|
||||
this.uploadData.menuId=this.menuId
|
||||
this.uploadData.infoId=this.infoId
|
||||
|
||||
// console.log('uplod',this.uploadAction,this.uploadData)
|
||||
// console.log(this.thisFileType,this.thisFileSize,this.thisFileUploadUrl);
|
||||
},
|
||||
methods:{
|
||||
beforeUpload(file,fileList) {
|
||||
if(this.myfileList&&this.myfileList.length>=1){
|
||||
this.$message.warning('只能上传一个文件')
|
||||
return false
|
||||
}else{
|
||||
// let thisFileType = this.thisFileType.replace(/\s+/g, "");
|
||||
console.log('typeee',file.type)
|
||||
if(file.type==this.accept){
|
||||
this.fileTypeSatus = true;
|
||||
this.$message.destroy()
|
||||
// 207M.doc文件大小超出100MB限制, 请压缩或降低文件质量!
|
||||
this.errorMessage = file.name + "文件大小超出100MB限制, 请压缩或降低文件质量!";
|
||||
}
|
||||
}
|
||||
},
|
||||
remove(){
|
||||
this.fileTypeSatus = true;
|
||||
// console.log('rrr',this.myfileList)
|
||||
},
|
||||
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)
|
||||
}
|
||||
})
|
||||
// console.log('remove',this.fileList)
|
||||
this.$emit('uploadSuccess', this.fileList)
|
||||
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 > 1) {
|
||||
info.fileList.splice(1)
|
||||
// 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 lang="less" scoped>
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<style lang="less">
|
||||
.ocr-upload-modal{
|
||||
.ant-modal-wrap{
|
||||
z-index: 1002;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -18,6 +18,7 @@
|
||||
<tableData
|
||||
:flag="'header'"
|
||||
:url="url"
|
||||
:type="type"
|
||||
:showAction="false"
|
||||
:OperationList="OperationList"
|
||||
@onSelectChange="onSelectChange"
|
||||
@@ -126,7 +127,8 @@
|
||||
// addInfo: 'ocr/OcrRestful/addOcrRecord', //新增
|
||||
},
|
||||
rowId:'',
|
||||
rows:[]
|
||||
rows:[],
|
||||
type:'pdf'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
@@ -11,44 +11,53 @@
|
||||
>
|
||||
<div class="imports-table-content">
|
||||
<div class="imports-header">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery(queryParams)">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="$t('standard')">
|
||||
<j-input :placeholder="$t('enterNumber')" v-model="queryParams.standNumber"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="$t('title')">
|
||||
<j-input :placeholder="$t('enterTitle')" 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">{{$t('reset')}}</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
<search :url="url" :flag="'condition'"></search>
|
||||
<!-- <a-form layout="inline" @keyup.enter.native="searchQuery(queryParams)">-->
|
||||
<!-- <a-row :gutter="24">-->
|
||||
<!-- <a-col :md="6" :sm="12">-->
|
||||
<!-- <a-form-item :label="$t('standard')">-->
|
||||
<!-- <j-input :placeholder="$t('enterNumber')" v-model="queryParams.standNumber"></j-input>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- <a-col :md="6" :sm="12">-->
|
||||
<!-- <a-form-item :label="$t('title')">-->
|
||||
<!-- <j-input :placeholder="$t('enterTitle')" 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">{{$t('reset')}}</a-button>-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- </a-row>-->
|
||||
<!-- </a-form>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="imports-table-detail">
|
||||
<a-spin :spinning="spinning">
|
||||
<a-table :data-source="tableSource" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="tag-con-table" :pagination="false" >
|
||||
</a-table>
|
||||
</a-spin>
|
||||
<div class="page" v-if="tableSource.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+` ${total} `+ $t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="queryParams.pageSize"
|
||||
:total="total"
|
||||
@change="onChangePage"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
<tableData
|
||||
:flag="'header'"
|
||||
:url="url"
|
||||
:type="type"
|
||||
:showAction="false"
|
||||
:OperationList="OperationList"
|
||||
@onSelectChange="onSelectChange"
|
||||
/>
|
||||
<!-- <a-spin :spinning="spinning">-->
|
||||
<!-- <a-table :data-source="tableSource" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="tag-con-table" :pagination="false" >-->
|
||||
<!-- </a-table>-->
|
||||
<!-- </a-spin>-->
|
||||
<!-- <div class="page" v-if="tableSource.length > 0">-->
|
||||
<!-- <a-pagination-->
|
||||
<!-- :show-total="total => $t('total')+` ${total} `+ $t('strip')"-->
|
||||
<!-- show-quick-jumper-->
|
||||
<!-- show-size-changer-->
|
||||
<!-- :page-size.sync="queryParams.pageSize"-->
|
||||
<!-- :total="total"-->
|
||||
<!-- @change="onChangePage"-->
|
||||
<!-- @showSizeChange="SizeChange"-->
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="imports-files">
|
||||
<a-form-model
|
||||
@@ -76,18 +85,23 @@
|
||||
<a-button class="imports-btn" type="primary" @click="cancleImports">{{$t('cancel')}}</a-button>
|
||||
</div>
|
||||
</div>
|
||||
<ocr-upload ref="uploadFile" :disabled="disabled" @uploadSuccess="uploadSuccess"></ocr-upload>
|
||||
<split-upload ref="uploadFile" :disabled="disabled" @uploadSuccess="uploadSuccess"></split-upload>
|
||||
</a-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction, deleteAction, downFile } from '@/api/manage'
|
||||
import OcrUpload from '@/components/OcrUpload/index'
|
||||
import SplitUpload from '@/components/SplitUpload/index'
|
||||
import search from '@/components/search/index'
|
||||
import TableData from '@/components/OcrTable/DocTable'
|
||||
import eventBUs from '../../../../common/event'
|
||||
export default {
|
||||
name: 'import',
|
||||
components:{
|
||||
OcrUpload
|
||||
SplitUpload,
|
||||
search,
|
||||
TableData
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
@@ -142,6 +156,13 @@
|
||||
],
|
||||
},
|
||||
spinning:false, //loading标识
|
||||
type:'',
|
||||
url:{
|
||||
tableHeader: 'document/bussDocumentLibraryEO/getHeaderOrConditionForOcr', //表格头部字段
|
||||
seachList: 'document/bussDocumentLibraryEO/getHeaderOrConditionForOcr', //搜索字段
|
||||
tableList: 'document/bussDocumentLibraryEO/ocrPageInfo', //表格数据
|
||||
},
|
||||
OperationList:[]
|
||||
}
|
||||
},
|
||||
props:{
|
||||
@@ -171,7 +192,8 @@
|
||||
this.visible = false;
|
||||
this.$emit('visible',false)
|
||||
},
|
||||
onSelectChange(keys){
|
||||
onSelectChange(keys,rows){
|
||||
console.log('keys',keys,rows)
|
||||
this.selectedRowKeys=keys
|
||||
},
|
||||
|
||||
@@ -249,4 +271,14 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style lang="less">
|
||||
.imports-table-content {
|
||||
.imports-header {
|
||||
.ant-col-sm-24{
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -588,7 +588,7 @@
|
||||
type:String,
|
||||
default:''
|
||||
},
|
||||
item:{
|
||||
itemVal:{
|
||||
type:Object,
|
||||
default:{}
|
||||
}
|
||||
@@ -600,12 +600,15 @@
|
||||
}else{
|
||||
this.selectedNum=false
|
||||
}
|
||||
}
|
||||
},
|
||||
// itemVal(oldVal,newVal){
|
||||
// console.log('new',oldVal,newVal)
|
||||
// }
|
||||
},
|
||||
mounted() {
|
||||
this.visible=this.addVisible
|
||||
this.formInline=this.item
|
||||
console.log('form',this.formInline,this.item)
|
||||
// console.log('form',this.formInline,this.item)
|
||||
this.loadData()
|
||||
},
|
||||
methods:{
|
||||
@@ -615,7 +618,6 @@
|
||||
if(res.success){
|
||||
this.contentList=[...res.result]
|
||||
|
||||
console.log('res',res.result)
|
||||
}
|
||||
}).finally(()=>{
|
||||
this.loading=false
|
||||
@@ -639,7 +641,7 @@
|
||||
},
|
||||
//删除按钮
|
||||
splitDelete(item,index){
|
||||
console.log('itme',item,this.contentList)
|
||||
// console.log('itme',item,this.contentList)
|
||||
if(item.id){
|
||||
this.deleteIds.push(item.id)
|
||||
}
|
||||
@@ -648,7 +650,7 @@
|
||||
this.contentList[index]=this.contentList[index+1]
|
||||
}
|
||||
this.contentList.pop()
|
||||
console.log('this.content',this.contentList)
|
||||
// console.log('this.content',this.contentList)
|
||||
},
|
||||
//保存
|
||||
splitSave(){
|
||||
@@ -671,8 +673,8 @@
|
||||
params[res] = params[res].join(',')
|
||||
}
|
||||
})
|
||||
// console.log('item',this.item,JSON.stringify(this.item)=="{}")
|
||||
if(JSON.stringify(this.item)=="{}"){
|
||||
|
||||
if(JSON.stringify(this.itemVal)=="{}"){
|
||||
params.info_id=this.infoId
|
||||
params.menu_id=this.menuId
|
||||
}
|
||||
@@ -695,6 +697,7 @@
|
||||
this.visible=false
|
||||
// this.$emit('closeVisible',false)
|
||||
eventBUs.$emit('searchReset')
|
||||
this.$emit('sumber')
|
||||
}else{
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
@@ -765,7 +768,7 @@
|
||||
},
|
||||
//上传文件
|
||||
uploadSuccess1(data,imgs) {
|
||||
console.log('dataimg',data,imgs)
|
||||
// console.log('dataimg',data,imgs)
|
||||
let lengthImg=imgs.length
|
||||
for(let i = this.contentList.length;i>this.addIndex;i--){
|
||||
this.contentList[i+lengthImg-1]=this.contentList[i-1]
|
||||
@@ -780,7 +783,7 @@
|
||||
})
|
||||
}
|
||||
this.splitVisible=false
|
||||
console.log('conteend',this.contentList)
|
||||
// console.log('conteend',this.contentList)
|
||||
},
|
||||
//点击图片预览
|
||||
preImg(item){
|
||||
@@ -971,16 +974,14 @@
|
||||
})
|
||||
},
|
||||
edit(item) {
|
||||
this.visible=true
|
||||
this.type = 'edit'
|
||||
this.getForm(() => {
|
||||
getAction(this.url.getDocumentInfo, { id: item.id }).then((res) => {
|
||||
if (res.success) {
|
||||
this.formInline = res.result[0]
|
||||
}
|
||||
})
|
||||
this.formInline=item
|
||||
})
|
||||
},
|
||||
add() {
|
||||
this.visible=true
|
||||
this.formInline = {}
|
||||
this.type = 'add'
|
||||
this.getForm()
|
||||
|
||||
@@ -49,9 +49,12 @@
|
||||
<a-icon type="plus" />
|
||||
{{ $t('add') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleImportManage">
|
||||
<a-icon type="import" :rotate="-90" />
|
||||
{{ $t('import') }}
|
||||
<div class="operator-text upload-split" @click="handleImportManage">
|
||||
<a-icon type="import" :rotate="-90" v-if="!uploadMenuId" />
|
||||
{{ uploadMenuId===''? $t('import'):'' }}
|
||||
<upload v-if="menuId" ref="uploadSplit":infoId="infoId" :menuId="uploadMenuId" @uploadSuccess="uploadSuccess"></upload>
|
||||
<!-- <ImportFile :url="url"/>-->
|
||||
|
||||
</div>
|
||||
<div class="operator-text" @click="handleExportManage">
|
||||
<a-icon type="export" :rotate="-90"/>
|
||||
@@ -149,8 +152,8 @@
|
||||
:ids="ids">
|
||||
</split-bat-form>
|
||||
</a-modal>
|
||||
<split-add-form ref="splitForm" v-if="addVisible" :addVisible="addVisible" :formTitle="formTitle" :flag="'4'" :url="url" :infoId="infoId" :menuId="menuId" :itemId="itemId" :item="item" @closeVisible="closeVisible"></split-add-form>
|
||||
<upload ref="uploadSplit" @uploadSuccess="uploadSuccess"></upload>
|
||||
<split-add-form ref="splitForm" v-if="addVisible" :addVisible="addVisible" :formTitle="formTitle" :flag="'4'" :url="url" :infoId="infoId" :menuId="menuId" :itemId="itemId" :itemVal="itemVal" @closeVisible="closeVisible" @sumber="sumber"></split-add-form>
|
||||
|
||||
</div>
|
||||
</a-card>
|
||||
</div>
|
||||
@@ -160,9 +163,10 @@
|
||||
import { getAction, postAction, deleteAction, putAction, downloadFile } from '@/api/manage'
|
||||
import search from '@/components/search/index'
|
||||
import TableData from '@/components/SplitDetailTable/index'
|
||||
import upload from '@/components/uploadFile/file.vue'
|
||||
// import upload from '@/components/uploadFile/file.vue'
|
||||
import SplitBatForm from '@/components/SplitBatForm/index'
|
||||
import SplitAddForm from './SplitAddForm'
|
||||
import upload from '@/components/SplitImport/index'
|
||||
import axios from 'axios'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import eventBUs from '@/common/event'
|
||||
@@ -174,7 +178,8 @@
|
||||
TableData,
|
||||
SplitBatForm,
|
||||
SplitAddForm,
|
||||
upload
|
||||
upload,
|
||||
// ImportFile
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -193,52 +198,11 @@
|
||||
searchValue: '',
|
||||
autoExpandParent: true,
|
||||
dataList: [],
|
||||
contentValue:'12. 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板下面是白色;和 d) 高至少400(四百)毫米和宽至少100(一百)毫米; 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板下面是白色;和 d) 高至少400(四百)毫米和宽至少100(一百)毫米;',
|
||||
contentValue:'',
|
||||
gData: [],
|
||||
selecIds:[],
|
||||
loading:false,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('clauseNo'),
|
||||
dataIndex: 'serialNumber',
|
||||
key: 'serialNumber',
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: this.$t('clauseName'),
|
||||
dataIndex: 'serialName',
|
||||
key: 'serialName',
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: this.$t('clauseContent'),
|
||||
dataIndex: 'serialContent',
|
||||
key: 'serialContent',
|
||||
align: "center",
|
||||
width: '50%',
|
||||
scopedSlots: {customRender: 'clauseContent'},
|
||||
|
||||
},
|
||||
{
|
||||
title: this.$t('functionalAreas'),
|
||||
dataIndex: 'functionArea',
|
||||
key: 'functionArea',
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: this.$t('technicalField'),
|
||||
dataIndex: 'tecArea',
|
||||
key: 'tecArea',
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
dataIndex: 'action',
|
||||
scopedSlots: {customRender: 'action'},
|
||||
align: "center",
|
||||
width: 120
|
||||
}
|
||||
],
|
||||
columns: [],
|
||||
addVisible:false,
|
||||
attId:'',
|
||||
data:[],
|
||||
@@ -266,7 +230,7 @@
|
||||
infoId:'',
|
||||
menuId:'',
|
||||
itemId:'',
|
||||
item:{},
|
||||
itemVal:{},
|
||||
// NodeTreeItemVisible:false,
|
||||
flag:false, //提交按钮标识
|
||||
isEdit:false,
|
||||
@@ -287,6 +251,8 @@
|
||||
getAddForm: 'language/switch/getForm', // 表单的字段
|
||||
addInfo: '/jero-boot/split/sarFileSplitItems/addSplitItems', //新增
|
||||
updateInfo:'/jero-boot/split/sarFileSplitItems/updateSplitItems', //编辑
|
||||
getDocumentInfo:'split/sarFileSplitInfo/queryById',
|
||||
importZipUrl: '/split/sarFileSplitItems/importSplitItems',//导入
|
||||
},
|
||||
urlBatSet:{
|
||||
getAddForm:'split/sarFileSplitItems/getBatchSetForm',
|
||||
@@ -295,6 +261,8 @@
|
||||
batSetVisible:false, //批量设置弹框显示
|
||||
ids:'',
|
||||
token:Vue.ls.get(ACCESS_TOKEN),
|
||||
// upAccept:'.zip', //导入文件类型
|
||||
uploadMenuId:''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -307,7 +275,7 @@
|
||||
methods: {
|
||||
//显示条款内容弹框
|
||||
showContent(){
|
||||
this.contentVisible=true
|
||||
// this.contentVisible=true
|
||||
},
|
||||
//关闭条款内容弹框
|
||||
handleCancel(){
|
||||
@@ -441,7 +409,8 @@
|
||||
//选择树节点
|
||||
onSelect(selectedKeys){
|
||||
this.menuId=selectedKeys[0]
|
||||
eventBUs.$emit('searchReset')
|
||||
this.uploadMenuId=selectedKeys[0]
|
||||
// eventBUs.$emit('searchReset')
|
||||
// console.log('sele',selectedKeys)
|
||||
},
|
||||
//树形新增
|
||||
@@ -624,7 +593,7 @@
|
||||
this.$refs.splitForm.add()
|
||||
})
|
||||
}else{
|
||||
this.$message.warning('请选择要添加条款的目录位置')
|
||||
this.$message.warning(this.$t('selectDirectoryTerms'))
|
||||
}
|
||||
},
|
||||
closeVisible(val){
|
||||
@@ -632,7 +601,10 @@
|
||||
},
|
||||
//导入
|
||||
handleImportManage(){
|
||||
this.$refs.uploadSplit.visible=true
|
||||
if(!this.menuId){
|
||||
this.$message.warning(this.$t('selectDirectoryTerms'))
|
||||
}
|
||||
|
||||
},
|
||||
//上传成功
|
||||
uploadSuccess(data){
|
||||
@@ -646,7 +618,14 @@
|
||||
},
|
||||
//导出
|
||||
handleExportManage(){
|
||||
let name = this.$t('DocumentSplitting')+'.zip'
|
||||
let query = {
|
||||
infoId:this.infoId,
|
||||
exportName:name,
|
||||
idList:this.selectedRowKeys.join(',')
|
||||
}
|
||||
|
||||
downloadFile('split/sarFileSplitItems/exportSplitInfoZip', name, query)
|
||||
},
|
||||
//模板下载
|
||||
handleDownManage(){
|
||||
@@ -789,15 +768,18 @@
|
||||
},
|
||||
//编辑
|
||||
editClick(val){
|
||||
// console.log('val',val)
|
||||
this.formTitle=this.$t('edit')
|
||||
this.item=val
|
||||
this.itemVal=val
|
||||
this.itemId=val.id
|
||||
this.addVisible=true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.splitForm.edit(val)
|
||||
})
|
||||
},
|
||||
//保存成功
|
||||
sumber(){
|
||||
this.loadMenuData()
|
||||
},
|
||||
//删除
|
||||
deleteClick(val){
|
||||
let params={
|
||||
@@ -1076,6 +1058,11 @@
|
||||
min-width: 300px;
|
||||
}
|
||||
}
|
||||
.upload-split{
|
||||
.ant-upload{
|
||||
color:#040B29;
|
||||
}
|
||||
}
|
||||
}
|
||||
.show-setting{
|
||||
.ant-modal{
|
||||
|
||||
@@ -11,48 +11,57 @@
|
||||
>
|
||||
<div class="split-table-content">
|
||||
<div class="split-header">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery(queryParams)">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item :label="$t('standard')" class="split-item">
|
||||
<j-input :placeholder="$t('enterNumber')" v-model="queryParams.standNumber"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item :label="$t('title')" class="split-item">
|
||||
<j-input :placeholder="$t('enterTitle')" v-model="queryParams.standName"></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="6">
|
||||
<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">{{$t('reset')}}</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
<search :url="url" :flag="'condition'"></search>
|
||||
<!-- <a-form layout="inline" @keyup.enter.native="searchQuery(queryParams)">-->
|
||||
<!-- <a-row :gutter="24">-->
|
||||
<!-- <a-col :md="6" :sm="8">-->
|
||||
<!-- <a-form-item :label="$t('standard')" class="split-item">-->
|
||||
<!-- <j-input :placeholder="$t('enterNumber')" v-model="queryParams.standNumber"></j-input>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- <a-col :md="6" :sm="8">-->
|
||||
<!-- <a-form-item :label="$t('title')" class="split-item">-->
|
||||
<!-- <j-input :placeholder="$t('enterTitle')" v-model="queryParams.standName"></j-input>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- <a-col :md="6" :sm="6">-->
|
||||
<!-- <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">{{$t('reset')}}</a-button>-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- </a-row>-->
|
||||
<!-- </a-form>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="split-table-detail">
|
||||
<a-spin :spinning="spinning">
|
||||
<a-table :data-source="tableSource" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="tag-con-table" :pagination="false" >
|
||||
</a-table>
|
||||
</a-spin>
|
||||
<div class="page" v-if="tableSource.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+` ${total} `+ $t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="queryParams.pageSize"
|
||||
:total="total"
|
||||
@change="onChangePage"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
<tableData
|
||||
:flag="'header'"
|
||||
:url="url"
|
||||
:type="type"
|
||||
:showAction="false"
|
||||
:OperationList="OperationList"
|
||||
@onSelectChange="onSelectChange"
|
||||
/>
|
||||
<!-- <a-spin :spinning="spinning">-->
|
||||
<!-- <a-table :data-source="tableSource" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="tag-con-table" :pagination="false" >-->
|
||||
<!-- </a-table>-->
|
||||
<!-- </a-spin>-->
|
||||
<!-- <div class="page" v-if="tableSource.length > 0">-->
|
||||
<!-- <a-pagination-->
|
||||
<!-- :show-total="total => $t('total')+` ${total} `+ $t('strip')"-->
|
||||
<!-- show-quick-jumper-->
|
||||
<!-- show-size-changer-->
|
||||
<!-- :page-size.sync="queryParams.pageSize"-->
|
||||
<!-- :total="total"-->
|
||||
<!-- @change="onChangePage"-->
|
||||
<!-- @showSizeChange="SizeChange"-->
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="split-footer">
|
||||
<div class="split-footer-wrap">
|
||||
<a-button class="split-btn split-chai" type="primary">{{$t('split')}}</a-button>
|
||||
<a-button class="split-btn split-chai" type="primary" @click="submitSplit">{{$t('split')}}</a-button>
|
||||
<a-button class="split-btn" type="primary" @click="cancelSplit">{{$t('cancel')}}</a-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -61,21 +70,21 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction } from '../../../../api/manage'
|
||||
import { getAction, postAction } from '../../../../api/manage'
|
||||
import search from '@/components/search/index'
|
||||
import TableData from '@/components/OcrTable/DocTable'
|
||||
import eventBUs from '../../../../common/event'
|
||||
|
||||
export default {
|
||||
name: 'split',
|
||||
components:{
|
||||
search,
|
||||
TableData,
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
visible:false,
|
||||
tableSource:[
|
||||
{
|
||||
standNumber:'aaaa',
|
||||
standName:'11111',
|
||||
fileName:'234323',
|
||||
fileType_dictText:'ewre',
|
||||
}
|
||||
], //列表数据
|
||||
tableSource:[], //列表数据
|
||||
selectedRowKeys:[],
|
||||
queryParams:{
|
||||
pageNo:1,
|
||||
@@ -113,10 +122,21 @@
|
||||
},
|
||||
],
|
||||
spinning:false, //loading标识
|
||||
url:{
|
||||
tableHeader: 'document/bussDocumentLibraryEO/getHeaderOrConditionForOcr', //表格头部字段
|
||||
seachList: 'document/bussDocumentLibraryEO/getHeaderOrConditionForOcr', //搜索字段
|
||||
tableList: 'document/bussDocumentLibraryEO/ocrPageInfo', //表格数据
|
||||
},
|
||||
type:'doc',
|
||||
OperationList:[]
|
||||
}
|
||||
},
|
||||
props:{
|
||||
splitVisible:Boolean
|
||||
splitVisible:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
},
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.visible=this.splitVisible
|
||||
@@ -142,8 +162,14 @@
|
||||
this.visible = false;
|
||||
this.$emit('visible',false)
|
||||
},
|
||||
onSelectChange(keys){
|
||||
onSelectChange(keys,rows){
|
||||
this.selectedRowKeys=keys
|
||||
if(keys.length>1){
|
||||
this.$message.warning(this.$t('OnlyOneSelected'))
|
||||
}else{
|
||||
this.rowId=keys[0]
|
||||
}
|
||||
this.rows=[...rows]
|
||||
},
|
||||
|
||||
//搜索
|
||||
@@ -167,6 +193,54 @@
|
||||
},
|
||||
cancelSplit(){
|
||||
this.$emit('visible',false)
|
||||
},
|
||||
//拆分
|
||||
submitSplit(){
|
||||
if(this.rows&&this.rows.length>1){
|
||||
this.$message.warning(this.$t('OnlyOneSelected'))
|
||||
}else if(this.rows==undefined||this.rows.length===0){
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}else if(this.rows&&this.rows.length==1) {
|
||||
let file = this.rows[0]
|
||||
if (file.file_name) {
|
||||
let name = file.file_name.split('.')
|
||||
let nameSuffix = name[name.length - 1]
|
||||
if (nameSuffix.toLowerCase() === 'doc'||nameSuffix.toLowerCase() === 'docx') {
|
||||
let params = {
|
||||
attId: file.id,
|
||||
standName: file.title,
|
||||
standNumber: file.serial_number,
|
||||
connectId: file.connect_id
|
||||
}
|
||||
if (file.text_info == '发布稿(必读)') {
|
||||
params.fileType = '1'
|
||||
} else if (file.text_info == '增补件(必读)') {
|
||||
params.fileType = '2'
|
||||
} else if (file.text_info == '报批稿') {
|
||||
params.fileType = '3'
|
||||
} else if (file.text_info == '征求意见稿') {
|
||||
params.fileType = '4'
|
||||
} else if (file.text_info == '测试程序') {
|
||||
params.fileType = '5'
|
||||
} else if (file.text_info == '相关资料') {
|
||||
params.fileType = '6'
|
||||
}
|
||||
postAction(`split/sarFileSplitInfo/add`, params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
eventBUs.$emit('searchReset')
|
||||
this.visible = false;
|
||||
this.$emit('visible', false)
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
// this.$emit('exportVisible',true)
|
||||
} else {
|
||||
this.$message.warning(this.$t('OnlyPDF'))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,6 +254,7 @@
|
||||
.split-item{
|
||||
display: flex;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,4 +274,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
<style lang="less">
|
||||
.split-table-content {
|
||||
.split-header {
|
||||
.ant-col-sm-24{
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user