Commit 7c93d14b authored by 李晓兵's avatar 李晓兵

'身份证上传'

parent 17102c61
......@@ -447,9 +447,7 @@ export default {
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
console.log('%%%%%%%%%%%%' + res)
if (res.result === 'S') {
console.log('**********' + res.lists)
} else {
hlsPopup.showLongCenter(res.message)
}
......@@ -498,13 +496,14 @@ export default {
var list = []
for (let i = 0; i < vm.idCardImgList.length; i++) {
let obj = {
'pkvalue': vm.idCardImgList[0].check_id,
'pkvalue': vm.idCardCheck_id,
'source_type': 'PRJ_CDD_ITEM_CHECK',
'picture': '',
'check_id': vm.idCardImgList[0].check_id,
'filePath': vm.idCardImgList[i],
'check_id': vm.idCardCheck_id,
'filePath': vm.idCardImgList[i].url,
'attachment_id': '',
'user_id': 1,
'fileName': vm.idCardImgList[i].fileName,
}
list.push(obj)
}
......@@ -600,6 +599,7 @@ export default {
'filePath': '',
'attachment_id': '',
'user_id': 1,
'fileName': '',
}
let cameraoptions = {
quality: 100,
......@@ -631,6 +631,7 @@ export default {
'filePath': '',
'attachment_id': '',
'user_id': 1,
'fileName': '',
}
obj.picture = imgUrl[i]
obj.filePath = imgUrl[i]
......@@ -745,7 +746,7 @@ export default {
} else {
if (ocrType === 'idCard') {
vm.idCardEditFlag = true // 身份证图片状态已修改
type === 'front' ? (vm.idCardFront = imgdata, vm.idCardIdentify(imgdata), vm.idCardImgList.push(imgdata)) : (vm.idCardBack = imgdata, vm.idCardImgList.push(imgdata))
type === 'front' ? (vm.idCardFront = imgdata, vm.idCardIdentify(imgdata), vm.idCardImgList.push({'url':imgdata,'fileName':'front'})) : (vm.idCardBack = imgdata, vm.idCardImgList.push({'url':imgdata,'fileName':'back'}))
} else if (ocrType === 'bankCard') {
vm.bankImg = imgdata
vm.bankCardIdentify(imgdata)
......@@ -771,7 +772,7 @@ export default {
} else {
if (ocrType === 'idCard') {
vm.idCardEditFlag = true // 身份证图片状态已修改
type === 'front' ? (vm.idCardFront = imgUrl[0], vm.idCardIdentify(imgUrl[0]), vm.idCardImgList.push(imgUrl[0])) : (vm.idCardBack = imgUrl[0], vm.idCardImgList.push(imgUrl[0]))
type === 'front' ? (vm.idCardFront = imgUrl[0], vm.idCardIdentify(imgUrl[0]), vm.idCardImgList.push({'url':imgUrl[0],'fileName':'front'})) : (vm.idCardBack = imgUrl[0], vm.idCardImgList.push({'url':imgUrl[0],'fileName':'back'}))
} else if (ocrType === 'bankCard') {
vm.bankImg = imgUrl[0]
vm.bankCardIdentify(imgUrl[0])
......
......@@ -1306,6 +1306,7 @@ export default {
'filePath': '',
'attachment_id': '',
'user_id': 1,
'fileName': '',
}
let cameraoptions = {
quality: 100,
......@@ -1339,6 +1340,7 @@ export default {
'filePath': '',
'attachment_id': '',
'user_id': 1,
'fileName': '',
}
obj.picture = imgUrl[i]
obj.filePath = imgUrl[i]
......
......@@ -372,7 +372,7 @@ export default {
fileUploadSvc: function (file, success) {
debugger
let path = file.filePath
let name = path.substr(path.lastIndexOf('/') + 1)
var name = path.substr(path.lastIndexOf('/') + 1)
let url = encodeURI(process.env.rootPath + '/app/fileUploadSvc?sysName=XCMG_DEV&apiName=attachment_upload')
let options = new FileUploadOptions() // eslint-disable-line
options.fileKey = 'file'
......@@ -387,7 +387,12 @@ export default {
'access_token': window.localStorage.access_token,
'filePath': path,
}
options.fileName = name
if(file.fileName){
options.fileName = file.fileName + name.split('.')[1]
}
else{
options.fileName = name
}
options.mimeType = 'multipart/form-date'
let ft = new FileTransfer() // eslint-disable-line
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment