电子函对接完成
Showing
5 changed files
with
136 additions
and
94 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 | ... | ... |
... | @@ -7,4 +7,6 @@ VUE_APP_CONTENT_ENCRYPT_KEY = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDA1SNj4qiOE | ... | @@ -7,4 +7,6 @@ VUE_APP_CONTENT_ENCRYPT_KEY = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDA1SNj4qiOE |
7 | VUE_APP_CONTENT_ENCRYPT_SWITCH = true | 7 | 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' | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
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,29 +86,41 @@ export default { | ... | @@ -71,29 +86,41 @@ 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 | // 筛选的值 |
81 | // 通知书类型 | 96 | let value = letter[key]; |
82 | case 2: | 97 | console.log(key, value, letter); |
83 | 98 | // 显示的值 | |
84 | break; | 99 | let name = ""; |
85 | // 发出时间 | 100 | switch (key) { |
86 | case 3: | 101 | // 通知书类型 |
87 | 102 | case "letterType": | |
88 | break; | 103 | name = this.i18n.eCorrespondenceEnquiry.letterName; |
89 | 104 | break; | |
90 | // 状况 | 105 | // 发出时间 |
91 | case 5: | 106 | case "printTime": |
92 | 107 | value = value.split(" ")[0]; | |
93 | break; | 108 | name = value; |
94 | 109 | break; | |
95 | default: | 110 | // 状况 |
96 | break; | 111 | case "isRead": |
112 | name = value == "N" ? this.i18n.eCorrespondenceEnquiry.UnRead : this.i18n.eCorrespondenceEnquiry.Read; | ||
113 | break; | ||
114 | default: | ||
115 | name = value; | ||
116 | break; | ||
117 | } | ||
118 | // 过滤重复的值 | ||
119 | if (filter.indexOf(value) > -1) { | ||
120 | continue; | ||
121 | } | ||
122 | filter.push(value); | ||
123 | this.checkList.push({ value: value, label: name }); | ||
97 | } | 124 | } |
98 | 125 | ||
99 | // 显示模态窗 | 126 | // 显示模态窗 |
... | @@ -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]; | ... | ... |
1 | <template> | 1 | <template> |
2 | <div class="list-container"> | 2 | <div class="list-container"> |
3 | <modal2-comp :visible="showDownloadError" :close="()=>{showDownloadError = false}" :content="$t('glbalTips.sysError')"></modal2-comp> | 3 | <modal2-comp :visible="showDownloadError" :close="()=>{showDownloadError = false}" :content="$t('glbalTips.sysError')"></modal2-comp> |
4 | <filter-comp :items="checkList" @confirm="onCheckConfirmHandler" :visible="filterVisible" @close="filterVisible = false"></filter-comp> | 4 | <filter-comp :items="checkList" @confirm="onCheckConfirmHandler" :visible="filterVisible" @close="filterVisible = false"></filter-comp> |
5 | <div class="cell-group"> | 5 | <div class="cell-group"> |
6 | <div class="table-contaner"> | 6 | <div class="table-contaner"> |
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> |
25 | </div> | 25 | </div> |
26 | </div> | 26 | </div> |
27 | <div class="table-content" :class="{hide : hide}"> | 27 | <div class="table-content" :class="{hide : hide}"> |
28 | <template v-if="contentList && contentList.length > 0"> | 28 | <template v-if="contentList && contentList.length > 0"> |
29 | <div v-for="(item,index) in contentList" :key="index"> | 29 | <div v-for="(item,index) in contentList" :key="index"> |
30 | <template v-if="index < maxShow"> | 30 | <template v-if="index < maxShow"> |
31 | <div class="data-line"> | 31 | <div class="data-line"> |
32 | <div class="td w1">{{item.bizNo}}</div> | 32 | <div class="td w1">{{item.bizNo}}</div> |
33 | <div class="td w1">{{$t("eCorrespondenceEnquiry.letterName")}}</div> | 33 | <div class="td w1">{{$t("eCorrespondenceEnquiry.letterName")}}</div> |
34 | <div class="td w2">{{item.printTime.split(" ")[0]}}</div> | 34 | <div class="td w2">{{item.printTime.split(" ")[0]}}</div> |
35 | <div class="td w2 pointer" @click="downloadPolicy(item)"> | 35 | <div class="td w2 pointer" @click="downloadPolicy(item)"> |
36 | <div class="download" @mouseover="onShowTipsOverHandler($event,item,index)" @mouseout="onShowTipsOutHandler($event,item,index)" > | 36 | <div class="download" @mouseover="onShowTipsOverHandler($event,item,index)" @mouseout="onShowTipsOutHandler($event,item,index)" > |
37 | <div class="download-tips"> | 37 | <div class="download-tips"> |
38 | <div class="cont">{{$t('customService.insuranceQuery.downloadClick')}}</div> | 38 | <div class="cont">{{$t('customService.insuranceQuery.downloadClick')}}</div> |
39 | </div> | 39 | </div> |
40 | <img class="icon-download" src="@/assets/images/insurance-query/icon-down-load.png" alt=""> | 40 | <img class="icon-download" src="@/assets/images/insurance-query/icon-down-load.png" alt=""> |
41 | </div> | 41 | </div> |
42 | {{$t("eCorrespondenceEnquiry.DownloadDoc")}} | 42 | {{$t("eCorrespondenceEnquiry.DownloadDoc")}} |
43 | </div> | 43 | </div> |
44 | <div class="td w2">{{item.isRead == "N" ? $t('eCorrespondenceEnquiry.UnRead') : $t('eCorrespondenceEnquiry.Read')}}</div> | 44 | <div class="td w2">{{item.isRead == "N" ? $t('eCorrespondenceEnquiry.UnRead') : $t('eCorrespondenceEnquiry.Read')}}</div> |
45 | </div> | 45 | </div> |
46 | <div class="separator-h" v-if="index < contentList.length - 1 && index < maxShow - 1"></div> | 46 | <div class="separator-h" v-if="index < contentList.length - 1 && index < maxShow - 1"></div> |
47 | </template> | 47 | </template> |
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 | ||
55 | <template v-else> | 55 | <template v-else> |
56 | <div class="empty"> | 56 | <div class="empty"> |
57 | <div class="tips"> | 57 | <div class="tips"> |
58 | <img class="icon" src="@/assets/images/common/icon-alert-i.png" alt=""> | 58 | <img class="icon" src="@/assets/images/common/icon-alert-i.png" alt=""> |
59 | <div class="txt"> | 59 | <div class="txt"> |
60 | {{$t('customService.insuranceQuery.noPolicy')}} | 60 | {{$t('customService.insuranceQuery.noPolicy')}} |
61 | <span class="pointer btn" @click="toContactUs">{{$t('customService.insuranceQuery.customService')}}</span> | 61 | <span class="pointer btn" @click="toContactUs">{{$t('customService.insuranceQuery.customService')}}</span> |
62 | </div> | 62 | </div> |
63 | </div> | 63 | </div> |
64 | </div> | 64 | </div> |
65 | </template> | 65 | </template> |
66 | </div> | 66 | </div> |
67 | </div> | 67 | </div> |
68 | </div> | 68 | </div> |
69 | </template> | 69 | </template> |
70 | 70 | ||
71 | 71 | ... | ... |
-
Please register or sign in to post a comment