mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-20 20:06:44 +08:00
Merge branch 'hotfix/bug_回归测试问题及优化' into dev
This commit is contained in:
@@ -580,22 +580,30 @@ export default {
|
|||||||
}).then(() => {
|
}).then(() => {
|
||||||
if (detail.name == 'fileListIdFront') {
|
if (detail.name == 'fileListIdFront') {
|
||||||
this.fileListIdFront = []
|
this.fileListIdFront = []
|
||||||
|
this.deleteImg(file, 'fileListIdFront')
|
||||||
} else if (detail.name == 'fileListIdBack') {
|
} else if (detail.name == 'fileListIdBack') {
|
||||||
this.fileListIdBack = []
|
this.fileListIdBack = []
|
||||||
|
this.deleteImg(file, 'fileListIdBack')
|
||||||
} else if (detail.name == 'fileLIstImg') {
|
} else if (detail.name == 'fileLIstImg') {
|
||||||
this.fileLIstImg = []
|
this.fileLIstImg = []
|
||||||
|
this.deleteImg(file, 'fileLIstImg')
|
||||||
} else if (detail.name == 'fileListBank') {
|
} else if (detail.name == 'fileListBank') {
|
||||||
this.fileListBank = []
|
this.fileListBank = []
|
||||||
|
this.deleteImg(file, 'fileListBank')
|
||||||
// } else if (detail.name == 'fileListBankBack') {
|
// } else if (detail.name == 'fileListBankBack') {
|
||||||
// this.fileListBankBack = []
|
// this.fileListBankBack = []
|
||||||
} else if (detail.name == 'fileListIdFrontInsured') {
|
} else if (detail.name == 'fileListIdFrontInsured') {
|
||||||
this.fileListIdFrontInsured = []
|
this.fileListIdFrontInsured = []
|
||||||
|
this.deleteImg(file, 'fileListIdFrontInsured')
|
||||||
} else if (detail.name == 'fileListIdBackInsured') {
|
} else if (detail.name == 'fileListIdBackInsured') {
|
||||||
this.fileListIdBackInsured = []
|
this.fileListIdBackInsured = []
|
||||||
|
this.deleteImg(file, 'fileListIdBackInsured')
|
||||||
} else if (detail.name == 'fileListBankInsured') {
|
} else if (detail.name == 'fileListBankInsured') {
|
||||||
this.fileListBankInsured = []
|
this.fileListBankInsured = []
|
||||||
|
this.deleteImg(file, 'fileListBankInsured')
|
||||||
} else if (detail.name == 'fileLIstImgInsured') {
|
} else if (detail.name == 'fileLIstImgInsured') {
|
||||||
this.fileLIstImgInsured = []
|
this.fileLIstImgInsured = []
|
||||||
|
this.deleteImg(file, 'fileLIstImgInsured')
|
||||||
// } else if (detail.name == 'fileListOtherOne') {
|
// } else if (detail.name == 'fileListOtherOne') {
|
||||||
// this.fileListOtherOne = []
|
// this.fileListOtherOne = []
|
||||||
// } else if (detail.name == 'fileListOtherTwo') {
|
// } else if (detail.name == 'fileListOtherTwo') {
|
||||||
@@ -604,8 +612,10 @@ export default {
|
|||||||
// this.fileListOtherThree = []
|
// this.fileListOtherThree = []
|
||||||
} else if (detail.name == 'saleInsuredInfoOther') {
|
} else if (detail.name == 'saleInsuredInfoOther') {
|
||||||
this.saleInsuredInfoOther = []
|
this.saleInsuredInfoOther = []
|
||||||
|
this.deleteImg(file, 'saleInsuredInfoOther')
|
||||||
} else if (detail.name == 'saleInsuredPersonInfoOther') {
|
} else if (detail.name == 'saleInsuredPersonInfoOther') {
|
||||||
this.saleInsuredPersonInfoOther = []
|
this.saleInsuredPersonInfoOther = []
|
||||||
|
this.deleteImg(file, 'saleInsuredPersonInfoOther')
|
||||||
// } else if (detail.name == 'fileListtypebeneficiary') {
|
// } else if (detail.name == 'fileListtypebeneficiary') {
|
||||||
// that.fileListtypebeneficiary.map((item, index, array) => {
|
// that.fileListtypebeneficiary.map((item, index, array) => {
|
||||||
// if (item.content == file.content) {
|
// if (item.content == file.content) {
|
||||||
@@ -615,7 +625,6 @@ export default {
|
|||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
}
|
}
|
||||||
this.deleteImg(file)
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
test(type, id) {
|
test(type, id) {
|
||||||
@@ -663,12 +672,15 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 删除图片
|
// 删除图片
|
||||||
deleteImg(file) {
|
deleteImg(file, nameList) {
|
||||||
let that = this
|
let that = this
|
||||||
that.list.map((item, index, array) => {
|
that.list.map((item, index, array) => {
|
||||||
if (item.fileName.indexOf(file.file.name) == -1) {
|
// if (item.fileName.indexOf(file.file.name) == -1) {
|
||||||
return
|
// return
|
||||||
} else {
|
// } else {
|
||||||
|
// array.splice(index, 1)
|
||||||
|
// }
|
||||||
|
if (item.fileName == file.name && nameList == item.name) {
|
||||||
array.splice(index, 1)
|
array.splice(index, 1)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -679,6 +691,7 @@ export default {
|
|||||||
// 此时可以自行将文件上传至服务器
|
// 此时可以自行将文件上传至服务器
|
||||||
that.file = file.content
|
that.file = file.content
|
||||||
that.imgName = Math.floor(Math.random() * 100).toString() + new Date().getTime() + file.file.name //为图片名加随机数 与时间戳
|
that.imgName = Math.floor(Math.random() * 100).toString() + new Date().getTime() + file.file.name //为图片名加随机数 与时间戳
|
||||||
|
file.name = that.imgName
|
||||||
that.uploadImg()
|
that.uploadImg()
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -708,8 +721,6 @@ export default {
|
|||||||
message: '加载中……'
|
message: '加载中……'
|
||||||
})
|
})
|
||||||
let formdata = new FormData()
|
let formdata = new FormData()
|
||||||
console.log('file-----------------', that.file)
|
|
||||||
console.log('name-----------------', that.imgName)
|
|
||||||
formdata.append('imgPath', that.dataURLtoFile(that.file, that.imgName))
|
formdata.append('imgPath', that.dataURLtoFile(that.file, that.imgName))
|
||||||
uploadImg(formdata).then(res => {
|
uploadImg(formdata).then(res => {
|
||||||
// console.log(res)
|
// console.log(res)
|
||||||
@@ -728,6 +739,7 @@ export default {
|
|||||||
// console.log(that.file)
|
// console.log(that.file)
|
||||||
// 证件类型
|
// 证件类型
|
||||||
let imageInfoType = ''
|
let imageInfoType = ''
|
||||||
|
let name = ''
|
||||||
// if (that.type == 'fileListIdFront' && that.id == '1') {
|
// if (that.type == 'fileListIdFront' && that.id == '1') {
|
||||||
// imageInfoType = '1'
|
// imageInfoType = '1'
|
||||||
// } else if (that.type == 'fileListIdBack' && that.id == '1') {
|
// } else if (that.type == 'fileListIdBack' && that.id == '1') {
|
||||||
@@ -751,57 +763,74 @@ export default {
|
|||||||
// }
|
// }
|
||||||
if (that.type == 'fileListIdFront' && that.id == '1') {
|
if (that.type == 'fileListIdFront' && that.id == '1') {
|
||||||
//身份证正面
|
//身份证正面
|
||||||
|
name = 'fileListIdFront'
|
||||||
imageInfoType = '1'
|
imageInfoType = '1'
|
||||||
} else if (that.type == 'fileListIdBack' && that.id == '1') {
|
} else if (that.type == 'fileListIdBack' && that.id == '1') {
|
||||||
//身份证反面
|
//身份证反面
|
||||||
|
name = 'fileListIdBack'
|
||||||
imageInfoType = '2'
|
imageInfoType = '2'
|
||||||
} else if (that.type == 'fileListIdFront' && that.id == '2') {
|
} else if (that.type == 'fileListIdFront' && that.id == '2') {
|
||||||
//户口本正面
|
//户口本正面
|
||||||
|
name = 'fileListIdFront'
|
||||||
imageInfoType = '5'
|
imageInfoType = '5'
|
||||||
} else if (that.type == 'fileListIdBack' && that.id == '2') {
|
} else if (that.type == 'fileListIdBack' && that.id == '2') {
|
||||||
//户口本反面
|
//户口本反面
|
||||||
|
name = 'fileListIdBack'
|
||||||
imageInfoType = '6'
|
imageInfoType = '6'
|
||||||
} else if (that.type == 'fileListIdFront' && that.id == '3') {
|
} else if (that.type == 'fileListIdFront' && that.id == '3') {
|
||||||
//出生证正面
|
//出生证正面
|
||||||
|
name = 'fileListIdFront'
|
||||||
imageInfoType = '7'
|
imageInfoType = '7'
|
||||||
} else if (that.type == 'fileListIdBack' && that.id == '3') {
|
} else if (that.type == 'fileListIdBack' && that.id == '3') {
|
||||||
//出生证反面
|
//出生证反面
|
||||||
|
name = 'fileListIdBack'
|
||||||
imageInfoType = '12'
|
imageInfoType = '12'
|
||||||
} else if (that.type == 'fileLIstImg' && that.id == '4') {
|
} else if (that.type == 'fileLIstImg' && that.id == '4') {
|
||||||
//护照面
|
//护照面
|
||||||
|
name = 'fileLIstImg'
|
||||||
imageInfoType = '8'
|
imageInfoType = '8'
|
||||||
} else if (that.type == 'fileListIdFront' && that.id == '5') {
|
} else if (that.type == 'fileListIdFront' && that.id == '5') {
|
||||||
//港澳居民来往内地通行证正面
|
//港澳居民来往内地通行证正面
|
||||||
|
name = 'fileListIdFront'
|
||||||
imageInfoType = '9'
|
imageInfoType = '9'
|
||||||
} else if (that.type == 'fileListIdBack' && that.id == '5') {
|
} else if (that.type == 'fileListIdBack' && that.id == '5') {
|
||||||
//港澳居民来往内地通行证反面
|
//港澳居民来往内地通行证反面
|
||||||
|
name = 'fileListIdBack'
|
||||||
imageInfoType = '13'
|
imageInfoType = '13'
|
||||||
} else if (that.type == 'fileListIdFront' && that.id == '6') {
|
} else if (that.type == 'fileListIdFront' && that.id == '6') {
|
||||||
//台湾居民来往大陆通行证正面
|
//台湾居民来往大陆通行证正面
|
||||||
|
name = 'fileListIdFront'
|
||||||
imageInfoType = '10'
|
imageInfoType = '10'
|
||||||
} else if (that.type == 'fileListIdBack' && that.id == '6') {
|
} else if (that.type == 'fileListIdBack' && that.id == '6') {
|
||||||
//台湾居民来往大陆通行证反面
|
//台湾居民来往大陆通行证反面
|
||||||
|
name = 'fileListIdBack'
|
||||||
imageInfoType = '14'
|
imageInfoType = '14'
|
||||||
} else if (that.type == 'fileListIdFront' && that.id == '8') {
|
} else if (that.type == 'fileListIdFront' && that.id == '8') {
|
||||||
//外国人永久居留身份证正面
|
//外国人永久居留身份证正面
|
||||||
|
name = 'fileListIdFront'
|
||||||
imageInfoType = '15'
|
imageInfoType = '15'
|
||||||
} else if (that.type == 'fileListIdBack' && that.id == '8') {
|
} else if (that.type == 'fileListIdBack' && that.id == '8') {
|
||||||
//外国人永久居留身份证反面
|
//外国人永久居留身份证反面
|
||||||
|
name = 'fileListIdBack'
|
||||||
imageInfoType = '16'
|
imageInfoType = '16'
|
||||||
} else if (that.type == 'fileListIdFront' && that.id == '9') {
|
} else if (that.type == 'fileListIdFront' && that.id == '9') {
|
||||||
//港澳台居民居住证正面
|
//港澳台居民居住证正面
|
||||||
|
name = 'fileListIdFront'
|
||||||
imageInfoType = '17'
|
imageInfoType = '17'
|
||||||
} else if (that.type == 'fileListIdBack' && that.id == '9') {
|
} else if (that.type == 'fileListIdBack' && that.id == '9') {
|
||||||
//港澳台居民居住证反面
|
//港澳台居民居住证反面
|
||||||
|
name = 'fileListIdBack'
|
||||||
imageInfoType = '18'
|
imageInfoType = '18'
|
||||||
} else if (that.type == 'fileListBank') {
|
} else if (that.type == 'fileListBank') {
|
||||||
//银行卡正面
|
//银行卡正面
|
||||||
|
name = 'fileListBank'
|
||||||
imageInfoType = '3'
|
imageInfoType = '3'
|
||||||
// } else if (that.type == 'fileListBankBack') {
|
// } else if (that.type == 'fileListBankBack') {
|
||||||
// //银行卡反面
|
// //银行卡反面
|
||||||
// imageInfoType = '19'
|
// imageInfoType = '19'
|
||||||
}
|
}
|
||||||
let obj = {
|
let obj = {
|
||||||
|
name: name,
|
||||||
businessNo: that.orderNo,
|
businessNo: that.orderNo,
|
||||||
businessType: '',
|
businessType: '',
|
||||||
imageInfoType: imageInfoType,
|
imageInfoType: imageInfoType,
|
||||||
@@ -811,8 +840,6 @@ export default {
|
|||||||
subBusinessNo: that.saleInsuredInfo.appntId,
|
subBusinessNo: that.saleInsuredInfo.appntId,
|
||||||
fileName: that.imgName
|
fileName: that.imgName
|
||||||
}
|
}
|
||||||
// window.localStorage.setItem('obj', JSON.stringify(obj))
|
|
||||||
// that.list.push(JSON.parse(window.localStorage.getItem('obj')))
|
|
||||||
that.list.push(obj)
|
that.list.push(obj)
|
||||||
} else if (
|
} else if (
|
||||||
that.type == 'fileListIdFrontInsured' ||
|
that.type == 'fileListIdFrontInsured' ||
|
||||||
@@ -825,40 +852,57 @@ export default {
|
|||||||
// 证件类型
|
// 证件类型
|
||||||
|
|
||||||
let imageInfoType = ''
|
let imageInfoType = ''
|
||||||
|
let name = ''
|
||||||
|
|
||||||
if (that.type == 'fileListIdFrontInsured' && that.id == '1') {
|
if (that.type == 'fileListIdFrontInsured' && that.id == '1') {
|
||||||
|
name = 'fileListIdFrontInsured'
|
||||||
imageInfoType = '1'
|
imageInfoType = '1'
|
||||||
} else if (that.type == 'fileListIdBackInsured' && that.id == '1') {
|
} else if (that.type == 'fileListIdBackInsured' && that.id == '1') {
|
||||||
|
name = 'fileListIdBackInsured'
|
||||||
imageInfoType = '2'
|
imageInfoType = '2'
|
||||||
} else if (that.type == 'fileListIdFrontInsured' && that.id == '2') {
|
} else if (that.type == 'fileListIdFrontInsured' && that.id == '2') {
|
||||||
|
name = 'fileListIdFrontInsured'
|
||||||
imageInfoType = '5'
|
imageInfoType = '5'
|
||||||
} else if (that.type == 'fileListIdBackInsured' && that.id == '2') {
|
} else if (that.type == 'fileListIdBackInsured' && that.id == '2') {
|
||||||
|
name = 'fileListIdBackInsured'
|
||||||
imageInfoType = '6'
|
imageInfoType = '6'
|
||||||
} else if (that.type == 'fileListIdFrontInsured' && that.id == '3') {
|
} else if (that.type == 'fileListIdFrontInsured' && that.id == '3') {
|
||||||
|
name = 'fileListIdFrontInsured'
|
||||||
imageInfoType = '7'
|
imageInfoType = '7'
|
||||||
} else if (that.type == 'fileListIdBackInsured' && that.id == '3') {
|
} else if (that.type == 'fileListIdBackInsured' && that.id == '3') {
|
||||||
|
name = 'fileListIdBackInsured'
|
||||||
imageInfoType = '12'
|
imageInfoType = '12'
|
||||||
} else if (that.type == 'fileLIstImgInsured' && that.id == '4') {
|
} else if (that.type == 'fileLIstImgInsured' && that.id == '4') {
|
||||||
|
name = 'fileLIstImgInsured'
|
||||||
imageInfoType = '8'
|
imageInfoType = '8'
|
||||||
} else if (that.type == 'fileListIdFrontInsured' && that.id == '5') {
|
} else if (that.type == 'fileListIdFrontInsured' && that.id == '5') {
|
||||||
|
name = 'fileListIdFrontInsured'
|
||||||
imageInfoType = '9'
|
imageInfoType = '9'
|
||||||
} else if (that.type == 'fileListIdBackInsured' && that.id == '5') {
|
} else if (that.type == 'fileListIdBackInsured' && that.id == '5') {
|
||||||
|
name = 'fileListIdBackInsured'
|
||||||
imageInfoType = '13'
|
imageInfoType = '13'
|
||||||
} else if (that.type == 'fileListIdFrontInsured' && that.id == '6') {
|
} else if (that.type == 'fileListIdFrontInsured' && that.id == '6') {
|
||||||
|
name = 'fileListIdFrontInsured'
|
||||||
imageInfoType = '10'
|
imageInfoType = '10'
|
||||||
} else if (that.type == 'fileListIdBackInsured' && that.id == '6') {
|
} else if (that.type == 'fileListIdBackInsured' && that.id == '6') {
|
||||||
|
name = 'fileListIdBackInsured'
|
||||||
imageInfoType = '14'
|
imageInfoType = '14'
|
||||||
} else if (that.type == 'fileListIdFrontInsured' && that.id == '8') {
|
} else if (that.type == 'fileListIdFrontInsured' && that.id == '8') {
|
||||||
|
name = 'fileListIdFrontInsured'
|
||||||
imageInfoType = '15'
|
imageInfoType = '15'
|
||||||
} else if (that.type == 'fileListIdBackInsured' && that.id == '8') {
|
} else if (that.type == 'fileListIdBackInsured' && that.id == '8') {
|
||||||
|
name = 'fileListIdBackInsured'
|
||||||
imageInfoType = '16'
|
imageInfoType = '16'
|
||||||
} else if (that.type == 'fileListIdFrontInsured' && that.id == '9') {
|
} else if (that.type == 'fileListIdFrontInsured' && that.id == '9') {
|
||||||
|
name = 'fileListIdFrontInsured'
|
||||||
imageInfoType = '17'
|
imageInfoType = '17'
|
||||||
} else if (that.type == 'fileListIdBackInsured' && that.id == '9') {
|
} else if (that.type == 'fileListIdBackInsured' && that.id == '9') {
|
||||||
|
name = 'fileListIdBackInsured'
|
||||||
imageInfoType = '18'
|
imageInfoType = '18'
|
||||||
}
|
}
|
||||||
|
|
||||||
let obj = {
|
let obj = {
|
||||||
|
name: name,
|
||||||
businessNo: that.orderNo,
|
businessNo: that.orderNo,
|
||||||
businessType: '',
|
businessType: '',
|
||||||
imageInfoType: imageInfoType,
|
imageInfoType: imageInfoType,
|
||||||
@@ -872,9 +916,11 @@ export default {
|
|||||||
} else if (that.type == 'fileListOther') {
|
} else if (that.type == 'fileListOther') {
|
||||||
// 是其他
|
// 是其他
|
||||||
let type = '2'
|
let type = '2'
|
||||||
|
let name = 'fileListOther'
|
||||||
let obj = {
|
let obj = {
|
||||||
|
name: name,
|
||||||
businessNo: that.orderNo,
|
businessNo: that.orderNo,
|
||||||
businessType: '',
|
businessType: name,
|
||||||
imageInfoType: '11',
|
imageInfoType: '11',
|
||||||
rgssUrl: encodeURI(res.path).replace(/\+/g, '%2B'),
|
rgssUrl: encodeURI(res.path).replace(/\+/g, '%2B'),
|
||||||
subBusinessType: type,
|
subBusinessType: type,
|
||||||
@@ -980,6 +1026,9 @@ export default {
|
|||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
// delete that.list.fileName
|
// delete that.list.fileName
|
||||||
|
that.list.map(i => {
|
||||||
|
delete i.name
|
||||||
|
})
|
||||||
let data = {
|
let data = {
|
||||||
orderDTO: {
|
orderDTO: {
|
||||||
orderInfoDTO: {
|
orderInfoDTO: {
|
||||||
|
|||||||
Reference in New Issue
Block a user