676900f3 by joe

产品保单下载、电子通知书下载功能完善

1 parent 127531cc
...@@ -161,11 +161,11 @@ export default { ...@@ -161,11 +161,11 @@ export default {
161 }, 161 },
162 downloadPolicy(item) { 162 downloadPolicy(item) {
163 httpPost({ 163 httpPost({
164 url: api.getDownloadPath, 164 url: api.getObsDownloadPath,
165 sid: true, 165 sid: true,
166 data: { 166 data: {
167 policyCode: item.bizNo, 167 key: item.key,
168 recordId: item.recordId 168 name: item.bizNo + "-" + this.i18n.eCorrespondenceEnquiry.letterName + ".pdf"
169 } 169 }
170 }).then(res => { 170 }).then(res => {
171 if (res) { 171 if (res) {
......
...@@ -47,7 +47,9 @@ export default { ...@@ -47,7 +47,9 @@ export default {
47 // 全部的信息 47 // 全部的信息
48 sourceData: {}, 48 sourceData: {},
49 bottomBtnType: "", 49 bottomBtnType: "",
50 bottomBtnLink: "" 50 bottomBtnLink: "",
51 file1: null,
52 file2: null
51 } 53 }
52 }, 54 },
53 components: {}, 55 components: {},
...@@ -73,7 +75,7 @@ export default { ...@@ -73,7 +75,7 @@ export default {
73 bottomBtnHandle() { 75 bottomBtnHandle() {
74 // this.btnNavigateTo(this.bottomBtnType, this.bottomBtnLink); 76 // this.btnNavigateTo(this.bottomBtnType, this.bottomBtnLink);
75 this.$router.push({ 77 this.$router.push({
76 path:"/custom/service?q=m6" 78 path: "/custom/service?q=m6"
77 }) 79 })
78 }, 80 },
79 btnNavigateTo(type, link) { 81 btnNavigateTo(type, link) {
...@@ -186,16 +188,20 @@ export default { ...@@ -186,16 +188,20 @@ export default {
186 188
187 this.bottomBtnType = targetData.bottomUrlType; 189 this.bottomBtnType = targetData.bottomUrlType;
188 this.bottomBtnLink = targetData.bottomUrlLink; 190 this.bottomBtnLink = targetData.bottomUrlLink;
191
192 this.file1 = targetData.file1;
193 this.file2 = targetData.file2;
189 } 194 }
190 }, 195 },
191 downloadFile(key) { 196 downloadFile(key) {
192 let sourceData = this.sourceData; 197 let file = this[key];
193 198
194 if (sourceData.exts && sourceData.exts.iobsKey && sourceData.exts.iobsKey[key]) { 199 if (file) {
195 let iobsKey = sourceData.exts.iobsKey[key]; 200 let key = file.url;
201 let name = file.name;
196 httpPost({ 202 httpPost({
197 url: api.getObsDownloadPath, 203 url: api.getObsDownloadPath,
198 data: { key: iobsKey } 204 data: { key, name }
199 }).then(res => { 205 }).then(res => {
200 if (res) { 206 if (res) {
201 let url = requestDomain() + api.downloadPolicy + "/" + res; 207 let url = requestDomain() + api.downloadPolicy + "/" + res;
......
...@@ -190,7 +190,7 @@ ...@@ -190,7 +190,7 @@
190 <!-- 下载 --> 190 <!-- 下载 -->
191 <div class="download"> 191 <div class="download">
192 <div class="border2 download-item"> 192 <div class="border2 download-item">
193 <div class="cont" @click="downloadFile('k1')"> 193 <div class="cont" @click="downloadFile('file1')">
194 <div class="icon-wrap"> 194 <div class="icon-wrap">
195 <img class="icon" src="@/assets/images/vhis/vhis-download.png" /> 195 <img class="icon" src="@/assets/images/vhis/vhis-download.png" />
196 </div> 196 </div>
...@@ -198,7 +198,7 @@ ...@@ -198,7 +198,7 @@
198 </div> 198 </div>
199 </div> 199 </div>
200 <div class="border2 download-item"> 200 <div class="border2 download-item">
201 <div class="cont" @click="downloadFile('k2')"> 201 <div class="cont" @click="downloadFile('file1')">
202 <div class="icon-wrap"> 202 <div class="icon-wrap">
203 <img class="icon" src="@/assets/images/vhis/vhis-download.png" /> 203 <img class="icon" src="@/assets/images/vhis/vhis-download.png" />
204 </div> 204 </div>
......
...@@ -47,7 +47,10 @@ export default { ...@@ -47,7 +47,10 @@ export default {
47 // 全部的信息 47 // 全部的信息
48 sourceData: {}, 48 sourceData: {},
49 bottomBtnType: "", 49 bottomBtnType: "",
50 bottomBtnLink: "" 50 bottomBtnLink: "",
51 file1: null,
52 file2: null,
53 file3: null,
51 } 54 }
52 }, 55 },
53 components: {}, 56 components: {},
...@@ -183,16 +186,21 @@ export default { ...@@ -183,16 +186,21 @@ export default {
183 186
184 this.bottomBtnType = targetData.bottomUrlType; 187 this.bottomBtnType = targetData.bottomUrlType;
185 this.bottomBtnLink = targetData.bottomUrlLink; 188 this.bottomBtnLink = targetData.bottomUrlLink;
189
190 this.file1 = targetData.file1;
191 this.file2 = targetData.file2;
192 this.file3 = targetData.file3;
186 } 193 }
187 }, 194 },
188 downloadFile(key) { 195 downloadFile(key) {
189 let sourceData = this.sourceData; 196 let file = this[key];
190 197
191 if (sourceData.exts && sourceData.exts.iobsKey && sourceData.exts.iobsKey[key]) { 198 if (file) {
192 let iobsKey = sourceData.exts.iobsKey[key]; 199 let key = file.url;
200 let name = file.name;
193 httpPost({ 201 httpPost({
194 url: api.getObsDownloadPath, 202 url: api.getObsDownloadPath,
195 data: { key: iobsKey } 203 data: { key, name }
196 }).then(res => { 204 }).then(res => {
197 if (res) { 205 if (res) {
198 let url = requestDomain() + api.downloadPolicy + "/" + res; 206 let url = requestDomain() + api.downloadPolicy + "/" + res;
......
...@@ -363,17 +363,17 @@ ...@@ -363,17 +363,17 @@
363 <!-- 下载 --> 363 <!-- 下载 -->
364 <div class="download"> 364 <div class="download">
365 <div class="border2 download-item"> 365 <div class="border2 download-item">
366 <div class="cont" @click="downloadFile('k1')"> 366 <div class="cont" @click="downloadFile('file1')">
367 <div class="icon-wrap"><img class="icon" src="@/assets/images/vhis/vhis-download.png"></div> {{$t('vhisDetail.download.t1')}} 367 <div class="icon-wrap"><img class="icon" src="@/assets/images/vhis/vhis-download.png"></div> {{$t('vhisDetail.download.t1')}}
368 </div> 368 </div>
369 </div> 369 </div>
370 <div class="border2 download-item"> 370 <div class="border2 download-item">
371 <div class="cont" @click="downloadFile('k2')"> 371 <div class="cont" @click="downloadFile('file2')">
372 <div class="icon-wrap"><img class="icon" src="@/assets/images/vhis/vhis-download.png"></div> {{$t('vhisDetail.download.t2')}} 372 <div class="icon-wrap"><img class="icon" src="@/assets/images/vhis/vhis-download.png"></div> {{$t('vhisDetail.download.t2')}}
373 </div> 373 </div>
374 </div> 374 </div>
375 <div class="border2 download-item"> 375 <div class="border2 download-item">
376 <div class="cont" @click="downloadFile('k3')"> 376 <div class="cont" @click="downloadFile('file3')">
377 <div class="icon-wrap"><img class="icon" src="@/assets/images/vhis/vhis-download.png"></div> {{$t('vhisDetail.download.t3')}} 377 <div class="icon-wrap"><img class="icon" src="@/assets/images/vhis/vhis-download.png"></div> {{$t('vhisDetail.download.t3')}}
378 </div> 378 </div>
379 </div> 379 </div>
......