Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
op-web-service
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
bp
op-web-service
Commits
ddc3e995
Commit
ddc3e995
authored
Jul 08, 2021
by
mengwenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:随服务端字段更改
parent
631489f0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
58 deletions
+44
-58
index.vue
src/pages/Enterprise/Audit/index.vue
+12
-12
enterpriseForm.vue
src/pages/Enterprise/components/enterpriseForm.vue
+32
-46
No files found.
src/pages/Enterprise/Audit/index.vue
View file @
ddc3e995
...
@@ -70,19 +70,19 @@
...
@@ -70,19 +70,19 @@
>
>
<template
#
reference
>
<template
#
reference
>
<el-image
<el-image
v-if=
"scope.row.sensitiveWord && scope.row.entterprise_image"
v-if=
"scope.row.sensitiveWord && scope.row.entterprise_image
_url
"
fit=
"fill"
fit=
"fill"
:src=
"scope.row.entterprise_image"
:src=
"scope.row.entterprise_image
_url
"
></el-image>
></el-image>
<span
v-else-if=
"
<span
v-else-if=
"
scope.row.sensitiveWord && !scope.row.entterprise_image
scope.row.sensitiveWord && !scope.row.entterprise_image
_url
"
>
无
</span>
"
>
无
</span>
<span
v-else
>
无权限
</span>
<span
v-else
>
无权限
</span>
</
template
>
</
template
>
<el-image
<el-image
fit=
"fill"
fit=
"fill"
style=
"width:100%;height:100%"
style=
"width:100%;height:100%"
:src=
"scope.row.entterprise_image"
:src=
"scope.row.entterprise_image
_url
"
></el-image>
></el-image>
</el-popover>
</el-popover>
</template>
</template>
...
@@ -119,19 +119,19 @@
...
@@ -119,19 +119,19 @@
>
>
<template
#
reference
>
<template
#
reference
>
<el-image
<el-image
v-if=
"scope.row.sensitiveWord && scope.row.legal_front_id_card"
v-if=
"scope.row.sensitiveWord && scope.row.legal_front_id_card
_url
"
:src=
"scope.row.legal_front_id_card"
:src=
"scope.row.legal_front_id_card
_url
"
fit=
"fill"
fit=
"fill"
></el-image>
></el-image>
<span
v-else-if=
"
<span
v-else-if=
"
scope.row.sensitiveWord && !scope.row.legal_front_id_card
scope.row.sensitiveWord && !scope.row.legal_front_id_card
_url
"
>
无
</span>
"
>
无
</span>
<span
v-else
>
无权限
</span>
<span
v-else
>
无权限
</span>
</
template
>
</
template
>
<el-image
<el-image
fit=
"fill"
fit=
"fill"
style=
"width:100%;height:100%"
style=
"width:100%;height:100%"
:src=
"scope.row.legal_front_id_card"
:src=
"scope.row.legal_front_id_card
_url
"
></el-image>
></el-image>
</el-popover>
</el-popover>
</template>
</template>
...
@@ -148,19 +148,19 @@
...
@@ -148,19 +148,19 @@
>
>
<template
#
reference
>
<template
#
reference
>
<el-image
<el-image
v-if=
"scope.row.sensitiveWord && scope.row.legal_back_id_card"
v-if=
"scope.row.sensitiveWord && scope.row.legal_back_id_card
_url
"
fit=
"fill"
fit=
"fill"
:src=
"scope.row.legal_back_id_card"
:src=
"scope.row.legal_back_id_card
_url
"
></el-image>
></el-image>
<span
v-else-if=
"
<span
v-else-if=
"
scope.row.sensitiveWord && !scope.row.legal_back_id_card
scope.row.sensitiveWord && !scope.row.legal_back_id_card
_url
"
>
无
</span>
"
>
无
</span>
<span
v-else
>
无权限
</span>
<span
v-else
>
无权限
</span>
</
template
>
</
template
>
<el-image
<el-image
fit=
"fill"
fit=
"fill"
style=
"width:100%;height:100%"
style=
"width:100%;height:100%"
:src=
"scope.row.legal_back_id_card"
:src=
"scope.row.legal_back_id_card
_url
"
></el-image>
></el-image>
</el-popover>
</el-popover>
...
...
src/pages/Enterprise/components/enterpriseForm.vue
View file @
ddc3e995
...
@@ -33,12 +33,13 @@
...
@@ -33,12 +33,13 @@
prop=
"businessLicense"
prop=
"businessLicense"
>
>
<el-image
<el-image
v-if=
"establishForm.entterprise
Image
"
v-if=
"establishForm.entterprise
_image_url
"
style=
"width:200px;height:200px;border-radius:10px"
style=
"width:200px;height:200px;border-radius:10px"
:src=
"establishForm.entterprise
Image
"
:src=
"establishForm.entterprise
_image_url
"
fit=
"cover"
fit=
"cover"
></el-image>
></el-image>
<el-upload
<el-upload
:data=
"
{scenario:`business_license`}"
:show-file-list="false"
:show-file-list="false"
:action="domainName"
:action="domainName"
:accept="'image/*'"
:accept="'image/*'"
...
@@ -84,12 +85,13 @@
...
@@ -84,12 +85,13 @@
prop=
"front_img"
prop=
"front_img"
>
>
<el-image
<el-image
v-if=
"establishForm.
frontImg
"
v-if=
"establishForm.
legal_front_id_card_url
"
style=
"width:200px;height:200px;border-radius:10px"
style=
"width:200px;height:200px;border-radius:10px"
:src=
"establishForm.
frontImg
"
:src=
"establishForm.
legal_front_id_card_url
"
fit=
"cover"
fit=
"cover"
></el-image>
></el-image>
<el-upload
<el-upload
:data=
"
{scenario:`id_card`}"
:show-file-list="false"
:show-file-list="false"
:action="domainName"
:action="domainName"
:accept="'image/*'"
:accept="'image/*'"
...
@@ -109,12 +111,13 @@
...
@@ -109,12 +111,13 @@
prop=
"bak_img"
prop=
"bak_img"
>
>
<el-image
<el-image
v-if=
"establishForm.
bakImg
"
v-if=
"establishForm.
legal_back_id_card_url
"
style=
"width:200px;height:200px;border-radius:10px"
style=
"width:200px;height:200px;border-radius:10px"
:src=
"establishForm.
bakImg
"
:src=
"establishForm.
legal_back_id_card_url
"
fit=
"cover"
fit=
"cover"
></el-image>
></el-image>
<el-upload
<el-upload
:data=
"
{scenario:`id_card`}"
:show-file-list="false"
:show-file-list="false"
:action="domainName"
:action="domainName"
:accept="'image/*'"
:accept="'image/*'"
...
@@ -197,7 +200,7 @@ export default {
...
@@ -197,7 +200,7 @@ export default {
};
};
// 身份证照片正面校验规则
// 身份证照片正面校验规则
const
idPhotoFontRules
=
(
rule
,
value
,
callback
)
=>
{
const
idPhotoFontRules
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
this
.
establishForm
.
front_img
)
{
if
(
!
this
.
establishForm
.
legal_front_id_card
)
{
callback
(
new
Error
(
"请上传身份正面证照片"
));
callback
(
new
Error
(
"请上传身份正面证照片"
));
}
else
{
}
else
{
callback
();
callback
();
...
@@ -206,7 +209,7 @@ export default {
...
@@ -206,7 +209,7 @@ export default {
};
};
// 身份证照片反面校验规则
// 身份证照片反面校验规则
const
idPhotoBackRules
=
(
rule
,
value
,
callback
)
=>
{
const
idPhotoBackRules
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
this
.
establishForm
.
bak_img
)
{
if
(
!
this
.
establishForm
.
legal_back_id_card
)
{
callback
(
new
Error
(
"请上传身份反面证照片"
));
callback
(
new
Error
(
"请上传身份反面证照片"
));
}
else
{
}
else
{
callback
();
callback
();
...
@@ -256,7 +259,7 @@ export default {
...
@@ -256,7 +259,7 @@ export default {
name
:
null
,
// 企业名称(!)
name
:
null
,
// 企业名称(!)
entterprise_image
:
null
,
// 金山云key(!)
entterprise_image
:
null
,
// 金山云key(!)
/* *********身份认证信息********* */
/* *********身份认证信息********* */
record_id
:
null
,
// 企业认证id
enterprise_auth_
record_id
:
null
,
// 企业认证id
front_img
:
""
,
// 身份证正面照的金山云objectid(!)
front_img
:
""
,
// 身份证正面照的金山云objectid(!)
bak_img
:
""
,
// 身份证反面照的尖山云objeid(!)
bak_img
:
""
,
// 身份证反面照的尖山云objeid(!)
idcard_number
:
""
,
// 身份证号(!)
idcard_number
:
""
,
// 身份证号(!)
...
@@ -324,9 +327,12 @@ export default {
...
@@ -324,9 +327,12 @@ export default {
this
.
establishForm
.
data_type
=
val
.
record
.
data_type
;
this
.
establishForm
.
data_type
=
val
.
record
.
data_type
;
this
.
establishForm
.
name
=
val
.
record
.
name
;
this
.
establishForm
.
name
=
val
.
record
.
name
;
this
.
establishForm
.
code
=
val
.
record
.
code
;
this
.
establishForm
.
code
=
val
.
record
.
code
;
this
.
establishForm
.
entterprise_image_url
=
val
.
record
.
entterprise_image_url
;
this
.
establishForm
.
entterprise_image
=
val
.
record
.
entterprise_image
;
this
.
establishForm
.
entterprise_image
=
val
.
record
.
entterprise_image
;
this
.
establishForm
.
front_img
=
val
.
record
.
legal_front_id_card
;
this
.
establishForm
.
legal_front_id_card_url
=
val
.
record
.
legal_front_id_card_url
;
this
.
establishForm
.
bak_img
=
val
.
record
.
legal_back_id_card
;
this
.
establishForm
.
legal_front_id_card
=
val
.
record
.
legal_front_id_card
;
this
.
establishForm
.
legal_back_id_card_url
=
val
.
record
.
legal_back_id_card_url
;
this
.
establishForm
.
legal_back_id_card
=
val
.
record
.
legal_back_id_card
;
this
.
establishForm
.
idcard_number
=
val
.
record
.
legal_id_card
;
this
.
establishForm
.
idcard_number
=
val
.
record
.
legal_id_card
;
this
.
establishForm
.
userName
=
val
.
record
.
legal_person
;
this
.
establishForm
.
userName
=
val
.
record
.
legal_person
;
this
.
establishForm
.
legal_mobile
=
val
.
record
.
legal_mobile
;
this
.
establishForm
.
legal_mobile
=
val
.
record
.
legal_mobile
;
...
@@ -334,9 +340,6 @@ export default {
...
@@ -334,9 +340,6 @@ export default {
this
.
establishForm
.
legal_mobile
=
val
.
record
.
mobile
;
this
.
establishForm
.
legal_mobile
=
val
.
record
.
mobile
;
this
.
establishForm
.
user_id
=
val
.
record
.
user_id
;
this
.
establishForm
.
user_id
=
val
.
record
.
user_id
;
this
.
establishForm
.
sensitiveWord
=
val
.
record
.
sensitiveWord
;
this
.
establishForm
.
sensitiveWord
=
val
.
record
.
sensitiveWord
;
this
.
establishForm
.
entterpriseImage
=
val
.
record
.
entterprise_image
;
this
.
establishForm
.
frontImg
=
val
.
record
.
legal_front_id_card
;
this
.
establishForm
.
bakImg
=
val
.
record
.
legal_back_id_card
;
}
}
},
},
...
@@ -345,24 +348,24 @@ export default {
...
@@ -345,24 +348,24 @@ export default {
handleEnterpriseSuccess
(
res
)
{
handleEnterpriseSuccess
(
res
)
{
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
clearValidate
(
"entterpriseImageRef"
);
this
.
clearValidate
(
"entterpriseImageRef"
);
this
.
establishForm
.
entterprise
Image
=
`http://
${
res
.
result
.
file_url
}
`
;
this
.
establishForm
.
entterprise
_image_url
=
`http://
${
res
.
result
.
file_url
}
`
;
this
.
establishForm
.
entterprise_image
=
res
.
result
.
object_id
;
this
.
establishForm
.
entterprise_image
=
`
${
res
.
result
.
bucket
}
/
${
res
.
result
.
object_id
}
`
;
},
},
// 上传身份证前面
// 上传身份证前面
handleFontSuccess
(
res
)
{
handleFontSuccess
(
res
)
{
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
clearValidate
(
"frontImgRef"
);
this
.
clearValidate
(
"frontImgRef"
);
this
.
establishForm
.
frontImg
=
`http://
${
res
.
result
.
file_url
}
`
;
this
.
establishForm
.
legal_front_id_card_url
=
`http://
${
res
.
result
.
file_url
}
`
;
this
.
establishForm
.
front_img
=
res
.
result
.
object_id
;
this
.
establishForm
.
legal_front_id_card
=
`
${
res
.
result
.
bucket
}
/
${
res
.
result
.
object_id
}
`
;
},
},
// 上传身份证后面
// 上传身份证后面
handleBackSuccess
(
res
)
{
handleBackSuccess
(
res
)
{
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
clearValidate
(
"bakImgRef"
);
this
.
clearValidate
(
"bakImgRef"
);
this
.
establishForm
.
bakImg
=
`http://
${
res
.
result
.
file_url
}
`
;
this
.
establishForm
.
legal_back_id_card_url
=
`http://
${
res
.
result
.
file_url
}
`
;
this
.
establishForm
.
bak_img
=
res
.
result
.
object_id
;
this
.
establishForm
.
legal_back_id_card
=
`
${
res
.
result
.
bucket
}
/
${
res
.
result
.
object_id
}
`
;
},
},
// 取消创建表单
// 取消创建表单
...
@@ -394,7 +397,7 @@ export default {
...
@@ -394,7 +397,7 @@ export default {
const
enterpriseQuery
=
{
const
enterpriseQuery
=
{
code
,
code
,
name
,
name
,
entterprise_image
,
entterprise_image
_url
:
entterprise_image
,
data_from
:
3
,
data_from
:
3
,
data_type
,
data_type
,
mobile
,
mobile
,
...
@@ -402,7 +405,7 @@ export default {
...
@@ -402,7 +405,7 @@ export default {
};
};
postBusiness
(
enterpriseQuery
).
then
(
res
=>
{
postBusiness
(
enterpriseQuery
).
then
(
res
=>
{
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
establishForm
.
enterprise_id
=
this
.
establishForm
.
enterprise_
auth_record_
id
=
res
.
result
.
enterprise_auth_record_id
;
res
.
result
.
enterprise_auth_record_id
;
// 提交法人信息
// 提交法人信息
this
.
uploadLegal
();
this
.
uploadLegal
();
...
@@ -417,12 +420,11 @@ export default {
...
@@ -417,12 +420,11 @@ export default {
data_type
,
data_type
,
mobile
mobile
}
=
this
.
establishForm
;
}
=
this
.
establishForm
;
entterprise_image
=
this
.
transformObjectId
(
entterprise_image
);
const
editQuery
=
{
const
editQuery
=
{
record_id
:
this
.
enterpriseId
,
enterprise_auth_
record_id
:
this
.
enterpriseId
,
code
,
code
,
name
,
name
,
entterprise_image
,
entterprise_image
_url
:
entterprise_image
,
data_type
,
data_type
,
data_from
:
3
,
data_from
:
3
,
mobile
mobile
...
@@ -445,24 +447,20 @@ export default {
...
@@ -445,24 +447,20 @@ export default {
let
{
let
{
data_type
,
data_type
,
user_id
,
user_id
,
front_img
,
legal_front_id_card
,
bak_img
,
legal_back_id_card
,
idcard_number
,
idcard_number
,
userName
,
userName
,
legal_mobile
legal_mobile
}
=
this
.
establishForm
;
}
=
this
.
establishForm
;
front_img
=
this
.
transformObjectId
(
front_img
);
bak_img
=
this
.
transformObjectId
(
bak_img
);
// 提交法人信息
// 提交法人信息
let
legalQuery
=
{
let
legalQuery
=
{
record_id
:
this
.
enterpriseId
enterprise_auth_record_id
:
this
.
enterpriseId
?
parseInt
(
this
.
enterpriseId
)
:
parseInt
(
this
.
establishForm
.
enterprise_auth_record_id
),
?
this
.
enterpriseId
:
this
.
establishForm
.
enterprise_id
,
front_completeness
:
0
,
front_completeness
:
0
,
bak_completeness
:
0
,
bak_completeness
:
0
,
user_id
:
user_id
?
parseInt
(
user_id
)
:
""
,
user_id
:
user_id
?
parseInt
(
user_id
)
:
""
,
front_img
,
posit_image_url
:
legal_front_id_card
,
ba
k_img
,
ba
ck_image_url
:
legal_back_id_card
,
idcard_number
,
idcard_number
,
name
:
userName
,
name
:
userName
,
legal_mobile
,
legal_mobile
,
...
@@ -477,18 +475,6 @@ export default {
...
@@ -477,18 +475,6 @@ export default {
});
});
},
},
// 转换图片地址为ObjectId
transformObjectId
(
urls
)
{
try
{
const
url
=
new
URL
(
urls
);
let
pathName
=
url
.
pathname
;
let
objectId
=
pathName
.
slice
(
1
);
return
objectId
;
}
catch
(
error
)
{
return
urls
;
}
},
// 清除校验
// 清除校验
clearValidate
(
formName
)
{
clearValidate
(
formName
)
{
this
.
$refs
[
formName
].
clearValidate
();
this
.
$refs
[
formName
].
clearValidate
();
...
...
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