Commit d327a4f8 by Sweet Zhang

pdfjs

parent f448a28b
<div class="businessCardContainer">
<div style="text-align: right;padding-right: 20px;padding-top: 15px;" *ngIf="practitionerInfo?.emailIsActive==0">
<button class="applyEmailBtn" (click)="applyEmail()">申请公司邮箱</button>
<div style="text-align: right;padding-top: 15px;">
<button class="applyEmailBtn" (click)="applyEmail()" *ngIf="practitionerInfo?.emailIsActive==0">申请公司邮箱</button>
<a class="applyEmailBtn" href="assets/pdfjs/web/viewer.html?file={{practitionerInfo?.businessCardPdfUrl}}&isNeedCover=false&isNeedDownload=true" target="_blank" rel="noopener noreferrer">保存名片PDF档</a>
</div>
<div class="brokerCardPositive">
<div class="qrcodeBox">
......
......@@ -11,6 +11,11 @@
border-radius: 5px;
color: #fff;
background: #0767bf;
margin: 0 5px;
display: inline-block;
outline: none;
border: none;
text-decoration-line: none;
}
.brokerCardPositive {
display: flex;
......
import {Component, OnInit} from '@angular/core';
import {Component, OnDestroy, OnInit} from '@angular/core';
import { MyService } from '../my.service';
@Component({
......
......@@ -10,7 +10,16 @@
<div class="contentList" [ngStyle]="{'margin-top':type == 'fileUpload'?'10px':'auto'}">
<ul>
<li *ngFor="let fileUploadItem of fileUploadItemList">
<a href="{{fileUploadItem.filePath}}" download="{{fileUploadItem.itemName}}" target="_blank" *ngIf="!judgmentFile(fileUploadItem.filePath)">
<a href="{{fileUploadItem.filePath}}" download="{{fileUploadItem.itemName}}" *ngIf="!judgmentFile(fileUploadItem.filePath) && !judgmentFile(fileUploadItem.filePath,'pdf')">
<div style="overflow-x: hidden; white-space: nowrap;text-overflow: ellipsis;">
<i class="iconfont icon-ziliao"></i>
<span title="{{fileUploadItem.itemName}}">{{fileUploadItem.itemName}}</span>
</div>
<div style="flex-basis: 30px;text-align: right;">
<i class="iconfont icon-xiazai" style="margin-right: 0;"></i>
</div>
</a>
<a href="assets/pdfjs/web/viewer.html?file={{fileUploadItem.filePath}}" target="_blank" *ngIf="!judgmentFile(fileUploadItem.filePath) && judgmentFile(fileUploadItem.filePath,'pdf')">
<div style="overflow-x: hidden; white-space: nowrap;text-overflow: ellipsis;">
<i class="iconfont icon-pdf"></i>
<span title="{{fileUploadItem.itemName}}">{{fileUploadItem.itemName}}</span>
......
......@@ -52,17 +52,27 @@ export class FileUploadComponent implements OnInit {
}
}
// 判断是不是视频文件
judgmentFile(picUrl) {
judgmentFile(picUrl,type='video') {
let filename = picUrl; //文件路径地址
let index1 = filename.lastIndexOf(".");
let index2 = filename.length;
let postf = filename.substring(index1, index2).toLowerCase(); //获取文bai件后缀名duzhi
//判断文件后缀名是否等于视频文件的后缀名
if (postf===".avi"||postf===".mp4"||postf===".rmvb"||postf===".mov") {
return true
}else{
return false
if(type==='video'){
//判断文件后缀名是否等于视频文件的后缀名
if (postf===".avi"||postf===".mp4"||postf===".rmvb"||postf===".mov") {
return true
}else{
return false
}
}else if(type==='pdf'){
//判断文件后缀名是否等于pdf
if (postf===".pdf") {
return true
}else{
return false
}
}
}
// 文件下载
......
......@@ -91,7 +91,7 @@ export class MenuItemComponent implements OnInit {
content: [
{ no: 5, subtitle: '保险ABC', icon: 'abc', path: `https://${window.location.host}/issue`, routerLink: '' ,showSubMenu:true},
// { no: 6, subtitle: '培训课件', icon: 'train', path: '', routerLink: 'training',showSubMenu:true },
{ no: 10, subtitle: '职业类别', icon: 'job', path: 'https://www.ydinsurance.cn/occupationQry/', routerLink: '',showSubMenu:true },
// { no: 10, subtitle: '职业类别', icon: 'job', path: 'https://www.ydinsurance.cn/occupationQry/', routerLink: '',showSubMenu:true },
// { no: 11, subtitle: '文件下载', icon: 'download', path: 'https://www.ydinsurance.cn/?page_id=13957', routerLink: 'fileUpload',showSubMenu:true },
// { no: 36, subtitle: '培训视频', icon: 'trainVideo', path: '', routerLink: 'trainingVideo',showSubMenu:true },
{ no: 39, subtitle: '岗前培训', icon: 'prejobTrainingIcon', path: '', routerLink: 'prejobTraining',showSubMenu:true },
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment