拆分详情增加
This commit is contained in:
@@ -561,5 +561,6 @@ module.exports = {
|
|||||||
mergeTerms:'determine merger terms',
|
mergeTerms:'determine merger terms',
|
||||||
documentSplitTemplate:'document split template',
|
documentSplitTemplate:'document split template',
|
||||||
batSetting:'batch setting',
|
batSetting:'batch setting',
|
||||||
|
selectDirectoryTerms:'please select the directory location to add terms',
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -565,5 +565,6 @@ module.exports = {
|
|||||||
mergeTerms:'确定合并条款',
|
mergeTerms:'确定合并条款',
|
||||||
documentSplitTemplate:'文档拆分模板',
|
documentSplitTemplate:'文档拆分模板',
|
||||||
batSetting:'批量设置',
|
batSetting:'批量设置',
|
||||||
|
selectDirectoryTerms:'请选择添加条款的目录位置',
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -79,6 +79,10 @@
|
|||||||
showAction: {
|
showAction: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
type:{
|
||||||
|
type:String,
|
||||||
|
default:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -190,6 +194,7 @@
|
|||||||
let pageSize = JSON.parse(JSON.stringify(this.pageSize))
|
let pageSize = JSON.parse(JSON.stringify(this.pageSize))
|
||||||
let params = {
|
let params = {
|
||||||
...this.searchParmes,
|
...this.searchParmes,
|
||||||
|
type:this.type,
|
||||||
orderBy: this.orderBy,
|
orderBy: this.orderBy,
|
||||||
orderByField: this.orderByField,
|
orderByField: this.orderByField,
|
||||||
pageNo: pageNo + '',
|
pageNo: pageNo + '',
|
||||||
|
|||||||
@@ -13,8 +13,19 @@
|
|||||||
@change="tableOnChange"
|
@change="tableOnChange"
|
||||||
>
|
>
|
||||||
<span slot="showContent" slot-scope="text, record">
|
<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>
|
||||||
|
|
||||||
|
<!-- <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">
|
<span slot="operation" slot-scope="record">
|
||||||
<a v-for="(ol,index) in OperationList"
|
<a v-for="(ol,index) in OperationList"
|
||||||
@click="OperationClick(ol,record)">
|
@click="OperationClick(ol,record)">
|
||||||
@@ -92,6 +103,12 @@
|
|||||||
orderByField: ''
|
orderByField: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch:{
|
||||||
|
menuId(oldValue,newValue){
|
||||||
|
// console.log('oldnew',oldValue,newValue)
|
||||||
|
this.getTableList()
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
eventBUs.$on('searchQuery', search => {
|
eventBUs.$on('searchQuery', search => {
|
||||||
Object.keys(search).forEach(res => {
|
Object.keys(search).forEach(res => {
|
||||||
@@ -140,15 +157,9 @@
|
|||||||
})
|
})
|
||||||
if(res.db_field_name=='iterms_conditions'){
|
if(res.db_field_name=='iterms_conditions'){
|
||||||
this.columns[index].width='35%'
|
this.columns[index].width='35%'
|
||||||
}
|
|
||||||
if (res.click) {
|
|
||||||
this.columns[index].scopedSlots = {
|
this.columns[index].scopedSlots = {
|
||||||
customRender: 'showContent'
|
customRender: 'showContent'
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
this.columns[index].scopedSlots = {
|
|
||||||
customRender: 'detailText'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// console.log('columns',this.columns)
|
// console.log('columns',this.columns)
|
||||||
@@ -167,6 +178,7 @@
|
|||||||
scopedSlots: { customRender: 'operation' }
|
scopedSlots: { customRender: 'operation' }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -245,15 +257,7 @@
|
|||||||
height: calc(100% - 100px);
|
height: calc(100% - 100px);
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
.content-show{
|
.content-show{
|
||||||
width: 500px;
|
/*text-align: center;*/
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
<tableData
|
||||||
:flag="'header'"
|
:flag="'header'"
|
||||||
:url="url"
|
:url="url"
|
||||||
|
:type="type"
|
||||||
:showAction="false"
|
:showAction="false"
|
||||||
:OperationList="OperationList"
|
:OperationList="OperationList"
|
||||||
@onSelectChange="onSelectChange"
|
@onSelectChange="onSelectChange"
|
||||||
@@ -126,7 +127,8 @@
|
|||||||
// addInfo: 'ocr/OcrRestful/addOcrRecord', //新增
|
// addInfo: 'ocr/OcrRestful/addOcrRecord', //新增
|
||||||
},
|
},
|
||||||
rowId:'',
|
rowId:'',
|
||||||
rows:[]
|
rows:[],
|
||||||
|
type:'pdf'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|||||||
@@ -11,44 +11,53 @@
|
|||||||
>
|
>
|
||||||
<div class="imports-table-content">
|
<div class="imports-table-content">
|
||||||
<div class="imports-header">
|
<div class="imports-header">
|
||||||
<a-form layout="inline" @keyup.enter.native="searchQuery(queryParams)">
|
<search :url="url" :flag="'condition'"></search>
|
||||||
<a-row :gutter="24">
|
<!-- <a-form layout="inline" @keyup.enter.native="searchQuery(queryParams)">-->
|
||||||
<a-col :md="6" :sm="12">
|
<!-- <a-row :gutter="24">-->
|
||||||
<a-form-item :label="$t('standard')">
|
<!-- <a-col :md="6" :sm="12">-->
|
||||||
<j-input :placeholder="$t('enterNumber')" v-model="queryParams.standNumber"></j-input>
|
<!-- <a-form-item :label="$t('standard')">-->
|
||||||
</a-form-item>
|
<!-- <j-input :placeholder="$t('enterNumber')" v-model="queryParams.standNumber"></j-input>-->
|
||||||
</a-col>
|
<!-- </a-form-item>-->
|
||||||
<a-col :md="6" :sm="12">
|
<!-- </a-col>-->
|
||||||
<a-form-item :label="$t('title')">
|
<!-- <a-col :md="6" :sm="12">-->
|
||||||
<j-input :placeholder="$t('enterTitle')" v-model="queryParams.standName"></j-input>
|
<!-- <a-form-item :label="$t('title')">-->
|
||||||
</a-form-item>
|
<!-- <j-input :placeholder="$t('enterTitle')" v-model="queryParams.standName"></j-input>-->
|
||||||
</a-col>
|
<!-- </a-form-item>-->
|
||||||
<a-col :md="6" :sm="8">
|
<!-- </a-col>-->
|
||||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
<!-- <a-col :md="6" :sm="8">-->
|
||||||
<a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button>
|
<!-- <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">-->
|
||||||
<a-button @click="searchReset" icon="reload" style="margin-left: 8px">{{$t('reset')}}</a-button>
|
<!-- <a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button>-->
|
||||||
</span>
|
<!-- <a-button @click="searchReset" icon="reload" style="margin-left: 8px">{{$t('reset')}}</a-button>-->
|
||||||
</a-col>
|
<!-- </span>-->
|
||||||
</a-row>
|
<!-- </a-col>-->
|
||||||
</a-form>
|
<!-- </a-row>-->
|
||||||
|
<!-- </a-form>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="imports-table-detail">
|
<div class="imports-table-detail">
|
||||||
<a-spin :spinning="spinning">
|
<tableData
|
||||||
<a-table :data-source="tableSource" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="tag-con-table" :pagination="false" >
|
:flag="'header'"
|
||||||
</a-table>
|
:url="url"
|
||||||
</a-spin>
|
:type="type"
|
||||||
<div class="page" v-if="tableSource.length > 0">
|
:showAction="false"
|
||||||
<a-pagination
|
:OperationList="OperationList"
|
||||||
:show-total="total => $t('total')+` ${total} `+ $t('strip')"
|
@onSelectChange="onSelectChange"
|
||||||
show-quick-jumper
|
/>
|
||||||
show-size-changer
|
<!-- <a-spin :spinning="spinning">-->
|
||||||
:page-size.sync="queryParams.pageSize"
|
<!-- <a-table :data-source="tableSource" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="tag-con-table" :pagination="false" >-->
|
||||||
:total="total"
|
<!-- </a-table>-->
|
||||||
@change="onChangePage"
|
<!-- </a-spin>-->
|
||||||
@showSizeChange="SizeChange"
|
<!-- <div class="page" v-if="tableSource.length > 0">-->
|
||||||
/>
|
<!-- <a-pagination-->
|
||||||
</div>
|
<!-- :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>
|
||||||
<div class="imports-files">
|
<div class="imports-files">
|
||||||
<a-form-model
|
<a-form-model
|
||||||
@@ -76,18 +85,23 @@
|
|||||||
<a-button class="imports-btn" type="primary" @click="cancleImports">{{$t('cancel')}}</a-button>
|
<a-button class="imports-btn" type="primary" @click="cancleImports">{{$t('cancel')}}</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ocr-upload ref="uploadFile" :disabled="disabled" @uploadSuccess="uploadSuccess"></ocr-upload>
|
<split-upload ref="uploadFile" :disabled="disabled" @uploadSuccess="uploadSuccess"></split-upload>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getAction, postAction, deleteAction, downFile } from '@/api/manage'
|
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 {
|
export default {
|
||||||
name: 'import',
|
name: 'import',
|
||||||
components:{
|
components:{
|
||||||
OcrUpload
|
SplitUpload,
|
||||||
|
search,
|
||||||
|
TableData
|
||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
@@ -142,6 +156,13 @@
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
spinning:false, //loading标识
|
spinning:false, //loading标识
|
||||||
|
type:'',
|
||||||
|
url:{
|
||||||
|
tableHeader: 'document/bussDocumentLibraryEO/getHeaderOrConditionForOcr', //表格头部字段
|
||||||
|
seachList: 'document/bussDocumentLibraryEO/getHeaderOrConditionForOcr', //搜索字段
|
||||||
|
tableList: 'document/bussDocumentLibraryEO/ocrPageInfo', //表格数据
|
||||||
|
},
|
||||||
|
OperationList:[]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props:{
|
props:{
|
||||||
@@ -171,7 +192,8 @@
|
|||||||
this.visible = false;
|
this.visible = false;
|
||||||
this.$emit('visible',false)
|
this.$emit('visible',false)
|
||||||
},
|
},
|
||||||
onSelectChange(keys){
|
onSelectChange(keys,rows){
|
||||||
|
console.log('keys',keys,rows)
|
||||||
this.selectedRowKeys=keys
|
this.selectedRowKeys=keys
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -249,4 +271,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
|
<style lang="less">
|
||||||
|
.imports-table-content {
|
||||||
|
.imports-header {
|
||||||
|
.ant-col-sm-24{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@@ -588,7 +588,7 @@
|
|||||||
type:String,
|
type:String,
|
||||||
default:''
|
default:''
|
||||||
},
|
},
|
||||||
item:{
|
itemVal:{
|
||||||
type:Object,
|
type:Object,
|
||||||
default:{}
|
default:{}
|
||||||
}
|
}
|
||||||
@@ -600,12 +600,15 @@
|
|||||||
}else{
|
}else{
|
||||||
this.selectedNum=false
|
this.selectedNum=false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
// itemVal(oldVal,newVal){
|
||||||
|
// console.log('new',oldVal,newVal)
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.visible=this.addVisible
|
this.visible=this.addVisible
|
||||||
this.formInline=this.item
|
this.formInline=this.item
|
||||||
console.log('form',this.formInline,this.item)
|
// console.log('form',this.formInline,this.item)
|
||||||
this.loadData()
|
this.loadData()
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
@@ -615,7 +618,6 @@
|
|||||||
if(res.success){
|
if(res.success){
|
||||||
this.contentList=[...res.result]
|
this.contentList=[...res.result]
|
||||||
|
|
||||||
console.log('res',res.result)
|
|
||||||
}
|
}
|
||||||
}).finally(()=>{
|
}).finally(()=>{
|
||||||
this.loading=false
|
this.loading=false
|
||||||
@@ -639,7 +641,7 @@
|
|||||||
},
|
},
|
||||||
//删除按钮
|
//删除按钮
|
||||||
splitDelete(item,index){
|
splitDelete(item,index){
|
||||||
console.log('itme',item,this.contentList)
|
// console.log('itme',item,this.contentList)
|
||||||
if(item.id){
|
if(item.id){
|
||||||
this.deleteIds.push(item.id)
|
this.deleteIds.push(item.id)
|
||||||
}
|
}
|
||||||
@@ -648,7 +650,7 @@
|
|||||||
this.contentList[index]=this.contentList[index+1]
|
this.contentList[index]=this.contentList[index+1]
|
||||||
}
|
}
|
||||||
this.contentList.pop()
|
this.contentList.pop()
|
||||||
console.log('this.content',this.contentList)
|
// console.log('this.content',this.contentList)
|
||||||
},
|
},
|
||||||
//保存
|
//保存
|
||||||
splitSave(){
|
splitSave(){
|
||||||
@@ -671,8 +673,8 @@
|
|||||||
params[res] = params[res].join(',')
|
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.info_id=this.infoId
|
||||||
params.menu_id=this.menuId
|
params.menu_id=this.menuId
|
||||||
}
|
}
|
||||||
@@ -695,6 +697,7 @@
|
|||||||
this.visible=false
|
this.visible=false
|
||||||
// this.$emit('closeVisible',false)
|
// this.$emit('closeVisible',false)
|
||||||
eventBUs.$emit('searchReset')
|
eventBUs.$emit('searchReset')
|
||||||
|
this.$emit('sumber')
|
||||||
}else{
|
}else{
|
||||||
this.$message.warning(this.$t('operationFailed'))
|
this.$message.warning(this.$t('operationFailed'))
|
||||||
}
|
}
|
||||||
@@ -765,7 +768,7 @@
|
|||||||
},
|
},
|
||||||
//上传文件
|
//上传文件
|
||||||
uploadSuccess1(data,imgs) {
|
uploadSuccess1(data,imgs) {
|
||||||
console.log('dataimg',data,imgs)
|
// console.log('dataimg',data,imgs)
|
||||||
let lengthImg=imgs.length
|
let lengthImg=imgs.length
|
||||||
for(let i = this.contentList.length;i>this.addIndex;i--){
|
for(let i = this.contentList.length;i>this.addIndex;i--){
|
||||||
this.contentList[i+lengthImg-1]=this.contentList[i-1]
|
this.contentList[i+lengthImg-1]=this.contentList[i-1]
|
||||||
@@ -780,7 +783,7 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.splitVisible=false
|
this.splitVisible=false
|
||||||
console.log('conteend',this.contentList)
|
// console.log('conteend',this.contentList)
|
||||||
},
|
},
|
||||||
//点击图片预览
|
//点击图片预览
|
||||||
preImg(item){
|
preImg(item){
|
||||||
@@ -971,16 +974,14 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
edit(item) {
|
edit(item) {
|
||||||
|
this.visible=true
|
||||||
this.type = 'edit'
|
this.type = 'edit'
|
||||||
this.getForm(() => {
|
this.getForm(() => {
|
||||||
getAction(this.url.getDocumentInfo, { id: item.id }).then((res) => {
|
this.formInline=item
|
||||||
if (res.success) {
|
|
||||||
this.formInline = res.result[0]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
add() {
|
add() {
|
||||||
|
this.visible=true
|
||||||
this.formInline = {}
|
this.formInline = {}
|
||||||
this.type = 'add'
|
this.type = 'add'
|
||||||
this.getForm()
|
this.getForm()
|
||||||
|
|||||||
@@ -49,9 +49,12 @@
|
|||||||
<a-icon type="plus" />
|
<a-icon type="plus" />
|
||||||
{{ $t('add') }}
|
{{ $t('add') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="operator-text" @click="handleImportManage">
|
<div class="operator-text upload-split" @click="handleImportManage">
|
||||||
<a-icon type="import" :rotate="-90" />
|
<a-icon type="import" :rotate="-90" v-if="!uploadMenuId" />
|
||||||
{{ $t('import') }}
|
{{ uploadMenuId===''? $t('import'):'' }}
|
||||||
|
<upload v-if="menuId" ref="uploadSplit":infoId="infoId" :menuId="uploadMenuId" @uploadSuccess="uploadSuccess"></upload>
|
||||||
|
<!-- <ImportFile :url="url"/>-->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="operator-text" @click="handleExportManage">
|
<div class="operator-text" @click="handleExportManage">
|
||||||
<a-icon type="export" :rotate="-90"/>
|
<a-icon type="export" :rotate="-90"/>
|
||||||
@@ -149,8 +152,8 @@
|
|||||||
:ids="ids">
|
:ids="ids">
|
||||||
</split-bat-form>
|
</split-bat-form>
|
||||||
</a-modal>
|
</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>
|
<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>
|
||||||
<upload ref="uploadSplit" @uploadSuccess="uploadSuccess"></upload>
|
|
||||||
</div>
|
</div>
|
||||||
</a-card>
|
</a-card>
|
||||||
</div>
|
</div>
|
||||||
@@ -160,9 +163,10 @@
|
|||||||
import { getAction, postAction, deleteAction, putAction, downloadFile } from '@/api/manage'
|
import { getAction, postAction, deleteAction, putAction, downloadFile } from '@/api/manage'
|
||||||
import search from '@/components/search/index'
|
import search from '@/components/search/index'
|
||||||
import TableData from '@/components/SplitDetailTable/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 SplitBatForm from '@/components/SplitBatForm/index'
|
||||||
import SplitAddForm from './SplitAddForm'
|
import SplitAddForm from './SplitAddForm'
|
||||||
|
import upload from '@/components/SplitImport/index'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||||
import eventBUs from '@/common/event'
|
import eventBUs from '@/common/event'
|
||||||
@@ -174,7 +178,8 @@
|
|||||||
TableData,
|
TableData,
|
||||||
SplitBatForm,
|
SplitBatForm,
|
||||||
SplitAddForm,
|
SplitAddForm,
|
||||||
upload
|
upload,
|
||||||
|
// ImportFile
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -193,52 +198,11 @@
|
|||||||
searchValue: '',
|
searchValue: '',
|
||||||
autoExpandParent: true,
|
autoExpandParent: true,
|
||||||
dataList: [],
|
dataList: [],
|
||||||
contentValue:'12. 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板下面是白色;和 d) 高至少400(四百)毫米和宽至少100(一百)毫米; 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板下面是白色;和 d) 高至少400(四百)毫米和宽至少100(一百)毫米;',
|
contentValue:'',
|
||||||
gData: [],
|
gData: [],
|
||||||
selecIds:[],
|
selecIds:[],
|
||||||
loading:false,
|
loading:false,
|
||||||
columns: [
|
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
|
|
||||||
}
|
|
||||||
],
|
|
||||||
addVisible:false,
|
addVisible:false,
|
||||||
attId:'',
|
attId:'',
|
||||||
data:[],
|
data:[],
|
||||||
@@ -266,7 +230,7 @@
|
|||||||
infoId:'',
|
infoId:'',
|
||||||
menuId:'',
|
menuId:'',
|
||||||
itemId:'',
|
itemId:'',
|
||||||
item:{},
|
itemVal:{},
|
||||||
// NodeTreeItemVisible:false,
|
// NodeTreeItemVisible:false,
|
||||||
flag:false, //提交按钮标识
|
flag:false, //提交按钮标识
|
||||||
isEdit:false,
|
isEdit:false,
|
||||||
@@ -287,6 +251,8 @@
|
|||||||
getAddForm: 'language/switch/getForm', // 表单的字段
|
getAddForm: 'language/switch/getForm', // 表单的字段
|
||||||
addInfo: '/jero-boot/split/sarFileSplitItems/addSplitItems', //新增
|
addInfo: '/jero-boot/split/sarFileSplitItems/addSplitItems', //新增
|
||||||
updateInfo:'/jero-boot/split/sarFileSplitItems/updateSplitItems', //编辑
|
updateInfo:'/jero-boot/split/sarFileSplitItems/updateSplitItems', //编辑
|
||||||
|
getDocumentInfo:'split/sarFileSplitInfo/queryById',
|
||||||
|
importZipUrl: '/split/sarFileSplitItems/importSplitItems',//导入
|
||||||
},
|
},
|
||||||
urlBatSet:{
|
urlBatSet:{
|
||||||
getAddForm:'split/sarFileSplitItems/getBatchSetForm',
|
getAddForm:'split/sarFileSplitItems/getBatchSetForm',
|
||||||
@@ -295,6 +261,8 @@
|
|||||||
batSetVisible:false, //批量设置弹框显示
|
batSetVisible:false, //批量设置弹框显示
|
||||||
ids:'',
|
ids:'',
|
||||||
token:Vue.ls.get(ACCESS_TOKEN),
|
token:Vue.ls.get(ACCESS_TOKEN),
|
||||||
|
// upAccept:'.zip', //导入文件类型
|
||||||
|
uploadMenuId:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -307,7 +275,7 @@
|
|||||||
methods: {
|
methods: {
|
||||||
//显示条款内容弹框
|
//显示条款内容弹框
|
||||||
showContent(){
|
showContent(){
|
||||||
this.contentVisible=true
|
// this.contentVisible=true
|
||||||
},
|
},
|
||||||
//关闭条款内容弹框
|
//关闭条款内容弹框
|
||||||
handleCancel(){
|
handleCancel(){
|
||||||
@@ -441,7 +409,8 @@
|
|||||||
//选择树节点
|
//选择树节点
|
||||||
onSelect(selectedKeys){
|
onSelect(selectedKeys){
|
||||||
this.menuId=selectedKeys[0]
|
this.menuId=selectedKeys[0]
|
||||||
eventBUs.$emit('searchReset')
|
this.uploadMenuId=selectedKeys[0]
|
||||||
|
// eventBUs.$emit('searchReset')
|
||||||
// console.log('sele',selectedKeys)
|
// console.log('sele',selectedKeys)
|
||||||
},
|
},
|
||||||
//树形新增
|
//树形新增
|
||||||
@@ -624,7 +593,7 @@
|
|||||||
this.$refs.splitForm.add()
|
this.$refs.splitForm.add()
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
this.$message.warning('请选择要添加条款的目录位置')
|
this.$message.warning(this.$t('selectDirectoryTerms'))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
closeVisible(val){
|
closeVisible(val){
|
||||||
@@ -632,7 +601,10 @@
|
|||||||
},
|
},
|
||||||
//导入
|
//导入
|
||||||
handleImportManage(){
|
handleImportManage(){
|
||||||
this.$refs.uploadSplit.visible=true
|
if(!this.menuId){
|
||||||
|
this.$message.warning(this.$t('selectDirectoryTerms'))
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
//上传成功
|
//上传成功
|
||||||
uploadSuccess(data){
|
uploadSuccess(data){
|
||||||
@@ -646,7 +618,14 @@
|
|||||||
},
|
},
|
||||||
//导出
|
//导出
|
||||||
handleExportManage(){
|
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(){
|
handleDownManage(){
|
||||||
@@ -789,15 +768,18 @@
|
|||||||
},
|
},
|
||||||
//编辑
|
//编辑
|
||||||
editClick(val){
|
editClick(val){
|
||||||
// console.log('val',val)
|
|
||||||
this.formTitle=this.$t('edit')
|
this.formTitle=this.$t('edit')
|
||||||
this.item=val
|
this.itemVal=val
|
||||||
this.itemId=val.id
|
this.itemId=val.id
|
||||||
this.addVisible=true
|
this.addVisible=true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.splitForm.edit(val)
|
this.$refs.splitForm.edit(val)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//保存成功
|
||||||
|
sumber(){
|
||||||
|
this.loadMenuData()
|
||||||
|
},
|
||||||
//删除
|
//删除
|
||||||
deleteClick(val){
|
deleteClick(val){
|
||||||
let params={
|
let params={
|
||||||
@@ -1076,6 +1058,11 @@
|
|||||||
min-width: 300px;
|
min-width: 300px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.upload-split{
|
||||||
|
.ant-upload{
|
||||||
|
color:#040B29;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.show-setting{
|
.show-setting{
|
||||||
.ant-modal{
|
.ant-modal{
|
||||||
|
|||||||
@@ -11,48 +11,57 @@
|
|||||||
>
|
>
|
||||||
<div class="split-table-content">
|
<div class="split-table-content">
|
||||||
<div class="split-header">
|
<div class="split-header">
|
||||||
<a-form layout="inline" @keyup.enter.native="searchQuery(queryParams)">
|
<search :url="url" :flag="'condition'"></search>
|
||||||
<a-row :gutter="24">
|
<!-- <a-form layout="inline" @keyup.enter.native="searchQuery(queryParams)">-->
|
||||||
<a-col :md="6" :sm="8">
|
<!-- <a-row :gutter="24">-->
|
||||||
<a-form-item :label="$t('standard')" class="split-item">
|
<!-- <a-col :md="6" :sm="8">-->
|
||||||
<j-input :placeholder="$t('enterNumber')" v-model="queryParams.standNumber"></j-input>
|
<!-- <a-form-item :label="$t('standard')" class="split-item">-->
|
||||||
</a-form-item>
|
<!-- <j-input :placeholder="$t('enterNumber')" v-model="queryParams.standNumber"></j-input>-->
|
||||||
</a-col>
|
<!-- </a-form-item>-->
|
||||||
<a-col :md="6" :sm="8">
|
<!-- </a-col>-->
|
||||||
<a-form-item :label="$t('title')" class="split-item">
|
<!-- <a-col :md="6" :sm="8">-->
|
||||||
<j-input :placeholder="$t('enterTitle')" v-model="queryParams.standName"></j-input>
|
<!-- <a-form-item :label="$t('title')" class="split-item">-->
|
||||||
</a-form-item>
|
<!-- <j-input :placeholder="$t('enterTitle')" v-model="queryParams.standName"></j-input>-->
|
||||||
</a-col>
|
<!-- </a-form-item>-->
|
||||||
<a-col :md="6" :sm="6">
|
<!-- </a-col>-->
|
||||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
<!-- <a-col :md="6" :sm="6">-->
|
||||||
<a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button>
|
<!-- <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">-->
|
||||||
<a-button @click="searchReset" icon="reload" style="margin-left: 8px">{{$t('reset')}}</a-button>
|
<!-- <a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button>-->
|
||||||
</span>
|
<!-- <a-button @click="searchReset" icon="reload" style="margin-left: 8px">{{$t('reset')}}</a-button>-->
|
||||||
</a-col>
|
<!-- </span>-->
|
||||||
</a-row>
|
<!-- </a-col>-->
|
||||||
</a-form>
|
<!-- </a-row>-->
|
||||||
|
<!-- </a-form>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="split-table-detail">
|
<div class="split-table-detail">
|
||||||
<a-spin :spinning="spinning">
|
<tableData
|
||||||
<a-table :data-source="tableSource" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="tag-con-table" :pagination="false" >
|
:flag="'header'"
|
||||||
</a-table>
|
:url="url"
|
||||||
</a-spin>
|
:type="type"
|
||||||
<div class="page" v-if="tableSource.length > 0">
|
:showAction="false"
|
||||||
<a-pagination
|
:OperationList="OperationList"
|
||||||
:show-total="total => $t('total')+` ${total} `+ $t('strip')"
|
@onSelectChange="onSelectChange"
|
||||||
show-quick-jumper
|
/>
|
||||||
show-size-changer
|
<!-- <a-spin :spinning="spinning">-->
|
||||||
:page-size.sync="queryParams.pageSize"
|
<!-- <a-table :data-source="tableSource" :columns="columns" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="tag-con-table" :pagination="false" >-->
|
||||||
:total="total"
|
<!-- </a-table>-->
|
||||||
@change="onChangePage"
|
<!-- </a-spin>-->
|
||||||
@showSizeChange="SizeChange"
|
<!-- <div class="page" v-if="tableSource.length > 0">-->
|
||||||
/>
|
<!-- <a-pagination-->
|
||||||
</div>
|
<!-- :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>
|
||||||
<div class="split-footer">
|
<div class="split-footer">
|
||||||
<div class="split-footer-wrap">
|
<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>
|
<a-button class="split-btn" type="primary" @click="cancelSplit">{{$t('cancel')}}</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -61,21 +70,21 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<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 {
|
export default {
|
||||||
name: 'split',
|
name: 'split',
|
||||||
|
components:{
|
||||||
|
search,
|
||||||
|
TableData,
|
||||||
|
},
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
visible:false,
|
visible:false,
|
||||||
tableSource:[
|
tableSource:[], //列表数据
|
||||||
{
|
|
||||||
standNumber:'aaaa',
|
|
||||||
standName:'11111',
|
|
||||||
fileName:'234323',
|
|
||||||
fileType_dictText:'ewre',
|
|
||||||
}
|
|
||||||
], //列表数据
|
|
||||||
selectedRowKeys:[],
|
selectedRowKeys:[],
|
||||||
queryParams:{
|
queryParams:{
|
||||||
pageNo:1,
|
pageNo:1,
|
||||||
@@ -113,10 +122,21 @@
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
spinning:false, //loading标识
|
spinning:false, //loading标识
|
||||||
|
url:{
|
||||||
|
tableHeader: 'document/bussDocumentLibraryEO/getHeaderOrConditionForOcr', //表格头部字段
|
||||||
|
seachList: 'document/bussDocumentLibraryEO/getHeaderOrConditionForOcr', //搜索字段
|
||||||
|
tableList: 'document/bussDocumentLibraryEO/ocrPageInfo', //表格数据
|
||||||
|
},
|
||||||
|
type:'doc',
|
||||||
|
OperationList:[]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props:{
|
props:{
|
||||||
splitVisible:Boolean
|
splitVisible:{
|
||||||
|
type:Boolean,
|
||||||
|
default:false
|
||||||
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.visible=this.splitVisible
|
this.visible=this.splitVisible
|
||||||
@@ -142,8 +162,14 @@
|
|||||||
this.visible = false;
|
this.visible = false;
|
||||||
this.$emit('visible',false)
|
this.$emit('visible',false)
|
||||||
},
|
},
|
||||||
onSelectChange(keys){
|
onSelectChange(keys,rows){
|
||||||
this.selectedRowKeys=keys
|
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(){
|
cancelSplit(){
|
||||||
this.$emit('visible',false)
|
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{
|
.split-item{
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -199,4 +274,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<style lang="less">
|
||||||
|
.split-table-content {
|
||||||
|
.split-header {
|
||||||
|
.ant-col-sm-24{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user