Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-xcmg-vue-app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xugong
hls-xcmg-vue-app
Commits
328a7445
Commit
328a7445
authored
Oct 18, 2019
by
李晓兵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'法人身份证上传'
parent
f178653a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
250 additions
and
71 deletions
+250
-71
naturePerson.vue
src/pages/userBind/np/naturePerson.vue
+74
-32
enterprise.vue
src/pages/userBind/org/enterprise.vue
+158
-37
hlsPopup.js
src/scripts/hlsPopup.js
+18
-2
No files found.
src/pages/userBind/np/naturePerson.vue
View file @
328a7445
...
@@ -53,6 +53,9 @@
...
@@ -53,6 +53,9 @@
<div
v-if=
"idCardFront && !isApproved"
@
click=
"ocrShow('idCard', 'front')"
>
<div
v-if=
"idCardFront && !isApproved"
@
click=
"ocrShow('idCard', 'front')"
>
<img
:src=
"idCardFront"
style=
"width: 100%;height: 100%;margin: 0"
>
<img
:src=
"idCardFront"
style=
"width: 100%;height: 100%;margin: 0"
>
</div>
</div>
<div
v-if=
"idCardFront && isApproved"
>
<img
:src=
"idCardFront"
style=
"width: 100%;height: 100%;margin: 0"
@
click=
"showBigPicture(idCardFront)"
>
</div>
<div
v-if=
"!idCardBack"
@
click=
"ocrShow('idCard', 'back')"
>
<div
v-if=
"!idCardBack"
@
click=
"ocrShow('idCard', 'back')"
>
<img
src=
"@/assets/userBind/back.png"
>
<img
src=
"@/assets/userBind/back.png"
>
<p>
反面
</p>
<p>
反面
</p>
...
@@ -60,6 +63,9 @@
...
@@ -60,6 +63,9 @@
<div
v-if=
"idCardBack && !isApproved"
@
click=
"ocrShow('idCard', 'back')"
>
<div
v-if=
"idCardBack && !isApproved"
@
click=
"ocrShow('idCard', 'back')"
>
<img
:src=
"idCardBack"
style=
"width: 100%;height: 100%;margin: 0"
>
<img
:src=
"idCardBack"
style=
"width: 100%;height: 100%;margin: 0"
>
</div>
</div>
<div
v-if=
"idCardBack && isApproved"
>
<img
:src=
"idCardBack"
style=
"width: 100%;height: 100%;margin: 0"
@
click=
"showBigPicture(idCardBack)"
>
</div>
</div>
</div>
</div>
</div>
<list-item
:item-height=
"44"
class=
"second-part"
>
<list-item
:item-height=
"44"
class=
"second-part"
>
...
@@ -199,15 +205,15 @@
...
@@ -199,15 +205,15 @@
<div
class=
"img-content"
>
<div
class=
"img-content"
>
<!--待上传图片列表-->
<!--待上传图片列表-->
<div
v-for=
"(item, index) in upload_list"
v-if=
"item.check_id==list.check_id"
:key=
"index"
class=
"card-upload"
>
<div
v-for=
"(item, index) in upload_list"
v-if=
"item.check_id==list.check_id"
:key=
"index"
class=
"card-upload"
>
<img
:src=
"item.picture"
>
<img
:src=
"item.picture"
@
click=
"showBigPicture(item.picture)"
>
<div
class=
"close"
@
click=
"
delete_pic(item.attachment_id
)"
>
<div
class=
"close"
@
click=
"
remove_pic(item.attachment_id,index
)"
>
<img
src=
"@/assets/userBind/deleteIcon.png"
>
<img
src=
"@/assets/userBind/deleteIcon.png"
>
</div>
</div>
</div>
</div>
<!--从服务器上下载的图片-->
<!--从服务器上下载的图片-->
<div
v-for=
"item in dowload_list"
>
<div
v-for=
"item in dowload_list"
>
<div
v-for=
"(pic, index) in item"
v-if=
"pic.check_id==list.check_id"
:key=
"index"
class=
"card-upload"
>
<div
v-for=
"(pic, index) in item"
v-if=
"pic.check_id==list.check_id"
:key=
"index"
class=
"card-upload"
>
<img
:src=
"pic.url"
>
<img
:src=
"pic.url"
@
click=
"showBigPicture(pic.url)"
>
<div
class=
"close"
@
click=
"delete_pic(pic.attachment_id)"
>
<div
class=
"close"
@
click=
"delete_pic(pic.attachment_id)"
>
<img
src=
"@/assets/userBind/deleteIcon.png"
>
<img
src=
"@/assets/userBind/deleteIcon.png"
>
</div>
</div>
...
@@ -368,9 +374,7 @@ export default {
...
@@ -368,9 +374,7 @@ export default {
bankImg
:
''
,
// 银行卡图片
bankImg
:
''
,
// 银行卡图片
cddItemList
:
[],
// 资料清单列表
cddItemList
:
[],
// 资料清单列表
idCardCheck_id
:
''
,
// 身份证check_id
idCardCheck_id
:
''
,
// 身份证check_id
bankCardCheck_id
:
''
,
// 银行卡check_id
idCardImgList
:
[],
// 存身份证图片列表
idCardImgList
:
[],
// 存身份证图片列表
bankCardImgList
:
[],
// 存上传银行卡图片列表
idCardEditFlag
:
false
,
// 身份证修改标识,为true则标识已修改,后续需要重新上传此照片
idCardEditFlag
:
false
,
// 身份证修改标识,为true则标识已修改,后续需要重新上传此照片
}
}
},
},
...
@@ -454,7 +458,7 @@ export default {
...
@@ -454,7 +458,7 @@ export default {
}
}
})
})
},
},
load_picture
(
check_id
,
index
)
{
load_picture
(
check_id
,
index
,
cdd_item
)
{
let
vm
=
this
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'attachment_list_query'
+
'&index'
+
index
// 附件查询
let
url
=
process
.
env
.
basePath
+
'attachment_list_query'
+
'&index'
+
index
// 附件查询
let
param
=
{
let
param
=
{
...
@@ -467,7 +471,14 @@ export default {
...
@@ -467,7 +471,14 @@ export default {
res
.
lists
.
forEach
(
item
=>
{
res
.
lists
.
forEach
(
item
=>
{
item
[
'url'
]
=
process
.
env
.
filePath
+
'attachment_id='
+
item
.
attachment_id
+
'&access_token='
+
window
.
localStorage
.
access_token
item
[
'url'
]
=
process
.
env
.
filePath
+
'attachment_id='
+
item
.
attachment_id
+
'&access_token='
+
window
.
localStorage
.
access_token
})
})
vm
.
dowload_list
.
push
(
res
.
lists
)
switch
(
cdd_item
)
{
case
'NP_ID_CARD'
:
vm
.
idCardBack
=
res
.
lists
[
0
].
url
vm
.
idCardFront
=
res
.
lists
[
1
].
url
break
default
:
vm
.
dowload_list
.
push
(
res
.
lists
)
}
}
else
{
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
hlsPopup
.
showLongCenter
(
res
.
message
)
}
}
...
@@ -502,16 +513,13 @@ export default {
...
@@ -502,16 +513,13 @@ export default {
case
'NP_ID_CARD'
:
case
'NP_ID_CARD'
:
vm
.
idCardCheck_id
=
item
.
check_id
vm
.
idCardCheck_id
=
item
.
check_id
break
break
case
'BANK_CARD'
:
vm
.
bankCardCheck_id
=
item
.
check_id
break
default
:
default
:
vm
.
cddItemList
.
push
(
item
)
vm
.
cddItemList
.
push
(
item
)
}
}
})
})
// 查询图片
// 查询图片
listTemp
.
forEach
((
item
,
index
)
=>
{
listTemp
.
forEach
((
item
,
index
)
=>
{
vm
.
load_picture
(
item
.
check_id
,
index
)
vm
.
load_picture
(
item
.
check_id
,
index
,
item
.
cdd_item
)
})
})
if
(
vm
.
idCardEditFlag
)
{
// 身份证图片已修改,重新上传
if
(
vm
.
idCardEditFlag
)
{
// 身份证图片已修改,重新上传
var
list
=
[]
var
list
=
[]
...
@@ -706,40 +714,67 @@ export default {
...
@@ -706,40 +714,67 @@ export default {
hlsPopup
.
hideLoading
()
hlsPopup
.
hideLoading
()
}
}
},
},
// 删除图片
// 移除图片
delete_pic
(
attachment_id
)
{
remove_pic
(
attachment_id
,
index
)
{
hlsPopup
.
showLongCenter
(
'接口还没写'
)
let
vm
=
this
/* let vm = this
var
delete_list
=
[]
let url = process.env.basePath + 'attachment_list_query'
let
obj
=
{
'attachment_id'
:
attachment_id
}
delete_list
.
push
(
obj
)
let
url
=
process
.
env
.
basePath
+
'app_delete_attment'
// 附件删除
let
param
=
{
let
param
=
{
attachment_id: attachment_id
,
'picturelist'
:
delete_list
,
}
}
hlsPopup
.
showLoading
(
'请稍候'
)
hlsPopup
.
showLoading
(
'请稍候'
)
vm.
$
post(url, param).then(function (res) {
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
vm.
hlsPopup.hideLoading()
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
if
(
res
.
result
===
'S'
)
{
hlsPopup
.
showLongCenter
(
'删除成功!'
)
} else {
vm
.
remove_upload_list
(
attachment_id
,
index
)
hlsPopup.showLongCenter(res.message)
}
else
if
(
res
.
result
===
'E'
)
{
hlsPopup
.
showShortCenter
(
res
.
message
)
}
}
})
*/
})
},
},
/* uploadIdCardFront (
) {
remove_upload_list
(
attachment_id
,
index
)
{
let
vm
=
this
let
vm
=
this
let url = process.env.basePath + 'attachment_upload'
vm
.
upload_list
.
remove
(
index
)
vm
.
upload_list
.
sort
()
},
// 删除图片
delete_pic
(
attachment_id
)
{
let
vm
=
this
var
delete_list
=
[]
let
obj
=
{
'attachment_id'
:
attachment_id
}
delete_list
.
push
(
obj
)
let
url
=
process
.
env
.
basePath
+
'app_delete_attment'
// 附件删除
let
param
=
{
let
param
=
{
file_path: this.upload_list[0].filePath,
'picturelist'
:
delete_list
,
source_type: '',
pkvalue: window.localStorage.getItem('user_id'),
user_id: window.localStorage.getItem('user_id'),
}
}
hlsPopup
.
showLoading
(
'请稍候'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
vm.
hlsPopup.hideLoading()
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
if
(
res
.
result
===
'S'
)
{
console.log(res.response.attachment_id)
hlsPopup
.
showLongCenter
(
'删除成功!'
)
vm
.
remove_dowload_list
(
attachment_id
)
}
else
if
(
res
.
result
===
'E'
)
{
hlsPopup
.
showShortCenter
(
res
.
message
)
}
}
})
})
}, */
},
remove_dowload_list
(
attachment_id
)
{
let
vm
=
this
for
(
let
i
=
0
;
i
<
vm
.
dowload_list
.
length
;
i
++
)
{
let
list
=
vm
.
dowload_list
[
i
]
for
(
let
j
=
0
;
j
<
list
.
length
;
j
++
)
{
let
li
=
list
[
j
]
if
(
parseFloat
(
li
.
attachment_id
)
===
parseFloat
(
attachment_id
))
{
list
.
remove
(
j
)
break
}
}
}
vm
.
dowload_list
.
sort
()
},
ocrShow
(
ocrType
,
type
)
{
ocrShow
(
ocrType
,
type
)
{
let
vm
=
this
let
vm
=
this
hlsPopup
.
showActionSheet
({
hlsPopup
.
showActionSheet
({
...
@@ -1178,6 +1213,13 @@ export default {
...
@@ -1178,6 +1213,13 @@ export default {
}
}
})
})
},
},
// 查看大图
showBigPicture
(
pic
)
{
let
vm
=
this
vm
.
hlsPopup
.
showBigPicture
({
imgUrl
:
pic
,
})
},
},
},
}
}
</
script
>
</
script
>
...
...
src/pages/userBind/org/enterprise.vue
View file @
328a7445
...
@@ -46,13 +46,12 @@
...
@@ -46,13 +46,12 @@
<div
v-if=
"!licenseImg"
@
click=
"ocrShow('license', '')"
>
<div
v-if=
"!licenseImg"
@
click=
"ocrShow('license', '')"
>
<img
src=
"@/assets/userBind/camera.png"
>
<img
src=
"@/assets/userBind/camera.png"
>
</div>
</div>
<div
<div
v-if=
"licenseImg && !isApproved"
style=
"width: 100%;height: 100%"
@
click=
"ocrShow('license', '')"
>
v-if=
"licenseImg && !isApproved"
style=
"width: 100%;height: 100%"
@
click=
"ocrShow('license', '')"
>
<img
:src=
"licenseImg"
style=
"width: 100%;height: 100%;margin: 0"
>
<img
:src=
"licenseImg"
style=
"width: 100%;height: 100%;margin: 0"
>
</div>
</div>
<div
v-if=
"licenseImg && isApproved"
>
<img
:src=
"licenseImg"
style=
"width: 100%;height: 100%;margin: 0"
@
click=
"showBigPicture(licenseImg)"
>
</div>
</div>
</div>
</div>
</div>
...
@@ -197,6 +196,9 @@
...
@@ -197,6 +196,9 @@
<div
v-if=
"idCardFront && !isApproved"
@
click=
"ocrShow('idCard', 'front')"
>
<div
v-if=
"idCardFront && !isApproved"
@
click=
"ocrShow('idCard', 'front')"
>
<img
:src=
"idCardFront"
style=
"width: 100%;height: 100%;margin: 0"
>
<img
:src=
"idCardFront"
style=
"width: 100%;height: 100%;margin: 0"
>
</div>
</div>
<div
v-if=
"idCardFront && isApproved"
>
<img
:src=
"idCardFront"
style=
"width: 100%;height: 100%;margin: 0"
@
click=
"showBigPicture(idCardFront)"
>
</div>
<div
v-if=
"!idCardBack"
@
click=
"ocrShow('idCard', 'back')"
>
<div
v-if=
"!idCardBack"
@
click=
"ocrShow('idCard', 'back')"
>
<img
src=
"@/assets/userBind/org/back.png"
>
<img
src=
"@/assets/userBind/org/back.png"
>
<p>
反面
</p>
<p>
反面
</p>
...
@@ -204,6 +206,9 @@
...
@@ -204,6 +206,9 @@
<div
v-if=
"idCardBack && !isApproved"
@
click=
"ocrShow('idCard', 'back')"
>
<div
v-if=
"idCardBack && !isApproved"
@
click=
"ocrShow('idCard', 'back')"
>
<img
:src=
"idCardBack"
style=
"width: 100%;height: 100%;margin: 0"
>
<img
:src=
"idCardBack"
style=
"width: 100%;height: 100%;margin: 0"
>
</div>
</div>
<div
v-if=
"idCardBack && isApproved"
>
<img
:src=
"idCardBack"
style=
"width: 100%;height: 100%;margin: 0"
@
click=
"showBigPicture(idCardBack)"
>
</div>
</div>
</div>
</div>
</div>
...
@@ -297,15 +302,15 @@
...
@@ -297,15 +302,15 @@
<div
class=
"img-content"
>
<div
class=
"img-content"
>
<!--待上传图片列表-->
<!--待上传图片列表-->
<div
v-for=
"(item, index) in upload_list"
v-if=
"item.check_id==list.check_id"
:key=
"index"
class=
"card-upload"
>
<div
v-for=
"(item, index) in upload_list"
v-if=
"item.check_id==list.check_id"
:key=
"index"
class=
"card-upload"
>
<img
:src=
"item.picture"
>
<img
:src=
"item.picture"
@
click=
"showBigPicture(item.picture)"
>
<div
class=
"close"
@
click=
"
delete_pic(item.attachment_id
)"
>
<div
class=
"close"
@
click=
"
remove_pic(item.attachment_id, index
)"
>
<img
src=
"@/assets/userBind/deleteIcon.png"
>
<img
src=
"@/assets/userBind/deleteIcon.png"
>
</div>
</div>
</div>
</div>
<!--从服务器上下载的图片-->
<!--从服务器上下载的图片-->
<div
v-for=
"item in dowload_list"
>
<div
v-for=
"item in dowload_list"
>
<div
v-for=
"(pic, index) in item"
v-if=
"pic.check_id==list.check_id"
:key=
"index"
class=
"card-upload"
>
<div
v-for=
"(pic, index) in item"
v-if=
"pic.check_id==list.check_id"
:key=
"index"
class=
"card-upload"
>
<img
:src=
"pic.url"
>
<img
:src=
"pic.url"
@
click=
"showBigPicture(pic.url)"
>
<div
class=
"close"
@
click=
"delete_pic(pic.attachment_id)"
>
<div
class=
"close"
@
click=
"delete_pic(pic.attachment_id)"
>
<img
src=
"@/assets/userBind/deleteIcon.png"
>
<img
src=
"@/assets/userBind/deleteIcon.png"
>
</div>
</div>
...
@@ -487,6 +492,13 @@ export default {
...
@@ -487,6 +492,13 @@ export default {
upload_list
:
[],
// 上传图片列表
upload_list
:
[],
// 上传图片列表
dowload_list
:
[],
// 下载图片列表
dowload_list
:
[],
// 下载图片列表
cddItemList
:
[],
// 资料清单列表
cddItemList
:
[],
// 资料清单列表
idCardCheck_id
:
''
,
// 身份证check_id
bankCardCheck_id
:
''
,
// 银行卡check_id
licenseCheck_id
:
''
,
// 营业执照check_id
idCardImgList
:
[],
// 存身份证图片列表
bankCardImgList
:
[],
// 存上传银行卡图片列表
idCardEditFlag
:
false
,
// 身份证修改标识,为true则标识已修改,后续需要重新上传此照片
licenseEditFlag
:
false
,
// 营业执照照片修改标识,为true则标识已修改,后续需要重新上传此照片
}
}
},
},
computed
:
{},
computed
:
{},
...
@@ -705,7 +717,7 @@ export default {
...
@@ -705,7 +717,7 @@ export default {
verified
()
{
verified
()
{
this
.
dowload_list
=
[]
// 保存之前将图片下载列表清空,防止出现重复的图片
this
.
dowload_list
=
[]
// 保存之前将图片下载列表清空,防止出现重复的图片
if
(
this
.
flag
)
{
/*
if (this.flag) {
// this.flag = false
// this.flag = false
for (let i in this.authMsg) {
for (let i in this.authMsg) {
this.authMsg[i] = ''
this.authMsg[i] = ''
...
@@ -919,8 +931,8 @@ export default {
...
@@ -919,8 +931,8 @@ export default {
// vm.loadItemList()
// vm.loadItemList()
}
}
})
})
}
}
*/
//
this.loadItemList()
//
this.loadItemList()
},
},
hideModal
()
{
hideModal
()
{
this
.
showModalValue
=
false
this
.
showModalValue
=
false
...
@@ -1161,11 +1173,13 @@ export default {
...
@@ -1161,11 +1173,13 @@ export default {
hlsPopup
.
showLongCenter
(
'请拍照'
)
hlsPopup
.
showLongCenter
(
'请拍照'
)
}
else
{
}
else
{
if
(
ocrType
===
'idCard'
)
{
if
(
ocrType
===
'idCard'
)
{
type
===
'front'
?
(
vm
.
idCardFront
=
imgdata
,
vm
.
idCardIdentify
(
imgdata
))
:
(
vm
.
idCardBack
=
imgdata
)
vm
.
idCardEditFlag
=
true
// 身份证图片状态已修改
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'
)
{
}
else
if
(
ocrType
===
'bankCard'
)
{
vm
.
bankImg
=
imgdata
vm
.
bankImg
=
imgdata
vm
.
bankCardIdentify
(
imgdata
)
vm
.
bankCardIdentify
(
imgdata
)
}
else
if
(
ocrType
===
'license'
)
{
}
else
if
(
ocrType
===
'license'
)
{
vm
.
licenseEditFlag
=
true
// 营业执照图片状态已修改
vm
.
licenseImg
=
imgdata
vm
.
licenseImg
=
imgdata
vm
.
licenseIdentify
(
imgdata
)
vm
.
licenseIdentify
(
imgdata
)
}
}
...
@@ -1189,11 +1203,13 @@ export default {
...
@@ -1189,11 +1203,13 @@ export default {
hlsPopup
.
showLongCenter
(
'请选择一张图片'
)
hlsPopup
.
showLongCenter
(
'请选择一张图片'
)
}
else
{
}
else
{
if
(
ocrType
===
'idCard'
)
{
if
(
ocrType
===
'idCard'
)
{
type
===
'front'
?
(
vm
.
idCardFront
=
imgUrl
[
0
],
vm
.
idCardIdentify
(
imgUrl
[
0
]))
:
(
vm
.
idCardBack
=
imgUrl
[
0
])
vm
.
idCardEditFlag
=
true
// 身份证图片状态已修改
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'
)
{
}
else
if
(
ocrType
===
'bankCard'
)
{
vm
.
bankImg
=
imgUrl
[
0
]
vm
.
bankImg
=
imgUrl
[
0
]
vm
.
bankCardIdentify
(
imgUrl
[
0
])
vm
.
bankCardIdentify
(
imgUrl
[
0
])
}
else
if
(
ocrType
===
'license'
)
{
}
else
if
(
ocrType
===
'license'
)
{
vm
.
licenseEditFlag
=
true
// 营业执照图片状态已修改
vm
.
licenseImg
=
imgUrl
[
0
]
vm
.
licenseImg
=
imgUrl
[
0
]
vm
.
licenseIdentify
(
imgUrl
[
0
])
vm
.
licenseIdentify
(
imgUrl
[
0
])
}
}
...
@@ -1252,7 +1268,7 @@ export default {
...
@@ -1252,7 +1268,7 @@ export default {
vm
.
baseInfo
.
organization_code
=
result
.
社会信用代码
.
words
vm
.
baseInfo
.
organization_code
=
result
.
社会信用代码
.
words
})
})
},
},
load_picture
(
check_id
,
index
)
{
load_picture
(
check_id
,
index
,
cdd_item
)
{
let
vm
=
this
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'attachment_list_query'
+
'&index'
+
index
// 附件查询
let
url
=
process
.
env
.
basePath
+
'attachment_list_query'
+
'&index'
+
index
// 附件查询
let
param
=
{
let
param
=
{
...
@@ -1265,7 +1281,17 @@ export default {
...
@@ -1265,7 +1281,17 @@ export default {
res
.
lists
.
forEach
(
item
=>
{
res
.
lists
.
forEach
(
item
=>
{
item
[
'url'
]
=
process
.
env
.
filePath
+
'attachment_id='
+
item
.
attachment_id
+
'&access_token='
+
window
.
localStorage
.
access_token
item
[
'url'
]
=
process
.
env
.
filePath
+
'attachment_id='
+
item
.
attachment_id
+
'&access_token='
+
window
.
localStorage
.
access_token
})
})
vm
.
dowload_list
.
push
(
res
.
lists
)
switch
(
cdd_item
)
{
case
'NP_ID_CARD'
:
vm
.
idCardBack
=
res
.
lists
[
0
].
url
vm
.
idCardFront
=
res
.
lists
[
1
].
url
break
case
'ORG_CODE'
:
vm
.
licenseImg
=
res
.
lists
[
0
]
break
default
:
vm
.
dowload_list
.
push
(
res
.
lists
)
}
}
else
{
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
hlsPopup
.
showLongCenter
(
res
.
message
)
}
}
...
@@ -1273,11 +1299,11 @@ export default {
...
@@ -1273,11 +1299,11 @@ export default {
},
},
loadItemList
()
{
loadItemList
()
{
let
vm
=
this
let
vm
=
this
let
bpId
=
vm
.
from
?
vm
.
$route
.
params
.
bp_id
:
vm
.
bp_id
//
let bpId = vm.from ? vm.$route.params.bp_id : vm.bp_id
let
url
=
process
.
env
.
basePath
+
'prj_cdd_check_list'
let
url
=
process
.
env
.
basePath
+
'prj_cdd_check_list'
let
param
=
{
let
param
=
{
master
:
{
master
:
{
'document_id'
:
bpId
,
'document_id'
:
8142
,
'document_table'
:
'HLS_BP_MASTER'
,
'document_table'
:
'HLS_BP_MASTER'
,
'tab_group'
:
vm
.
flag
?
'HLS_ORG_NAUTH'
:
'HLS_ORG_AUTH'
,
'tab_group'
:
vm
.
flag
?
'HLS_ORG_NAUTH'
:
'HLS_ORG_AUTH'
,
},
},
...
@@ -1286,14 +1312,120 @@ export default {
...
@@ -1286,14 +1312,120 @@ export default {
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
// vm.hlsPopup.hideLoading()
// vm.hlsPopup.hideLoading()
if
(
res
.
result
===
'S'
)
{
if
(
res
.
result
===
'S'
)
{
vm
.
cddItemList
=
[...
res
.
lists
]
vm
.
cddItemList
=
[]
var
listTemp
=
[...
res
.
lists
]
listTemp
.
forEach
(
item
=>
{
switch
(
item
.
cdd_item
)
{
case
'NP_ID_CARD'
:
vm
.
idCardCheck_id
=
item
.
check_id
break
case
'ORG_CODE'
:
vm
.
licenseCheck_id
=
item
.
check_id
break
default
:
vm
.
cddItemList
.
push
(
item
)
}
})
// 查询图片
// 查询图片
vm
.
cddItemList
.
forEach
((
item
,
index
)
=>
{
listTemp
.
forEach
((
item
,
index
)
=>
{
vm
.
load_picture
(
item
.
check_id
,
index
)
vm
.
load_picture
(
item
.
check_id
,
index
,
item
.
cdd_item
)
})
})
if
(
vm
.
idCardEditFlag
)
{
// 身份证图片已修改,重新上传
var
list
=
[]
for
(
let
i
=
0
;
i
<
vm
.
idCardImgList
.
length
;
i
++
)
{
let
obj
=
{
'pkvalue'
:
vm
.
idCardCheck_id
,
'source_type'
:
'PRJ_CDD_ITEM_CHECK'
,
'picture'
:
''
,
'check_id'
:
vm
.
idCardCheck_id
,
'filePath'
:
vm
.
idCardImgList
[
i
].
url
,
'attachment_id'
:
''
,
'user_id'
:
1
,
'fileName'
:
vm
.
idCardImgList
[
i
].
fileName
,
}
list
.
push
(
obj
)
}
vm
.
save_picture
(
list
)
}
if
(
vm
.
licenseEditFlag
)
{
// 营业执照图片已修改,重新上传
var
list
=
[]
let
obj
=
{
'pkvalue'
:
vm
.
licenseCheck_id
,
'source_type'
:
'PRJ_CDD_ITEM_CHECK'
,
'picture'
:
''
,
'check_id'
:
vm
.
licenseCheck_id
,
'filePath'
:
vm
.
licenseImg
,
'attachment_id'
:
''
,
'user_id'
:
1
,
'fileName'
:
''
,
}
list
.
push
(
obj
)
vm
.
save_picture
(
list
)
}
}
}
})
})
},
},
// 移除图片
remove_pic
(
attachment_id
,
index
)
{
let
vm
=
this
var
delete_list
=
[]
let
obj
=
{
'attachment_id'
:
attachment_id
}
delete_list
.
push
(
obj
)
let
url
=
process
.
env
.
basePath
+
'app_delete_attment'
// 附件删除
let
param
=
{
'picturelist'
:
delete_list
,
}
hlsPopup
.
showLoading
(
'请稍候'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
hlsPopup
.
showLongCenter
(
'删除成功!'
)
vm
.
remove_upload_list
(
attachment_id
,
index
)
}
else
if
(
res
.
result
===
'E'
)
{
hlsPopup
.
showShortCenter
(
res
.
message
)
}
})
},
remove_upload_list
(
attachment_id
,
index
)
{
let
vm
=
this
vm
.
upload_list
.
remove
(
index
)
vm
.
upload_list
.
sort
()
},
// 删除图片
delete_pic
(
attachment_id
)
{
let
vm
=
this
var
delete_list
=
[]
let
obj
=
{
'attachment_id'
:
attachment_id
}
delete_list
.
push
(
obj
)
let
url
=
process
.
env
.
basePath
+
'app_delete_attment'
// 附件删除
let
param
=
{
'picturelist'
:
delete_list
,
}
hlsPopup
.
showLoading
(
'请稍候'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
hlsPopup
.
showLongCenter
(
'删除成功!'
)
vm
.
remove_dowload_list
(
attachment_id
)
}
else
if
(
res
.
result
===
'E'
)
{
hlsPopup
.
showShortCenter
(
res
.
message
)
}
})
},
remove_dowload_list
(
attachment_id
)
{
let
vm
=
this
for
(
let
i
=
0
;
i
<
vm
.
dowload_list
.
length
;
i
++
)
{
let
list
=
vm
.
dowload_list
[
i
]
for
(
let
j
=
0
;
j
<
list
.
length
;
j
++
)
{
let
li
=
list
[
j
]
if
(
parseFloat
(
li
.
attachment_id
)
===
parseFloat
(
attachment_id
))
{
list
.
remove
(
j
)
break
}
}
}
vm
.
dowload_list
.
sort
()
},
// 图片上传入口
// 图片上传入口
imgUploadShow
(
check_id
)
{
imgUploadShow
(
check_id
)
{
let
vm
=
this
let
vm
=
this
...
@@ -1404,23 +1536,12 @@ export default {
...
@@ -1404,23 +1536,12 @@ export default {
hlsPopup
.
hideLoading
()
hlsPopup
.
hideLoading
()
}
}
},
},
// 删除图片
// 查看大图
delete_pic
(
attachment_id
)
{
showBigPicture
(
pic
)
{
hlsPopup
.
showLongCenter
(
'接口还没写'
)
let
vm
=
this
/* let vm = this
vm
.
hlsPopup
.
showBigPicture
({
let url = process.env.basePath + 'attachment_list_query'
imgUrl
:
pic
,
let param = {
})
attachment_id: attachment_id,
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
} else {
hlsPopup.showLongCenter(res.message)
}
}) */
},
},
},
},
}
}
...
...
src/scripts/hlsPopup.js
View file @
328a7445
...
@@ -17,6 +17,23 @@ export default {
...
@@ -17,6 +17,23 @@ export default {
isLoading
:
false
,
isLoading
:
false
,
SHOW_TIMES
:
2000
,
SHOW_TIMES
:
2000
,
IS_SHOW_MASK
:
true
,
IS_SHOW_MASK
:
true
,
/**
* 移除数组的某个元素
* @param dx 下标
* @returns {boolean}
*/
remove
:
function
(
dx
)
{
debugger
if
(
isNaN
(
dx
)
||
dx
>
this
.
length
)
{
return
false
}
for
(
var
i
=
0
,
n
=
0
;
i
<
this
.
length
;
i
++
)
{
if
(
this
[
i
]
!=
this
[
dx
])
{
this
[
n
++
]
=
this
[
i
]
}
}
this
.
length
-=
1
},
/**
/**
* 锁屏函数 超过10s后自动解屏用于防止屏幕锁死
* 锁屏函数 超过10s后自动解屏用于防止屏幕锁死
* 自动截屏成弹出错误提示框
* 自动截屏成弹出错误提示框
...
@@ -249,12 +266,11 @@ export default {
...
@@ -249,12 +266,11 @@ export default {
ShowPicturePlugin
.
show
({
ShowPicturePlugin
.
show
({
imgUrl
:
imgObject
.
imgUrl
,
imgUrl
:
imgObject
.
imgUrl
,
width
:
imgObject
.
width
,
width
:
imgObject
.
width
,
imgList
:
imgObject
.
imgList
,
startPosition
:
imgObject
.
startPosition
,
})
})
}
}
},
},
/**
/**
* 下拉框 支持级联操作 需指定 parent 属性
* 下拉框 支持级联操作 需指定 parent 属性
* @param selectOption.list Array [{"code": "NP","code_name": "个人"}]
* @param selectOption.list Array [{"code": "NP","code_name": "个人"}]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment