电子函对接完成
Showing
5 changed files
with
67 additions
and
25 deletions
... | @@ -8,3 +8,4 @@ VUE_APP_CONTENT_ENCRYPT_SWITCH = true | ... | @@ -8,3 +8,4 @@ VUE_APP_CONTENT_ENCRYPT_SWITCH = true |
8 | VUE_APP_ONE_ACCOUNT_CENTER_OFF = true | 8 | VUE_APP_ONE_ACCOUNT_CENTER_OFF = true |
9 | 9 | ||
10 | VUE_APP_HIDE_VHIS_MODAL_FLAG = 'Y' | 10 | VUE_APP_HIDE_VHIS_MODAL_FLAG = 'Y' |
11 | VUE_APP_MOCK_DATA = true | ... | ... |
... | @@ -8,3 +8,5 @@ VUE_APP_CONTENT_ENCRYPT_SWITCH = true | ... | @@ -8,3 +8,5 @@ VUE_APP_CONTENT_ENCRYPT_SWITCH = true |
8 | VUE_APP_ONE_ACCOUNT_CENTER_OFF = true | 8 | VUE_APP_ONE_ACCOUNT_CENTER_OFF = true |
9 | 9 | ||
10 | VUE_APP_HIDE_VHIS_MODAL_FLAG = 'N' | 10 | VUE_APP_HIDE_VHIS_MODAL_FLAG = 'N' |
11 | # 这里会mock数据,注意到生产环境要改为false | ||
12 | VUE_APP_MOCK_DATA = true | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -107,6 +107,7 @@ function initQueryConfig() { | ... | @@ -107,6 +107,7 @@ function initQueryConfig() { |
107 | E: rsaKeyIndex1, | 107 | E: rsaKeyIndex1, |
108 | vhis: vhis1, | 108 | vhis: vhis1, |
109 | policies: policies, | 109 | policies: policies, |
110 | mockData: process.env.VUE_APP_MOCK_DATA == undefined || !process.env.VUE_APP_MOCK_DATA ? false : true, | ||
110 | oneAccountCenterOff: process.env.VUE_APP_ONE_ACCOUNT_CENTER_OFF == "true" ? true : false | 111 | oneAccountCenterOff: process.env.VUE_APP_ONE_ACCOUNT_CENTER_OFF == "true" ? true : false |
111 | }; | 112 | }; |
112 | 113 | ... | ... |
... | @@ -34,6 +34,7 @@ export default { | ... | @@ -34,6 +34,7 @@ export default { |
34 | name: "LetterListHeader", | 34 | name: "LetterListHeader", |
35 | data() { | 35 | data() { |
36 | return { | 36 | return { |
37 | originalList: [], | ||
37 | contentList: [], | 38 | contentList: [], |
38 | maxShow: 2, | 39 | maxShow: 2, |
39 | selectPolicyCode: "", | 40 | selectPolicyCode: "", |
... | @@ -41,7 +42,8 @@ export default { | ... | @@ -41,7 +42,8 @@ export default { |
41 | hide: false, | 42 | hide: false, |
42 | showDownloadError: false, | 43 | showDownloadError: false, |
43 | filterVisible: false, | 44 | filterVisible: false, |
44 | checkList: [] | 45 | checkList: [], |
46 | filterKey: "" | ||
45 | } | 47 | } |
46 | }, | 48 | }, |
47 | computed: { | 49 | computed: { |
... | @@ -58,8 +60,21 @@ export default { | ... | @@ -58,8 +60,21 @@ export default { |
58 | url: api.letterRecordList, | 60 | url: api.letterRecordList, |
59 | sid: true | 61 | sid: true |
60 | }).then(res => { | 62 | }).then(res => { |
61 | this.contentList = res; | 63 | if (window.global.mockData) { |
62 | this.$set(this, 'contentList', res); | 64 | res.push({ "recordId": "10", "bizNo": "P000000000000318", "letterType": "2", "printTime": "2020-05-03 16:02:21", "key": "c4ace2829737459cb6c95f523e0f5223", "isRead": "N" }) |
65 | res.push({ "recordId": "10", "bizNo": "P000000000000319", "letterType": "2", "printTime": "2020-05-04 16:02:21", "key": "c4ace2829737459cb6c95f523e0f5223", "isRead": "N" }) | ||
66 | res.push({ "recordId": "10", "bizNo": "P000000000000320", "letterType": "2", "printTime": "2020-05-05 16:02:21", "key": "c4ace2829737459cb6c95f523e0f5223", "isRead": "Y" }) | ||
67 | res.push({ "recordId": "10", "bizNo": "P000000000000321", "letterType": "2", "printTime": "2020-05-06 16:02:21", "key": "c4ace2829737459cb6c95f523e0f5223", "isRead": "Y" }) | ||
68 | res.push({ "recordId": "10", "bizNo": "P000000000000322", "letterType": "2", "printTime": "2020-05-07 16:02:21", "key": "c4ace2829737459cb6c95f523e0f5223", "isRead": "Y" }) | ||
69 | res.push({ "recordId": "10", "bizNo": "P000000000000323", "letterType": "2", "printTime": "2020-05-08 16:02:21", "key": "c4ace2829737459cb6c95f523e0f5223", "isRead": "Y" }) | ||
70 | } | ||
71 | for (let index = 0; index < res.length; index++) { | ||
72 | let letter = res[index]; | ||
73 | if (letter.letterType == "2") { | ||
74 | this.originalList.push(letter); | ||
75 | this.contentList.push(letter); | ||
76 | } | ||
77 | } | ||
63 | }); | 78 | }); |
64 | }, | 79 | }, |
65 | onShowTipsOverHandler(event, item, index) { | 80 | onShowTipsOverHandler(event, item, index) { |
... | @@ -71,30 +86,42 @@ export default { | ... | @@ -71,30 +86,42 @@ export default { |
71 | child.style.display = "none"; | 86 | child.style.display = "none"; |
72 | }, | 87 | }, |
73 | // 过滤筛选 | 88 | // 过滤筛选 |
74 | onFilterHandler(idx) { | 89 | onFilterHandler(key) { |
75 | this.checkList = [] | 90 | let filter = []; |
76 | switch (idx) { | 91 | this.checkList = []; |
77 | // 保单号码 | 92 | this.filterKey = key; |
78 | case 1: | 93 | for (let index in this.originalList) { |
79 | 94 | let letter = this.originalList[index]; | |
80 | break; | 95 | // 筛选的值 |
96 | let value = letter[key]; | ||
97 | console.log(key, value, letter); | ||
98 | // 显示的值 | ||
99 | let name = ""; | ||
100 | switch (key) { | ||
81 | // 通知书类型 | 101 | // 通知书类型 |
82 | case 2: | 102 | case "letterType": |
83 | 103 | name = this.i18n.eCorrespondenceEnquiry.letterName; | |
84 | break; | 104 | break; |
85 | // 发出时间 | 105 | // 发出时间 |
86 | case 3: | 106 | case "printTime": |
87 | 107 | value = value.split(" ")[0]; | |
108 | name = value; | ||
88 | break; | 109 | break; |
89 | |||
90 | // 状况 | 110 | // 状况 |
91 | case 5: | 111 | case "isRead": |
92 | 112 | name = value == "N" ? this.i18n.eCorrespondenceEnquiry.UnRead : this.i18n.eCorrespondenceEnquiry.Read; | |
93 | break; | 113 | break; |
94 | |||
95 | default: | 114 | default: |
115 | name = value; | ||
96 | break; | 116 | break; |
97 | } | 117 | } |
118 | // 过滤重复的值 | ||
119 | if (filter.indexOf(value) > -1) { | ||
120 | continue; | ||
121 | } | ||
122 | filter.push(value); | ||
123 | this.checkList.push({ value: value, label: name }); | ||
124 | } | ||
98 | 125 | ||
99 | // 显示模态窗 | 126 | // 显示模态窗 |
100 | this.filterVisible = true; | 127 | this.filterVisible = true; |
... | @@ -102,8 +129,19 @@ export default { | ... | @@ -102,8 +129,19 @@ export default { |
102 | /** | 129 | /** |
103 | * 多选确认 | 130 | * 多选确认 |
104 | */ | 131 | */ |
105 | onCheckConfirmHandler(evt) { | 132 | onCheckConfirmHandler(values) { |
106 | console.log("checkList evt :", evt); | 133 | let newList = []; |
134 | for (let index in this.originalList) { | ||
135 | let letter = this.originalList[index]; | ||
136 | let v = letter[this.filterKey]; | ||
137 | if (this.filterKey == "printTime") { | ||
138 | v = v.split(" ")[0]; | ||
139 | } | ||
140 | if (values.indexOf(v) > -1) { | ||
141 | newList.push(letter); | ||
142 | } | ||
143 | } | ||
144 | this.contentList = newList; | ||
107 | }, | 145 | }, |
108 | changeLetterType(letterNo) { | 146 | changeLetterType(letterNo) { |
109 | return this.i18n.eCorrespondenceEnquiry.LetterMap[letterNo]; | 147 | return this.i18n.eCorrespondenceEnquiry.LetterMap[letterNo]; | ... | ... |
... | @@ -7,18 +7,18 @@ | ... | @@ -7,18 +7,18 @@ |
7 | <div class="table-header orange new"> | 7 | <div class="table-header orange new"> |
8 | <div class="normal-header"> | 8 | <div class="normal-header"> |
9 | <div class="td w1">{{$t('eCorrespondenceEnquiry.PolicyNumber')}} | 9 | <div class="td w1">{{$t('eCorrespondenceEnquiry.PolicyNumber')}} |
10 | <div @click="onFilterHandler(1)" class="down-arrow"></div> | 10 | <div @click="onFilterHandler('bizNo')" class="down-arrow"></div> |
11 | </div> | 11 | </div> |
12 | <div class="td w1">{{$t('eCorrespondenceEnquiry.TypeOfCorrespondence')}} | 12 | <div class="td w1">{{$t('eCorrespondenceEnquiry.TypeOfCorrespondence')}} |
13 | <div @click="onFilterHandler(2)" class="down-arrow"></div> | 13 | <div @click="onFilterHandler('letterType')" class="down-arrow"></div> |
14 | </div> | 14 | </div> |
15 | <div class="td w2">{{$t('eCorrespondenceEnquiry.SentOutDate')}} | 15 | <div class="td w2">{{$t('eCorrespondenceEnquiry.SentOutDate')}} |
16 | <div @click="onFilterHandler(3)" class="down-arrow"></div> | 16 | <div @click="onFilterHandler('printTime')" class="down-arrow"></div> |
17 | </div> | 17 | </div> |
18 | <div class="td w2">{{$t('eCorrespondenceEnquiry.DownloadLink')}} | 18 | <div class="td w2">{{$t('eCorrespondenceEnquiry.DownloadLink')}} |
19 | 19 | ||
20 | </div> | 20 | </div> |
21 | <div @click="onFilterHandler(5)" class="td w2">{{$t('eCorrespondenceEnquiry.Status')}} | 21 | <div @click="onFilterHandler('isRead')" class="td w2">{{$t('eCorrespondenceEnquiry.Status')}} |
22 | <div class="down-arrow"></div> | 22 | <div class="down-arrow"></div> |
23 | </div> | 23 | </div> |
24 | </div> | 24 | </div> |
... | @@ -48,7 +48,7 @@ | ... | @@ -48,7 +48,7 @@ |
48 | </div> | 48 | </div> |
49 | <template v-if="maxShow < contentList.length"> | 49 | <template v-if="maxShow < contentList.length"> |
50 | <div class="separator-h"></div> | 50 | <div class="separator-h"></div> |
51 | <div class="data-line show-more-btn" @click="maxShow = contentList.length">{{$t('customService.insuranceQuery.showMore')}}</div> | 51 | <div class="data-line show-more-btn" @click="maxShow = 1000">{{$t('customService.insuranceQuery.showMore')}}</div> |
52 | </template> | 52 | </template> |
53 | </template> | 53 | </template> |
54 | 54 | ... | ... |
-
Please register or sign in to post a comment