Commit 00d9b872 authored by 李晓兵's avatar 李晓兵

'file'

parent 07e5d012
...@@ -405,6 +405,7 @@ export default { ...@@ -405,6 +405,7 @@ export default {
if (from.fullPath === '/tab/my-info') { // 绑定查询入口 if (from.fullPath === '/tab/my-info') { // 绑定查询入口
next(vm => { next(vm => {
vm.basicInfoQuery() vm.basicInfoQuery()
vm.loadItemList()// 附件查询
vm.from = true vm.from = true
}) })
} }
...@@ -430,6 +431,24 @@ export default { ...@@ -430,6 +431,24 @@ export default {
} }
}) })
}, },
load_picture(check_id){
debugger
let vm = this
let url = process.env.basePath + 'attachment_list_query'
let param = {
check_id: check_id,
}
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)
}
})
},
async verified () { async verified () {
// let bpId = await this.saveWord() // let bpId = await this.saveWord()
// this.getBankInfo() // this.getBankInfo()
...@@ -451,6 +470,10 @@ export default { ...@@ -451,6 +470,10 @@ export default {
// vm.hlsPopup.hideLoading() // vm.hlsPopup.hideLoading()
if (res.result === 'S') { if (res.result === 'S') {
vm.cddItemList = [...res.lists] vm.cddItemList = [...res.lists]
// 查询图片
/* vm.cddItemList.forEach(item => {
vm.load_picture(item.check_id)
})*/
} }
}) })
}, },
...@@ -535,7 +558,7 @@ export default { ...@@ -535,7 +558,7 @@ export default {
let vm = this let vm = this
let obj = { let obj = {
'pkvalue': 7928, 'pkvalue': 7928,
'source_type': 'HLS_BP_MASTER', 'source_type': 'PRJ_CDD_ITEM_CHECK',
'check_id': check_id, 'check_id': check_id,
'picture': '', 'picture': '',
'filePath': '', 'filePath': '',
...@@ -567,7 +590,7 @@ export default { ...@@ -567,7 +590,7 @@ export default {
for (let i = 0; i < imgUrl.length; i++) { for (let i = 0; i < imgUrl.length; i++) {
let obj = { let obj = {
'pkvalue': 7928, 'pkvalue': 7928,
'source_type': 'HLS_BP_MASTER', 'source_type': 'PRJ_CDD_ITEM_CHECK',
'check_id': check_id, 'check_id': check_id,
'picture': '', 'picture': '',
'filePath': '', 'filePath': '',
...@@ -575,10 +598,12 @@ export default { ...@@ -575,10 +598,12 @@ export default {
'user_id':1 'user_id':1
} }
obj.picture = imgUrl[i] obj.picture = imgUrl[i]
obj.file_path = imgUrl[i] obj.filePath = imgUrl[i]
// push到上传列表中 通知前台数据发生改变 var list = []
vm.upload_list.push(obj) list.push(obj)
} }
// 拍完一张立马执行保存图片逻辑
vm.save_picture(list)
} }
let error = function () { let error = function () {
} }
......
...@@ -371,7 +371,7 @@ export default { ...@@ -371,7 +371,7 @@ export default {
*/ */
fileUploadSvc: function (file, success) { fileUploadSvc: function (file, success) {
debugger debugger
let path = file.file_path let path = file.filePath
let name = path.substr(path.lastIndexOf('/') + 1) let name = path.substr(path.lastIndexOf('/') + 1)
let url = encodeURI(process.env.rootPath + '/app/fileUploadSvc?sysName=XCMG_DEV&apiName=attachment_upload') let url = encodeURI(process.env.rootPath + '/app/fileUploadSvc?sysName=XCMG_DEV&apiName=attachment_upload')
let options = new FileUploadOptions() // eslint-disable-line let options = new FileUploadOptions() // 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