Commit 26bb5e78 by Sweet Zhang

增加培训视频

parent b384f1bd
......@@ -15,10 +15,10 @@
<i class="iconfont icon-pdf" *ngIf="!judgmentFile(fileUploadItem.filePath)"></i>
<img src="assets/images/videoIcon.png" alt="视频" *ngIf="judgmentFile(fileUploadItem.filePath)" style=" width: 26px;
margin-right: 6px;">
<span title="{{fileUploadItem.itemName}}">{{fileUploadItem.itemName}}</span>
</div>
<div title="{{fileUploadItem.itemName}}">{{fileUploadItem.itemName}}</div>
<div style="position: absolute;right: 5px;top: 6px;">
<i class="iconfont icon-xiazai" *ngIf="!judgmentFile(fileUploadItem.filePath)"></i>
<div style="flex-basis: 30px;text-align: right;">
<i class="iconfont icon-xiazai" style="margin-right: 0;" *ngIf="!judgmentFile(fileUploadItem.filePath)"></i>
<img src="assets/images/playIcon.png" alt="播放" *ngIf="judgmentFile(fileUploadItem.filePath)" style=" width: 26px;">
</div>
</a>
......
......@@ -48,6 +48,8 @@
border-bottom: 1px solid #dcdcdc;
padding: 4px 20px;
position: relative;
height: 42px;
line-height: 42px;
.icon-xiazai {
font-size: 22px;
color: #ec2d37;
......@@ -56,7 +58,9 @@
a {
display: flex;
align-items: center;
justify-content: space-between;
color: #000;
height: 100%;
.iconfont {
color: #ec2d37;
font-size: 22px;
......
......@@ -9,7 +9,7 @@ import { ActivatedRoute } from "@angular/router";
})
export class FileUploadComponent implements OnInit {
fileUploadItemList: Array<any>;
// 判断是文件下载还是教育培训
// 判断是文件下载还是教育培训还是培训视频
type: string;
categoryList: Array<any>;
selectedCategoryId: any;
......@@ -19,14 +19,19 @@ export class FileUploadComponent implements OnInit {
ngOnInit() {
this.type = this.activatedRoute.snapshot.data[0]['type'];
this.fileUploadType = this.activatedRoute.snapshot.queryParams.fileUploadType ? this.activatedRoute.snapshot.queryParams.fileUploadType : null;
if(this.type === 'trainingVideo'){
this.fileUploadType = true;
}else{
this.fileUploadType = this.activatedRoute.snapshot.queryParams.fileUploadType ? this.activatedRoute.snapshot.queryParams.fileUploadType : null;
}
this.dropOptionsQuery();
if (this.type === 'fileUpload') {
this.fileUpload(3, 0, 19, 'yd_download_file_type', this.selectedCategoryId);
} else if (this.type === 'training') {
this.fileUpload(3, 0, 23, 'yd_trainning_file_type', this.selectedCategoryId);
} else if (this.type === 'trainingVideo') {
this.fileUpload(3, 0, 23, 'yd_trainning_file_type', 'trainingVideo');
}
}
// 判断是不是视频文件
judgmentFile(picUrl) {
......
......@@ -92,6 +92,7 @@ export class MenuItemComponent implements OnInit {
{ 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: 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 },
],
isShow: true
},{
......
......@@ -79,6 +79,7 @@ const myRoutes: Routes = [
{ path: 'material/:itemId', component: MkMaterialDetailComponent, canActivate: [AuthGuard] },
{ path: 'fileUpload', component: FileUploadComponent, canActivate: [AuthGuard], data: [{ type: 'fileUpload' }] },
{ path: 'training', component: FileUploadComponent, canActivate: [AuthGuard], data: [{ type: 'training' }] },
{ path: 'trainingVideo', component: FileUploadComponent, canActivate: [AuthGuard], data: [{ type: 'trainingVideo' }] },
{ path: 'importantAnnouncement', component: ImportantAnnouncementComponent, canActivate: [AuthGuard] },
{ path: 'salesDetail', component: SalesDetailComponent, canActivate: [AuthGuard] },
{ path: 'importantAnnouncement/:id', component: AnnouncementDetailComponent, canActivate: [AuthGuard] },
......
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