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
92ccbc0e
Commit
92ccbc0e
authored
Jun 25, 2023
by
jiacheng.mao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决用户基本信息,户籍省市区三级联动的问题
parent
2337e79a
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
161 additions
and
68 deletions
+161
-68
dev.env.js
config/dev.env.js
+5
-5
prod.env.js
config/prod.env.js
+1
-1
uat.env.js
config/uat.env.js
+1
-1
base-info.vue
src/pages/userBindNew/np/base-info.vue
+153
-60
index.html
www/index.html
+1
-1
No files found.
config/dev.env.js
View file @
92ccbc0e
'use strict'
module
.
exports
=
{
NODE_ENV
:
'"
development
"'
,
NODE_ENV
:
'"
production
"'
,
CONFIG_ENV
:
JSON
.
stringify
(
process
.
env
.
CONFIG_ENV
),
debug
:
true
,
isMobilePlatform
:
true
,
loginPath
:
'"http://180.104.121.66:8088/oauth/token?client_id=client2&client_secret=secret&grant_type=password&username=appadmin&password=" '
,
basePath
:
'"http://180.104.121.66:8088/r/api/interface?sysName=XCMG_
DEV
&apiName="'
,
basePath
:
'"http://180.104.121.66:8088/r/api/interface?sysName=XCMG_
UAT
&apiName="'
,
rootPath
:
'"http://180.104.121.66:8088/r/api"'
,
filePath
:
'"http://180.104.121.66:8088/r/api/app/fileViewSvc?sysName=XCMG_
DEV
&apiName=file_view&"'
,
filePath
:
'"http://180.104.121.66:8088/r/api/app/fileViewSvc?sysName=XCMG_
UAT
&apiName=file_view&"'
,
ocrPath
:
'"http://180.104.121.66:8088/r/api"'
,
fileUploadSvcPath
:
'"http://180.104.121.66:8088/r/api/app/fileUploadSvc?sysName=XCMG_
DEV
&apiName="'
,
fileUploadSvcPath
:
'"http://180.104.121.66:8088/r/api/app/fileUploadSvc?sysName=XCMG_
UAT
&apiName="'
,
appId
:
'"com.xcmg.app.dev"'
,
currentVersion
:
'"
3.7.8
"'
currentVersion
:
'"
4.1.2
"'
}
config/prod.env.js
View file @
92ccbc0e
...
...
@@ -11,5 +11,5 @@ module.exports = {
ocrPath
:
'"http://www.xcmgfs.com:8087/r/api"'
,
fileUploadSvcPath
:
'"http://www.xcmgfs.com:8087/r/api/app/fileUploadSvc?sysName=XCMG_PROD&apiName="'
,
appId
:
'"com.xcmg.app"'
,
currentVersion
:
'"0.4.
1
"'
currentVersion
:
'"0.4.
2
"'
}
config/uat.env.js
View file @
92ccbc0e
...
...
@@ -11,5 +11,5 @@ module.exports = {
ocrPath
:
'"http://180.104.121.66:8088/r/api"'
,
fileUploadSvcPath
:
'"http://180.104.121.66:8088/r/api/app/fileUploadSvc?sysName=XCMG_UAT&apiName="'
,
appId
:
'"com.xcmg.app.dev"'
,
currentVersion
:
'"4.
0.9
"'
currentVersion
:
'"4.
1.2
"'
}
src/pages/userBindNew/np/base-info.vue
View file @
92ccbc0e
...
...
@@ -169,36 +169,36 @@
<div
slot=
"name"
class=
"required"
>
户籍地址省
</div>
<input
slot=
"content"
v-model=
"baseInfo.register_province_n
ame
"
v-model=
"baseInfo.register_province_n"
placeholder=
"上传身份证自动填充"
type=
"text"
readonly
onfocus=
"this.blur()"
@
click=
"selectProvince()"
@
click=
"select
Register
Province()"
>
</item>
<item
:showArrow=
"true"
>
<div
slot=
"name"
class=
"required"
>
户籍地址市
</div>
<input
slot=
"content"
v-model=
"baseInfo.register_city_n
ame
"
v-model=
"baseInfo.register_city_n"
placeholder=
"上传身份证自动填充"
type=
"text"
readonly
onfocus=
"this.blur()"
@
click=
"selectCity()"
@
click=
"select
Register
City()"
>
</item>
<item
:showArrow=
"true"
>
<div
slot=
"name"
class=
"required"
>
户籍地址区/县
</div>
<input
slot=
"content"
v-model=
"baseInfo.register_district_n
ame
"
v-model=
"baseInfo.register_district_n"
placeholder=
"上传身份证自动填充"
type=
"text"
readonly
onfocus=
"this.blur()"
@
click=
"selectDistrict()"
@
click=
"select
Register
District()"
>
</item>
<item>
...
...
@@ -460,6 +460,9 @@ export default {
bp_type
:
''
,
},
// 查询出来的第二个角色
multiRoleList
:
[],
// 查询出来的多角色
registerProvinceList
:
[],
registerCityList
:
[],
registerDistrictList
:
[],
baseInfo
:
{
bp_type_n
:
''
,
academic_background_n
:
''
,
...
...
@@ -478,11 +481,11 @@ export default {
living_address
:
''
,
address_on_resident_booklit
:
''
,
register_province
:
''
,
register_province_n
ame
:
''
,
register_province_n
:
''
,
register_city
:
''
,
register_city_n
ame
:
''
,
register_city_n
:
''
,
register_district
:
''
,
register_district_n
ame
:
''
,
register_district_n
:
''
,
marital_status
:
''
,
academic_background
:
''
,
bp_name_sp
:
''
,
...
...
@@ -571,6 +574,11 @@ export default {
this
.
getMarital
()
this
.
getDrivingLicenseType
()
this
.
getProvince
()
this
.
getCity
()
this
.
getDistrict
()
this
.
getRegisterProvince
()
this
.
getRegisterCity
()
this
.
getRegisterDistrict
()
},
beforeRouteEnter
(
to
,
from
,
next
)
{
// 绑定查询入口
...
...
@@ -611,11 +619,11 @@ export default {
living_address
:
''
,
address_on_resident_booklit
:
''
,
register_province
:
''
,
register_province_n
ame
:
''
,
register_province_n
:
''
,
register_city
:
''
,
register_city_n
ame
:
''
,
register_city_n
:
''
,
register_district
:
''
,
register_district_n
ame
:
''
,
register_district_n
:
''
,
marital_status
:
''
,
academic_background
:
''
,
bp_name_sp
:
''
,
...
...
@@ -702,11 +710,11 @@ export default {
living_address
:
''
,
address_on_resident_booklit
:
''
,
register_province
:
''
,
register_province_n
ame
:
''
,
register_province_n
:
''
,
register_city
:
''
,
register_city_n
ame
:
''
,
register_city_n
:
''
,
register_district
:
''
,
register_district_n
ame
:
''
,
register_district_n
:
''
,
marital_status
:
''
,
academic_background
:
''
,
bp_name_sp
:
''
,
...
...
@@ -843,6 +851,10 @@ export default {
vm
.
addRows
(
vm
.
baseInfo
.
address_on_resident_booklit
)
vm
.
addRowsLive
(
vm
.
baseInfo
.
living_address
)
// vm.peopleList = res.info.agent_username.split(',')
vm
.
getCity
()
vm
.
getDistrict
()
vm
.
getRegisterCity
()
vm
.
getRegisterDistrict
()
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
...
...
@@ -1697,70 +1709,40 @@ export default {
code
:
'bp_type'
,
object
:
{},
returnItem
:
function
(
index
,
obj
)
{
if
(
e
===
'register'
)
{
vm
.
baseInfo
.
register_province
=
obj
.
bp_type
vm
.
baseInfo
.
register_province_name
=
obj
.
bp_type_n
}
else
{
vm
.
baseInfo
.
province_id
=
obj
.
bp_type
vm
.
baseInfo
.
province_name
=
obj
.
bp_type_n
}
vm
.
getCity
()
},
})
},
selectCity
(
e
)
{
selectCity
()
{
let
vm
=
this
if
(
e
===
'register'
)
{
if
(
vm
.
baseInfo
.
register_province
===
''
)
{
hlsPopup
.
showLongCenter
(
'请先选择省份'
)
}
}
else
{
if
(
vm
.
baseInfo
.
province_id
===
''
)
{
hlsPopup
.
showLongCenter
(
'请先选择省份'
)
}
}
vm
.
hlsPopup
.
selectList
({
list
:
vm
.
cityList
,
code
:
'bp_type'
,
object
:
{},
returnItem
:
function
(
index
,
obj
)
{
if
(
e
===
'register'
)
{
vm
.
baseInfo
.
register_city
=
obj
.
bp_type
vm
.
baseInfo
.
register_city_name
=
obj
.
bp_type_n
}
else
{
vm
.
baseInfo
.
city_id
=
obj
.
bp_type
vm
.
baseInfo
.
city_name
=
obj
.
bp_type_n
}
vm
.
getDistrict
()
},
})
},
selectDistrict
(
e
)
{
selectDistrict
()
{
let
vm
=
this
if
(
e
===
'register'
)
{
if
(
vm
.
baseInfo
.
register_province
===
''
||
vm
.
baseInfo
.
register_city
===
''
)
{
hlsPopup
.
showLongCenter
(
'请先选择城市'
)
}
}
else
{
if
(
vm
.
baseInfo
.
city_id
===
''
||
vm
.
baseInfo
.
province_id
===
''
)
{
hlsPopup
.
showLongCenter
(
'请先选择城市'
)
}
}
vm
.
hlsPopup
.
selectList
({
list
:
vm
.
districtList
,
code
:
'bp_type'
,
object
:
{},
returnItem
:
function
(
index
,
obj
)
{
if
(
e
===
'register'
)
{
vm
.
baseInfo
.
register_district
=
obj
.
bp_type
vm
.
baseInfo
.
register_district_name
=
obj
.
bp_type_n
}
else
{
vm
.
baseInfo
.
district_id
=
obj
.
bp_type
vm
.
baseInfo
.
district_name
=
obj
.
bp_type_n
}
},
})
},
...
...
@@ -1784,6 +1766,9 @@ export default {
getCity
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'fnd_city_query'
if
(
!
vm
.
baseInfo
.
province_id
)
{
return
}
let
param
=
{
province_id
:
vm
.
baseInfo
.
province_id
,
}
...
...
@@ -1803,6 +1788,9 @@ export default {
getDistrict
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'fnd_district_query'
if
(
!
vm
.
baseInfo
.
city_id
)
{
return
}
let
param
=
{
city_id
:
vm
.
baseInfo
.
city_id
,
}
...
...
@@ -1819,6 +1807,111 @@ export default {
}
})
},
selectRegisterProvince
()
{
let
vm
=
this
vm
.
hlsPopup
.
selectList
({
list
:
vm
.
registerProvinceList
,
code
:
'bp_type'
,
object
:
{},
returnItem
:
function
(
index
,
obj
)
{
vm
.
baseInfo
.
register_province
=
obj
.
bp_type
vm
.
baseInfo
.
register_province_n
=
obj
.
bp_type_n
vm
.
getRegisterCity
()
},
})
},
selectRegisterCity
()
{
let
vm
=
this
if
(
vm
.
baseInfo
.
register_province
===
''
)
{
hlsPopup
.
showLongCenter
(
'请先选择省份'
)
}
vm
.
hlsPopup
.
selectList
({
list
:
vm
.
registerCityList
,
code
:
'bp_type'
,
object
:
{},
returnItem
:
function
(
index
,
obj
)
{
vm
.
baseInfo
.
register_city
=
obj
.
bp_type
vm
.
baseInfo
.
register_city_n
=
obj
.
bp_type_n
vm
.
getRegisterDistrict
()
},
})
},
selectRegisterDistrict
()
{
let
vm
=
this
if
(
vm
.
baseInfo
.
register_province
===
''
||
vm
.
baseInfo
.
register_city
===
''
)
{
hlsPopup
.
showLongCenter
(
'请先选择城市'
)
}
vm
.
hlsPopup
.
selectList
({
list
:
vm
.
registerDistrictList
,
code
:
'bp_type'
,
object
:
{},
returnItem
:
function
(
index
,
obj
)
{
vm
.
baseInfo
.
register_district
=
obj
.
bp_type
vm
.
baseInfo
.
register_district_n
=
obj
.
bp_type_n
},
})
},
getRegisterProvince
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'fnd_province_query'
let
param
=
{}
vm
.
hlsPopup
.
showLoading
(
'请稍候'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
vm
.
registerProvinceList
=
res
.
lists
.
map
(
item
=>
{
return
{
code
:
item
.
province_id
,
code_name
:
item
.
province_name
,
}
})
}
})
},
getRegisterCity
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'fnd_city_query'
if
(
!
vm
.
baseInfo
.
register_province
)
{
return
}
let
param
=
{
province_id
:
vm
.
baseInfo
.
register_province
,
}
// vm.hlsPopup.showLoading('请稍候')
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
// vm.hlsPopup.hideLoading()
if
(
res
.
result
===
'S'
)
{
vm
.
registerCityList
=
res
.
lists
.
map
(
item
=>
{
return
{
code
:
item
.
city_id
,
code_name
:
item
.
city_name
,
}
})
}
})
},
getRegisterDistrict
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'fnd_district_query'
if
(
!
vm
.
baseInfo
.
register_city
)
{
return
}
let
param
=
{
city_id
:
vm
.
baseInfo
.
register_city
,
}
// vm.hlsPopup.showLoading('请稍候')
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
// vm.hlsPopup.hideLoading()
if
(
res
.
result
===
'S'
)
{
vm
.
registerDistrictList
=
res
.
lists
.
map
(
item
=>
{
return
{
code
:
item
.
district_id
,
code_name
:
item
.
district_name
,
}
})
}
})
},
getMarital
()
{
let
vm
=
this
let
url
=
process
.
env
.
basePath
+
'bp_marital_status_query'
...
...
@@ -1907,7 +2000,7 @@ export default {
res
.
lists
.
forEach
(
item
=>
{
if
(
item
.
province_code
.
indexOf
(
p
)
!==
-
1
)
{
vm
.
$set
(
vm
.
baseInfo
,
'register_province'
,
item
.
province_id
)
vm
.
$set
(
vm
.
baseInfo
,
'register_province_n
ame
'
,
item
.
province_name
)
vm
.
$set
(
vm
.
baseInfo
,
'register_province_n'
,
item
.
province_name
)
}
})
}
...
...
@@ -1921,7 +2014,7 @@ export default {
suc
.
lists
.
forEach
(
item
=>
{
if
(
item
.
city_code
.
indexOf
(
c
)
!==
-
1
)
{
vm
.
$set
(
vm
.
baseInfo
,
'register_city'
,
item
.
city_id
)
vm
.
$set
(
vm
.
baseInfo
,
'register_city_n
ame
'
,
item
.
city_name
)
vm
.
$set
(
vm
.
baseInfo
,
'register_city_n'
,
item
.
city_name
)
}
})
}
...
...
@@ -1935,7 +2028,7 @@ export default {
suc
.
lists
.
forEach
(
item
=>
{
if
(
item
.
district_code
.
indexOf
(
d
)
!==
-
1
)
{
vm
.
$set
(
vm
.
baseInfo
,
'register_district'
,
item
.
district_id
)
vm
.
$set
(
vm
.
baseInfo
,
'register_district_n
ame
'
,
item
.
district_name
)
vm
.
$set
(
vm
.
baseInfo
,
'register_district_n'
,
item
.
district_name
)
}
})
}
...
...
www/index.html
View file @
92ccbc0e
<!DOCTYPE html>
<html><head><meta
charset=
utf-8
><meta
name=
viewport
content=
"initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,width=device-width,viewport-fit=cover"
><meta
name=
format-detection
content=
"telephone=no"
><meta
name=
format-detection
content=
"email=no"
><meta
name=
apple-mobile-web-app-capable
content=
yes
><meta
name=
apple-mobile-web-app-status-bar-style
content=
black
><script
type=
text/javascript
src=
./static/vuePlatform.js
></script><script
type=
text/javascript
src=
./static/prototype.js
></script><script
type=
text/javascript
src=
./cordova.js
></script><script
type=
text/javascript
src=
"http://api.map.baidu.com/api?v=2.0&ak=Eoo0EtfjYCdAy7r8D19gZ0vMojdZpHqU"
></script><title>
徐工金服
</title><link
href=
./static/css/app.fb52dd271f35e6cb942abb94eb5f18bb.css
rel=
stylesheet
></head><body><div
id=
app-box
></div><script
type=
text/javascript
src=
./static/js/manifest.16dc3c74f4e0c838ce1f.js
></script><script
type=
text/javascript
src=
./static/js/vendor.a2bd9868e7885d7ce8da.js
></script><script
type=
text/javascript
src=
./static/js/app.279bb6618e94708c8fd3.js
></script></body></html>
\ No newline at end of file
<!DOCTYPE html>
<html><head><meta
charset=
utf-8
><meta
name=
viewport
content=
"initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,width=device-width,viewport-fit=cover"
><meta
name=
format-detection
content=
"telephone=no"
><meta
name=
format-detection
content=
"email=no"
><meta
name=
apple-mobile-web-app-capable
content=
yes
><meta
name=
apple-mobile-web-app-status-bar-style
content=
black
><script
type=
text/javascript
src=
./static/vuePlatform.js
></script><script
type=
text/javascript
src=
./static/prototype.js
></script><script
type=
text/javascript
src=
./cordova.js
></script><script
type=
text/javascript
src=
"http://api.map.baidu.com/api?v=2.0&ak=Eoo0EtfjYCdAy7r8D19gZ0vMojdZpHqU"
></script><title>
徐工金服
</title><link
href=
./static/css/app.fb52dd271f35e6cb942abb94eb5f18bb.css
rel=
stylesheet
></head><body><div
id=
app-box
></div><script
type=
text/javascript
src=
./static/js/manifest.29e8de5cf04e4fe4d693.js
></script><script
type=
text/javascript
src=
./static/js/vendor.6fb9a8a9e3d7464e35f7.js
></script><script
type=
text/javascript
src=
./static/js/app.7e7cbcc92f7463151cf8.js
></script></body></html>
\ No newline at end of file
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