标准入库流程1->添加文件名出现undefined

This commit is contained in:
zhaokaiyao@91isoft.com
2021-10-11 16:53:15 +08:00
parent a105a3e6fc
commit d4c312d982
@@ -1533,7 +1533,6 @@
watch:{ watch:{
'form.country': { 'form.country': {
handler (val) { handler (val) {
console.log(val)
if (val !== '' && val !== null && typeof (val) !== 'undefined') { if (val !== '' && val !== null && typeof (val) !== 'undefined') {
if (val instanceof Array) { if (val instanceof Array) {
this.countryArr = val.join(","); this.countryArr = val.join(",");
@@ -1727,7 +1726,7 @@
data.forEach(item => { data.forEach(item => {
this.$set(this.textStatusMap, item.value, item.label) this.$set(this.textStatusMap, item.value, item.label)
}) })
console.log(this.textStatusMap, '文本状态的值')
}, },
clearFormData(data){ clearFormData(data){
this.form = { this.form = {
@@ -1818,10 +1817,10 @@
const bringData = this.standardCheckedList[0] const bringData = this.standardCheckedList[0]
bringData.signFlag = this.form.signFlag && this.form.signFlag != '' ? this.form.signFlag : '0' bringData.signFlag = this.form.signFlag && this.form.signFlag != '' ? this.form.signFlag : '0'
bringData.standInData = this.form.standInData && this.form.standInData != '' ? this.form.standInData : '0' bringData.standInData = this.form.standInData && this.form.standInData != '' ? this.form.standInData : '0'
console.log(bringData)
const json = Object.assign(bringData, bringData.attrInfoCaseMap); const json = Object.assign(bringData, bringData.attrInfoCaseMap);
this.form = JSON.parse(JSON.stringify(json)) this.form = JSON.parse(JSON.stringify(json))
console.log(json,'AAAAAAA')
this.form.qcdw = JSON.parse(JSON.stringify(json)).qcdw && JSON.parse(JSON.stringify(json)).qcdw !== '[]' ? JSON.parse(JSON.stringify(json)).qcdw.split(',') : [] this.form.qcdw = JSON.parse(JSON.stringify(json)).qcdw && JSON.parse(JSON.stringify(json)).qcdw !== '[]' ? JSON.parse(JSON.stringify(json)).qcdw.split(',') : []
this.form.wssmr = JSON.parse(JSON.stringify(json)).wssmr && JSON.parse(JSON.stringify(json)).wssmr !== '[]' ? JSON.parse(JSON.stringify(json)).wssmr.split(',') : [] this.form.wssmr = JSON.parse(JSON.stringify(json)).wssmr && JSON.parse(JSON.stringify(json)).wssmr !== '[]' ? JSON.parse(JSON.stringify(json)).wssmr.split(',') : []
this.form.zrgcs = JSON.parse(JSON.stringify(json)).zrgcs && JSON.parse(JSON.stringify(json)).zrgcs !== '[]' ? JSON.parse(JSON.stringify(json)).zrgcs.split(',') : [] this.form.zrgcs = JSON.parse(JSON.stringify(json)).zrgcs && JSON.parse(JSON.stringify(json)).zrgcs !== '[]' ? JSON.parse(JSON.stringify(json)).zrgcs.split(',') : []
@@ -2213,7 +2212,6 @@
}, },
// 导入标准数据成功后执行 // 导入标准数据成功后执行
importFileSuccess (response, file,fileList) { importFileSuccess (response, file,fileList) {
console.log("helloFIleSuccess")
// 上传成功后判断是否是两条数据是的话替换掉旧数据 // 上传成功后判断是否是两条数据是的话替换掉旧数据
// if (fileList.length > 1) { // if (fileList.length > 1) {
// this.fileList = fileList.splice(0, 1) // this.fileList = fileList.splice(0, 1)
@@ -2224,49 +2222,81 @@
if(this.fileType === 'fbgbjbd'){ if(this.fileType === 'fbgbjbd'){
this.FBGBJBDFileList=fileList; this.FBGBJBDFileList=fileList;
this.form.fbgbjbd += response.data.id+','; this.form.fbgbjbd += response.data.id+',';
if( this.form.fbgbjbdName=== undefined){
this.form.fbgbjbdName=''
}
this.form.fbgbjbdName += response.data.name+','; this.form.fbgbjbdName += response.data.name+',';
}else if(this.fileType === 'xgd'){ }else if(this.fileType === 'xgd'){
this.xgdFileList=fileList; this.xgdFileList=fileList;
this.form.xgd += response.data.id+','; this.form.xgd += response.data.id+',';
if( this.form.xgdName=== undefined){
this.form.xgdName=''
}
this.form.xgdName += response.data.name+','; this.form.xgdName += response.data.name+',';
}else if(this.fileType === 'bpg'){ }else if(this.fileType === 'bpg'){
this.bpgFileList=fileList; this.bpgFileList=fileList;
this.form.bpg += response.data.id+','; this.form.bpg += response.data.id+',';
if( this.form.bpgName=== undefined){
this.form.bpgName=''
}
this.form.bpgName += response.data.name+','; this.form.bpgName += response.data.name+',';
}else if(this.fileType === 'ssg'){ }else if(this.fileType === 'ssg'){
this.ssgFileList=fileList; this.ssgFileList=fileList;
this.form.ssg += response.data.id+','; this.form.ssg += response.data.id+',';
if( this.form.ssgName=== undefined){
this.form.ssgName=''
}
this.form.ssgName += response.data.name+','; this.form.ssgName += response.data.name+',';
}else if(this.fileType === 'zqyjg'){ }else if(this.fileType === 'zqyjg'){
this.zqyjgFileList=fileList; this.zqyjgFileList=fileList;
this.form.zqyjg += response.data.id+','; this.form.zqyjg += response.data.id+',';
if( this.form.zqyjgName=== undefined){
this.form.zqyjgName=''
}
this.form.zqyjgName += response.data.name+','; this.form.zqyjgName += response.data.name+',';
}else if(this.fileType === 'jdwj'){ }else if(this.fileType === 'jdwj'){
this.jdwjFileList=fileList; this.jdwjFileList=fileList;
this.form.jdwj += response.data.id+','; this.form.jdwj += response.data.id+',';
if( this.form.jdwjName=== undefined){
this.form.jdwjName=''
}
this.form.jdwjName += response.data.name+','; this.form.jdwjName += response.data.name+',';
}else if(this.fileType === 'kwj'){ }else if(this.fileType === 'kwj'){
this.kwjFileList=fileList; this.kwjFileList=fileList;
this.form.kwj += response.data.id+','; this.form.kwj += response.data.id+',';
if( this.form.kwjName=== undefined){
this.form.kwjName=''
}
this.form.kwjName += response.data.name+','; this.form.kwjName += response.data.name+',';
}else if(this.fileType === 'xgd'){ }
this.xgdFileList=fileList; // else if(this.fileType === 'xgd'){
this.form.xgd += response.data.id+','; // this.xgdFileList=fileList;
this.form.xgdName += response.data.name+','; // this.form.xgd += response.data.id+',';
}else if(this.fileType === 'glwj'){ // this.form.xgdName += response.data.name+',';
// }
else if(this.fileType === 'glwj'){
this.qlwjFileList=fileList; this.qlwjFileList=fileList;
this.form.glwj += response.data.id+','; this.form.glwj += response.data.id+',';
if( this.form.glwjName=== undefined){
this.form.glwjName=''
}
this.form.glwjName += response.data.name+','; this.form.glwjName += response.data.name+',';
}else if(this.fileType === 'ca'){ }else if(this.fileType === 'ca'){
this.caFileList=fileList; this.caFileList=fileList;
this.form.ca += response.data.id+','; this.form.ca += response.data.id+',';
if( this.form.caName=== undefined){
this.form.caName=''
}
this.form.caName += response.data.name+','; this.form.caName += response.data.name+',';
}else if(this.fileType === 'zbjbd'){ }else if(this.fileType === 'zbjbd'){
this.zbjbdFileList=fileList; this.zbjbdFileList=fileList;
this.form.zbjbd += response.data.id+','; this.form.zbjbd += response.data.id+',';
if( this.form.zbjbdName=== undefined){
this.form.zbjbdName=''
}
this.form.zbjbdName += response.data.name+','; this.form.zbjbdName += response.data.name+',';
} }
this.$message({ this.$message({
showClose: true, showClose: true,
message: response.message, message: response.message,
type: 'success' type: 'success'
@@ -2299,7 +2329,6 @@
}else if (type==='glwj'){ }else if (type==='glwj'){
this.fileList=this.qlwjFileList; this.fileList=this.qlwjFileList;
} }
this.fileMadel = true; this.fileMadel = true;
}, },
@@ -2312,7 +2341,7 @@
} }
this.modalShowFlag1 = false this.modalShowFlag1 = false
} }
}, },
popoverHideCancel(){ popoverHideCancel(){
this.modalShowFlag1 = false this.modalShowFlag1 = false
@@ -2328,7 +2357,7 @@
} }
this.modalShowFlag2 = false this.modalShowFlag2 = false
} }
}, },
popoverHideBusVsCancel(){ popoverHideBusVsCancel(){
this.modalShowFlag2 = false this.modalShowFlag2 = false
@@ -2360,7 +2389,7 @@
} }
this.modalShowFlag4 = false this.modalShowFlag4 = false
} }
}, },
popoverHideModelCancel(){ popoverHideModelCancel(){
this.modalShowFlag4 = false this.modalShowFlag4 = false
@@ -2407,7 +2436,6 @@
roleForm: this.roleForm, roleForm: this.roleForm,
commentText: this.commentText commentText: this.commentText
})) }))
console.log(_formData, '参数')
saveTaskFirst(_formData).then(res => { saveTaskFirst(_formData).then(res => {
this.saveLoading = false this.saveLoading = false
this.$message.success('保存成功') this.$message.success('保存成功')