Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mongo-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
mongo-ui
Commits
3e607342
Commit
3e607342
authored
Aug 17, 2020
by
郝聪敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改智能评测
parent
029a83f1
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
619 additions
and
309 deletions
+619
-309
activity.js
src/api/activity.js
+11
-0
policy.js
src/api/policy.js
+1
-1
smartMeasure.js
src/api/smartMeasure.js
+11
-0
CrRadioBtn.vue
src/components/CrRadioBtn.vue
+6
-1
routes.js
src/router/routes.js
+1
-1
user.js
src/store/modules/user.js
+7
-7
constants.js
src/views/Home/Activity/constants.js
+44
-0
index.less
src/views/Home/Activity/index.less
+61
-11
index.vue
src/views/Home/Activity/index.vue
+105
-54
index.vue
src/views/Home/SmartMeasure/Report/index.vue
+8
-1
constants.js
src/views/Home/SmartMeasure/constants.js
+126
-0
index.less
src/views/Home/SmartMeasure/index.less
+10
-3
index.vue
src/views/Home/SmartMeasure/index.vue
+41
-63
Age.vue
src/views/Home/SmartMeasure/modules/Age.vue
+14
-21
Gender.vue
src/views/Home/SmartMeasure/modules/Gender.vue
+4
-17
Select.vue
src/views/Home/SmartMeasure/modules/Select.vue
+35
-64
index.vue
src/views/Home/index.vue
+1
-1
Modal.vue
src/views/Home/modules/Modal.vue
+63
-8
Guarantee.vue
src/views/Policy/Detail/Types/Guarantee.vue
+1
-1
InsuranceCard.vue
src/views/Policy/Detail/modules/InsuranceCard.vue
+2
-2
index.vue
src/views/Policy/PaymentRecord/index.vue
+1
-1
index.vue
src/views/Policy/Renewal/index.vue
+2
-2
constants.js
src/views/Policy/constants.js
+6
-6
PolicyItem.vue
src/views/Policy/modules/PolicyItem.vue
+5
-5
index.vue
src/views/User/Family/Detail/index.vue
+7
-3
index.less
src/views/User/Family/index.less
+11
-9
index.vue
src/views/User/Family/index.vue
+2
-2
FamilyForm.vue
src/views/User/Family/modules/FamilyForm.vue
+33
-25
No files found.
src/api/activity.js
0 → 100644
View file @
3e607342
import
req
from
"
@/service/http
"
;
// 查询最新抽奖结果和剩余抽奖次数
export
const
getLotteryRecord
=
()
=>
{
return
req
.
get
(
"
/act/draw/win-record
"
);
};
// 抽奖
export
const
drawLottery
=
params
=>
{
return
req
.
post
(
"
/act/draw/lt-draw
"
,
params
);
};
src/api/policy.js
View file @
3e607342
...
...
@@ -22,5 +22,5 @@ export const getPayRecord = policySecId => {
// 保单自动续保状态管理
export
const
updateRenewal
=
(
policySecId
,
status
)
=>
{
return
req
.
post
(
`/auto_renew_policy/
${
policySecId
}
/
${
status
}
`
);
return
req
.
post
(
`/
policy/
auto_renew_policy/
${
policySecId
}
/
${
status
}
`
);
};
src/api/smartMeasure.js
0 → 100644
View file @
3e607342
import
req
from
"
@/service/http
"
;
// 申请风险测评
export
const
addRiskEvaluation
=
param
=>
{
return
req
.
post
(
"
riskEvaluation
"
,
param
);
};
// 查询风险测评
export
const
getRiskEvaluation
=
()
=>
{
return
req
.
get
(
"
/user/risk_evaluation
"
);
};
src/components/CrRadioBtn.vue
View file @
3e607342
<
template
>
<cr-radio-group
v-model=
"radioVal"
class=
"radio-btn"
:class=
"
{ readonly }">
<cr-radio
:disabled=
"disabled"
:name=
"item.value"
:class=
"
{ checked: value === item.value }"
v-for="(item, index) in radioData"
...
...
@@ -30,7 +31,11 @@ export default {
type
:
Boolean
,
default
:
false
},
value
:
null
value
:
null
,
disabled
:
{
type
:
Boolean
,
default
:
false
}
},
watch
:
{
value
(
val
)
{
...
...
src/router/routes.js
View file @
3e607342
...
...
@@ -15,7 +15,7 @@ export default [
component
:
()
=>
import
(
"
../views/Home/SmartMeasure/index.vue
"
)
},
{
path
:
"
/home/smart-measure/report
"
,
path
:
"
/home/smart-measure/report
/:age/:gender
"
,
name
:
"
Report
"
,
component
:
()
=>
import
(
"
../views/Home/SmartMeasure/Report/index.vue
"
)
},
...
...
src/store/modules/user.js
View file @
3e607342
...
...
@@ -17,14 +17,14 @@ const CONSTANT = {
// 0: man; 1: woman
function
getReletion
(
relation
,
gender
)
{
let
result
=
""
;
if
([
1
,
3
].
includes
(
+
relation
))
{
if
(
+
relation
===
1
)
{
result
=
+
gender
?
"
母亲
"
:
"
父亲
"
;
if
([
2
,
4
].
includes
(
+
relation
))
{
if
(
+
relation
===
2
)
{
result
=
+
gender
===
0
?
"
母亲
"
:
"
父亲
"
;
}
else
{
result
=
+
gender
?
"
女儿
"
:
"
儿子
"
;
result
=
+
gender
===
0
?
"
女儿
"
:
"
儿子
"
;
}
}
else
{
result
=
CONSTANT
.
relation
[
+
relation
];
result
=
CONSTANT
.
relation
[
+
relation
-
1
];
}
return
result
;
...
...
@@ -60,7 +60,7 @@ export default {
// todo 家人保单列表筛选
const
result
=
familyList
.
map
(
family
=>
({
...
family
,
avatar
:
+
family
.
gender
===
0
?
CONSTANT
.
avatar
.
man
:
CONSTANT
.
avatar
.
woman
,
avatar
:
+
family
.
gender
===
1
?
CONSTANT
.
avatar
.
man
:
CONSTANT
.
avatar
.
woman
,
appellation
:
getReletion
(
family
.
relation
,
family
.
gender
),
policyList
:
_
.
values
(
_
.
mapValues
(
goodsMap
,
goodsList
=>
{
...
...
@@ -68,7 +68,7 @@ export default {
.
filter
(
policy
=>
_
.
some
(
goodsList
,
{
id
:
policy
.
productNo
})
&&
+
family
.
userInfoSecId
===
+
policy
.
insuredUser
SecId
&&
family
.
userInfoSecId
===
policy
.
insuredUserInfo
SecId
&&
[
"
6.1
"
,
"
6.2
"
,
"
6.3
"
].
includes
(
policy
.
policyState
)
)
.
map
(
policy
=>
({
...
policy
,
...
_
.
find
(
goodsList
,
{
id
:
policy
.
productNo
})
}))
...
...
src/views/Home/Activity/constants.js
0 → 100644
View file @
3e607342
const
personList
=
[
{
phone
:
"
138****1239
"
,
amount
:
"
18888
"
},
{
phone
:
"
155****2323
"
,
amount
:
"
888
"
},
{
phone
:
"
135****2854
"
,
amount
:
"
8888
"
},
{
phone
:
"
147****8493
"
,
amount
:
"
18888
"
},
{
phone
:
"
138****4762
"
,
amount
:
"
888
"
},
{
phone
:
"
177****2394
"
,
amount
:
"
18888
"
},
{
phone
:
"
167****0482
"
,
amount
:
"
8888
"
},
{
phone
:
"
152****3842
"
,
amount
:
"
888
"
},
{
phone
:
"
146****1359
"
,
amount
:
"
8888
"
},
{
phone
:
"
183****1239
"
,
amount
:
"
18888
"
}
];
export
default
personList
;
src/views/Home/Activity/index.less
View file @
3e607342
...
...
@@ -158,21 +158,54 @@
}
}
&-button {
display: flex;
justify-content: center;
margin: 26px 21px 0;
padding-top: 18px;
height: 75px;
font-size: 20px;
color: #B94A00;
font-weight: 600;
line-height: 28px;
background: url('../../../assets/images/home/button.png') no-repeat 0 0 /contain;
&-draw {
-webkit-animation: free_download .8s linear alternate infinite;
animation: free_download .8s linear alternate infinite;
position: relative;
&-button {
display: flex;
justify-content: center;
margin: 26px 21px 0;
padding-top: 18px;
height: 75px;
font-size: 20px;
color: #B94A00;
font-weight: 600;
line-height: 28px;
background: url('../../../assets/images/home/button.png') no-repeat 0 0 /contain;
}
&-tips {
position: absolute;
right: 21px;
top: -16px;
display: flex;
justify-content: center;
align-items: center;
width: 113px;
height: 17px;
background: linear-gradient(90deg,rgba(255,126,134,1) 0%,rgba(255,72,78,1) 100%);
border-radius: 7px 3px 7px 3px;
font-size: 12px;
font-weight: 600;
color: #FFFFFF;
line-height: 12px;
}
}
// &-button {
// display: flex;
// justify-content: center;
// margin: 26px 21px 0;
// padding-top: 18px;
// height: 75px;
// font-size: 20px;
// color: #B94A00;
// font-weight: 600;
// line-height: 28px;
// background: url('../../../assets/images/home/button.png') no-repeat 0 0 /contain;
// }
&-withdrawal {
display: flex;
flex-direction: column;
...
...
@@ -262,6 +295,23 @@
color: #333333 !important;
font-weight: 600;
line-height: 17px;
&_winning {
color: #FFFFFF !important;
background: #D5D8DE !important;
}
}
}
&-win {
margin: 18px 0 11px;
font-size: 12px;
color: #FFFFFF;
line-height: 17px;
.Av-win-time {
margin-bottom: 5px;
font-weight: 600;
}
.Av-win-instruction {
font-weight: 400;
}
}
}
...
...
src/views/Home/Activity/index.vue
View file @
3e607342
...
...
@@ -15,10 +15,10 @@
<p>
参与投票即可抽取最高
<span>
18888
</span>
元红包
</p>
<p>
芒果保险老用户专享
</p>
</div>
<div
class=
"activity-prize"
>
<div
class=
"activity-prize-pointer"
@
click=
"
gameStart
"
></div>
<div
class=
"activity-prize"
v-if=
"status !== 'HAS_WINNING'"
>
<div
class=
"activity-prize-pointer"
@
click=
"
drawLottery
"
></div>
</div>
<
!--
<div
class=
"activity-award
"
>
<
div
class=
"activity-award"
v-if=
"status === 'HAS_WINNING'
"
>
<div
class=
"activity-award-container"
>
<p
class=
"Aa-container-congratulate"
>
恭喜您已中奖
</p>
<p
class=
"Aa-container-public"
>
快关注「芒果保险」公众号
</p>
...
...
@@ -33,32 +33,30 @@
<p
class=
"Aa-container-focus"
>
截图或长按保存二维码
</p>
<p
class=
"Aa-container-focus"
>
使用「微信」扫一扫即可关注
</p>
</div>
</div>
-->
<div
class=
"activity-swiper"
>
</div>
<div
class=
"activity-swiper"
v-if=
"status !== 'HAS_WINNING'"
>
<cr-swipe
class=
"activity-swiper-container"
:autoplay=
"3000"
:show-indicators=
"false"
vertical
>
<cr-swipe-item>
<p>
138****8888
</p>
<p>
刚刚抽中了
<span>
18888
</span>
元红包
</p>
</cr-swipe-item>
<cr-swipe-item>
<p>
138****8887
</p>
<p>
刚刚抽中了
<span>
18888
</span>
元红包
</p>
</cr-swipe-item>
<cr-swipe-item>
<p>
138****8886
</p>
<p>
刚刚抽中了
<span>
18888
</span>
元红包
</p>
<cr-swipe-item
v-for=
"(item, index) in personList"
:key=
"index"
>
<p>
{{
item
.
phone
}}
</p>
<p>
刚刚抽中了
<span>
{{
item
.
amount
}}
</span
>
元红包
</p>
</cr-swipe-item>
</cr-swipe>
</div>
<div
class=
"activity-button"
@
click=
"modal.guide = true"
>
立即抽奖 100%领钱
</div>
<div
class=
"activity-draw"
v-if=
"status !== 'HAS_WINNING'"
>
<p
class=
"activity-draw-tips"
v-if=
"status === 'HAS_CHANCE'"
>
您有一次抽奖机会
</p>
<div
class=
"activity-draw-button"
@
click=
"drawLottery"
>
立即抽奖 100%领钱
</div>
</div>
<div
class=
"activity-withdrawal"
>
<p>
累计可提现红包
</p>
<p>
5元
</p>
<p>
{{
withdrawalText
}}
</p>
</div>
<div
class=
"activity-vote"
>
<p
class=
"activity-vote-title"
>
投保“国民保·百万医疗险”的用户
</p>
...
...
@@ -77,10 +75,18 @@
<p>
百万医疗险吗?
</p>
</div>
</div>
<cr-button
class=
"Av-body-right"
@
click=
"modal.vote = true"
>
去投票
<cr-button
:class=
"[
{ 'Av-body-right_winning': status === 'HAS_WINNING' }, 'Av-body-right']"
@click="drawLottery"
>
{{
voteButtonText
}}
</cr-button>
</div>
<div
class=
"activity-vote-win"
v-if=
"status === 'HAS_WINNING'"
>
<p
class=
"Av-win-time"
>
{{
winningTimeText
}}
</p>
<p
class=
"Av-win-instruction"
>
{{
winningIntroText
}}
</p>
</div>
<p></p>
</div>
<div
class=
"activity-intro"
>
<p>
奖品使用说明
</p>
...
...
@@ -91,13 +97,15 @@
</div>
<Modal
v-model=
"modal.winning"
type=
"winning"
></Modal>
<Modal
v-model=
"modal.guide"
type=
"guide"
></Modal>
<Modal
v-model=
"modal.vote"
type=
"vote"
></Modal>
<Modal
v-model=
"modal.vote"
type=
"vote"
@
game-start=
"gameStart"
></Modal>
<Modal
v-model=
"modal.detail"
type=
"detail"
>
</Modal>
</div>
</
template
>
<
script
>
import
Modal
from
"
../modules/Modal
"
;
import
localStorage
from
"
@/service/localStorage
"
;
import
personList
from
"
./constants
"
;
import
{
getLotteryRecord
,
drawLottery
}
from
"
@/api/activity
"
;
export
default
{
name
:
"
Activity
"
,
...
...
@@ -106,8 +114,10 @@ export default {
},
data
()
{
return
{
record
:
{},
isGoing
:
false
,
isLogin
:
localStorage
.
get
(
"
mongoToken
"
),
status
:
"
HAS_NOT_CHANCE
"
,
// HAS_NOT_CHANCE: 无机会 HAS_CHANCE: 有机会 HAS_WINNING
personList
,
modal
:
{
winning
:
false
,
guide
:
false
,
...
...
@@ -116,45 +126,86 @@ export default {
}
};
},
created
()
{
if
(
localStorage
.
get
(
"
mongoToken
"
))
{
this
.
getLotteryRecord
();
}
},
computed
:
{
voteButtonText
()
{
if
(
!
this
.
isLogin
)
{
return
"
去投票
"
;
let
text
=
"
去投票
"
;
if
(
this
.
status
===
"
HAS_WINNING
"
)
{
text
=
"
已中奖
"
;
}
else
if
(
this
.
status
===
"
HAS_CHANCE
"
)
{
text
=
"
去抽奖
"
;
}
return
""
;
return
text
;
},
withdrawalText
()
{
return
this
.
record
.
amount
?
`
${
this
.
record
.
amount
}
元`
:
"
0元
"
;
},
winningTimeText
()
{
return
`获奖时间:
${
this
.
record
.
time
}
`
;
},
winningIntroText
()
{
return
`奖品说明:您的奖品将在
${
this
.
record
.
time
}
,保单成功续期交费后,发放至您的“微信零钱”中,请注意查收。`
;
}
},
created
()
{},
methods
:
{
gameStart
()
{
this
.
$nextTick
(()
=>
{
if
(
this
.
isGoing
)
return
;
this
.
isGoing
=
true
;
console
.
log
(
"
游戏开始
"
);
const
turntable
=
document
.
querySelector
(
"
.activity-prize
"
);
const
pointer
=
document
.
querySelector
(
"
.activity-prize-pointer
"
);
// 1. 计算旋转角度
let
rotateItemDeg
=
(
3
*
360
)
/
6
;
// 每个item旋转角度, 第一个不用旋转
let
rotate
=
rotateItemDeg
+
4
*
360
;
let
rotateSpeed
=
((
rotateItemDeg
/
360
)
*
1
+
5
).
toFixed
(
2
);
// 2. 重置转盘样式
turntable
.
removeAttribute
(
"
style
"
);
pointer
.
removeAttribute
(
"
style
"
);
// 3. 保证下一次旋转动画生效
setTimeout
(()
=>
{
turntable
.
style
.
transform
=
`rotate(
${
rotate
}
deg)`
;
pointer
.
style
.
transform
=
`rotate(-
${
rotate
}
deg)`
;
pointer
.
style
.
transition
=
`transform
${
rotateSpeed
}
s ease-out`
;
turntable
.
style
.
transition
=
`transform
${
rotateSpeed
}
s ease-out`
;
},
10
);
async
gameStart
()
{
const
result
=
await
drawLottery
();
if
(
result
.
amount
===
"
5
"
)
{
this
.
$nextTick
(()
=>
{
if
(
this
.
isGoing
)
return
;
this
.
isGoing
=
true
;
console
.
log
(
"
游戏开始
"
);
const
turntable
=
document
.
querySelector
(
"
.activity-prize
"
);
const
pointer
=
document
.
querySelector
(
"
.activity-prize-pointer
"
);
// 1. 计算旋转角度
let
rotateItemDeg
=
(
3
*
360
)
/
6
;
// 每个item旋转角度, 第一个不用旋转
let
rotate
=
rotateItemDeg
+
4
*
360
;
let
rotateSpeed
=
((
rotateItemDeg
/
360
)
*
1
+
4
).
toFixed
(
2
);
// 2. 重置转盘样式
turntable
.
removeAttribute
(
"
style
"
);
pointer
.
removeAttribute
(
"
style
"
);
// 3. 保证下一次旋转动画生效
setTimeout
(()
=>
{
turntable
.
style
.
transform
=
`rotate(
${
rotate
}
deg)`
;
pointer
.
style
.
transform
=
`rotate(-
${
rotate
}
deg)`
;
pointer
.
style
.
transition
=
`transform
${
rotateSpeed
}
s ease-in-out`
;
turntable
.
style
.
transition
=
`transform
${
rotateSpeed
}
s ease-in-out`
;
},
10
);
// 4. 动画结束,显示中奖结果,中奖结果如何显示,视实际情况而定
setTimeout
(()
=>
{
console
.
log
(
"
中奖了
"
);
this
.
isGoing
=
false
;
this
.
modal
.
winning
=
true
;
},
rotateSpeed
*
1000
);
});
// 4. 动画结束,显示中奖结果,中奖结果如何显示,视实际情况而定
setTimeout
(()
=>
{
console
.
log
(
"
中奖了
"
);
this
.
isGoing
=
false
;
this
.
modal
.
winning
=
true
;
this
.
updateRecord
({
...
result
,
state
:
true
});
},
(
+
rotateSpeed
+
1
)
*
1000
);
});
}
},
async
getLotteryRecord
()
{
const
record
=
await
getLotteryRecord
();
this
.
updateRecord
(
record
);
},
drawLottery
()
{
if
(
this
.
status
===
"
HAS_NOT_CHANCE
"
)
{
this
.
modal
.
guide
=
true
;
}
else
if
(
this
.
status
===
"
HAS_CHANCE
"
)
{
this
.
modal
.
vote
=
true
;
}
},
updateRecord
(
record
)
{
this
.
record
=
record
;
if
(
record
?.
state
)
{
this
.
status
=
"
HAS_WINNING
"
;
}
else
if
(
record
?.
cnt
>
0
)
{
this
.
status
=
"
HAS_CHANCE
"
;
}
else
{
this
.
status
=
"
HAS_NOT_CHANCE
"
;
}
}
}
};
...
...
src/views/Home/SmartMeasure/Report/index.vue
View file @
3e607342
...
...
@@ -87,7 +87,14 @@
export
default
{
name
:
"
PolicyList
"
,
data
()
{
return
{};
return
{
avatar
:
""
,
age
:
0
};
},
create
()
{
const
answer
=
this
.
$route
.
query
.
answer
;
console
.
log
(
answer
);
}
};
</
script
>
...
...
src/views/Home/SmartMeasure/constants.js
0 → 100644
View file @
3e607342
import
male
from
"
@/assets/images/user/male@2x.png
"
;
import
female
from
"
@/assets/images/user/female@2x.png
"
;
const
questionList
=
[
{
id
:
1
,
question
:
"
请问您的性别是?
"
,
component
:
"
Gender
"
,
type
:
"
gender
"
,
selectType
:
"
radio
"
,
answer
:
""
},
{
id
:
2
,
question
:
"
请问您的年龄是?
"
,
component
:
"
Age
"
,
type
:
"
age
"
,
selectType
:
"
radio
"
,
answer
:
""
},
{
id
:
3
,
question
:
"
请问您结婚了吗?
"
,
component
:
"
Select
"
,
type
:
"
marrige
"
,
selectType
:
"
radio
"
,
answer
:
""
},
{
id
:
4
,
question
:
"
嘘…悄悄告诉我您月收入是多少?
"
,
component
:
"
Select
"
,
type
:
"
income
"
,
selectType
:
"
radio
"
,
answer
:
""
},
{
id
:
5
,
question
:
"
生活中,您有下面的习惯、环境吗
"
,
component
:
"
Select
"
,
type
:
"
environment
"
,
selectType
:
"
multi-select
"
,
answer
:
""
},
{
id
:
6
,
question
:
"
您平时的出行方式是什么呢?
"
,
component
:
"
Select
"
,
selectType
:
"
multi-select
"
,
type
:
"
travel
"
,
answer
:
""
},
{
id
:
7
,
question
:
"
您目前是否还有其他保险呢?
"
,
component
:
"
Select
"
,
type
:
"
insurance
"
,
selectType
:
"
multi-select
"
,
answer
:
""
}
];
const
ageScope
=
new
Array
(
48
)
.
fill
(
0
)
.
map
((
v
,
index
)
=>
1955
+
index
+
"
年
"
)
.
sort
((
a
,
b
)
=>
(
a
===
b
?
0
:
a
<
b
?
1
:
-
1
));
const
genderList
=
[
{
image
:
male
,
value
:
"
male
"
,
answer
:
"
男神
"
},
{
image
:
female
,
value
:
"
female
"
,
answer
:
"
女神
"
}
];
const
selectList
=
{
marrige
:
{
data
:
[
"
单身贵族爱自由
"
,
"
幸福的二人世界
"
,
"
家有儿女初长成
"
],
type
:
"
radio
"
,
selected
:
[],
required
:
true
},
income
:
{
data
:
[
[
"
3000元以下
"
,
"
3000~5000元
"
],
[
"
5000~8000元
"
,
"
8000~12000元
"
],
[
"
12000~18000元
"
,
"
18000元以上
"
]
],
type
:
"
radio
"
,
selected
:
[],
required
:
true
},
environment
:
{
data
:
[
[
"
喝酒
"
,
"
抽烟/二手烟
"
],
[
"
熬夜
"
,
"
不按时吃饭
"
],
[
"
工作压力大
"
,
"
不常运动
"
]
],
type
:
"
multi-select
"
,
selected
:
[],
required
:
true
},
travel
:
{
data
:
[
[
"
开车
"
,
"
公共交通
"
],
[
"
非机动车
"
,
"
步行
"
],
[
"
坐火车
"
,
"
坐飞机
"
]
],
type
:
"
multi-select
"
,
selected
:
[],
required
:
false
},
insurance
:
{
data
:
[[
"
社保
"
,
"
医疗险
"
],
[
"
重疾险
"
,
"
意外险
"
],
[
"
寿险
"
]],
type
:
"
multi-select
"
,
selected
:
[],
required
:
false
}
};
export
{
questionList
,
ageScope
,
genderList
,
selectList
};
src/views/Home/SmartMeasure/index.less
View file @
3e607342
...
...
@@ -91,6 +91,11 @@
color: #666666;
line-height: 14px;
}
.Mdrcc-marriage_selected {
background: #FFC842;
color: #333333;
}
}
.Mdrc-component-income {
...
...
@@ -187,14 +192,16 @@
justify-content: center;
align-items: center;
margin-right: 12px;
padding: 0 14px;
height: 40px;
box-sizing: border-box;
padding: 10px;
max-width: 244px;
// height: 40px;
background: #FFC842;
border-radius: 14px 0px 14px 14px;
font-size: 16px;
font-weight: 400;
color: #333333;
line-height:
16
px;
line-height:
20
px;
}
.Md-user-avatar {
...
...
src/views/Home/SmartMeasure/index.vue
View file @
3e607342
...
...
@@ -16,8 +16,10 @@
v-if=
"!item.answer || index === dataList.length - 1"
:is=
"item.component"
:type=
"item.type"
@
select=
"select"
:disabled=
"isLoading"
@
nextQuestion=
"nextQuestion"
@
submit=
"submit"
:currentAnswer.sync=
"currentAnswer"
></component>
</div>
</div>
...
...
@@ -31,10 +33,12 @@
</div>
<div
class=
"Md-operation-submit"
@
click=
"submit"
v-show=
"index === dataList.length - 1 && item.answer"
@
click=
"nextQuestion"
v-show=
"
item.selectType === 'multi-select' && currentAnswer && index === smartMeasure.length - 1
"
>
确认提交
{{
item
.
type
===
"
insurance
"
?
"
确认提交
"
:
"
确定
"
}}
</div>
</div>
<div
class=
"measure-dialogue-user"
v-show=
"index !== dataList.length - 1 && item.answer"
>
...
...
@@ -55,58 +59,7 @@
import
Age
from
"
./modules/Age
"
;
import
Gender
from
"
./modules/Gender
"
;
import
Select
from
"
./modules/Select
"
;
const
dataList
=
[
{
id
:
1
,
question
:
"
请问您的性别是?
"
,
component
:
"
Gender
"
,
type
:
"
gender
"
,
answer
:
""
},
{
id
:
2
,
question
:
"
请问您的年龄是?
"
,
component
:
"
Age
"
,
type
:
"
age
"
,
answer
:
""
},
{
id
:
3
,
question
:
"
请问您结婚了吗?
"
,
component
:
"
Select
"
,
type
:
"
marrige
"
,
answer
:
""
},
{
id
:
4
,
question
:
"
嘘…悄悄告诉我您月收入是多少?
"
,
component
:
"
Select
"
,
type
:
"
income
"
,
answer
:
""
},
{
id
:
5
,
question
:
"
生活中,您有下面的习惯、环境吗
"
,
component
:
"
Select
"
,
type
:
"
environment
"
,
answer
:
""
},
{
id
:
6
,
question
:
"
您平时的出行方式是什么呢?
"
,
component
:
"
Select
"
,
type
:
"
travel
"
,
answer
:
""
},
{
id
:
7
,
question
:
"
您目前是否还有其他保险呢?
"
,
component
:
"
Select
"
,
type
:
"
insurance
"
,
answer
:
""
}
];
import
{
questionList
}
from
"
./constants
"
;
export
default
{
name
:
"
SmartMeasure
"
,
...
...
@@ -117,8 +70,9 @@ export default {
},
data
()
{
return
{
dataList
,
isLoading
:
false
dataList
:
questionList
,
isLoading
:
false
,
currentAnswer
:
""
};
},
computed
:
{
...
...
@@ -132,27 +86,51 @@ export default {
}
},
methods
:
{
select
(
answer
)
{
const
id
=
this
.
smartMeasure
[
this
.
smartMeasure
.
length
-
1
].
id
;
this
.
smartMeasure
[
this
.
smartMeasure
.
length
-
1
].
answer
=
answer
;
// select(answer) {
// console.log(answer, this.isLoading);
// if (this.isLoading) return;
// currentAnswer = answer;
// const id = this.smartMeasure[this.smartMeasure.length - 1].id;
// this.smartMeasure[this.smartMeasure.length - 1].answer = answer;
// if (this.smartMeasure[this.smartMeasure.length - 1].selectType === "radio") {
// this.nextQuestion();
// }
// this.$forceUpdate();
// if (this.smartMeasure.length
<
this
.
dataList
.
length
)
{
// setTimeout(() => {
// this.dataList = this.dataList.map(data => {
// if (data.id === id) data.answer = answer;
// return data;
// });
// }, 600);
// }
// },
nextQuestion
()
{
this
.
$forceUpdate
();
const
id
=
this
.
smartMeasure
[
this
.
smartMeasure
.
length
-
1
].
id
;
if
(
this
.
smartMeasure
.
length
<
this
.
dataList
.
length
)
{
setTimeout
(()
=>
{
this
.
dataList
=
this
.
dataList
.
map
(
data
=>
{
if
(
data
.
id
===
id
)
data
.
answer
=
a
nswer
;
if
(
data
.
id
===
id
)
data
.
answer
=
this
.
currentA
nswer
;
return
data
;
});
this
.
currentAnswer
=
""
;
},
600
);
}
else
if
(
this
.
smartMeasure
.
length
===
this
.
dataList
.
length
)
{
this
.
submit
();
}
},
goBack
(
id
)
{
if
(
this
.
isLoading
)
return
;
this
.
dataList
[
id
-
1
].
answer
=
""
;
this
.
dataList
[
id
-
2
].
answer
=
""
;
},
submit
()
{
this
.
isLoading
=
true
;
this
.
scrollToBottom
();
setTimeout
(()
=>
{});
setTimeout
(()
=>
{
// this.$router.push({ path: "/home/smart-measure/report", query: { answer: this.dataList } });
},
2000
);
console
.
log
(
"
submit
"
,
this
.
dataList
);
},
scrollToBottom
()
{
...
...
src/views/Home/SmartMeasure/modules/Age.vue
View file @
3e607342
...
...
@@ -7,6 +7,7 @@
<cr-picker
ref=
"picker"
show-toolbar
selected-index=
"12"
:columns=
"ageScope"
@
confirm=
"onConfirm"
@
cancel=
"showPopup = false"
...
...
@@ -15,32 +16,20 @@
</div>
</
template
>
<
script
>
import
male
from
"
@/assets/images/user/male@2x.png
"
;
import
female
from
"
@/assets/images/user/female@2x.png
"
;
const
ageScope
=
new
Array
(
120
)
.
fill
(
0
)
.
map
((
v
,
index
)
=>
1901
+
index
+
"
年
"
)
.
sort
((
a
,
b
)
=>
(
a
===
b
?
0
:
a
<
b
?
1
:
-
1
));
const
dataList
=
[
{
image
:
male
,
value
:
"
male
"
},
{
image
:
female
,
value
:
"
female
"
}
];
import
{
ageScope
}
from
"
../constants
"
;
import
{
parseTime
}
from
"
@/service/utils
"
;
export
default
{
name
:
"
Age
"
,
props
:
{},
props
:
{
currentAnswer
:
{
type
:
String
,
default
:
""
}
},
data
()
{
return
{
showPopup
:
false
,
dataList
,
ageScope
,
refreshed
:
false
};
...
...
@@ -57,8 +46,12 @@ export default {
this
.
showPopup
=
false
;
},
onConfirm
(
picker
,
res
)
{
const
year
=
res
[
0
].
slice
(
0
,
4
);
const
currentYear
=
parseTime
(
""
,
"
{y}
"
);
const
age
=
currentYear
-
year
;
this
.
showPopup
=
false
;
this
.
$emit
(
"
select
"
,
res
[
0
]);
this
.
$emit
(
"
update:currentAnswer
"
,
`
${
age
}
岁`
);
this
.
$emit
(
"
nextQuestion
"
);
}
}
};
...
...
src/views/Home/SmartMeasure/modules/Gender.vue
View file @
3e607342
...
...
@@ -12,33 +12,20 @@
</div>
</
template
>
<
script
>
import
male
from
"
@/assets/images/user/male@2x.png
"
;
import
female
from
"
@/assets/images/user/female@2x.png
"
;
const
dataList
=
[
{
image
:
male
,
value
:
"
male
"
,
answer
:
"
男神
"
},
{
image
:
female
,
value
:
"
female
"
,
answer
:
"
女神
"
}
];
import
{
genderList
}
from
"
../constants
"
;
export
default
{
name
:
"
Age
"
,
props
:
{},
data
()
{
return
{
dataList
dataList
:
genderList
};
},
methods
:
{
select
(
value
)
{
this
.
$emit
(
"
select
"
,
value
);
this
.
$emit
(
"
update:currentAnswer
"
,
value
);
this
.
$emit
(
"
nextQuestion
"
);
}
}
};
...
...
src/views/Home/SmartMeasure/modules/Select.vue
View file @
3e607342
<
template
>
<div
class=
"Mdrc-component-marriage Mdrc-component-income"
>
<template
v-if=
"type === 'marrige'"
>
<p
v-for=
"(item, index) in answers[type].data"
:key=
"index"
@
click=
"select(item)"
>
<p
:class=
"
{ 'Mdrcc-marriage_selected': answers[type].selected.includes(item) }"
v-for="(item, index) in answers[type].data"
:key="index"
@click="select(item, answers[type].type, type)"
>
{{
item
}}
</p>
</
template
>
...
...
@@ -28,50 +33,7 @@
</div>
</template>
<
script
>
const
answers
=
{
marrige
:
{
data
:
[
"
单身贵族爱自由
"
,
"
幸福的二人世界
"
,
"
家有儿女初长成
"
],
type
:
"
radio
"
,
selected
:
[],
required
:
true
},
income
:
{
data
:
[
[
"
3000元以下
"
,
"
3000~5000元
"
],
[
"
5000~8000元
"
,
"
8000~12000元
"
],
[
"
12000~18000元
"
,
"
18000元以上
"
]
],
type
:
"
radio
"
,
selected
:
[],
required
:
true
},
environment
:
{
data
:
[
[
"
喝酒
"
,
"
抽烟/二手烟
"
],
[
"
熬夜
"
,
"
不按时吃饭
"
],
[
"
工作压力大
"
,
"
不常运动
"
]
],
type
:
"
radio
"
,
selected
:
[],
required
:
true
},
travel
:
{
data
:
[
[
"
开车
"
,
"
公共交通
"
],
[
"
非机动车
"
,
"
步行
"
],
[
"
坐火车
"
,
"
坐飞机
"
]
],
tye
:
"
radio
"
,
selected
:
[],
required
:
false
},
insurance
:
{
data
:
[[
"
社保
"
,
"
医疗险
"
],
[
"
重疾险
"
,
"
意外险
"
],
[
"
寿险
"
]],
type
:
"
multi-select
"
,
selected
:
[],
required
:
false
}
};
import
{
selectList
}
from
"
../constants
"
;
export
default
{
name
:
"
Select
"
,
...
...
@@ -79,37 +41,46 @@ export default {
type
:
{
type
:
String
,
default
:
"
marrige
"
},
disabled
:
{
type
:
Boolean
,
default
:
false
},
currentAnswer
:
{
type
:
String
,
default
:
""
}
},
data
()
{
return
{
answers
:
JSON
.
parse
(
JSON
.
stringify
(
answers
))
answers
:
JSON
.
parse
(
JSON
.
stringify
(
selectList
))
};
},
methods
:
{
select
(
value
,
type
,
name
)
{
console
.
log
(
value
,
type
,
name
);
if
(
value
===
"
没有,下一题
"
&&
name
===
"
insurance
"
)
{
this
.
answers
.
insurance
.
selected
=
[
"
没有,下一题
"
];
this
.
$emit
(
"
select
"
,
value
);
this
.
$emit
(
"
submit
"
);
return
;
}
if
(
type
===
"
multi-select
"
)
{
this
.
answers
[
name
].
selected
=
this
.
answers
[
name
].
selected
.
filter
(
v
=>
v
!==
"
没有,下一题
"
);
this
.
answers
[
name
].
selected
.
includes
(
value
)
?
(
this
.
answers
[
name
].
selected
=
this
.
answers
[
name
].
selected
.
filter
(
v
=>
v
!==
value
))
:
this
.
answers
[
name
].
selected
.
push
(
value
);
if
(
this
.
disabled
)
return
;
this
.
$emit
(
"
select
"
,
this
.
answers
[
name
].
selected
.
join
(
"
,
"
));
}
else
{
this
.
$emit
(
"
select
"
,
value
);
if
(
type
===
"
multi-select
"
)
{
if
(
value
===
"
没有,下一题
"
)
{
this
.
answers
[
name
].
selected
=
[
"
没有,下一题
"
];
}
else
{
this
.
answers
[
name
].
selected
=
this
.
answers
[
name
].
selected
.
filter
(
v
=>
v
!==
"
没有,下一题
"
);
if
(
this
.
answers
[
name
].
selected
.
includes
(
value
))
{
this
.
answers
[
name
].
selected
=
this
.
answers
[
name
].
selected
.
filter
(
v
=>
v
!==
value
);
}
else
{
this
.
answers
[
name
].
selected
.
push
(
value
);
}
}
this
.
$emit
(
"
update:currentAnswer
"
,
this
.
answers
[
name
].
selected
.
join
(
"
,
"
));
}
else
if
(
type
===
"
radio
"
)
{
this
.
answers
[
name
].
selected
=
[
value
];
this
.
$emit
(
"
update:currentAnswer
"
,
value
);
this
.
$emit
(
"
nextQuestion
"
);
}
}
},
created
()
{
// this.answers[this.type] = answers[this.type];
console
.
log
(
answers
.
insurance
);
}
};
</
script
>
...
...
src/views/Home/index.vue
View file @
3e607342
...
...
@@ -7,7 +7,7 @@
fit=
"cover"
src=
"@/assets/images/home/activity@2x.png"
/>
<div
class=
"home-button"
></div>
<div
class=
"home-button"
@
click=
"$router.push('/home/activity')"
></div>
<div
class=
"home-service"
>
<router-link
tag=
"div"
to=
"/home/smart-measure"
class=
"home-service-item"
>
<svg-icon
icon-class=
"risk-assessment"
class-name=
"Hs-item-svg"
/>
...
...
src/views/Home/modules/Modal.vue
View file @
3e607342
...
...
@@ -76,23 +76,41 @@
可以
100
%
报销责任内的医药费用,是医保的重要补充,是人人都应该购买的国民医疗保障。
<
/p
>
<
div
class
=
"
Avp-body-opera
"
>
<
div
class
=
"
Avpb-opera-item Avpb-opera-left Avpb-opera-left_selected
"
>
<
div
:
class
=
"
[
{ 'Avpb-opera-left_selected': voteData.activeIdx === 0
}
,
'Avpb-opera-item',
'Avpb-opera-left'
]
"
@
click
=
"
vote(0)
"
>
<
svg
-
icon
class
-
name
=
"
Avpbo-item-svg
"
icon
-
class
=
"
understand
"
/>
<
p
class
=
"
Avpbo-item-text
"
>
了解
<
/p
>
<
/div
>
<
div
class
=
"
Avpb-opera-item Avpb-opera-right
"
>
<
div
:
class
=
"
[
{ 'Avpb-opera-right_selected': voteData.activeIdx === 1
}
,
'Avpb-opera-item',
'Avpb-opera-right'
]
"
@
click
=
"
vote(1)
"
>
<
svg
-
icon
class
-
name
=
"
Avpbo-item-svg
"
icon
-
class
=
"
understand-not
"
/>
<
p
class
=
"
Avpbo-item-text
"
>
不了解
<
/p
>
<
/div
>
<
/div
>
<
div
class
=
"
Avp-body-statistic
"
>
<
p
>
了解
<
span
>
23405
<
/span></
p
>
<
p
>
不了解
<
span
>
23405
<
/span></
p
>
<
p
>
了解
<
span
>
{{
voteData
.
understandNum
}}
<
/span
>
<
/p
>
<
p
>
不了解
<
span
>
{{
voteData
.
notUnderstandNum
}}
<
/span
>
<
/p
>
<
/div
>
<
cr
-
progress
class
=
"
Avp-body-progress
"
:
percentage
=
"
80
"
:
show
-
pivot
=
"
false
"
/>
<
cr
-
progress
class
=
"
Avp-body-progress
"
:
percentage
=
"
percentage
"
:
show
-
pivot
=
"
false
"
/>
<
/div
>
<
div
class
=
"
Av-pane-footer
"
>
<
cr
-
button
class
=
"
Avp-body-button
"
>
<
cr
-
button
class
=
"
Avp-body-button
"
@
click
=
"
drawLottery
"
>
完成投票抽红包
<
/cr-button
>
<
p
>
最高
<
span
>
88888
<
/span>元</
p
>
...
...
@@ -142,9 +160,23 @@ export default {
data
()
{
return
{
show
:
this
.
value
,
time
time
,
voteData
:
{
activeIdx
:
0
,
understandNum
:
15688
,
notUnderstandNum
:
2566
}
}
;
}
,
computed
:
{
percentage
()
{
return
(
(
this
.
voteData
.
understandNum
/
(
this
.
voteData
.
understandNum
+
this
.
voteData
.
notUnderstandNum
))
*
100
);
}
}
,
watch
:
{
value
:
{
immediate
:
true
,
...
...
@@ -162,7 +194,12 @@ export default {
this
.
$emit
(
"
input
"
,
false
);
}
,
go
()
{
this
.
$emit
(
"
input
"
,
false
);
if
(
this
.
value
)
{
this
.
$router
.
push
({
path
:
"
/goods/detail
"
,
query
:
{
id
:
"
TKYLX001
"
,
type
:
"
mi
"
}
}
);
}
}
,
resetTime
()
{
this
.
time
=
time
;
...
...
@@ -175,6 +212,21 @@ export default {
}
this
.
time
-=
1
;
timer
=
setTimeout
(
this
.
countTime
,
1000
);
}
,
vote
(
idx
)
{
if
(
this
.
voteData
.
activeIdx
===
idx
)
return
;
this
.
voteData
.
activeIdx
=
idx
;
if
(
idx
===
0
)
{
this
.
voteData
.
notUnderstandNum
--
;
this
.
voteData
.
understandNum
++
;
}
else
if
(
idx
===
1
)
{
this
.
voteData
.
notUnderstandNum
++
;
this
.
voteData
.
understandNum
--
;
}
}
,
drawLottery
()
{
this
.
$emit
(
"
input
"
,
false
);
this
.
$emit
(
"
game-start
"
);
}
}
}
;
...
...
@@ -446,6 +498,9 @@ export default {
background
:
url
(
"
../../../assets/images/home/understand-not@2x.png
"
)
no
-
repeat
center
/
contain
;
&
_selected
{
.
Avpbo
-
item
-
text
{
color
:
#
fff
;
}
background
:
url
(
"
../../../assets/images/home/understand-not_selected@2x.png
"
)
no
-
repeat
center
/
contain
;
}
...
...
src/views/Policy/Detail/Types/Guarantee.vue
View file @
3e607342
...
...
@@ -11,7 +11,7 @@
<insurance-card
:productNo=
"data.productNo"
:policySecId=
"data.policySecId"
:autoRenewP
remium=
"data.autoRenewPremium
"
:autoRenewP
olicy=
"data.autoRenewPolicy
"
:policyNo=
"data.policyNo"
:orderNo=
"data.orderNo"
></insurance-card>
...
...
src/views/Policy/Detail/modules/InsuranceCard.vue
View file @
3e607342
...
...
@@ -18,7 +18,7 @@ export default {
type
:
[
Number
,
String
],
default
:
1
},
autoRenewP
remium
:
{
autoRenewP
olicy
:
{
type
:
Boolean
,
default
:
false
},
...
...
@@ -46,7 +46,7 @@ export default {
return
GOODS_LIST
.
find
(
v
=>
v
.
id
===
this
.
productNo
)?.
company
||
""
;
},
buttonText
()
{
return
this
.
autoRenewP
remium
?
"
已开通次年续保
"
:
"
已关闭次年续保
"
;
return
this
.
autoRenewP
olicy
?
"
已开通次年续保
"
:
"
已关闭次年续保
"
;
}
},
methods
:
{
...
...
src/views/Policy/PaymentRecord/index.vue
View file @
3e607342
...
...
@@ -124,7 +124,7 @@ export default {
recordDate
:
v
.
recordDate
,
amountText
:
`
${
v
.
amount
}
元`
,
payStatusText
:
v
.
currentPayState
===
"
1
"
?
"
已欠费
"
:
v
.
currentPayState
===
"
3
"
?
"
缴费成功
"
:
"
-
"
v
.
currentPayState
===
-
1
?
"
已欠费
"
:
v
.
currentPayState
===
3
?
"
缴费成功
"
:
"
-
"
}))
||
[];
if
([
"
9-5
"
,
"
9-6
"
].
includes
(
status
))
{
...
...
src/views/Policy/Renewal/index.vue
View file @
3e607342
...
...
@@ -22,7 +22,7 @@
<div
class=
"renewal-container-detail"
v-if=
"!isOpened"
></div>
<div
class=
"renewal-container-detail"
v-if=
"isOpened"
>
<div
class=
"Rc-detail-item"
>
<span>
次年保
但
生效时间
</span>
<span>
次年保
单
生效时间
</span>
<span>
{{
nextYear
}}
</span>
</div>
<div
class=
"Rc-detail-item"
>
...
...
@@ -47,7 +47,7 @@ export default {
},
async
created
()
{
const
detail
=
await
getPolicyDetail
(
this
.
$route
.
params
.
orderNo
);
if
(
detail
.
autoRenewP
remium
)
{
if
(
detail
.
autoRenewP
olicy
)
{
this
.
isOpened
=
true
;
}
this
.
nextYear
=
detail
.
nextYearEffectiveDate
||
"
-
"
;
...
...
src/views/Policy/constants.js
View file @
3e607342
...
...
@@ -30,7 +30,7 @@ const statusMap = {
component
:
"
Guarantee
"
},
"
4
"
:
{
status
:
[
"
1-1
"
,
"
4-1
"
,
"
5-1
"
],
status
:
[
"
1-1
"
,
"
2-1
"
,
"
3-1
"
,
"
2-4
"
,
"
3-4
"
],
title
:
"
被保人:${title}
"
,
contend
:
"
需付保费:${money}元
"
,
statusText
:
"
待支付
"
,
...
...
@@ -55,7 +55,7 @@ const statusMap = {
},
"
6
"
:
{
status
:
[
"
7-5
"
],
title
:
"
退款金额:${title}
"
,
title
:
"
退款金额:${title}
元
"
,
contend
:
"
支付时间:${start}
"
,
statusText
:
"
退款中
"
,
buttons
:
[
"
联系客服
"
],
...
...
@@ -69,7 +69,7 @@ const statusMap = {
},
"
7
"
:
{
status
:
[
"
4-5
"
,
"
5-5
"
],
title
:
"
退款金额:${title}
"
,
title
:
"
退款金额:${title}
元
"
,
contend
:
"
支付时间:${start}
"
,
statusText
:
"
退款中
"
,
buttons
:
[
"
联系客服
"
],
...
...
@@ -83,7 +83,7 @@ const statusMap = {
},
"
8
"
:
{
status
:
[
"
4-6
"
,
"
5-6
"
,
"
7-6
"
],
title
:
"
退款金额:${title}
"
,
title
:
"
退款金额:${title}
元
"
,
contend
:
"
支付时间:${start}
"
,
statusText
:
"
退款成功
"
,
buttons
:
[
"
联系客服
"
],
...
...
@@ -96,8 +96,8 @@ const statusMap = {
}
},
"
9
"
:
{
status
:
[
"
4-
4
"
,
"
5-4
"
,
"
7-4
"
,
"
9-4
"
],
title
:
"
退款金额:${title}
"
,
status
:
[
"
4-
7
"
,
"
5-7
"
,
"
7-7
"
,
"
9-7
"
],
title
:
"
退款金额:${title}
元
"
,
contend
:
"
支付时间:${start}
"
,
statusText
:
"
退款失败
"
,
buttons
:
[
"
联系客服
"
]
...
...
src/views/Policy/modules/PolicyItem.vue
View file @
3e607342
...
...
@@ -79,11 +79,11 @@ import { getPolicyList } from "@/api/policy";
import
policyStatusMixin
from
"
../mixin/policyStatus.mixin
"
;
import
detailPayMixin
from
"
@/views/Goods/Detail/modules/detailPay.mixin
"
;
// SELF(
0
, "本人"),
// PARENT(
1
, "父母"),
// SPOUSE(
2
, "配偶"),
// CHILDREN(
3
, "子女");
const
relations
=
[
-
1
,
0
,
1
,
2
,
3
];
// SELF(
1
, "本人"),
// PARENT(
2
, "父母"),
// SPOUSE(
3
, "配偶"),
// CHILDREN(
4
, "子女");
const
relations
=
[
-
1
,
1
,
2
,
3
,
4
];
export
default
{
name
:
"
InsuranceRecommend
"
,
...
...
src/views/User/Family/Detail/index.vue
View file @
3e607342
...
...
@@ -18,7 +18,6 @@ export default {
userInfoSecId
:
""
,
nameMask
:
""
,
idNoMask
:
""
,
socialSecurity
:
""
,
relation
:
""
}
};
...
...
@@ -26,12 +25,17 @@ export default {
async
created
()
{
await
this
.
setFamilyList
();
const
information
=
this
.
familyList
.
find
(
family
=>
+
family
.
userInfoSecId
===
+
this
.
$route
.
params
.
id
family
=>
family
.
userInfoSecId
===
this
.
$route
.
params
.
id
);
this
.
information
=
{
...
information
,
relation
:
information
.
appellation
,
socialSecurity
:
information
.
socialSecurity
?
"
true
"
:
"
false
"
socialSecurity
:
information
.
socialSecurity
===
true
?
"
true
"
:
information
.
socialSecurity
===
false
?
"
false
"
:
""
};
},
computed
:
{
...
...
src/views/User/Family/index.less
View file @
3e607342
...
...
@@ -147,7 +147,6 @@
&-radio {
display: flex;
justify-content: space-between;
margin-bottom: 28px;
padding-left: 10px;
.Ff-radio-title {
...
...
@@ -229,14 +228,17 @@
}
&-button {
width: 100%;
height: 52px;
background: #FFC842 !important;
border-radius: 14px;
font-size: 16px;
font-weight: 600;
color: #333333;
line-height: 22px;
&_confirm {
margin-top: 28px;
width: 100%;
height: 52px;
background: #FFC842 !important;
border-radius: 14px;
font-size: 16px;
font-weight: 600;
color: #333333;
line-height: 22px;
}
&_deleted {
width: 100%;
margin-top: 15px;
...
...
src/views/User/Family/index.vue
View file @
3e607342
...
...
@@ -6,7 +6,7 @@
<div
class=
"family-list-item"
v-for=
"(item, index) in familyList"
@
click=
"go(`/user/family/detail/$
{
item.userInfoSecId
}`)"
@
click=
"go(`/user/family/detail/$
{
encodeURIComponent(item.userInfoSecId)
}`)"
:key="index"
>
<div
class=
"Fl-item-left"
>
...
...
@@ -24,7 +24,7 @@
{ 'family-list-item_overlay_3': familyList.length >= 3 },
'family-list-item'
]"
@click="go(`/user/family/detail/${
familyList[0].userInfoSecId
}`)"
@click="go(`/user/family/detail/${
encodeURIComponent(familyList[0].userInfoSecId)
}`)"
>
<div
class=
"Fl-item-left"
>
<cr-image
class=
"Fli-left-image"
:src=
"familyList[0].avatar"
width=
""
height=
""
/>
...
...
src/views/User/Family/modules/FamilyForm.vue
View file @
3e607342
...
...
@@ -4,22 +4,21 @@
<cr-form
ref=
"form"
class=
"family-form"
@
submit=
"modal.confirm = true"
@
failed=
"onFailed"
>
<cr-field
class=
"family-form-item"
v-model=
"formData.name
Mask
"
:readonly=
"readOnlyProperty.name
Mask
"
v-model=
"formData.name"
:readonly=
"readOnlyProperty.name"
name=
"姓名"
label=
"姓名"
placeholder=
"请
输入投保
人姓名"
:rules=
"[
{ required: true, message: '请填写
用户
名' }]"
placeholder=
"请
填写家
人姓名"
:rules=
"[
{ required: true, message: '请填写
家人姓
名' }]"
/>
<cr-field
class=
"family-form-item"
v-model=
"formData.idNoMask"
:readonly=
"readOnlyProperty.idNoMask"
type=
"password"
v-model=
"formData.idNo"
:readonly=
"readOnlyProperty.idNo"
name=
"身份证号"
label=
"身份证号"
placeholder=
"请填写家人身份证号"
:rules=
"[
{ required: true, message: '请填写身份证号' }]"
:rules=
"[
{ required: true, message: '请填写
家人
身份证号' }]"
/>
<cr-field
@
click.native=
"showPopups"
...
...
@@ -41,10 +40,15 @@
/>
</div>
<cr-field
class=
"Ff-radio-options"
name=
"社保"
>
<cr-radio-btn
slot=
"input"
v-model=
"formData.socialSecurity"
:radio-data=
"planOptions"
/>
<cr-radio-btn
slot=
"input"
:disabled=
"readOnlyProperty.socialSecurity"
v-model=
"formData.socialSecurity"
:radio-data=
"planOptions"
/>
</cr-field>
</div>
<cr-button
class=
"family-form-button
"
native-type=
"submit
"
>
<cr-button
class=
"family-form-button
_confirm"
native-type=
"submit"
v-if=
"isShowSub
"
>
{{
saveText
}}
</cr-button>
<cr-button
class=
"family-form-button_deleted"
@
click=
"modal.delete = true"
v-if=
"isShowDel"
>
...
...
@@ -74,11 +78,11 @@
<div
class=
"family-confirm-modal"
>
<div
class=
"Fc-modal-item"
>
<span
v-html=
"'姓  名:'"
></span>
<span>
{{
formData
.
name
Mask
}}
</span>
<span>
{{
formData
.
name
}}
</span>
</div>
<div
class=
"Fc-modal-item"
>
<span>
身份证号:
</span>
<span>
{{
formData
.
idNo
Mask
}}
</span>
<span>
{{
formData
.
idNo
}}
</span>
</div>
<div
class=
"Fc-modal-item"
>
<span>
与您关系:
</span>
...
...
@@ -100,7 +104,7 @@
confirm-btn=
"继续保留"
title=
"删除确认"
>
确认删除【
{{
information
.
name
Mask
information
.
name
}}
】的个人信息吗?为提供全面的家庭保障,建议您保留家庭成员信息。
</Modal>
<cr-popup
v-model=
"showPopup"
position=
"bottom"
>
...
...
@@ -129,8 +133,8 @@ const planOptions = [
];
const
defaultFormData
=
{
userInfoSecId
:
""
,
name
Mask
:
""
,
idNo
Mask
:
""
,
name
:
""
,
idNo
:
""
,
socialSecurity
:
""
,
relation
:
""
};
...
...
@@ -179,8 +183,9 @@ export default {
result
=
{
...
result
,
...{
nameMask
:
true
,
idNoMask
:
true
name
:
true
,
idNo
:
true
,
socialSecurity
:
true
}
};
}
...
...
@@ -191,6 +196,9 @@ export default {
},
isShowDel
()
{
return
this
.
type
===
"
update
"
&&
this
.
formData
.
relation
!==
"
本人
"
?
true
:
false
;
},
isShowSub
()
{
return
this
.
type
===
"
add
"
||
this
.
formData
.
relation
!==
"
本人
"
?
true
:
false
;
}
},
watch
:
{
...
...
@@ -204,8 +212,8 @@ export default {
this
.
modal
.
confirm
=
false
;
// 组件不支持boolean,需转换
const
params
=
{
name
:
this
.
formData
?.
name
Mask
,
idNo
:
this
.
formData
?.
idNo
Mask
,
name
:
this
.
formData
?.
name
,
idNo
:
this
.
formData
?.
idNo
,
relation
:
this
.
getReletion
(
this
.
formData
?.
relation
)
};
// 转换参数类型
...
...
@@ -243,14 +251,14 @@ export default {
getReletion
(
relation
)
{
let
result
=
-
1
;
if
([
"
父亲
"
,
"
母亲
"
].
includes
(
relation
))
{
result
=
1
;
}
else
if
([
"
女儿
"
,
"
儿子
"
].
includes
(
relation
))
{
result
=
3
;
if
([
"
父亲
"
,
"
母亲
"
,
"
父母
"
].
includes
(
relation
))
{
result
=
2
;
}
else
if
([
"
女儿
"
,
"
儿子
"
,
"
子女
"
].
includes
(
relation
))
{
result
=
4
;
}
else
if
(
relation
===
"
本人
"
)
{
result
=
0
;
result
=
1
;
}
else
if
(
relation
===
"
配偶
"
)
{
result
=
2
;
result
=
3
;
}
return
result
;
...
...
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