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( ...@@ -60,6 +60,7 @@ window.addEventListener(
); );
if (process.env.VUE_APP_ENVIRONMENT !== "production") { if (process.env.VUE_APP_ENVIRONMENT !== "production") {
Vue.config.devtools = true;
// ! 上线后务必取掉 // ! 上线后务必取掉
new vConsole(); new vConsole();
} }
...@@ -53,7 +53,7 @@ export default { ...@@ -53,7 +53,7 @@ export default {
}, },
actions: { actions: {
async setFamilyList({ commit }, policyList) { async setFamilyList({ commit }, policyList) {
let familyList = await getFamilyList(); let familyList = (await getFamilyList()) || [];
if (!policyList) { if (!policyList) {
policyList = await getPolicyList(); policyList = await getPolicyList();
} }
......
...@@ -454,7 +454,26 @@ export default { ...@@ -454,7 +454,26 @@ export default {
this.familyList = res; this.familyList = res;
if (this.hasAutoSaveData(this.autoSaveKey) && !reset) { if (this.hasAutoSaveData(this.autoSaveKey) && !reset) {
this.getSaveInfoHandler(this.autoSaveKey, AUTO_SAVE_TARGET); 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) { if (relation) {
const userArray = this.familyList.filter(item => item.relation === +relation); const userArray = this.familyList.filter(item => item.relation === +relation);
this.relationList = userArray.length > 1 ? userArray : []; this.relationList = userArray.length > 1 ? userArray : [];
...@@ -505,8 +524,6 @@ export default { ...@@ -505,8 +524,6 @@ export default {
} }
}; };
} }
} else {
this.selfInfoReadonly = true;
} }
} else { } else {
let relation = this.formData.relation || "1"; let relation = this.formData.relation || "1";
......
...@@ -56,7 +56,7 @@ export default { ...@@ -56,7 +56,7 @@ export default {
GoodList, GoodList,
Tabbar, Tabbar,
copyright, copyright,
InstructionModal, InstructionModal
}, },
data() { data() {
return { return {
......
...@@ -1005,7 +1005,26 @@ export default { ...@@ -1005,7 +1005,26 @@ export default {
this.familyList = res; this.familyList = res;
if (this.hasAutoSaveData(AUTO_SAVE_KEY)) { if (this.hasAutoSaveData(AUTO_SAVE_KEY)) {
this.getSaveInfoHandler(AUTO_SAVE_KEY, AUTO_SAVE_TARGET); 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) { if (relation) {
const userArray = this.familyList.filter(item => item.relation === +relation); const userArray = this.familyList.filter(item => item.relation === +relation);
this.relationList = userArray.length > 1 ? userArray : []; this.relationList = userArray.length > 1 ? userArray : [];
...@@ -1045,8 +1064,6 @@ export default { ...@@ -1045,8 +1064,6 @@ export default {
} }
}; };
} }
} else {
this.selfInfoReadonly = true;
} }
} else { } else {
let relation = this.formData.insuredUserInfo.relation; let relation = this.formData.insuredUserInfo.relation;
......
...@@ -900,11 +900,6 @@ ...@@ -900,11 +900,6 @@
dependencies: dependencies:
mkdirp "^1.0.4" 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": "@qg/qg-scroll@^1.4.2":
version "1.4.2" version "1.4.2"
resolved "http://npmprivate.quantgroups.com/@qg%2fqg-scroll/-/qg-scroll-1.4.2.tgz#df834f9f372ffa6e4c4233c8a3e6e74ccca971a7" 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