拆分条款详情修改

This commit is contained in:
caoyang
2022-04-08 22:49:48 +08:00
parent cfd47d4233
commit 7d9dc44461
9 changed files with 110 additions and 98 deletions
@@ -34,6 +34,11 @@
{{text && text.length > 18?text.slice(0,17)+'...':text}} {{text && text.length > 18?text.slice(0,17)+'...':text}}
</a> </a>
</span> </span>
<span slot="detailText" slot-scope="text,record">
<span class="text" :title="text">
{{text && text.length > 18?text.slice(0,17)+'...':text}}
</span>
</span>
</a-table> </a-table>
</div> </div>
<div class="page" v-if="dataSource.length > 0"> <div class="page" v-if="dataSource.length > 0">
@@ -156,19 +161,23 @@
ellipsis: true, ellipsis: true,
sorter: res.sort sorter: res.sort
}) })
if(res.db_field_name=='iterms_conditions'){
this.columns[index].width='500'
this.columns[index].scopedSlots = {
customRender: 'showContent'
}
}
if (res.urlClick) { if (res.urlClick) {
this.columns[index].scopedSlots = { this.columns[index].scopedSlots = {
customRender: 'urlClick' customRender: 'urlClick'
} }
}else if(res.db_field_name=='iterms_conditions'){
this.columns[index].width='500'
this.columns[index].scopedSlots = {
customRender: 'showContent'
}
}else{
this.columns[index].scopedSlots = {
customRender: 'detailText'
}
} }
}) })
// console.log('this.columns',this.columns)
let width = 0 let width = 0
if (this.OperationList.length > 0) { if (this.OperationList.length > 0) {
for (let i = 0; i < this.OperationList.length; i++) { for (let i = 0; i < this.OperationList.length; i++) {
+30 -5
View File
@@ -21,6 +21,15 @@
<!-- <a-button type="primary" ghost class="ant-upload-text" style="font-size: 14px;line-height: 30px">{{$t('clickUpload')}}</a-button>--> <!-- <a-button type="primary" ghost class="ant-upload-text" style="font-size: 14px;line-height: 30px">{{$t('clickUpload')}}</a-button>-->
</a-upload> </a-upload>
<!-- </a-modal>--> <!-- </a-modal>-->
<a-modal
:title="''"
class="split-error"
:visible="preErrVisible"
@cancel="handleErrCancel"
:footer="false"
>
<span class="err-value">{{errValue}}</span>
</a-modal>
</div> </div>
</template> </template>
@@ -44,7 +53,9 @@
accept:'application/zip', accept:'application/zip',
uploadData:{ uploadData:{
}, },
cut:'' cut:'',
preErrVisible:false,
errValue:''
} }
}, },
computed:{ computed:{
@@ -76,13 +87,16 @@
// console.log(this.thisFileType,this.thisFileSize,this.thisFileUploadUrl); // console.log(this.thisFileType,this.thisFileSize,this.thisFileUploadUrl);
}, },
methods:{ methods:{
handleErrCancel(){
this.preErrVisible=false
},
beforeUpload(file,fileList) { beforeUpload(file,fileList) {
if(this.myfileList&&this.myfileList.length>=1){ if(this.myfileList&&this.myfileList.length>=1){
this.$message.warning('只能上传一个文件') this.$message.warning('只能上传一个文件')
return false return false
}else{ }else{
// let thisFileType = this.thisFileType.replace(/\s+/g, ""); // let thisFileType = this.thisFileType.replace(/\s+/g, "");
console.log('typeee',file.type) // console.log('typeee',file.type)
if(file.type==this.accept){ if(file.type==this.accept){
this.fileTypeSatus = true; this.fileTypeSatus = true;
this.$message.destroy() this.$message.destroy()
@@ -104,7 +118,14 @@
if(val.response.success){ if(val.response.success){
this.$message.success(val.response.message); this.$message.success(val.response.message);
}else{ }else{
this.$message.error(val.response.message); if(val.response.code==1){
this.$message.error(val.response.message);
}else{
this.preErrVisible=true
this.errValue=val.response.message
}
} }
info.fileList.splice(index,1) info.fileList.splice(index,1)
@@ -167,7 +188,7 @@
}) })
if(this.myfileList.length > 0){ if(this.myfileList.length > 0){
console.log('file1111',this.fileList) // console.log('file1111',this.fileList)
this.$emit('uploadSuccess', this.fileList,'success') this.$emit('uploadSuccess', this.fileList,'success')
this.$message.destroy() this.$message.destroy()
this.$message.success(`${info.file.name} 文件上传成功。`); this.$message.success(`${info.file.name} 文件上传成功。`);
@@ -197,5 +218,9 @@
z-index: 1002; z-index: 1002;
} }
} }
.split-error{
.err-value{
margin-top: 10px;
}
}
</style> </style>
@@ -29,7 +29,11 @@
</span> </span>
</a> </a>
</span> </span>
<span slot="detailText" slot-scope="text,record">
<span class="text" :title="text">
{{text && text.length > 18?text.slice(0,17)+'...':text}}
</span>
</span>
</a-table> </a-table>
</div> </div>
<div class="page" v-if="dataSource.length > 0"> <div class="page" v-if="dataSource.length > 0">
+7 -6
View File
@@ -29,6 +29,11 @@
</span> </span>
</a> </a>
</span> </span>
<span slot="detailText" slot-scope="text,record">
<span class="text" :title="text">
{{text && text.length > 18?text.slice(0,17)+'...':text}}
</span>
</span>
</a-table> </a-table>
</div> </div>
<div class="page" v-if="dataSource.length > 0"> <div class="page" v-if="dataSource.length > 0">
@@ -143,16 +148,12 @@
if(res.db_field_name==''){ if(res.db_field_name==''){
// scope.row.itermsConditions ? scope.row.itermsConditions.replace(/<.*?>/ig, ' ') : '' // scope.row.itermsConditions ? scope.row.itermsConditions.replace(/<.*?>/ig, ' ') : ''
} }
if (res.click) {
this.columns[index].scopedSlots = {
customRender: 'showContent'
}
} else {
this.columns[index].scopedSlots = { this.columns[index].scopedSlots = {
customRender: 'detailText' customRender: 'detailText'
} }
}
}) })
let width = 0 let width = 0
if (this.OperationList.length > 0) { if (this.OperationList.length > 0) {
for (let i = 0; i < this.OperationList.length; i++) { for (let i = 0; i < this.OperationList.length; i++) {
@@ -1,5 +1,5 @@
<template> <template>
<div class="ocr-upload"> <div class="split-import-upload">
<!-- <a-modal v-model="visible" :maskClosable="false" :footer="[]" :title="title" class="ocr-upload-modal">--> <!-- <a-modal v-model="visible" :maskClosable="false" :footer="[]" :title="title" class="ocr-upload-modal">-->
<a-upload <a-upload
:accept='accept' :accept='accept'
@@ -13,7 +13,7 @@
:headers="headers" :headers="headers"
:before-upload="beforeUpload" :before-upload="beforeUpload"
:remove='remove' :remove='remove'
:showUploadList="false"
@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>-->
<a-icon type="export" :rotate="-90" /> <a-icon type="export" :rotate="-90" />
@@ -50,21 +50,33 @@
}, },
methods:{ methods:{
beforeUpload(file,fileList) { beforeUpload(file,fileList) {
// console.log('file',this.accept,file,fileList) console.log('file',this.accept,file,fileList,this.myfileList)
this.fileTypeSatus=false this.fileTypeSatus=false
// if(this.myfileList&&this.myfileList.length>=1){ if(this.myfileList&&this.myfileList.length>=1){
// this.$message.warning('只能上传一个文件') // console.log()
// return false this.$message.warning('只能上传一个文件')
// }else{ return false
}else{
// let thisFileType = this.thisFileType.replace(/\s+/g, ""); // let thisFileType = this.thisFileType.replace(/\s+/g, "");
if(file.type==this.accept){ // console.log('accetptt',this.accept)
let acceptFlag=false
let accepts = this.accept.split(',')
accepts.forEach((item,index)=>{
if(item==file.type){
acceptFlag=true
return
}else{
acceptFlag=false
}
})
if(acceptFlag){
// console.log('111111') // console.log('111111')
this.fileTypeSatus = true; this.fileTypeSatus = true;
this.$message.destroy() this.$message.destroy()
// 207M.doc文件大小超出100MB限制, 请压缩或降低文件质量! // 207M.doc文件大小超出100MB限制, 请压缩或降低文件质量!
this.errorMessage = file.name + "文件大小超出100MB限制, 请压缩或降低文件质量!"; this.errorMessage = file.name + "文件大小超出100MB限制, 请压缩或降低文件质量!";
} }
// } }
}, },
remove(){ remove(){
this.fileTypeSatus = true; this.fileTypeSatus = true;
@@ -81,6 +93,7 @@
info.fileList.splice(index,1) info.fileList.splice(index,1)
} }
}) })
console.log('fileStatue',this.fileTypeSatus)
if (this.fileTypeSatus) { if (this.fileTypeSatus) {
if (file.size > 100000000) { if (file.size > 100000000) {
this.$message.error(this.errorMessage) this.$message.error(this.errorMessage)
@@ -134,10 +147,10 @@
this.fileList.push(res) this.fileList.push(res)
} }
}) })
let fileList1=[] // let fileList1=[]
fileList1[0]=this.fileList[this.fileList.length-1] // fileList1[0]=this.fileList[this.fileList.length-1]
if(this.myfileList.length > 0){ if(this.myfileList.length > 0){
this.$emit('uploadSuccess', fileList1) this.$emit('uploadSuccess', this.fileList)
this.$message.destroy() this.$message.destroy()
this.$message.success(`${info.file.name} 文件上传成功。`); this.$message.success(`${info.file.name} 文件上传成功。`);
// console.log('fileList111',file,this.fileList,fileList1) // console.log('fileList111',file,this.fileList,fileList1)
@@ -148,7 +161,7 @@
// this.$message.success(`${info.file.name} 文件上传成功。`); // this.$message.success(`${info.file.name} 文件上传成功。`);
} }
} }
}else{ }else if( !this.fileTypeSatus&&this.myfileList.length<1){
this.$message.warning('不支持上传该类型的文件!') this.$message.warning('不支持上传该类型的文件!')
} }
}, },
@@ -167,5 +180,26 @@
z-index: 1002; z-index: 1002;
} }
} }
.split-import-upload{
.ant-upload-list-item-info{
span{
display: flex;
justify-content: start;
text-align: right;
.ant-upload-list-item-name{
margin-right: 20px;
max-width: 800px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
}
}
.ant-upload-list-text{
position: absolute;
top: 140px;
right: 240px;
}
}
</style> </style>
@@ -35,29 +35,7 @@
@onSelectChange="onSelectChange" @onSelectChange="onSelectChange"
/> />
</div> </div>
<!-- <div class="imports-files">-->
<!-- <a-form-model-->
<!-- class="imports-content"-->
<!-- ref="ruleForm"-->
<!-- :model="form"-->
<!-- :rules="rules"-->
<!-- :label-col="labelCol"-->
<!-- :wrapper-col="wrapperCol"-->
<!-- >-->
<!-- <a-form-model-item ref="file" :label="$t('splitFile')" prop="file">-->
<!-- <split-upload ref="uploadFile" :accept="accept" :disabled="disabled" :module="'split'" @uploadSuccess="uploadSuccess"></split-upload>-->
<!--&lt;!&ndash; <a-input v-model="form.file" >{{form.file}}</a-input>&ndash;&gt;-->
<!--&lt;!&ndash; <a-button type="primary" class="button-text"&ndash;&gt;-->
<!--&lt;!&ndash; @click="fileUpload()">&ndash;&gt;-->
<!--&lt;!&ndash; {{ (form.file === 'null' || form.file === '' ||&ndash;&gt;-->
<!--&lt;!&ndash; form.file == null) ? $t('upload1') : $t('viewUploadedFiles')&ndash;&gt;-->
<!--&lt;!&ndash; }}&ndash;&gt;-->
<!--&lt;!&ndash; </a-button>&ndash;&gt;-->
<!-- </a-form-model-item>-->
<!-- </a-form-model>-->
<!-- <a-button class="file-down" type="primary" @click="downLoad">{{$t('templateDownload')}}</a-button>-->
<!-- </div>-->
<div class="imports-footer"> <div class="imports-footer">
<div class="imports-footer-wrap"> <div class="imports-footer-wrap">
@@ -148,7 +126,7 @@
OperationList:[], OperationList:[],
upload1:this.$t('upload1'), upload1:this.$t('upload1'),
// accept:'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/msword', // accept:'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/msword',
accept:'application/x-zip-compressed', accept:'application/x-zip-compressed,application/zip',
rows:[], rows:[],
token:Vue.ls.get(ACCESS_TOKEN), token:Vue.ls.get(ACCESS_TOKEN),
flag:false, //提交表单标识 flag:false, //提交表单标识
@@ -383,6 +361,8 @@
} }
.imports-table-drawer{ .imports-table-drawer{
.table-operator{ .table-operator{
display: flex;
justify-content: end;
text-align: right; text-align: right;
margin-bottom: 20px; margin-bottom: 20px;
span{ span{
@@ -241,7 +241,7 @@
<uploadFile ref="uploadFile" :accept="accept" @uploadSuccess="uploadSuccess"></uploadFile> <uploadFile ref="uploadFile" :accept="accept" @uploadSuccess="uploadSuccess"></uploadFile>
<span class="con-divider">{{$t('contentValidity')}}</span> <span class="con-divider">{{$t('clauseContent')}}</span>
<a-divider dashed /> <a-divider dashed />
<div class="table-operator"> <div class="table-operator">
<div class="operator-text" @click="splitAdd('-1')"> <div class="operator-text" @click="splitAdd('-1')">
@@ -33,25 +33,7 @@
</template> </template>
</a-dropdown> </a-dropdown>
</template> </template>
<!-- <template slot="title" slot-scope="{ title }">-->
<!-- <span v-if="title.indexOf(searchValue) > -1" :title="title">-->
<!-- {{ title.substr(0, title.indexOf(searchValue)) }}<span style="color: #f50">{{ searchValue }}</span>{{ title.substr(title.indexOf(searchValue) + searchValue.length) }}-->
<!-- </span>-->
<!-- <span v-else :title="title">{{ title }}</span>-->
<!-- </template>-->
</a-tree> </a-tree>
<!-- <div v-if="NodeTreeItem" :style="tmpStyle" >-->
<!-- <div class="menu-item" @click="orgAdd">-->
<!-- {{$t('newNode')}}-->
<!-- </div>-->
<!-- <div class="menu-item" @click="orgEdit">-->
<!-- {{$t('modifyNode')}}-->
<!-- </div>-->
<!-- <div class="menu-item menu-bottom" @click="orgDelete" v-if="NodeTreeItem">-->
<!-- {{$t('deleteNode')}}-->
<!-- </div>-->
<!-- </div>-->
</div> </div>
</div> </div>
<div class="split-detail-right"> <div class="split-detail-right">
@@ -1100,7 +1082,7 @@
.split-detail-left{ .split-detail-left{
width: 260px; width: 260px;
padding-right: 20px; padding-right: 20px;
border-right: 1px solid #666666; border-right: 1px solid #E6E7EC;
.split-detail-left-tree{ .split-detail-left-tree{
width: 240px; width: 240px;
} }
@@ -54,29 +54,6 @@
@onSelectChange="onSelectChange" @onSelectChange="onSelectChange"
/> />
</div> </div>
<!-- <div style="width: 100px">-->
<!-- 文件类型:-->
<!-- <a-select v-model="fileGroup" style="width: 100px">-->
<!-- <a-select-option value="GSO" key="GSO">-->
<!-- GSO-->
<!-- </a-select-option>-->
<!-- <a-select-option value="Korean" key="Korean">-->
<!-- 韩国-->
<!-- </a-select-option>-->
<!-- <a-select-option value="US" key="US">-->
<!-- 美国-->
<!-- </a-select-option>-->
<!-- <a-select-option value="EU" key="EU">-->
<!-- 欧洲-->
<!-- </a-select-option>-->
<!-- <a-select-option value="Japan" key="Japan">-->
<!-- 日本-->
<!-- </a-select-option>-->
<!-- <a-select-option value="CN" key="CN">-->
<!-- 中国-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- </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" @click="submitSplit">{{$t('split')}}</a-button> <a-button class="split-btn split-chai" type="primary" @click="submitSplit">{{$t('split')}}</a-button>