676900f3 by joe

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

1 parent 127531cc
......@@ -161,11 +161,11 @@ export default {
},
downloadPolicy(item) {
httpPost({
url: api.getDownloadPath,
url: api.getObsDownloadPath,
sid: true,
data: {
policyCode: item.bizNo,
recordId: item.recordId
key: item.key,
name: item.bizNo + "-" + this.i18n.eCorrespondenceEnquiry.letterName + ".pdf"
}
}).then(res => {
if (res) {
......
......@@ -47,7 +47,9 @@ export default {
// 全部的信息
sourceData: {},
bottomBtnType: "",
bottomBtnLink: ""
bottomBtnLink: "",
file1: null,
file2: null
}
},
components: {},
......@@ -73,7 +75,7 @@ export default {
bottomBtnHandle() {
// this.btnNavigateTo(this.bottomBtnType, this.bottomBtnLink);
this.$router.push({
path:"/custom/service?q=m6"
path: "/custom/service?q=m6"
})
},
btnNavigateTo(type, link) {
......@@ -186,16 +188,20 @@ export default {
this.bottomBtnType = targetData.bottomUrlType;
this.bottomBtnLink = targetData.bottomUrlLink;
this.file1 = targetData.file1;
this.file2 = targetData.file2;
}
},
downloadFile(key) {
let sourceData = this.sourceData;
let file = this[key];
if (sourceData.exts && sourceData.exts.iobsKey && sourceData.exts.iobsKey[key]) {
let iobsKey = sourceData.exts.iobsKey[key];
if (file) {
let key = file.url;
let name = file.name;
httpPost({
url: api.getObsDownloadPath,
data: { key: iobsKey }
data: { key, name }
}).then(res => {
if (res) {
let url = requestDomain() + api.downloadPolicy + "/" + res;
......
......@@ -190,7 +190,7 @@
<!-- 下载 -->
<div class="download">
<div class="border2 download-item">
<div class="cont" @click="downloadFile('k1')">
<div class="cont" @click="downloadFile('file1')">
<div class="icon-wrap">
<img class="icon" src="@/assets/images/vhis/vhis-download.png" />
</div>
......@@ -198,7 +198,7 @@
</div>
</div>
<div class="border2 download-item">
<div class="cont" @click="downloadFile('k2')">
<div class="cont" @click="downloadFile('file1')">
<div class="icon-wrap">
<img class="icon" src="@/assets/images/vhis/vhis-download.png" />
</div>
......
......@@ -47,7 +47,10 @@ export default {
// 全部的信息
sourceData: {},
bottomBtnType: "",
bottomBtnLink: ""
bottomBtnLink: "",
file1: null,
file2: null,
file3: null,
}
},
components: {},
......@@ -183,16 +186,21 @@ export default {
this.bottomBtnType = targetData.bottomUrlType;
this.bottomBtnLink = targetData.bottomUrlLink;
this.file1 = targetData.file1;
this.file2 = targetData.file2;
this.file3 = targetData.file3;
}
},
downloadFile(key) {
let sourceData = this.sourceData;
let file = this[key];
if (sourceData.exts && sourceData.exts.iobsKey && sourceData.exts.iobsKey[key]) {
let iobsKey = sourceData.exts.iobsKey[key];
if (file) {
let key = file.url;
let name = file.name;
httpPost({
url: api.getObsDownloadPath,
data: { key: iobsKey }
data: { key, name }
}).then(res => {
if (res) {
let url = requestDomain() + api.downloadPolicy + "/" + res;
......
......@@ -363,17 +363,17 @@
<!-- 下载 -->
<div class="download">
<div class="border2 download-item">
<div class="cont" @click="downloadFile('k1')">
<div class="cont" @click="downloadFile('file1')">
<div class="icon-wrap"><img class="icon" src="@/assets/images/vhis/vhis-download.png"></div> {{$t('vhisDetail.download.t1')}}
</div>
</div>
<div class="border2 download-item">
<div class="cont" @click="downloadFile('k2')">
<div class="cont" @click="downloadFile('file2')">
<div class="icon-wrap"><img class="icon" src="@/assets/images/vhis/vhis-download.png"></div> {{$t('vhisDetail.download.t2')}}
</div>
</div>
<div class="border2 download-item">
<div class="cont" @click="downloadFile('k3')">
<div class="cont" @click="downloadFile('file3')">
<div class="icon-wrap"><img class="icon" src="@/assets/images/vhis/vhis-download.png"></div> {{$t('vhisDetail.download.t3')}}
</div>
</div>
......