Commit 73842e4d authored by 郭志伟's avatar 郭志伟

Merge branch 'fix/info_back' into 'master'

Fix/info back

See merge request !252
parents 20135407 0d2712fa
......@@ -60,6 +60,7 @@ window.addEventListener(
);
if (process.env.VUE_APP_ENVIRONMENT !== "production") {
Vue.config.devtools = true;
// ! 上线后务必取掉
new vConsole();
}
......@@ -53,7 +53,7 @@ export default {
},
actions: {
async setFamilyList({ commit }, policyList) {
let familyList = await getFamilyList();
let familyList = (await getFamilyList()) || [];
if (!policyList) {
policyList = await getPolicyList();
}
......
......@@ -454,7 +454,26 @@ export default {
this.familyList = res;
if (this.hasAutoSaveData(this.autoSaveKey) && !reset) {
this.getSaveInfoHandler(this.autoSaveKey, AUTO_SAVE_TARGET);
const { idNo, userInfoSecId, relation } = this.formData;
const { idNo, userInfoSecId, relation, selfIdNo } = this.formData;
const selfUserInfo = this.familyList.find(item => item.relation === 1);
if (selfUserInfo && selfUserInfo.idNo && selfIdNo) {
const { idNoMask, nameMask, socialSecurity, userInfoSecId } = selfUserInfo;
this.formData = {
...this.formData,
...{
selfIdNo: idNoMask,
selfName: nameMask,
selfSecId: userInfoSecId,
selfSocialSecurity:
typeof socialSecurity === undefined || socialSecurity === ""
? ""
: socialSecurity
? "1"
: "0"
}
};
this.selfInfoReadonly = true;
}
if (relation) {
const userArray = this.familyList.filter(item => item.relation === +relation);
this.relationList = userArray.length > 1 ? userArray : [];
......@@ -505,8 +524,6 @@ export default {
}
};
}
} else {
this.selfInfoReadonly = true;
}
} else {
let relation = this.formData.relation || "1";
......
......@@ -56,7 +56,7 @@ export default {
GoodList,
Tabbar,
copyright,
InstructionModal,
InstructionModal
},
data() {
return {
......
......@@ -1005,7 +1005,26 @@ export default {
this.familyList = res;
if (this.hasAutoSaveData(AUTO_SAVE_KEY)) {
this.getSaveInfoHandler(AUTO_SAVE_KEY, AUTO_SAVE_TARGET);
const { relation, idNo, userInfoSecId } = this.formData.insuredUserInfo;
const { relation, idNo, userInfoSecId, selfIdNo } = this.formData.insuredUserInfo;
const selfUserInfo = this.familyList.find(item => item.relation === 1);
if (selfUserInfo && selfUserInfo.idNo && selfIdNo) {
const { idNoMask, nameMask, socialSecurity, userInfoSecId } = selfUserInfo;
this.formData = {
...this.formData,
...{
selfIdNo: idNoMask,
selfName: nameMask,
selfSecId: userInfoSecId,
selfSocialSecurity:
typeof socialSecurity === undefined || socialSecurity === ""
? ""
: socialSecurity
? "1"
: "0"
}
};
this.selfInfoReadonly = true;
}
if (relation) {
const userArray = this.familyList.filter(item => item.relation === +relation);
this.relationList = userArray.length > 1 ? userArray : [];
......@@ -1045,8 +1064,6 @@ export default {
}
};
}
} else {
this.selfInfoReadonly = true;
}
} else {
let relation = this.formData.insuredUserInfo.relation;
......
......@@ -900,11 +900,6 @@
dependencies:
mkdirp "^1.0.4"
"@qg/cherry-ui@^1.2.6":
version "1.2.6"
resolved "http://npmprivate.quantgroups.com/@qg%2fcherry-ui/-/cherry-ui-1.2.6.tgz#c8fcff71d35f0cb59c49019132e1bb5426648da6"
integrity sha512-vXpCUPAlPhcn9hnsTJS7qGgg9KcfTgZIWINaiiahRZQA6pEH4qmLihQp7HYeYvih/ENgDgDcVRRc4OSd7zibcg==
"@qg/qg-scroll@^1.4.2":
version "1.4.2"
resolved "http://npmprivate.quantgroups.com/@qg%2fqg-scroll/-/qg-scroll-1.4.2.tgz#df834f9f372ffa6e4c4233c8a3e6e74ccca971a7"
......
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