拆分详情表格修改
This commit is contained in:
@@ -642,4 +642,8 @@ module.exports = {
|
||||
confirmWithdraw:'confirm Withdraw',
|
||||
OperationDetails:'Operation details',
|
||||
OperationTime:'Operation time',
|
||||
oneTableAdded:'only one table can be added',
|
||||
addATable:'please add a table',
|
||||
pleaseUploadSplitFile:'please upload split file',
|
||||
|
||||
}
|
||||
@@ -646,4 +646,8 @@ module.exports = {
|
||||
confirmWithdraw:'确认撤回?',
|
||||
OperationDetails:'操作详情',
|
||||
OperationTime:'操作时间',
|
||||
oneTableAdded:'只能添加一个表格',
|
||||
addATable:'请添加一个表格',
|
||||
pleaseUploadSplitFile:'请上传拆分文件',
|
||||
|
||||
}
|
||||
@@ -124,8 +124,6 @@
|
||||
this.preErrVisible=true
|
||||
this.errValue=val.response.message
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
info.fileList.splice(index,1)
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
this.fileTypeSatus=false
|
||||
if(this.myfileList&&this.myfileList.length>=1){
|
||||
// console.log()
|
||||
this.$message.warning('只能上传一个文件')
|
||||
this.$message.warning(this.$t('onlyOnefileUploaded'))
|
||||
return false
|
||||
}else{
|
||||
// let thisFileType = this.thisFileType.replace(/\s+/g, "");
|
||||
@@ -102,7 +102,7 @@
|
||||
if (status === 'error') {
|
||||
this.$emit('uploadSuccess', this.fileList)
|
||||
this.$message.destroy()
|
||||
this.$message.error(`${info.file.name} 文件上传失败。`);
|
||||
this.$message.error(`${info.file.name}`+this.$t('fileUploadFailed'));
|
||||
} else if (status === 'removed') {
|
||||
this.myfileList = info.fileList;
|
||||
this.fileList = []
|
||||
@@ -116,7 +116,7 @@
|
||||
// console.log('remove',this.fileList)
|
||||
this.$emit('uploadSuccess', this.fileList)
|
||||
this.$message.destroy()
|
||||
this.$message.success(`${info.file.name} 删除成功。`);
|
||||
this.$message.success(`${info.file.name}`+this.$t('deletedSuccessfully'));
|
||||
} else if (status === 'done') {
|
||||
this.fileList = []
|
||||
this.myfileList = info.fileList;
|
||||
@@ -152,7 +152,7 @@
|
||||
if(this.myfileList.length > 0){
|
||||
this.$emit('uploadSuccess', this.fileList)
|
||||
this.$message.destroy()
|
||||
this.$message.success(`${info.file.name} 文件上传成功。`);
|
||||
this.$message.success(`${info.file.name}`+this.$t('fileUploadFailed'));
|
||||
// console.log('fileList111',file,this.fileList,fileList1)
|
||||
}
|
||||
} else if (status === 'uploading') {
|
||||
@@ -162,7 +162,7 @@
|
||||
}
|
||||
}
|
||||
}else if( !this.fileTypeSatus&&this.myfileList.length<1){
|
||||
this.$message.warning('不支持上传该类型的文件!')
|
||||
this.$message.warning(this.$t('typeCannotUploaded'))
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@@ -40,7 +40,8 @@
|
||||
methods:{
|
||||
populateIframe(iframe, headers) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", 'http://10.0.1.31:8080/jero-boot/ocr/pageOffice/word');
|
||||
// xhr.open("GET", 'http://10.0.1.31:8080/jero-boot/ocr/pageOffice/word');
|
||||
xhr.open("GET", 'http://10.0.1.25:8080/jero-boot/ocr/ocrCheck/editorFile');
|
||||
xhr.responseType = "blob";
|
||||
headers.forEach((header) => {
|
||||
xhr.setRequestHeader(header[0], header[1]);
|
||||
|
||||
@@ -43,6 +43,15 @@
|
||||
<a-button class="imports-btn" type="primary" @click="cancleImports">{{$t('cancel')}}</a-button>
|
||||
</div>
|
||||
</div>
|
||||
<a-modal
|
||||
:title="''"
|
||||
class="split-error"
|
||||
:visible="preErrVisible"
|
||||
@cancel="handleErrCancel"
|
||||
:footer="false"
|
||||
>
|
||||
<span class="err-value">{{errValue}}</span>
|
||||
</a-modal>
|
||||
<!-- <split-upload ref="uploadFile" :disabled="disabled" :title="upload1" :accept="accept" @uploadSuccess="uploadSuccess"></split-upload>-->
|
||||
</a-drawer>
|
||||
</div>
|
||||
@@ -130,7 +139,9 @@
|
||||
rows:[],
|
||||
token:Vue.ls.get(ACCESS_TOKEN),
|
||||
flag:false, //提交表单标识
|
||||
cut:''
|
||||
cut:'',
|
||||
preErrVisible:false,
|
||||
errValue:''
|
||||
}
|
||||
},
|
||||
props:{
|
||||
@@ -176,7 +187,7 @@
|
||||
this.$emit('visible',false)
|
||||
},
|
||||
onSelectChange(keys,rows){
|
||||
console.log('keys',keys,rows)
|
||||
// console.log('keys',keys,rows)
|
||||
this.selectedRowKeys=keys
|
||||
this.rows=rows
|
||||
},
|
||||
@@ -235,7 +246,7 @@
|
||||
}else if(this.rows&&this.rows.length>1){
|
||||
this.$message.warning(this.$t('OnlyOneSelected'))
|
||||
}else if(!this.form.file) {
|
||||
this.$message.warning('请上传拆分文件')
|
||||
this.$message.warning(this.$t('pleaseUploadSplitFile'))
|
||||
}else if(this.rows&&this.rows.length===1){
|
||||
let params={
|
||||
connectId:this.rows[0].connect_id,
|
||||
@@ -276,6 +287,12 @@
|
||||
this.$emit('visible',false)
|
||||
}else{
|
||||
this.$message.warning(res.data.message)
|
||||
if(res.data.code==1){
|
||||
this.$message.error(res.data.message);
|
||||
}else{
|
||||
this.preErrVisible=true
|
||||
this.errValue=res.data.message
|
||||
}
|
||||
}
|
||||
}).finally(() => [
|
||||
this.flag = false
|
||||
@@ -311,7 +328,10 @@
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
},
|
||||
handleErrCancel(){
|
||||
this.preErrVisible=false
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -321,12 +321,23 @@
|
||||
@cancel="handleColCancel"
|
||||
>
|
||||
<a-form :form="form" :label-col="{ span: 8 }" :wrapper-col="{ span: 14 }">
|
||||
<a-form-item :label="$t('numberRows')">
|
||||
<a-input-number v-model="rowCount" :min="1" :max="99999" :placeholder="$t('pleaseEnter')+$t('numberRows')" :formatter="limitNumber" :parser="limitNumber" style="width: 100%" />
|
||||
</a-form-item>
|
||||
<a-form-item :label="$t('numberColumns')">
|
||||
<a-input-number v-model="colCount" :min="1" :max="99999" :placeholder="$t('pleaseEnter')+$t('numberColumns')" :formatter="limitNumber" :parser="limitNumber" style="width: 100%" />
|
||||
</a-form-item>
|
||||
<a-form-model
|
||||
class="number-content"
|
||||
:model="rowColForm"
|
||||
:rules="validatorRowColRules"
|
||||
ref="numberRowColForm"
|
||||
>
|
||||
<a-form-model-item :label="$t('numberRows')" prop="rowCount">
|
||||
<!-- <a-form-item :label="$t('numberRows')">-->
|
||||
<a-input-number v-model="rowColForm.rowCount" :min="1" :max="100" :placeholder="$t('pleaseEnter')+$t('numberRows')" :formatter="limitNumber" :parser="limitNumber" style="width: 100%" />
|
||||
<!-- </a-form-item>-->
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('numberColumns')" prop="colCount">
|
||||
<!-- <a-form-item :label="$t('numberColumns')">-->
|
||||
<a-input-number v-model="rowColForm.colCount" :min="1" :max="100" :placeholder="$t('pleaseEnter')+$t('numberColumns')" :formatter="limitNumber" :parser="limitNumber" style="width: 100%" />
|
||||
<!-- </a-form-item>-->
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
</a-form>
|
||||
</a-modal>
|
||||
<!-- 表格弹框-->
|
||||
@@ -533,8 +544,18 @@
|
||||
]
|
||||
},
|
||||
numberFlag:false,
|
||||
rowColForm:{},
|
||||
validatorRowColRules:{
|
||||
colCount:[
|
||||
{ required: true, message: this.$t('pleaseEnter')+this.$t('numberRows'),trigger: 'blur'},
|
||||
],
|
||||
rowCount:[
|
||||
{ required: true, message: this.$t('pleaseEnter')+this.$t('numberColumns'),trigger: 'blur'},
|
||||
]
|
||||
},
|
||||
itemVal:{},
|
||||
contentTrees:'',
|
||||
isTableEdit:false,
|
||||
|
||||
}
|
||||
},
|
||||
@@ -634,7 +655,11 @@
|
||||
},
|
||||
//编辑按钮
|
||||
splitEdit(index,item){
|
||||
console.log('item',item)
|
||||
this.addIndex=index
|
||||
this.tableVisible=true
|
||||
this.isTableEdit=true
|
||||
this.ueContent=item.itemContent
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ueditor.setContent(item.itemContent)
|
||||
})
|
||||
@@ -810,68 +835,90 @@
|
||||
},
|
||||
//表格确认按钮
|
||||
handleOkTable(){
|
||||
this.tableVisible=false
|
||||
this.contentList[this.addIndex+1]= {
|
||||
id:'',
|
||||
type:'TABLE',
|
||||
itemContent:this.ueContent
|
||||
let ueContent=[]
|
||||
ueContent = this.ueContent.match(/<table.{0,}?.+?>{0,}?<\/table>/g)||[];
|
||||
// console.log('uuuuuu',ueContent)
|
||||
if(ueContent&&ueContent.length>1){
|
||||
this.$message.warning(this.$t('oneTableAdded'))
|
||||
}else if(!ueContent||ueContent.length<1){
|
||||
this.$message.warning(this.$t('addATable'))
|
||||
} if(ueContent&&ueContent.length==1){
|
||||
this.tableVisible=false
|
||||
if(this.isTableEdit){
|
||||
this.contentList[this.addIndex]= {
|
||||
id:'',
|
||||
type:'TABLE',
|
||||
itemContent:ueContent[0]
|
||||
}
|
||||
|
||||
}else{
|
||||
for(let i = this.contentList.length;i>this.addIndex;i--){
|
||||
this.contentList[i+ueContent.length-1]=this.contentList[i-1]
|
||||
}
|
||||
this.contentList[++this.addIndex]= {
|
||||
id:'',
|
||||
type:'TABLE',
|
||||
itemContent:ueContent[0]
|
||||
}
|
||||
|
||||
}
|
||||
this.isTableEdit=false
|
||||
}
|
||||
// this.uEditorChange()
|
||||
// console.log('this.contentList',this.contentList)
|
||||
},
|
||||
//表格取消按钮
|
||||
handleCancelTable(){
|
||||
this.tableVisible=false
|
||||
this.isTableEdit=false
|
||||
},
|
||||
//获取表格内容
|
||||
uEditorChange (val) {
|
||||
// this.itemContent = this.$refs.ueditor.getUEContent()
|
||||
this.contentList[this.addIndex+1]= {
|
||||
id:'',
|
||||
type:'TABLE',
|
||||
itemContent:val
|
||||
}
|
||||
this.ueContent=val
|
||||
this.ueContent = val
|
||||
// this.ueContent=val
|
||||
|
||||
},
|
||||
//取消行数列数按钮
|
||||
handleColCancel(){
|
||||
this.tableColVisible=false
|
||||
this.rowCount=''
|
||||
this.colCount=''
|
||||
this.rowColForm.rowCount=''
|
||||
this.rowColForm.colCount=''
|
||||
},
|
||||
//确定行数列数按钮
|
||||
handleColOk(){
|
||||
this.tableColVisible=false
|
||||
this.tableVisible=true
|
||||
if(this.rowCount>0&&this.colCount>0){
|
||||
let tableList=[]
|
||||
let tableStr=''
|
||||
tableStr='<table class=\"word-table\" border="1" cellpadding="0" cellspacing="0">'
|
||||
for(let r=0;r<this.rowCount;r++){
|
||||
let rowTableList=[]
|
||||
tableStr+='<tr>'
|
||||
for(let c=0;c<this.colCount;c++){
|
||||
tableStr+=`<td></td>`
|
||||
let tableItem={}
|
||||
tableItem.id=''
|
||||
tableItem.rowNum=r+1
|
||||
tableItem.colNum=c+1
|
||||
tableItem.content=''
|
||||
rowTableList.push(tableItem)
|
||||
this.$refs.numberRowColForm.validate(valid=>{
|
||||
if(valid){
|
||||
this.tableColVisible=false
|
||||
this.tableVisible=true
|
||||
if(this.rowColForm.rowCount>0&&this.rowColForm.colCount>0){
|
||||
let tableList=[]
|
||||
let tableStr=''
|
||||
tableStr='<table class=\"word-table\" border="1" cellpadding="0" cellspacing="0">'
|
||||
for(let r=0;r<this.rowColForm.rowCount;r++){
|
||||
let rowTableList=[]
|
||||
tableStr+='<tr>'
|
||||
for(let c=0;c<this.rowColForm.colCount;c++){
|
||||
tableStr+=`<td></td>`
|
||||
let tableItem={}
|
||||
tableItem.id=''
|
||||
tableItem.rowNum=r+1
|
||||
tableItem.colNum=c+1
|
||||
tableItem.content=''
|
||||
rowTableList.push(tableItem)
|
||||
}
|
||||
tableStr+=`</tr>`
|
||||
tableList.push(rowTableList)
|
||||
}
|
||||
tableStr+=`</tr>`
|
||||
tableList.push(rowTableList)
|
||||
}
|
||||
tableStr+=`</table>`
|
||||
this.ueContent=tableStr
|
||||
tableStr+=`</table>`
|
||||
this.ueContent=tableStr
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ueditor.setContent(this.ueContent)
|
||||
})
|
||||
this.rowCount=''
|
||||
this.colCount=''
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ueditor.setContent(this.ueContent)
|
||||
})
|
||||
this.rowColForm.rowCount=''
|
||||
this.rowColForm.colCount=''
|
||||
}
|
||||
}
|
||||
})
|
||||
// console.log('cont1111',this.addIndex,this.contentList)
|
||||
},
|
||||
dateChange(item) {
|
||||
|
||||
@@ -22,28 +22,28 @@
|
||||
<div class="operator-select-type">
|
||||
<span class="operator-file-type">{{$t('fileType')}}</span>
|
||||
<a-select v-model="fileGroup" :placeholder="$t('selectFileType')" class="file-type-select">
|
||||
<a-select-option value="GSO" key="GSO">
|
||||
<a-select-option value="GSO" key="GSO" title="GSO">
|
||||
GSO
|
||||
</a-select-option>
|
||||
<a-select-option value="KMVSS_Table" key="KMVSS_Table">
|
||||
<a-select-option value="KMVSS_Table" key="KMVSS_Table" :title="$t('KMVSS_Table')">
|
||||
{{$t('KMVSS_Table')}}
|
||||
</a-select-option>
|
||||
<a-select-option value="KMVSS_Article" key="KMVSS_Article">
|
||||
<a-select-option value="KMVSS_Article" key="KMVSS_Article" :title="$t('KMVSS_Article')">
|
||||
{{$t('KMVSS_Article')}}
|
||||
</a-select-option>
|
||||
<a-select-option value="US" key="US">
|
||||
<a-select-option value="US" key="US" :title="$t('America')">
|
||||
{{$t('America')}}
|
||||
</a-select-option>
|
||||
<a-select-option value="EU" key="EU">
|
||||
<a-select-option value="EU" key="EU" :title="$t('Europe')">
|
||||
{{$t('Europe')}}
|
||||
</a-select-option>
|
||||
<a-select-option value="Japan_one" key="Japan_one">
|
||||
<a-select-option value="Japan_one" key="Japan_one" :title="$t('Japan_one')">
|
||||
{{$t('Japan_one')}}
|
||||
</a-select-option>
|
||||
<a-select-option value="Japan_two" key="Japan_two">
|
||||
<a-select-option value="Japan_two" key="Japan_two" :title="$t('Japan_two')">
|
||||
{{$t('Japan_two')}}
|
||||
</a-select-option>
|
||||
<a-select-option value="CN" key="CN">
|
||||
<a-select-option value="CN" key="CN" :title="$t('China')">
|
||||
{{$t('China')}}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
|
||||
Reference in New Issue
Block a user