企标编写汇总节点-上传发布稿-上传两个文件后,页面只显示一个文件
This commit is contained in:
@@ -348,7 +348,8 @@ export default {
|
||||
_this: this
|
||||
}, res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
// this.$message.success(res.message)
|
||||
this.$message.success('驳回成功')
|
||||
this.$router.push('/processCenter')
|
||||
}
|
||||
this.isSubmit = false
|
||||
|
||||
@@ -1246,6 +1246,7 @@
|
||||
this.XGDFileList = list3
|
||||
this.QTWJBUSSFileList = list4
|
||||
this.GLWJBUSSFileList = list5
|
||||
console.log(fileType)
|
||||
if(fileMadel){
|
||||
this.fileType = fileType
|
||||
this.fileUpload(fileType)
|
||||
@@ -2134,42 +2135,88 @@
|
||||
// fileList = fileList.splice(0, 1)
|
||||
// }
|
||||
if (response.ok) {
|
||||
const fileObj = {}
|
||||
fileObj.id = file.response.data.id
|
||||
fileObj.name = file.response.data.name
|
||||
switch (this.fileType){
|
||||
// debugger
|
||||
for(let i = 0 ; i < fileList.length ; i++){
|
||||
const fileObj = {}
|
||||
console.log(fileList[i],'fileList[i]')
|
||||
fileObj.id = fileList[i].response ? fileList[i].response.data.id : fileList[i].id
|
||||
fileObj.name =fileList[i].response? fileList[i].response.data.name : fileList[i].name
|
||||
switch (this.fileType){
|
||||
case 'FBGBUSS':
|
||||
this.FBGBUSSFileList = this.FBGBUSSFileList.filter ( item => item.response === undefined);
|
||||
this.FBGBUSSFileList = this.FBGBUSSFileList.filter ( item => item.response === undefined);
|
||||
if(this.FBGBUSSFileList.every((item)=>item.id !== fileObj.id) && fileObj.id!==undefined){
|
||||
this.FBGBUSSFileList.push(fileObj)
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'BZSMBUSS' :
|
||||
this.BZSMBUSSFileList = this.BZSMBUSSFileList.filter ( item => item.response === undefined);
|
||||
this.BZSMBUSSFileList = this.BZSMBUSSFileList.filter ( item => item.response === undefined);
|
||||
if(this.BZSMBUSSFileList.every((item)=>item.id !== fileObj.id) && fileObj.id!==undefined)
|
||||
this.BZSMBUSSFileList.push(fileObj)
|
||||
break;
|
||||
break;
|
||||
case 'LSBBBUSS':
|
||||
this.LSBBBUSSFileList = this.LSBBBUSSFileList.filter ( item => item.response === undefined);
|
||||
this.LSBBBUSSFileList = this.LSBBBUSSFileList.filter ( item => item.response === undefined);
|
||||
if(this.LSBBBUSSFileList.every((item)=>item.id !== fileObj.id) && fileObj.id!==undefined)
|
||||
this.LSBBBUSSFileList.push(fileObj)
|
||||
break;
|
||||
break;
|
||||
case 'QTWJBUSS':
|
||||
this.QTWJBUSSFileList = this.QTWJBUSSFileList.filter ( item => item.response === undefined);
|
||||
this.QTWJBUSSFileList = this.QTWJBUSSFileList.filter ( item => item.response === undefined);
|
||||
if(this.QTWJBUSSFileList.every((item)=>item.id !== fileObj.id) && fileObj.id!==undefined)
|
||||
this.QTWJBUSSFileList.push(fileObj)
|
||||
break;
|
||||
break;
|
||||
case 'GLWJBUSS':
|
||||
this.GLWJBUSSFileList = this.GLWJBUSSFileList.filter ( item => item.response === undefined);
|
||||
this.GLWJBUSSFileList = this.GLWJBUSSFileList.filter ( item => item.response === undefined);
|
||||
if(this.GLWJBUSSFileList.every((item)=>item.id !== fileObj.id) && fileObj.id!==undefined)
|
||||
this.GLWJBUSSFileList.push(fileObj)
|
||||
break;
|
||||
break;
|
||||
case 'XGD':
|
||||
this.XGDFileList = this.XGDFileList.filter ( item => item.response === undefined);
|
||||
this.XGDFileList = this.XGDFileList.filter ( item => item.response === undefined);
|
||||
if(this.XGDFileList.every((item)=>item.id !== fileObj.id) && fileObj.id!==undefined)
|
||||
this.XGDFileList.push(fileObj)
|
||||
break;
|
||||
break;
|
||||
default : ;
|
||||
}
|
||||
}
|
||||
// }
|
||||
console.log(this.FBGBUSSFileList)
|
||||
}
|
||||
|
||||
// const fileObj = {}
|
||||
// fileObj.id = file.response.data.id
|
||||
// fileObj.name = file.response.data.name
|
||||
// console.log(fileObj.name,'fileObj.name')
|
||||
// switch (this.fileType){
|
||||
// case 'FBGBUSS':
|
||||
// this.FBGBUSSFileList = this.FBGBUSSFileList.filter ( item => item.response === undefined);
|
||||
// this.FBGBUSSFileList.push(fileObj)
|
||||
// break;
|
||||
// case 'BZSMBUSS' :
|
||||
// this.BZSMBUSSFileList = this.BZSMBUSSFileList.filter ( item => item.response === undefined);
|
||||
// this.BZSMBUSSFileList.push(fileObj)
|
||||
// break;
|
||||
// case 'LSBBBUSS':
|
||||
// this.LSBBBUSSFileList = this.LSBBBUSSFileList.filter ( item => item.response === undefined);
|
||||
// this.LSBBBUSSFileList.push(fileObj)
|
||||
// break;
|
||||
// case 'QTWJBUSS':
|
||||
// this.QTWJBUSSFileList = this.QTWJBUSSFileList.filter ( item => item.response === undefined);
|
||||
// this.QTWJBUSSFileList.push(fileObj)
|
||||
// break;
|
||||
// case 'GLWJBUSS':
|
||||
// this.GLWJBUSSFileList = this.GLWJBUSSFileList.filter ( item => item.response === undefined);
|
||||
// this.GLWJBUSSFileList.push(fileObj)
|
||||
// break;
|
||||
// case 'XGD':
|
||||
// this.XGDFileList = this.XGDFileList.filter ( item => item.response === undefined);
|
||||
// this.XGDFileList.push(fileObj)
|
||||
// break;
|
||||
// default : ;
|
||||
// }
|
||||
this.formKey++
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: response.message,
|
||||
type: 'success'
|
||||
})
|
||||
this.fileMadel = false
|
||||
}
|
||||
},
|
||||
downloadFile (data) {
|
||||
|
||||
Reference in New Issue
Block a user