电子保单下拉变更
Showing
1 changed file
with
21 additions
and
11 deletions
| ... | @@ -74,20 +74,29 @@ export default { | ... | @@ -74,20 +74,29 @@ export default { |
| 74 | // res.push({ "recordId": "10", "bizNo": "P000000000000323", "letterType": "5", "printTime": "2020-05-08 16:02:21", "key": "c4ace2829737459cb6c95f523e0f5223", "isRead": "Y" }) | 74 | // res.push({ "recordId": "10", "bizNo": "P000000000000323", "letterType": "5", "printTime": "2020-05-08 16:02:21", "key": "c4ace2829737459cb6c95f523e0f5223", "isRead": "Y" }) |
| 75 | // } | 75 | // } |
| 76 | // this.isReadCandiates = [{ "v": "N", "n": this.i18n.eCorrespondenceEnquiry.UnRead }, { "v": "Y", "n": this.i18n.eCorrespondenceEnquiry.Read }]; | 76 | // this.isReadCandiates = [{ "v": "N", "n": this.i18n.eCorrespondenceEnquiry.UnRead }, { "v": "Y", "n": this.i18n.eCorrespondenceEnquiry.Read }]; |
| 77 | // 缓存,用于判断重复 | ||
| 78 | for (let index = 0; index < res.length; index++) { | ||
| 79 | let letter = res[index]; | ||
| 80 | if (letter.letterType == "5") { | ||
| 81 | this.originalList.push(letter); | ||
| 82 | this.contentList.push(letter); | ||
| 83 | } | ||
| 84 | } | ||
| 85 | this.initCandidates(); | ||
| 86 | }); | ||
| 87 | }, | ||
| 88 | initCandidates() { | ||
| 77 | this.letterTypeCandiates = [{ "v": "5", "n": this.i18n.eCorrespondenceEnquiry.letterName }]; | 89 | this.letterTypeCandiates = [{ "v": "5", "n": this.i18n.eCorrespondenceEnquiry.letterName }]; |
| 78 | 90 | ||
| 79 | // 缓存,用于判断重复 | 91 | // 缓存,用于判断重复 |
| 80 | let bizNoCache = []; | 92 | let bizNoCache = []; |
| 81 | let printTimeCache = []; | 93 | let printTimeCache = []; |
| 82 | let isReadCache = []; | 94 | let isReadCache = []; |
| 83 | let letterTypeCache = []; | ||
| 84 | |||
| 85 | let newBizNoCandidates = [], newPrintTimeCandidates = [], newIsReadCandiates = []; | 95 | let newBizNoCandidates = [], newPrintTimeCandidates = [], newIsReadCandiates = []; |
| 86 | 96 | ||
| 87 | for (let index = 0; index < res.length; index++) { | 97 | for (let index = 0; index < this.originalList.length; index++) { |
| 88 | let letter = res[index]; | 98 | let letter = this.originalList[index]; |
| 89 | if (letter.letterType == "5") { | 99 | let bizNo = letter.policyCode; |
| 90 | let bizNo = letter.bizNo; | ||
| 91 | let printTime = letter.printTime.split(" ")[0]; | 100 | let printTime = letter.printTime.split(" ")[0]; |
| 92 | let isRead = letter.isRead; | 101 | let isRead = letter.isRead; |
| 93 | 102 | ||
| ... | @@ -105,15 +114,10 @@ export default { | ... | @@ -105,15 +114,10 @@ export default { |
| 105 | let n = isRead == "Y" ? this.i18n.eCorrespondenceEnquiry.Read : this.i18n.eCorrespondenceEnquiry.UnRead; | 114 | let n = isRead == "Y" ? this.i18n.eCorrespondenceEnquiry.Read : this.i18n.eCorrespondenceEnquiry.UnRead; |
| 106 | newIsReadCandiates.push({ v: isRead, n: n }); | 115 | newIsReadCandiates.push({ v: isRead, n: n }); |
| 107 | } | 116 | } |
| 108 | |||
| 109 | this.originalList.push(letter); | ||
| 110 | this.contentList.push(letter); | ||
| 111 | } | ||
| 112 | } | 117 | } |
| 113 | this.bizNoCandidates = newBizNoCandidates; | 118 | this.bizNoCandidates = newBizNoCandidates; |
| 114 | this.printTimeCandidates = newPrintTimeCandidates; | 119 | this.printTimeCandidates = newPrintTimeCandidates; |
| 115 | this.isReadCandiates = newIsReadCandiates; | 120 | this.isReadCandiates = newIsReadCandiates; |
| 116 | }); | ||
| 117 | }, | 121 | }, |
| 118 | onShowTipsOverHandler(event, item, index) { | 122 | onShowTipsOverHandler(event, item, index) { |
| 119 | let child = event.currentTarget.childNodes[0]; | 123 | let child = event.currentTarget.childNodes[0]; |
| ... | @@ -251,5 +255,11 @@ export default { | ... | @@ -251,5 +255,11 @@ export default { |
| 251 | }, | 255 | }, |
| 252 | mounted() { | 256 | mounted() { |
| 253 | this.initData(); | 257 | this.initData(); |
| 258 | |||
| 259 | this.$root.eventBus.$on("langChange", () => { | ||
| 260 | try { | ||
| 261 | this.initCandidates(); | ||
| 262 | } catch (e) { } | ||
| 263 | }); | ||
| 254 | }, | 264 | }, |
| 255 | } | 265 | } | ... | ... |
-
Please register or sign in to post a comment