申请人修改文件后 赋值到提交的表单变量

This commit is contained in:
zhaokaiyao@91isoft.com
2021-11-07 14:14:23 +08:00
parent 8679002126
commit e038d6ab48
@@ -1217,6 +1217,7 @@
:before-upload="beginImportFile" :before-upload="beginImportFile"
:on-success="importFileSuccess" :on-success="importFileSuccess"
:on-change="fileChange" :on-change="fileChange"
:on-remove="removeOneFile"
:show-file-list="true" :show-file-list="true"
> >
<div style="padding: 20px 0"> <div style="padding: 20px 0">
@@ -2007,6 +2008,7 @@ export default {
} }
},removeOneFile(file, fileList) { },removeOneFile(file, fileList) {
switch (this.fileType){ switch (this.fileType){
case 'fbgbjbd': case 'fbgbjbd':
this.FBGBJBDFileList=fileList; this.FBGBJBDFileList=fileList;
@@ -2032,6 +2034,12 @@ export default {
case 'ca': case 'ca':
this.caFileList=fileList; this.caFileList=fileList;
break; break;
case 'zbjbd':
this.zbjbdFileList=fileList
break;
case 'glwj':
this.glwjFileList=fileList
break
default : ; default : ;
} }
}, },
@@ -2324,70 +2332,42 @@ export default {
}, },
fileInfoHandle(){ fileInfoHandle(){
if(this.fileType === 'fbgbjbd'){ //拼接文件名和id 提交到流程Activity
this.FBGBJBDFileList=fileList; this.form.fbgbjbd=this.FBGBJBDFileList.map(item => item.response.data.id).join(",")
this.form.fbgbjbd += response.data.id+','; this.form.fbgbjbdName=this.FBGBJBDFileList.map(item => item.name).join(",")
if( this.form.fbgbjbdName=== undefined){
this.form.fbgbjbdName=''
}
this.form.fbgbjbdName += response.data.name+',';
}else if(this.fileType === 'xgd'){
this.xgdFileList=fileList;
console.log(this.xgdFileList)
this.form.xgd += response.data.id+','; this.form.xgd=this.xgdFileList.map(item => item.response.data.id).join(",")
if( this.form.xgdName=== undefined){ this.form.xgdName=this.xgdFileList.map(item => item.name).join(",")
this.form.xgdName=''
} this.form.bpg=this.bpgFileList.map(item => item.response.data.id).join(",")
this.form.xgdName += response.data.name+','; this.form.bpgName=this.bpgFileList.map(item => item.name).join(",")
}else if(this.fileType === 'bpg'){
this.bpgFileList=fileList; this.form.ssg=this.ssgFileList.map(item => item.response.data.id).join(",")
this.form.bpg += response.data.id+','; this.form.ssgName=this.ssgFileList.map(item => item.name).join(",")
if( this.form.bpgName=== undefined){
this.form.bpgName='' this.form.zqyjg=this.zqyjgFileList.map(item => item.response.data.id).join(",")
} this.form.zqyjgName=this.zqyjgFileList.map(item => item.name).join(",")
this.form.bpgName += response.data.name+',';
}else if(this.fileType === 'ssg'){ this.form.jdwj=this.jdwjFileList.map(item => item.response.data.id).join(",")
this.ssgFileList=fileList; this.form.jdwjName=this.jdwjFileList.map(item => item.name).join(",")
this.form.ssg += response.data.id+',';
if( this.form.ssgName=== undefined){ this.form.kwj=this.kwjFileList.map(item => item.response.data.id).join(",")
this.form.ssgName='' this.form.kwjName=this.kwjFileList.map(item => item.name).join(",")
}
this.form.ssgName += response.data.name+','; this.form.ca=this.caFileList.map(item => item.response.data.id).join(",")
}else if(this.fileType === 'zqyjg'){ this.form.caName=this.caFileList.map(item => item.name).join(",")
this.zqyjgFileList=fileList;
this.form.zqyjg += response.data.id+','; this.form.zbjbd=this.zbjbdFileList.map(item => item.response.data.id).join(",")
if( this.form.zqyjgName=== undefined){ this.form.zbjbdName=this.zbjbdFileList.map(item => item.name).join(",")
this.form.zqyjgName=''
} this.form.glwj=this.glwjFileList.map(item => item.response.data.id).join(",")
this.form.zqyjgName += response.data.name+','; this.form.glwjName=this.glwjFileList.map(item => item.name).join(",")
}else if(this.fileType === 'jdwj'){
this.jdwjFileList=fileList;
this.form.jdwj += response.data.id+',';
if( this.form.jdwjName=== undefined){
this.form.jdwjName=''
}
this.form.jdwjName += response.data.name+',';
}else if(this.fileType === 'kwj'){
this.kwjFileList=fileList;
this.form.kwj += response.data.id+',';
if( this.form.kwjName=== undefined){
this.form.kwjName=''
}
this.form.kwjName += response.data.name+',';
}else if(this.fileType === 'ca'){
this.caFileList=fileList;
this.form.ca += response.data.id+',';
if( this.form.caName=== undefined){
this.form.caName=''
}
this.form.caName += response.data.name+',';
}
}, },
handleSubmit() { handleSubmit() {
this.form.country=this.countryArr; this.form.country=this.countryArr;
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
this.fileInfoHandle();
this.isSubmit = true this.isSubmit = true
this.form.commentText = this.commentText this.form.commentText = this.commentText
this.form.approvalOpinion = this.approvalOpinion this.form.approvalOpinion = this.approvalOpinion