Commit f919352d authored by 郝聪敏's avatar 郝聪敏

Merge branch 'feature/build_change' into 'master'

Feature/build change

See merge request !38
parents 029a83f1 5d6fe722
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);
};
...@@ -22,5 +22,5 @@ export const getPayRecord = policySecId => { ...@@ -22,5 +22,5 @@ export const getPayRecord = policySecId => {
// 保单自动续保状态管理 // 保单自动续保状态管理
export const updateRenewal = (policySecId, status) => { export const updateRenewal = (policySecId, status) => {
return req.post(`/auto_renew_policy/${policySecId}/${status}`); return req.post(`/policy/auto_renew_policy/${policySecId}/${status}`);
}; };
import req from "@/service/http";
// 申请风险测评
export const addRiskEvaluation = param => {
return req.post("riskEvaluation", param);
};
// 查询风险测评
export const getRiskEvaluation = () => {
return req.get("/user/risk_evaluation");
};
<template> <template>
<cr-radio-group v-model="radioVal" class="radio-btn" :class="{ readonly }"> <cr-radio-group v-model="radioVal" class="radio-btn" :class="{ readonly }">
<cr-radio <cr-radio
:disabled="disabled"
:name="item.value" :name="item.value"
:class="{ checked: value === item.value }" :class="{ checked: value === item.value }"
v-for="(item, index) in radioData" v-for="(item, index) in radioData"
...@@ -30,7 +31,11 @@ export default { ...@@ -30,7 +31,11 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
value: null value: null,
disabled: {
type: Boolean,
default: false
}
}, },
watch: { watch: {
value(val) { value(val) {
......
export default { export default {
basicHost: "http://192.168.29.211:8964/", // basicHost: "http://192.168.29.211:8964/",
// basicHost: "http://127.0.0.1:8964/", // basicHost: "http://127.0.0.1:8964/",
// basicHost: "https://hathaway-mg.liangkebang.net/", basicHost: "https://hathaway-mg.liangkebang.net/",
wxAppId: "wx514de17b23d53a20" wxAppId: "wx514de17b23d53a20"
}; };
...@@ -2,7 +2,7 @@ export default [ ...@@ -2,7 +2,7 @@ export default [
{ {
path: "/", path: "/",
name: "Default", name: "Default",
redirect: "/goods" redirect: "/home"
}, },
{ {
path: "/home", path: "/home",
...@@ -15,7 +15,7 @@ export default [ ...@@ -15,7 +15,7 @@ export default [
component: () => import("../views/Home/SmartMeasure/index.vue") component: () => import("../views/Home/SmartMeasure/index.vue")
}, },
{ {
path: "/home/smart-measure/report", path: "/home/smart-measure/report/:age/:gender",
name: "Report", name: "Report",
component: () => import("../views/Home/SmartMeasure/Report/index.vue") component: () => import("../views/Home/SmartMeasure/Report/index.vue")
}, },
......
...@@ -17,14 +17,14 @@ const CONSTANT = { ...@@ -17,14 +17,14 @@ const CONSTANT = {
// 0: man; 1: woman // 0: man; 1: woman
function getReletion(relation, gender) { function getReletion(relation, gender) {
let result = ""; let result = "";
if ([1, 3].includes(+relation)) { if ([2, 4].includes(+relation)) {
if (+relation === 1) { if (+relation === 2) {
result = +gender ? "母亲" : "父亲"; result = +gender === 0 ? "母亲" : "父亲";
} else { } else {
result = +gender ? "女儿" : "儿子"; result = +gender === 0 ? "女儿" : "儿子";
} }
} else { } else {
result = CONSTANT.relation[+relation]; result = CONSTANT.relation[+relation - 1];
} }
return result; return result;
...@@ -60,7 +60,7 @@ export default { ...@@ -60,7 +60,7 @@ export default {
// todo 家人保单列表筛选 // todo 家人保单列表筛选
const result = familyList.map(family => ({ const result = familyList.map(family => ({
...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), appellation: getReletion(family.relation, family.gender),
policyList: _.values( policyList: _.values(
_.mapValues(goodsMap, goodsList => { _.mapValues(goodsMap, goodsList => {
...@@ -68,7 +68,7 @@ export default { ...@@ -68,7 +68,7 @@ export default {
.filter( .filter(
policy => policy =>
_.some(goodsList, { id: policy.productNo }) && _.some(goodsList, { id: policy.productNo }) &&
+family.userInfoSecId === +policy.insuredUserSecId && family.userInfoSecId === policy.insuredUserInfoSecId &&
["6.1", "6.2", "6.3"].includes(policy.policyState) ["6.1", "6.2", "6.3"].includes(policy.policyState)
) )
.map(policy => ({ ...policy, ..._.find(goodsList, { id: policy.productNo }) })) .map(policy => ({ ...policy, ..._.find(goodsList, { id: policy.productNo }) }))
......
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;
...@@ -158,6 +158,10 @@ ...@@ -158,6 +158,10 @@
} }
} }
&-draw {
-webkit-animation: free_download .8s linear alternate infinite;
animation: free_download .8s linear alternate infinite;
position: relative;
&-button { &-button {
display: flex; display: flex;
justify-content: center; justify-content: center;
...@@ -169,9 +173,38 @@ ...@@ -169,9 +173,38 @@
font-weight: 600; font-weight: 600;
line-height: 28px; line-height: 28px;
background: url('../../../assets/images/home/button.png') no-repeat 0 0 /contain; background: url('../../../assets/images/home/button.png') no-repeat 0 0 /contain;
-webkit-animation: free_download .8s linear alternate infinite;
animation: free_download .8s linear alternate infinite;
} }
&-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 { &-withdrawal {
display: flex; display: flex;
...@@ -262,6 +295,23 @@ ...@@ -262,6 +295,23 @@
color: #333333 !important; color: #333333 !important;
font-weight: 600; font-weight: 600;
line-height: 17px; 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;
} }
} }
} }
......
...@@ -15,10 +15,10 @@ ...@@ -15,10 +15,10 @@
<p>参与投票即可抽取最高<span>18888</span>元红包</p> <p>参与投票即可抽取最高<span>18888</span>元红包</p>
<p>芒果保险老用户专享</p> <p>芒果保险老用户专享</p>
</div> </div>
<div class="activity-prize"> <div class="activity-prize" v-if="status !== 'HAS_WINNING'">
<div class="activity-prize-pointer" @click="gameStart"></div> <div class="activity-prize-pointer" @click="drawLottery"></div>
</div> </div>
<!-- <div class="activity-award"> <div class="activity-award" v-if="status === 'HAS_WINNING'">
<div class="activity-award-container"> <div class="activity-award-container">
<p class="Aa-container-congratulate">恭喜您已中奖</p> <p class="Aa-container-congratulate">恭喜您已中奖</p>
<p class="Aa-container-public">快关注「芒果保险」公众号</p> <p class="Aa-container-public">快关注「芒果保险」公众号</p>
...@@ -33,32 +33,30 @@ ...@@ -33,32 +33,30 @@
<p class="Aa-container-focus">截图或长按保存二维码</p> <p class="Aa-container-focus">截图或长按保存二维码</p>
<p class="Aa-container-focus">使用「微信」扫一扫即可关注</p> <p class="Aa-container-focus">使用「微信」扫一扫即可关注</p>
</div> </div>
</div> --> </div>
<div class="activity-swiper"> <div class="activity-swiper" v-if="status !== 'HAS_WINNING'">
<cr-swipe <cr-swipe
class="activity-swiper-container" class="activity-swiper-container"
:autoplay="3000" :autoplay="3000"
:show-indicators="false" :show-indicators="false"
vertical vertical
> >
<cr-swipe-item> <cr-swipe-item v-for="(item, index) in personList" :key="index">
<p>138****8888</p> <p>{{ item.phone }}</p>
<p>刚刚抽中了<span>18888</span>元红包</p> <p>
</cr-swipe-item> 刚刚抽中了<span>{{ item.amount }}</span
<cr-swipe-item> >元红包
<p>138****8887</p> </p>
<p>刚刚抽中了<span>18888</span>元红包</p>
</cr-swipe-item>
<cr-swipe-item>
<p>138****8886</p>
<p>刚刚抽中了<span>18888</span>元红包</p>
</cr-swipe-item> </cr-swipe-item>
</cr-swipe> </cr-swipe>
</div> </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"> <div class="activity-withdrawal">
<p>累计可提现红包</p> <p>累计可提现红包</p>
<p>5元</p> <p>{{ withdrawalText }}</p>
</div> </div>
<div class="activity-vote"> <div class="activity-vote">
<p class="activity-vote-title">投保“国民保·百万医疗险”的用户</p> <p class="activity-vote-title">投保“国民保·百万医疗险”的用户</p>
...@@ -77,10 +75,18 @@ ...@@ -77,10 +75,18 @@
<p>百万医疗险吗?</p> <p>百万医疗险吗?</p>
</div> </div>
</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> </cr-button>
</div> </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>
<div class="activity-intro"> <div class="activity-intro">
<p>奖品使用说明</p> <p>奖品使用说明</p>
...@@ -91,13 +97,15 @@ ...@@ -91,13 +97,15 @@
</div> </div>
<Modal v-model="modal.winning" type="winning"></Modal> <Modal v-model="modal.winning" type="winning"></Modal>
<Modal v-model="modal.guide" type="guide"></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> <Modal v-model="modal.detail" type="detail"> </Modal>
</div> </div>
</template> </template>
<script> <script>
import Modal from "../modules/Modal"; import Modal from "../modules/Modal";
import localStorage from "@/service/localStorage"; import localStorage from "@/service/localStorage";
import personList from "./constants";
import { getLotteryRecord, drawLottery } from "@/api/activity";
export default { export default {
name: "Activity", name: "Activity",
...@@ -106,8 +114,10 @@ export default { ...@@ -106,8 +114,10 @@ export default {
}, },
data() { data() {
return { return {
record: {},
isGoing: false, isGoing: false,
isLogin: localStorage.get("mongoToken"), status: "HAS_NOT_CHANCE", // HAS_NOT_CHANCE: 无机会 HAS_CHANCE: 有机会 HAS_WINNING
personList,
modal: { modal: {
winning: false, winning: false,
guide: false, guide: false,
...@@ -116,17 +126,35 @@ export default { ...@@ -116,17 +126,35 @@ export default {
} }
}; };
}, },
created() {
if (localStorage.get("mongoToken")) {
this.getLotteryRecord();
}
},
computed: { computed: {
voteButtonText() { voteButtonText() {
if (!this.isLogin) { let text = "去投票";
return "去投票"; 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: { methods: {
gameStart() { async gameStart() {
const result = await drawLottery();
if (result.amount === "5") {
this.$nextTick(() => { this.$nextTick(() => {
if (this.isGoing) return; if (this.isGoing) return;
this.isGoing = true; this.isGoing = true;
...@@ -136,7 +164,7 @@ export default { ...@@ -136,7 +164,7 @@ export default {
// 1. 计算旋转角度 // 1. 计算旋转角度
let rotateItemDeg = (3 * 360) / 6; // 每个item旋转角度, 第一个不用旋转 let rotateItemDeg = (3 * 360) / 6; // 每个item旋转角度, 第一个不用旋转
let rotate = rotateItemDeg + 4 * 360; let rotate = rotateItemDeg + 4 * 360;
let rotateSpeed = ((rotateItemDeg / 360) * 1 + 5).toFixed(2); let rotateSpeed = ((rotateItemDeg / 360) * 1 + 4).toFixed(2);
// 2. 重置转盘样式 // 2. 重置转盘样式
turntable.removeAttribute("style"); turntable.removeAttribute("style");
pointer.removeAttribute("style"); pointer.removeAttribute("style");
...@@ -144,8 +172,8 @@ export default { ...@@ -144,8 +172,8 @@ export default {
setTimeout(() => { setTimeout(() => {
turntable.style.transform = `rotate(${rotate}deg)`; turntable.style.transform = `rotate(${rotate}deg)`;
pointer.style.transform = `rotate(-${rotate}deg)`; pointer.style.transform = `rotate(-${rotate}deg)`;
pointer.style.transition = `transform ${rotateSpeed}s ease-out`; pointer.style.transition = `transform ${rotateSpeed}s ease-in-out`;
turntable.style.transition = `transform ${rotateSpeed}s ease-out`; turntable.style.transition = `transform ${rotateSpeed}s ease-in-out`;
}, 10); }, 10);
// 4. 动画结束,显示中奖结果,中奖结果如何显示,视实际情况而定 // 4. 动画结束,显示中奖结果,中奖结果如何显示,视实际情况而定
...@@ -153,9 +181,32 @@ export default { ...@@ -153,9 +181,32 @@ export default {
console.log("中奖了"); console.log("中奖了");
this.isGoing = false; this.isGoing = false;
this.modal.winning = true; this.modal.winning = true;
}, rotateSpeed * 1000); 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";
}
}
} }
}; };
</script> </script>
......
...@@ -87,7 +87,14 @@ ...@@ -87,7 +87,14 @@
export default { export default {
name: "PolicyList", name: "PolicyList",
data() { data() {
return {}; return {
avatar: "",
age: 0
};
},
create() {
const answer = this.$route.query.answer;
console.log(answer);
} }
}; };
</script> </script>
......
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 };
...@@ -91,6 +91,11 @@ ...@@ -91,6 +91,11 @@
color: #666666; color: #666666;
line-height: 14px; line-height: 14px;
} }
.Mdrcc-marriage_selected {
background: #FFC842;
color: #333333;
}
} }
.Mdrc-component-income { .Mdrc-component-income {
...@@ -187,14 +192,16 @@ ...@@ -187,14 +192,16 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-right: 12px; margin-right: 12px;
padding: 0 14px; box-sizing: border-box;
height: 40px; padding: 10px;
max-width: 244px;
// height: 40px;
background: #FFC842; background: #FFC842;
border-radius: 14px 0px 14px 14px; border-radius: 14px 0px 14px 14px;
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
line-height: 16px; line-height: 20px;
} }
.Md-user-avatar { .Md-user-avatar {
......
...@@ -16,8 +16,10 @@ ...@@ -16,8 +16,10 @@
v-if="!item.answer || index === dataList.length - 1" v-if="!item.answer || index === dataList.length - 1"
:is="item.component" :is="item.component"
:type="item.type" :type="item.type"
@select="select" :disabled="isLoading"
@nextQuestion="nextQuestion"
@submit="submit" @submit="submit"
:currentAnswer.sync="currentAnswer"
></component> ></component>
</div> </div>
</div> </div>
...@@ -31,10 +33,12 @@ ...@@ -31,10 +33,12 @@
</div> </div>
<div <div
class="Md-operation-submit" class="Md-operation-submit"
@click="submit" @click="nextQuestion"
v-show="index === dataList.length - 1 && item.answer" v-show="
item.selectType === 'multi-select' && currentAnswer && index === smartMeasure.length - 1
"
> >
确认提交 {{ item.type === "insurance" ? "确认提交" : "确定" }}
</div> </div>
</div> </div>
<div class="measure-dialogue-user" v-show="index !== dataList.length - 1 && item.answer"> <div class="measure-dialogue-user" v-show="index !== dataList.length - 1 && item.answer">
...@@ -55,58 +59,7 @@ ...@@ -55,58 +59,7 @@
import Age from "./modules/Age"; import Age from "./modules/Age";
import Gender from "./modules/Gender"; import Gender from "./modules/Gender";
import Select from "./modules/Select"; import Select from "./modules/Select";
import { questionList } from "./constants";
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: ""
}
];
export default { export default {
name: "SmartMeasure", name: "SmartMeasure",
...@@ -117,8 +70,9 @@ export default { ...@@ -117,8 +70,9 @@ export default {
}, },
data() { data() {
return { return {
dataList, dataList: questionList,
isLoading: false isLoading: false,
currentAnswer: ""
}; };
}, },
computed: { computed: {
...@@ -132,27 +86,51 @@ export default { ...@@ -132,27 +86,51 @@ export default {
} }
}, },
methods: { methods: {
select(answer) { // select(answer) {
const id = this.smartMeasure[this.smartMeasure.length - 1].id; // console.log(answer, this.isLoading);
this.smartMeasure[this.smartMeasure.length - 1].answer = answer; // 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(); this.$forceUpdate();
const id = this.smartMeasure[this.smartMeasure.length - 1].id;
if (this.smartMeasure.length < this.dataList.length) { if (this.smartMeasure.length < this.dataList.length) {
setTimeout(() => { setTimeout(() => {
this.dataList = this.dataList.map(data => { this.dataList = this.dataList.map(data => {
if (data.id === id) data.answer = answer; if (data.id === id) data.answer = this.currentAnswer;
return data; return data;
}); });
this.currentAnswer = "";
}, 600); }, 600);
} else if (this.smartMeasure.length === this.dataList.length) {
this.submit();
} }
}, },
goBack(id) { goBack(id) {
if (this.isLoading) return;
this.dataList[id - 1].answer = ""; this.dataList[id - 1].answer = "";
this.dataList[id - 2].answer = ""; this.dataList[id - 2].answer = "";
}, },
submit() { submit() {
this.isLoading = true; this.isLoading = true;
this.scrollToBottom(); this.scrollToBottom();
setTimeout(() => {}); setTimeout(() => {
// this.$router.push({ path: "/home/smart-measure/report", query: { answer: this.dataList } });
}, 2000);
console.log("submit", this.dataList); console.log("submit", this.dataList);
}, },
scrollToBottom() { scrollToBottom() {
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<cr-picker <cr-picker
ref="picker" ref="picker"
show-toolbar show-toolbar
selected-index="12"
:columns="ageScope" :columns="ageScope"
@confirm="onConfirm" @confirm="onConfirm"
@cancel="showPopup = false" @cancel="showPopup = false"
...@@ -15,32 +16,20 @@ ...@@ -15,32 +16,20 @@
</div> </div>
</template> </template>
<script> <script>
import male from "@/assets/images/user/male@2x.png"; import { ageScope } from "../constants";
import female from "@/assets/images/user/female@2x.png"; import { parseTime } from "@/service/utils";
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"
}
];
export default { export default {
name: "Age", name: "Age",
props: {}, props: {
currentAnswer: {
type: String,
default: ""
}
},
data() { data() {
return { return {
showPopup: false, showPopup: false,
dataList,
ageScope, ageScope,
refreshed: false refreshed: false
}; };
...@@ -57,8 +46,12 @@ export default { ...@@ -57,8 +46,12 @@ export default {
this.showPopup = false; this.showPopup = false;
}, },
onConfirm(picker, res) { onConfirm(picker, res) {
const year = res[0].slice(0, 4);
const currentYear = parseTime("", "{y}");
const age = currentYear - year;
this.showPopup = false; this.showPopup = false;
this.$emit("select", res[0]); this.$emit("update:currentAnswer", `${age}岁`);
this.$emit("nextQuestion");
} }
} }
}; };
......
...@@ -12,33 +12,20 @@ ...@@ -12,33 +12,20 @@
</div> </div>
</template> </template>
<script> <script>
import male from "@/assets/images/user/male@2x.png"; import { genderList } from "../constants";
import female from "@/assets/images/user/female@2x.png";
const dataList = [
{
image: male,
value: "male",
answer: "男神"
},
{
image: female,
value: "female",
answer: "女神"
}
];
export default { export default {
name: "Age", name: "Age",
props: {}, props: {},
data() { data() {
return { return {
dataList dataList: genderList
}; };
}, },
methods: { methods: {
select(value) { select(value) {
this.$emit("select", value); this.$emit("update:currentAnswer", value);
this.$emit("nextQuestion");
} }
} }
}; };
......
<template> <template>
<div class="Mdrc-component-marriage Mdrc-component-income"> <div class="Mdrc-component-marriage Mdrc-component-income">
<template v-if="type === 'marrige'"> <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 }} {{ item }}
</p> </p>
</template> </template>
...@@ -28,50 +33,7 @@ ...@@ -28,50 +33,7 @@
</div> </div>
</template> </template>
<script> <script>
const answers = { import { selectList } from "../constants";
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
}
};
export default { export default {
name: "Select", name: "Select",
...@@ -79,37 +41,46 @@ export default { ...@@ -79,37 +41,46 @@ export default {
type: { type: {
type: String, type: String,
default: "marrige" default: "marrige"
},
disabled: {
type: Boolean,
default: false
},
currentAnswer: {
type: String,
default: ""
} }
}, },
data() { data() {
return { return {
answers: JSON.parse(JSON.stringify(answers)) answers: JSON.parse(JSON.stringify(selectList))
}; };
}, },
methods: { methods: {
select(value, type, name) { select(value, type, name) {
console.log(value, type, name); console.log(value, type, name);
if (value === "没有,下一题" && name === "insurance") { if (this.disabled) return;
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);
this.$emit("select", this.answers[name].selected.join(",")); if (type === "multi-select") {
if (value === "没有,下一题") {
this.answers[name].selected = ["没有,下一题"];
} else { } else {
this.$emit("select", value); 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> </script>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
fit="cover" fit="cover"
src="@/assets/images/home/activity@2x.png" 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"> <div class="home-service">
<router-link tag="div" to="/home/smart-measure" class="home-service-item"> <router-link tag="div" to="/home/smart-measure" class="home-service-item">
<svg-icon icon-class="risk-assessment" class-name="Hs-item-svg" /> <svg-icon icon-class="risk-assessment" class-name="Hs-item-svg" />
......
...@@ -76,23 +76,41 @@ ...@@ -76,23 +76,41 @@
可以100%报销责任内的医药费用,是医保的重要补充,是人人都应该购买的国民医疗保障。 可以100%报销责任内的医药费用,是医保的重要补充,是人人都应该购买的国民医疗保障。
</p> </p>
<div class="Avp-body-opera"> <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" /> <svg-icon class-name="Avpbo-item-svg" icon-class="understand" />
<p class="Avpbo-item-text">了解</p> <p class="Avpbo-item-text">了解</p>
</div> </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" /> <svg-icon class-name="Avpbo-item-svg" icon-class="understand-not" />
<p class="Avpbo-item-text">不了解</p> <p class="Avpbo-item-text">不了解</p>
</div> </div>
</div> </div>
<div class="Avp-body-statistic"> <div class="Avp-body-statistic">
<p>了解 <span>23405</span></p> <p>
<p>不了解 <span>23405</span></p> 了解 <span>{{ voteData.understandNum }}</span>
</p>
<p>
不了解 <span>{{ voteData.notUnderstandNum }}</span>
</p>
</div> </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>
<div class="Av-pane-footer"> <div class="Av-pane-footer">
<cr-button class="Avp-body-button"> <cr-button class="Avp-body-button" @click="drawLottery">
完成投票抽红包 完成投票抽红包
</cr-button> </cr-button>
<p>最高<span>88888</span>元</p> <p>最高<span>88888</span>元</p>
...@@ -142,9 +160,23 @@ export default { ...@@ -142,9 +160,23 @@ export default {
data() { data() {
return { return {
show: this.value, 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: { watch: {
value: { value: {
immediate: true, immediate: true,
...@@ -162,7 +194,12 @@ export default { ...@@ -162,7 +194,12 @@ export default {
this.$emit("input", false); this.$emit("input", false);
}, },
go() { go() {
this.$emit("input", false); if (this.value) {
this.$router.push({
path: "/goods/detail",
query: { id: "TKYLX001", type: "mi" }
});
}
}, },
resetTime() { resetTime() {
this.time = time; this.time = time;
...@@ -175,6 +212,21 @@ export default { ...@@ -175,6 +212,21 @@ export default {
} }
this.time -= 1; this.time -= 1;
timer = setTimeout(this.countTime, 1000); 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 { ...@@ -446,6 +498,9 @@ export default {
background: url("../../../assets/images/home/understand-not@2x.png") no-repeat background: url("../../../assets/images/home/understand-not@2x.png") no-repeat
center/contain; center/contain;
&_selected { &_selected {
.Avpbo-item-text {
color: #fff;
}
background: url("../../../assets/images/home/understand-not_selected@2x.png") no-repeat background: url("../../../assets/images/home/understand-not_selected@2x.png") no-repeat
center/contain; center/contain;
} }
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<insurance-card <insurance-card
:productNo="data.productNo" :productNo="data.productNo"
:policySecId="data.policySecId" :policySecId="data.policySecId"
:autoRenewPremium="data.autoRenewPremium" :autoRenewPolicy="data.autoRenewPolicy"
:policyNo="data.policyNo" :policyNo="data.policyNo"
:orderNo="data.orderNo" :orderNo="data.orderNo"
></insurance-card> ></insurance-card>
......
...@@ -18,7 +18,7 @@ export default { ...@@ -18,7 +18,7 @@ export default {
type: [Number, String], type: [Number, String],
default: 1 default: 1
}, },
autoRenewPremium: { autoRenewPolicy: {
type: Boolean, type: Boolean,
default: false default: false
}, },
...@@ -46,7 +46,7 @@ export default { ...@@ -46,7 +46,7 @@ export default {
return GOODS_LIST.find(v => v.id === this.productNo)?.company || ""; return GOODS_LIST.find(v => v.id === this.productNo)?.company || "";
}, },
buttonText() { buttonText() {
return this.autoRenewPremium ? "已开通次年续保" : "已关闭次年续保"; return this.autoRenewPolicy ? "已开通次年续保" : "已关闭次年续保";
} }
}, },
methods: { methods: {
......
...@@ -124,7 +124,7 @@ export default { ...@@ -124,7 +124,7 @@ export default {
recordDate: v.recordDate, recordDate: v.recordDate,
amountText: `${v.amount}元`, amountText: `${v.amount}元`,
payStatusText: payStatusText:
v.currentPayState === "1" ? "已欠费" : v.currentPayState === "3" ? "缴费成功" : "-" v.currentPayState === -1 ? "已欠费" : v.currentPayState === 3 ? "缴费成功" : "-"
})) || []; })) || [];
if (["9-5", "9-6"].includes(status)) { if (["9-5", "9-6"].includes(status)) {
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<div class="renewal-container-detail" v-if="!isOpened"></div> <div class="renewal-container-detail" v-if="!isOpened"></div>
<div class="renewal-container-detail" v-if="isOpened"> <div class="renewal-container-detail" v-if="isOpened">
<div class="Rc-detail-item"> <div class="Rc-detail-item">
<span>次年保生效时间</span> <span>次年保生效时间</span>
<span>{{ nextYear }}</span> <span>{{ nextYear }}</span>
</div> </div>
<div class="Rc-detail-item"> <div class="Rc-detail-item">
...@@ -47,7 +47,7 @@ export default { ...@@ -47,7 +47,7 @@ export default {
}, },
async created() { async created() {
const detail = await getPolicyDetail(this.$route.params.orderNo); const detail = await getPolicyDetail(this.$route.params.orderNo);
if (detail.autoRenewPremium) { if (detail.autoRenewPolicy) {
this.isOpened = true; this.isOpened = true;
} }
this.nextYear = detail.nextYearEffectiveDate || "-"; this.nextYear = detail.nextYearEffectiveDate || "-";
......
...@@ -30,7 +30,7 @@ const statusMap = { ...@@ -30,7 +30,7 @@ const statusMap = {
component: "Guarantee" component: "Guarantee"
}, },
"4": { "4": {
status: ["1-1", "4-1", "5-1"], status: ["1-1", "2-1", "3-1", "2-4", "3-4"],
title: "被保人:${title}", title: "被保人:${title}",
contend: "需付保费:${money}元", contend: "需付保费:${money}元",
statusText: "待支付", statusText: "待支付",
...@@ -55,7 +55,7 @@ const statusMap = { ...@@ -55,7 +55,7 @@ const statusMap = {
}, },
"6": { "6": {
status: ["7-5"], status: ["7-5"],
title: "退款金额:${title}", title: "退款金额:${title}",
contend: "支付时间:${start}", contend: "支付时间:${start}",
statusText: "退款中", statusText: "退款中",
buttons: ["联系客服"], buttons: ["联系客服"],
...@@ -69,7 +69,7 @@ const statusMap = { ...@@ -69,7 +69,7 @@ const statusMap = {
}, },
"7": { "7": {
status: ["4-5", "5-5"], status: ["4-5", "5-5"],
title: "退款金额:${title}", title: "退款金额:${title}",
contend: "支付时间:${start}", contend: "支付时间:${start}",
statusText: "退款中", statusText: "退款中",
buttons: ["联系客服"], buttons: ["联系客服"],
...@@ -83,7 +83,7 @@ const statusMap = { ...@@ -83,7 +83,7 @@ const statusMap = {
}, },
"8": { "8": {
status: ["4-6", "5-6", "7-6"], status: ["4-6", "5-6", "7-6"],
title: "退款金额:${title}", title: "退款金额:${title}",
contend: "支付时间:${start}", contend: "支付时间:${start}",
statusText: "退款成功", statusText: "退款成功",
buttons: ["联系客服"], buttons: ["联系客服"],
...@@ -96,8 +96,8 @@ const statusMap = { ...@@ -96,8 +96,8 @@ const statusMap = {
} }
}, },
"9": { "9": {
status: ["4-4", "5-4", "7-4", "9-4"], status: ["4-7", "5-7", "7-7", "9-7"],
title: "退款金额:${title}", title: "退款金额:${title}",
contend: "支付时间:${start}", contend: "支付时间:${start}",
statusText: "退款失败", statusText: "退款失败",
buttons: ["联系客服"] buttons: ["联系客服"]
......
...@@ -79,11 +79,11 @@ import { getPolicyList } from "@/api/policy"; ...@@ -79,11 +79,11 @@ import { getPolicyList } from "@/api/policy";
import policyStatusMixin from "../mixin/policyStatus.mixin"; import policyStatusMixin from "../mixin/policyStatus.mixin";
import detailPayMixin from "@/views/Goods/Detail/modules/detailPay.mixin"; import detailPayMixin from "@/views/Goods/Detail/modules/detailPay.mixin";
// SELF(0, "本人"), // SELF(1, "本人"),
// PARENT(1, "父母"), // PARENT(2, "父母"),
// SPOUSE(2, "配偶"), // SPOUSE(3, "配偶"),
// CHILDREN(3, "子女"); // CHILDREN(4, "子女");
const relations = [-1, 0, 1, 2, 3]; const relations = [-1, 1, 2, 3, 4];
export default { export default {
name: "InsuranceRecommend", name: "InsuranceRecommend",
......
...@@ -18,7 +18,6 @@ export default { ...@@ -18,7 +18,6 @@ export default {
userInfoSecId: "", userInfoSecId: "",
nameMask: "", nameMask: "",
idNoMask: "", idNoMask: "",
socialSecurity: "",
relation: "" relation: ""
} }
}; };
...@@ -26,12 +25,17 @@ export default { ...@@ -26,12 +25,17 @@ export default {
async created() { async created() {
await this.setFamilyList(); await this.setFamilyList();
const information = this.familyList.find( const information = this.familyList.find(
family => +family.userInfoSecId === +this.$route.params.id family => family.userInfoSecId === this.$route.params.id
); );
this.information = { this.information = {
...information, ...information,
relation: information.appellation, relation: information.appellation,
socialSecurity: information.socialSecurity ? "true" : "false" socialSecurity:
information.socialSecurity === true
? "true"
: information.socialSecurity === false
? "false"
: ""
}; };
}, },
computed: { computed: {
......
...@@ -147,7 +147,6 @@ ...@@ -147,7 +147,6 @@
&-radio { &-radio {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 28px;
padding-left: 10px; padding-left: 10px;
.Ff-radio-title { .Ff-radio-title {
...@@ -229,6 +228,8 @@ ...@@ -229,6 +228,8 @@
} }
&-button { &-button {
&_confirm {
margin-top: 28px;
width: 100%; width: 100%;
height: 52px; height: 52px;
background: #FFC842 !important; background: #FFC842 !important;
...@@ -237,6 +238,7 @@ ...@@ -237,6 +238,7 @@
font-weight: 600; font-weight: 600;
color: #333333; color: #333333;
line-height: 22px; line-height: 22px;
}
&_deleted { &_deleted {
width: 100%; width: 100%;
margin-top: 15px; margin-top: 15px;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div <div
class="family-list-item" class="family-list-item"
v-for="(item, index) in familyList" v-for="(item, index) in familyList"
@click="go(`/user/family/detail/${item.userInfoSecId}`)" @click="go(`/user/family/detail/${encodeURIComponent(item.userInfoSecId)}`)"
:key="index" :key="index"
> >
<div class="Fl-item-left"> <div class="Fl-item-left">
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
{ 'family-list-item_overlay_3': familyList.length >= 3 }, { 'family-list-item_overlay_3': familyList.length >= 3 },
'family-list-item' '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"> <div class="Fl-item-left">
<cr-image class="Fli-left-image" :src="familyList[0].avatar" width="" height="" /> <cr-image class="Fli-left-image" :src="familyList[0].avatar" width="" height="" />
......
...@@ -4,22 +4,21 @@ ...@@ -4,22 +4,21 @@
<cr-form ref="form" class="family-form" @submit="modal.confirm = true" @failed="onFailed"> <cr-form ref="form" class="family-form" @submit="modal.confirm = true" @failed="onFailed">
<cr-field <cr-field
class="family-form-item" class="family-form-item"
v-model="formData.nameMask" v-model="formData.name"
:readonly="readOnlyProperty.nameMask" :readonly="readOnlyProperty.name"
name="姓名" name="姓名"
label="姓名" label="姓名"
placeholder="请输入投保人姓名" placeholder="请填写家人姓名"
:rules="[{ required: true, message: '请填写用户名' }]" :rules="[{ required: true, message: '请填写家人姓名' }]"
/> />
<cr-field <cr-field
class="family-form-item" class="family-form-item"
v-model="formData.idNoMask" v-model="formData.idNo"
:readonly="readOnlyProperty.idNoMask" :readonly="readOnlyProperty.idNo"
type="password"
name="身份证号" name="身份证号"
label="身份证号" label="身份证号"
placeholder="请填写家人身份证号" placeholder="请填写家人身份证号"
:rules="[{ required: true, message: '请填写身份证号' }]" :rules="[{ required: true, message: '请填写家人身份证号' }]"
/> />
<cr-field <cr-field
@click.native="showPopups" @click.native="showPopups"
...@@ -41,10 +40,15 @@ ...@@ -41,10 +40,15 @@
/> />
</div> </div>
<cr-field class="Ff-radio-options" name="社保"> <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> </cr-field>
</div> </div>
<cr-button class="family-form-button" native-type="submit"> <cr-button class="family-form-button_confirm" native-type="submit" v-if="isShowSub">
{{ saveText }} {{ saveText }}
</cr-button> </cr-button>
<cr-button class="family-form-button_deleted" @click="modal.delete = true" v-if="isShowDel"> <cr-button class="family-form-button_deleted" @click="modal.delete = true" v-if="isShowDel">
...@@ -74,11 +78,11 @@ ...@@ -74,11 +78,11 @@
<div class="family-confirm-modal"> <div class="family-confirm-modal">
<div class="Fc-modal-item"> <div class="Fc-modal-item">
<span v-html="'姓&#12288;&#12288;名:'"></span> <span v-html="'姓&#12288;&#12288;名:'"></span>
<span>{{ formData.nameMask }}</span> <span>{{ formData.name }}</span>
</div> </div>
<div class="Fc-modal-item"> <div class="Fc-modal-item">
<span>身份证号:</span> <span>身份证号:</span>
<span>{{ formData.idNoMask }}</span> <span>{{ formData.idNo }}</span>
</div> </div>
<div class="Fc-modal-item"> <div class="Fc-modal-item">
<span>与您关系:</span> <span>与您关系:</span>
...@@ -100,7 +104,7 @@ ...@@ -100,7 +104,7 @@
confirm-btn="继续保留" confirm-btn="继续保留"
title="删除确认" title="删除确认"
>确认删除【{{ >确认删除【{{
information.nameMask information.name
}}】的个人信息吗?为提供全面的家庭保障,建议您保留家庭成员信息。 }}】的个人信息吗?为提供全面的家庭保障,建议您保留家庭成员信息。
</Modal> </Modal>
<cr-popup v-model="showPopup" position="bottom"> <cr-popup v-model="showPopup" position="bottom">
...@@ -129,8 +133,8 @@ const planOptions = [ ...@@ -129,8 +133,8 @@ const planOptions = [
]; ];
const defaultFormData = { const defaultFormData = {
userInfoSecId: "", userInfoSecId: "",
nameMask: "", name: "",
idNoMask: "", idNo: "",
socialSecurity: "", socialSecurity: "",
relation: "" relation: ""
}; };
...@@ -179,8 +183,9 @@ export default { ...@@ -179,8 +183,9 @@ export default {
result = { result = {
...result, ...result,
...{ ...{
nameMask: true, name: true,
idNoMask: true idNo: true,
socialSecurity: true
} }
}; };
} }
...@@ -191,6 +196,9 @@ export default { ...@@ -191,6 +196,9 @@ export default {
}, },
isShowDel() { isShowDel() {
return this.type === "update" && this.formData.relation !== "本人" ? true : false; return this.type === "update" && this.formData.relation !== "本人" ? true : false;
},
isShowSub() {
return this.type === "add" || this.formData.relation !== "本人" ? true : false;
} }
}, },
watch: { watch: {
...@@ -204,8 +212,8 @@ export default { ...@@ -204,8 +212,8 @@ export default {
this.modal.confirm = false; this.modal.confirm = false;
// 组件不支持boolean,需转换 // 组件不支持boolean,需转换
const params = { const params = {
name: this.formData?.nameMask, name: this.formData?.name,
idNo: this.formData?.idNoMask, idNo: this.formData?.idNo,
relation: this.getReletion(this.formData?.relation) relation: this.getReletion(this.formData?.relation)
}; };
// 转换参数类型 // 转换参数类型
...@@ -243,14 +251,14 @@ export default { ...@@ -243,14 +251,14 @@ export default {
getReletion(relation) { getReletion(relation) {
let result = -1; let result = -1;
if (["父亲", "母亲"].includes(relation)) { if (["父亲", "母亲", "父母"].includes(relation)) {
result = 1; result = 2;
} else if (["女儿", "儿子"].includes(relation)) { } else if (["女儿", "儿子", "子女"].includes(relation)) {
result = 3; result = 4;
} else if (relation === "本人") { } else if (relation === "本人") {
result = 0; result = 1;
} else if (relation === "配偶") { } else if (relation === "配偶") {
result = 2; result = 3;
} }
return result; return result;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment