fix bug
This commit is contained in:
@ -499,7 +499,7 @@ export class insuranceManagementListComponent implements OnInit {
|
|||||||
showImg(_record: any) {
|
showImg(_record: any) {
|
||||||
// var newUrl=_record.policyUrl.replace('http','https')
|
// var newUrl=_record.policyUrl.replace('http','https')
|
||||||
// window.open(newUrl,'_self');
|
// window.open(newUrl,'_self');
|
||||||
window.location.href = `${_record.policyUrl}`;
|
this.service.reviewPDF( `${_record.policyUrl}`)
|
||||||
// this.service.downloadFile(`${_record.policyUrl}`)
|
// this.service.downloadFile(`${_record.policyUrl}`)
|
||||||
// const params = {
|
// const params = {
|
||||||
// imgList: [_record.policyUrl],
|
// imgList: [_record.policyUrl],
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2021-12-03 15:31:52
|
* @Date : 2021-12-03 15:31:52
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-02-28 17:11:54
|
* @LastEditTime : 2022-04-11 14:12:35
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\insurance-management\\services\\insurance-management.service.ts
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\insurance-management\\services\\insurance-management.service.ts
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
*/
|
*/
|
||||||
@ -32,6 +32,28 @@ export class InsuranceManagementService extends ShipperBaseService {
|
|||||||
// 保险费列表数据导出接口
|
// 保险费列表数据导出接口
|
||||||
$api_get_asyncExport = `/api/sdc/premiumInfo/asyncExport`;
|
$api_get_asyncExport = `/api/sdc/premiumInfo/asyncExport`;
|
||||||
|
|
||||||
|
public reviewPDF(url: string) {
|
||||||
|
if (!url) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const uA = window.navigator.userAgent; // 判断浏览器内核
|
||||||
|
const isIE =
|
||||||
|
/msie\s|trident\/|edge\//i.test(uA) &&
|
||||||
|
!!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window);
|
||||||
|
const objectUrl = url;
|
||||||
|
const a = document.createElement('a');
|
||||||
|
document.body.appendChild(a);
|
||||||
|
a.href = objectUrl;
|
||||||
|
a.download = '保单.pdf';
|
||||||
|
if (isIE) {
|
||||||
|
// 兼容IE11无法触发下载的问题
|
||||||
|
(navigator as any).msSaveBlob(url, a.download);
|
||||||
|
} else {
|
||||||
|
a.click();
|
||||||
|
}
|
||||||
|
a.remove();
|
||||||
|
}
|
||||||
|
|
||||||
constructor(public injector: Injector) {
|
constructor(public injector: Injector) {
|
||||||
super(injector);
|
super(injector);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,13 +4,12 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2022-04-06 10:57:56
|
* @Date : 2022-04-06 10:57:56
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-04-11 14:00:47
|
* @LastEditTime : 2022-04-11 14:10:13
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\ticket-management\\components\\etc-invoiced-requested\\etc-invoiced-requested.component.html
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\ticket-management\\components\\etc-invoiced-requested\\etc-invoiced-requested.component.html
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
-->
|
-->
|
||||||
<page-header-wrapper [title]="'申请记录'">
|
<page-header-wrapper [title]="'申请记录'">
|
||||||
</page-header-wrapper>
|
</page-header-wrapper>
|
||||||
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
|
|
||||||
<nz-card class="search-box" nzBordered>
|
<nz-card class="search-box" nzBordered>
|
||||||
<div nz-row nzGutter="8">
|
<div nz-row nzGutter="8">
|
||||||
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
|
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: your name
|
* @Author: your name
|
||||||
* @Date: 2021-12-29 13:12:35
|
* @Date: 2021-12-29 13:12:35
|
||||||
* @LastEditTime : 2022-04-09 17:08:15
|
* @LastEditTime : 2022-04-11 14:11:21
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\ticket-management\\services\\ticket.service.ts
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\ticket-management\\services\\ticket.service.ts
|
||||||
@ -145,7 +145,7 @@ export class TicketService extends ShipperBaseService {
|
|||||||
super(injector);
|
super(injector);
|
||||||
}
|
}
|
||||||
|
|
||||||
reviewPDF(url: string) {
|
public reviewPDF(url: string) {
|
||||||
if (!url) {
|
if (!url) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user