Commit f0f6df65 by sunchao

解决冲突

parents 60174dcf 70fff34b
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
"ng-zorro-antd-mobile": "^0.12.5", "ng-zorro-antd-mobile": "^0.12.5",
"ngx-echarts": "^3.2.0", "ngx-echarts": "^3.2.0",
"ngx-ueditor": "^2.1.3", "ngx-ueditor": "^2.1.3",
"node-sass": "^4.14.1", "node-sass": "4.14.1",
"rxjs": "~6.3.3", "rxjs": "~6.3.3",
"save": "^2.4.0", "save": "^2.4.0",
"signature_pad": "^3.0.0-beta.4", "signature_pad": "^3.0.0-beta.4",
......
...@@ -87,6 +87,7 @@ export class AppComponent implements OnInit, OnDestroy { ...@@ -87,6 +87,7 @@ export class AppComponent implements OnInit, OnDestroy {
|| event.url.indexOf('/inviter')>=0 || event.url.indexOf('/inviter')>=0
|| event.url.indexOf('/register')>=0 || event.url.indexOf('/register')>=0
|| event.url.indexOf('/invitees')>=0 || event.url.indexOf('/invitees')>=0
|| event.url.indexOf('/video/')>=0
){ ){
this.isShowIndexBtn = false; this.isShowIndexBtn = false;
} }
......
<video *ngIf="!pdfPath" #video <iframe [src]="filePath | safeResourceUrl" frameborder="0" width="100%" height="100%" style="min-height: 100vh;" *ngIf="!isVideo"></iframe>
[src]="videoSrc"
controls="true"
width="100%" preload="auto" (contextmenu)="menuPrevent()" x5-playsinline="true" playsinline="true" webkit-playsinline="true" disablePictureInPicture> <video [src]="filePath | safeResourceUrl" frameborder="0" width="100%" height="100%" *ngIf="isVideo" controls></video>
您的浏览器不支持 video 标签。 \ No newline at end of file
</video>
<!-- <button type="button" class="downloadBtn" (click)="download(videoSrc)" *ngIf="permissions.isDownload&&deviceType!='1'&&!pdfPath">下载资源</button> -->
<iframe *ngIf="pdfPath" [src]="pdfPath | safeResourceUrl" frameborder="0" width="100%" height="100%" style="min-height: 100vh;"></iframe>
\ No newline at end of file
import { AfterViewInit, Component, ElementRef, OnDestroy, OnInit, ViewChild, } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { MyService } from 'src/app/my/my.service'; import { MyService } from 'src/app/my/my.service';
import { LifeCommonService } from '../life-common.service';
@Component({ @Component({
selector: 'ydlife-video', selector: 'ydlife-video',
templateUrl: './video.component.html', templateUrl: './video.component.html',
styleUrls: ['./video.component.scss'] styleUrls: ['./video.component.scss']
}) })
export class VideoComponent implements OnInit, AfterViewInit, OnDestroy { export class VideoComponent implements OnInit {
@ViewChild('video') video: ElementRef; filePath:string;
videoSrc: string; fileCategory:string;
pdfPath: any;
permissions: any;
lifeCustomerInfo: any;
timer: any;
timer2: any;
videoPlaybacks: Array<any>;
originTime: number = 0;
fileId:string; fileId:string;
deviceType:string; isVideo:boolean;
maxViewTime:number = 0; constructor(private activatedRoute: ActivatedRoute, private myService: MyService) { }
constructor(private activatedRoute: ActivatedRoute, private myService: MyService,private lifeCommonService:LifeCommonService) { }
ngOnInit() { ngOnInit() {
this.deviceType = this.lifeCommonService.checkDeviceType(); this.fileId = this.activatedRoute.snapshot.params.fileId;
this.videoSrc = sessionStorage.getItem('videoPath'); this.fileCategory = this.activatedRoute.snapshot.params.fileCategory;
this.permissions = JSON.parse(sessionStorage.getItem('permissions')); console.log(this.activatedRoute)
this.pdfPath = this.activatedRoute.snapshot.queryParams['path']; this.filePathQuery(null,this.fileId,this.fileCategory)
this.lifeCustomerInfo = JSON.parse(localStorage.getItem('lifeCustomerInfo'));
this.fileId = this.activatedRoute.snapshot.params['fileId'];
if(!this.pdfPath){
this.queryVideoPlayback(1);
}
} }
ngAfterViewInit(): void {
if(!this.pdfPath){ filePathQuery(status, fileId,fileCategory='23') {
this.video.nativeElement.addEventListener('pause', ()=> { //暂停开始执行的函数 this.myService.filePath('3', '0', fileCategory, 'yd_trainning_file_type', null, null, status, fileId).subscribe(res => {
clearInterval(this.timer); if(res['success']){
clearInterval(this.timer2); const fileUploadItem = res['data']['fileUploadItemList'][0];
console.log('暂停播放') this.isVideo = this.judgmentFile(fileUploadItem.filePath,'video');
this.saveVideoPlayback(); if(this.isVideo){
}); this.filePath = fileUploadItem.filePath;
this.video.nativeElement.addEventListener('play', ()=> { //开始执行的函数 }else{
this.timer = setInterval(() => { this.filePath = `assets/pdfjs/web/viewer.html?file=${fileUploadItem.filePath}&isneeddownload=${fileUploadItem.isDownload=='1'?'true':'false'}`
console.log('开始播放')
this.saveVideoPlayback();
}, 1000 * 20)
this.queryVideoPlayback(2)
});
if (this.permissions.isDownload == '2') {
this.video.nativeElement.setAttribute('controlslist', this.video.nativeElement.getAttribute('controlslist') + ' nodownload')
} else {
this.video.nativeElement.setAttribute('controlslist', this.video.nativeElement.getAttribute('controlslist'))
}
if (this.permissions.isControlPlayback == '2') {
this.video.nativeElement.setAttribute('controlslist', this.video.nativeElement.getAttribute('controlslist') + ' noplaybackrate')
} else {
this.video.nativeElement.setAttribute('controlslist', this.video.nativeElement.getAttribute('controlslist'))
}
}
}
ngOnDestroy(): void {
if(!this.pdfPath){
clearInterval(this.timer);
clearInterval(this.timer2);
this.saveVideoPlayback();
}
}
menuPrevent() {
return false;
} }
saveVideoPlayback() {
// playbackStatus 视频播放状态(1:未播放完;2:已播放完) 【必填】
const param = {
id: '',
customerId: this.lifeCustomerInfo.customerId,
practitionerId: this.lifeCustomerInfo.practitionerId,
fileId: this.fileId,
totalTime: this.video.nativeElement.duration,
viewTime: this.video.nativeElement.currentTime,
playbackStatus: this.video.nativeElement.currentTime >= this.video.nativeElement.duration ? 2 : 1,
} }
this.myService.saveVideoPlayback(param).subscribe(res => {
console.log(res);
}) })
} }
queryVideoPlayback(type) { // 判断是不是视频文件
const param = { judgmentFile(picUrl,type='video') {
id: null, let filename = picUrl; //文件路径地址
customerId: this.lifeCustomerInfo.customerId, let index1 = filename.lastIndexOf(".");
practitionerId: this.lifeCustomerInfo.practitionerId, let index2 = filename.length;
fileId: this.fileId, let postf = filename.substring(index1, index2).toLowerCase(); //获取文bai件后缀名duzhi
} if(type==='video'){
this.myService.queryVideoPlayback(param).subscribe(res => { //判断文件后缀名是否等于视频文件的后缀名
if (res['success']) { if (postf===".avi"||postf===".mp4"||postf===".rmvb"||postf===".mov") {
this.videoPlaybacks = res['data']['videoPlaybacks']; return true
this.maxViewTime = this.videoPlaybacks[0]['maxViewTime'];
if(type===1){
// 设置开始播放时间为上次离开时间
this.originTime = this.video.nativeElement.currentTime = this.videoPlaybacks.length > 0 ? this.videoPlaybacks[0]['viewTime'] : 0;
}else{ }else{
// 监测有没有拖动进度条 return false
this.timer2 = setInterval(()=>{
if (this.video.nativeElement.currentTime - this.originTime > 1 && this.video.nativeElement.currentTime > this.maxViewTime) {
this.video.nativeElement.currentTime = this.originTime;
} }
this.originTime = this.video.nativeElement.currentTime; }else if(type==='pdf'){
},500) //判断文件后缀名是否等于pdf
if (postf===".pdf") {
return true
}else{
return false
} }
} else {
this.video.nativeElement.currentTime = 0;
} }
console.log(res);
})
} }
download(path){ menuPrevent() {
window.open(path) return false;
} }
} }
...@@ -38,6 +38,7 @@ export class BankCardComponent implements OnInit { ...@@ -38,6 +38,7 @@ export class BankCardComponent implements OnInit {
this.openPopInfo('银行卡号不能为空!'); this.openPopInfo('银行卡号不能为空!');
return; return;
} }
console.log(this.bankAccountId,this.sureBankAccountId)
if(this.bankAccountId != this.sureBankAccountId){ if(this.bankAccountId != this.sureBankAccountId){
this.openPopInfo('两次银行卡号不一致!'); this.openPopInfo('两次银行卡号不一致!');
return; return;
......
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
<div class="wrapper" *ngIf="isActive==2"> <div class="wrapper" *ngIf="isActive==2">
<div class="top"> <div class="top">
<div class="title">基础公告佣金政策</div> <div class="title">基础公告佣金政策</div>
<div class="subtitle">*本产品适用 <span style="color: #333;font-weight: bold;">{{settlementRuleType}}</span> <span style="color: red;">(基本法类型取自产品基本信息-基本法)</span></div> <div class="subtitle">*本产品适用 <span style="color: #333;font-weight: bold;">{{settlementRuleType}}</span>
<!-- <span style="color: red;">(基本法类型取自产品基本信息-基本法)</span> -->
</div>
</div> </div>
<div class="content"> <div class="content">
<ul> <ul>
...@@ -34,3 +36,6 @@ ...@@ -34,3 +36,6 @@
<p>根据基本法规定,如因客户退保产生保险公司追佣的情形,公司将向经纪人扣回或追偿相应损失。</p> <p>根据基本法规定,如因客户退保产生保险公司追佣的情形,公司将向经纪人扣回或追偿相应损失。</p>
</div> </div>
</div> </div>
<div *ngIf="!commission && !commissionInfoList" style="text-align: center;font-size: 20px;color: #333;">
公告佣金数据待更新,请耐心等待!
</div>
...@@ -18,23 +18,28 @@ ...@@ -18,23 +18,28 @@
margin: 10px auto; margin: 10px auto;
ul{ ul{
display: flex; display: flex;
width: 600px; width: 700px;
align-items: center; align-items: center;
height: 40px; // height: 40px;
// border: 1px #333 solid; // border: 1px #333 solid;
// border-bottom: none; // border-bottom: none;
li{ li{
width: 15%; width: 15%;
text-align: center; text-align: center;
border:1px #333 solid; border: 1px #333 solid;
height: 40px; height: 50px;
line-height: 40px;
border-right: none; border-right: none;
border-bottom: none; border-bottom: none;
display: flex;
align-items: center;
justify-content: center;
} }
li.name,li.pay{ li.name{
width: 20%; width: 30%;
} }
// li.pay{
// width: 20%;
// }
li:nth-child(8){ li:nth-child(8){
border-right: 1px #333 solid; border-right: 1px #333 solid;
} }
......
<div class="courseDetailContainer">
<div class="courseInitShow">
<video *ngIf="canplay" #video
[src]="fileUploadItem?.filePath"
controls="true"
[poster]="fileUploadItem?.fileFirstImg"
width="100%" height="200px" preload="none" (contextmenu)="menuPrevent()" x5-playsinline="true" playsinline="true" webkit-playsinline="true" x5-video-player-type="h5" disablePictureInPicture>
您的浏览器不支持 video 标签。
</video>
<img *ngIf="!canplay" [src]="fileUploadItem?.fileFirstImg" alt="" srcset="" style="height: 200px;">
</div>
<div class="courseTitle">
<h4>{{fileUploadItem?.itemName}}</h4>
<span class="viewpdf" *ngIf="fileUploadItem?.filePath && fileUploadItem?.filePath.indexOf('.pdf') > -1 && (fileUploadItem.learningStatus == 1 || fileUploadItem.learningStatus == 2)" (click)="viewPdfDetail(fileUploadItem)">立即阅读</span>
</div>
<div class="courseIntroContent">
<div class="tab">
<span [ngClass]="{'actived': tabType===1}" (click)="switchTab(1)">介绍</span>
<span [ngClass]="{'actived': tabType===2}" (click)="switchTab(2)">目录</span>
<span [ngClass]="{'actived': tabType===3}" (click)="switchTab(3)">讲师</span>
</div>
<div class="tabContent">
<div class="introContent" *ngIf="tabType===1">
<p [innerHTML]="fileUploadItem?.fileIntroduce"></p>
</div>
<div class="catalogueContent" *ngIf="tabType===2">
<div class="courseSectionTotal">共{{fileUploadItemList?.length}}节</div>
<div class="courseCatalogue">
<ul>
<li *ngFor="let fileUploadItem of fileUploadItemList;index as i" (click)="selectVideo(fileUploadItem)">
<div>
<p>{{i + 1}}.</p>
<p>
<span>{{fileUploadItem?.itemName}}</span>
<span>{{fileUploadItem?.viewTime | secondsTransfer}}/{{fileUploadItem?.totalTime | secondsTransfer}}</span>
</p>
</div>
<div style="display: flex;flex-direction:column;align-items:center;width:58px;">
<p style="width: 30px;">
<img [src]="'assets/images/icons/' + (fileUploadItem.learningStatus == '3' ? 'disablePlay' : 'play') + '.png'" alt="" srcset="">
</p>
<p>{{fileUploadItem?.filePath.indexOf('.pdf') > -1 ? '点击阅读' : (fileUploadItem.learningStatus == '3' ? '不可播放' : '播放')}}</p>
</div>
</li>
</ul>
</div>
</div>
<div class="lecturerContent" *ngIf="tabType===3">
<div class="lecturerIntro">
<div class="lecturerUrl">
<img src="{{LecturerInfo?.lecturerUrl}}" alt="" srcset="">
</div>
<div>
<p><span class="lecturerName">{{LecturerInfo?.lecturerName}}</span></p>
<ng-container *ngIf="LecturerInfo?.lecturerRankNames">
<p *ngFor="let item of LecturerInfo.lecturerRankNames.split(',')" class="lecturerTitle"><span>{{item}}</span></p>
</ng-container>
</div>
</div>
<h4>
<span>讲师介绍</span>
</h4>
<p [innerHTML]="LecturerInfo?.lecturerIntroduce" style="padding:0 14px 0px 14px;color:#333"></p>
</div>
</div>
</div>
</div>
<!-- 提示弹窗 -->
<Modal [(ngModel)]="this.state.modal1" [transparent]="true" [maskClosable]="true" (onClose)="onClose('modal1')">
<div [ngStyle]="{ height: 100, overflow: 'scroll',color:'#000' }">
请完成上一个课程学习,此课程才能打开哦!
</div>
</Modal>
\ No newline at end of file
.courseDetailContainer{
background-color: #FFF;
height: calc(100vh - 70px);
.courseInitShow{
height: 200px;
background: rgba(237,237,237,.5);
}
.courseTitle{
padding: 0 13px;
height: 50px;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #f5f5f5;
h4{
font-size: 20px;
color: #333;
flex: 1 1 auto;
width: 0;
}
.viewpdf{
padding: 3px 8px;
background: #5f83ff;
border-radius: 5px;
color: #fff;
white-space: nowrap;
}
}
.courseIntroContent{
.tab{
display: flex;
justify-content: space-between;
padding: 0 15px;
height: 38px;
align-items: center;
border-bottom: 1px solid #f5f5f5;
font-size: 16px;
color: #333;
>span{
cursor: pointer;
&.actived{
position: relative;
color: #5F83FF;
&::after{
position: absolute;
content: '';
left: 0;
bottom: -7px;
width: 100%;
height: 0;
border-bottom: 1px solid #5F83FF;
}
}
}
}
.tabContent{
padding-bottom: 80px;
}
.courseSectionTotal{
height: 30px;
line-height: 30px;
padding-left: 15px;
color: #5F83FF;
font-size: 16px;
border-bottom: 1px solid #f5f5f5;
}
.courseCatalogue{
padding: 0 15px;
background-color: #fff;
li{
display: flex;
justify-content: space-between;
height: 70px;
align-items: center;
border-bottom: 1px solid #f5f5f5;
> div:first-child{
display: flex;
font-size: 16px;
color: #666;
> p:nth-of-type(2){
display: flex;
flex-direction: column;
margin-left: 2px;
>span:last-child{
color: #999;
}
}
}
}
}
.lecturerContent{
.lecturerIntro{
display: flex;
padding: 19px 25px;
border-bottom: 1px solid #f5f5f5;
.lecturerUrl{
width: 100px;
height: 100px;
border-radius: 50%;
background-color: #ccc;
overflow: hidden;
margin-right: 20px;
}
.lecturerName{
display: inline-block;
width: 96px;
height: 30px;
background: #5F83FF;
border-radius: 5px 5px 5px 5px;
opacity: 1;
color: #fff;
text-align: center;
line-height: 30px;
font-size: 20px;
}
.lecturerTitle{
font-size: 18px;
color: #5F83FF;
margin-top: 5px;
}
}
h4{
padding-left: 15px;
padding-top: 6px;
padding-bottom: 10px;
span{
border-bottom: 1px solid #333;
font-size: 15px;
}
}
}
.introContent{
padding: 14px;
}
}
}
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CourseDetailComponent } from './course-detail.component';
describe('CourseDetailComponent', () => {
let component: CourseDetailComponent;
let fixture: ComponentFixture<CourseDetailComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CourseDetailComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CourseDetailComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { AfterViewInit, Component, ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { LifeCommonService } from 'src/app/common/life-common.service';
import { MyService } from '../my.service';
@Component({
selector: 'ydlife-course-detail',
templateUrl: './course-detail.component.html',
styleUrls: ['./course-detail.component.scss']
})
export class CourseDetailComponent implements OnInit,OnDestroy {
@ViewChild('video') video: ElementRef;
lifeCustomerInfo: any;
timer: any;
timer2: any;
videoPlaybacks: Array<any>;
originTime: number = 0;
fileId: string;
deviceType: string;
maxViewTime: number = 0;
status: string;
tabType: number = 1;
LecturerInfo: any;
canplay:boolean = true;
public fileUploadItem: any;
public fileUploadItemList: Array<any>;
public customerId: string = localStorage.getItem('lifeCustomerInfo') ? JSON.parse(localStorage.getItem('lifeCustomerInfo')).customerId : null;
state = {
modal1: false,
};
onClose(key) {
this.state[key] = false;
}
constructor(private router:Router,private activatedRoute: ActivatedRoute, private myService: MyService, private lifeCommonService: LifeCommonService) { }
ngOnInit() {
this.fileId = this.activatedRoute.snapshot.params.fileId;
this.status = this.activatedRoute.snapshot.params.status;
this.deviceType = this.lifeCommonService.checkDeviceType();
this.lifeCustomerInfo = JSON.parse(localStorage.getItem('lifeCustomerInfo'));
this.filePathQuery(this.status, this.fileId);
}
// tab切换
switchTab(type) {
this.tabType = type;
if (type === 3) {
this.lecturerQuery(this.fileUploadItem.fileLecturerId);
} else if (type == 2) {
this.filePathQuery(null, null,this.fileUploadItem.mdDropOptionCode)
} else {
this.filePathQuery(this.status, this.fileId)
}
}
filePathQuery(status, fileId,code=null) {
if(status=='undefined' || status == '0'){
status = undefined;
}
this.myService.filePath('3', '0', '23', 'yd_trainning_file_type', code, this.customerId, status, fileId).subscribe(res => {
if (res['success']) {
if (fileId) {
this.fileUploadItem = res['data']['fileUploadItemList'] ? res['data']['fileUploadItemList'][0] : null;
if(this.fileUploadItem && this.fileUploadItem.filePath.indexOf('.pdf') < 0 && (this.fileUploadItem.learningStatus == 1 || this.fileUploadItem.learningStatus == 2)){
this.canplay = true;
}else{
this.canplay = false;
}
if (this.canplay) {
this.queryVideoPlayback(1);
setTimeout(() => {
this.video.nativeElement.addEventListener('ended', () => { //播放完成的函数
clearInterval(this.timer);
clearInterval(this.timer2);
console.log('播放完成的函数')
});
this.video.nativeElement.addEventListener('pause', () => { //暂停开始执行的函数
clearInterval(this.timer);
clearInterval(this.timer2);
console.log('暂停播放')
this.saveVideoPlayback();
});
this.video.nativeElement.addEventListener('play', () => { //开始执行的函数
this.timer = setInterval(() => {
console.log('开始播放')
this.saveVideoPlayback();
}, 1000 * 20)
this.queryVideoPlayback(2)
});
if (this.fileUploadItem.isDownload == '2') {
this.video.nativeElement.setAttribute('controlslist', this.video.nativeElement.getAttribute('controlslist') + ' nodownload')
} else {
this.video.nativeElement.setAttribute('controlslist', this.video.nativeElement.getAttribute('controlslist'))
}
if (this.fileUploadItem.isControlPlayback == '2') {
this.video.nativeElement.setAttribute('controlslist', this.video.nativeElement.getAttribute('controlslist') + ' noplaybackrate')
} else {
this.video.nativeElement.setAttribute('controlslist', this.video.nativeElement.getAttribute('controlslist'))
}
})
}
} else {
this.fileUploadItemList = res['data']['fileUploadItemList'];
}
}else{
clearInterval(this.timer);
clearInterval(this.timer2);
}
})
}
// 查询讲师信息
lecturerQuery(id) {
const param = {
id: id
}
this.myService.lecturerQuery(param).subscribe(res => {
if (res['success']) {
this.LecturerInfo = res['data']['lecturerInfos'][0]
}
})
}
ngOnDestroy(): void {
if (this.canplay) {
clearInterval(this.timer);
clearInterval(this.timer2);
this.saveVideoPlayback();
}
}
menuPrevent() {
return false;
}
saveVideoPlayback(type=1) {
// playbackStatus 视频播放状态(1:未播放完;2:已播放完) 【必填】
let param = {
id: '',
customerId: this.lifeCustomerInfo.customerId,
practitionerId: this.lifeCustomerInfo.practitionerId,
fileId: this.fileId,
}
if(type===2){
param['totalTime'] = param['viewTime'] = 0;
param['playbackStatus'] = 2;
}else{
param['totalTime']=this.video.nativeElement.duration;
param['viewTime']= this.video.nativeElement.currentTime;
param['playbackStatus']=this.video.nativeElement.currentTime >= this.video.nativeElement.duration ? 2 : 1;
if(param['totalTime'] == param['viewTime']){
clearInterval()
}
}
this.status = param['playbackStatus']=='2' ? '1' : this.status;
this.myService.saveVideoPlayback(param).subscribe(res => {
})
}
// 立即阅读
viewPdfDetail(fileUploadItem){
this.saveVideoPlayback(2);
this.router.navigate(['/pdfView',fileUploadItem.fileId,fileUploadItem.fileCategory]);
}
queryVideoPlayback(type) {
const param = {
id: null,
customerId: this.lifeCustomerInfo.customerId,
practitionerId: this.lifeCustomerInfo.practitionerId,
fileId: this.fileId,
}
this.myService.queryVideoPlayback(param).subscribe(res => {
if (res['success']) {
this.videoPlaybacks = res['data']['videoPlaybacks'];
this.maxViewTime = this.videoPlaybacks[0] ? this.videoPlaybacks[0]['maxViewTime'] : 0;
if (type === 1) {
// 设置开始播放时间为上次离开时间
this.originTime = this.video.nativeElement.currentTime = this.videoPlaybacks.length > 0 ? this.videoPlaybacks[0]['viewTime'] : 0;
} else {
// 监测有没有拖动进度条
this.timer2 = setInterval(() => {
if (this.video.nativeElement.currentTime - this.originTime > 1 && this.video.nativeElement.currentTime > this.maxViewTime) {
this.video.nativeElement.currentTime = this.originTime;
}
this.originTime = this.video.nativeElement.currentTime;
}, 500)
}
} else {
this.video.nativeElement.currentTime = 0;
}
})
}
download(path) {
window.open(path)
}
selectVideo(val) {
clearInterval();
if (val.learningStatus == '3') {
this.state.modal1 = true;
} else {
this.fileId = val.fileId;
this.filePathQuery(val.learningStatus, this.fileId);
this.router.navigate(['/courseDetail','0',this.fileId],{replaceUrl:true});
document.body.scroll({top:0,
left: 0,
behavior: 'smooth'})
}
}
}
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<i class="iconfont" style="margin-right: 0;" [ngClass]="fileUploadItem.isDownload=='1' ? 'icon-xiazai' : 'icon-xianshi'"></i> <i class="iconfont" style="margin-right: 0;" [ngClass]="fileUploadItem.isDownload=='1' ? 'icon-xiazai' : 'icon-xianshi'"></i>
</div> </div>
</a> </a>
<a href="javascript:;" [routerLink]="['/video',{'fileId':fileUploadItem.fileId}]" *ngIf="judgmentFile(fileUploadItem.filePath)" (click)="setVideoPath(fileUploadItem)"> <a href="javascript:;" [routerLink]="['/video',fileUploadItem.fileId,fileUploadItem.fileCategory]" *ngIf="judgmentFile(fileUploadItem.filePath)" (click)="setVideoPath(fileUploadItem)">
<div style="overflow-x: hidden; white-space: nowrap;text-overflow: ellipsis;"> <div style="overflow-x: hidden; white-space: nowrap;text-overflow: ellipsis;">
<img src="assets/images/videoIcon.png" alt="视频" *ngIf="judgmentFile(fileUploadItem.filePath)" style=" width: 26px; <img src="assets/images/videoIcon.png" alt="视频" *ngIf="judgmentFile(fileUploadItem.filePath)" style=" width: 26px;
margin-right: 6px;"> margin-right: 6px;">
......
...@@ -18,7 +18,7 @@ export class FileUploadComponent implements OnInit { ...@@ -18,7 +18,7 @@ export class FileUploadComponent implements OnInit {
} }
viewPdf(fileUploadItem){ viewPdf(fileUploadItem){
this.router.navigate(['/pdfView'],{queryParams:{path:`assets/pdfjs/web/viewer.html?file=${fileUploadItem.filePath}&isneeddownload=${fileUploadItem.isDownload=='1'?'true':'false'}`}}) this.router.navigate(['/pdfView',fileUploadItem.fileId,fileUploadItem.fileCategory],{queryParams:{path:`assets/pdfjs/web/viewer.html?file=${fileUploadItem.filePath}&isneeddownload=${fileUploadItem.isDownload=='1'?'true':'false'}`}})
sessionStorage.setItem('permissions',JSON.stringify({isDownload: fileUploadItem.isDownload,isControlPlayback:fileUploadItem.isControlPlayback})) sessionStorage.setItem('permissions',JSON.stringify({isDownload: fileUploadItem.isDownload,isControlPlayback:fileUploadItem.isControlPlayback}))
} }
setVideoPath(fileUploadItem){ setVideoPath(fileUploadItem){
......
...@@ -234,8 +234,9 @@ export class MkMaterialDetailComponent implements OnInit { ...@@ -234,8 +234,9 @@ export class MkMaterialDetailComponent implements OnInit {
} }
// 0是有plan,1是无plan // 0是有plan,1是无plan
if (posterInfo.isPlan == '0') { if (posterInfo.isPlan == '0') {
if(posterInfo.productCategoryId == '1' || posterInfo.productCategoryId == '4'){
if (posterInfo.productCategoryId == '2') { this.shareInfo.url = `${environment.DOMAINNAME}/pdetail/${this.materialItemId}?shareCode=${shareCodeUuid}&type=7`;
}else if (posterInfo.productCategoryId == '2') {
this.shareInfo.url = `${environment.DOMAINNAME}/hProductDetail/${this.materialItemId}?shareCode=${shareCodeUuid}&type=7`; this.shareInfo.url = `${environment.DOMAINNAME}/hProductDetail/${this.materialItemId}?shareCode=${shareCodeUuid}&type=7`;
} else if (posterInfo.productCategoryId == '5') { } else if (posterInfo.productCategoryId == '5') {
this.shareInfo.url = `${environment.DOMAINNAME}/hProductDetail/${this.materialItemId}?shareCode=${shareCodeUuid}&type=9`; this.shareInfo.url = `${environment.DOMAINNAME}/hProductDetail/${this.materialItemId}?shareCode=${shareCodeUuid}&type=9`;
......
...@@ -2,10 +2,12 @@ ...@@ -2,10 +2,12 @@
<h5>{{item.title}}</h5> <h5>{{item.title}}</h5>
<ul> <ul>
<li *ngFor="let subItem of item.subItems" (click)="featureSelect(subItem)"> <li *ngFor="let subItem of item.subItems" (click)="featureSelect(subItem)">
<ng-container *ngIf="subItem.isShow">
<div> <div>
<img [src]="'assets/images/indexIcons/' + subItem.icon + '.png'" alt=""> <img [src]="'assets/images/indexIcons/' + subItem.icon + '.png'" alt="">
</div> </div>
<p>{{subItem.name}}</p> <p>{{subItem.name}}</p>
</ng-container>
</li> </li>
</ul> </ul>
</div> </div>
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
DatePicker DatePicker
[mode]="'date'" [mode]="'date'"
[disabled]="readonlyFlag" [disabled]="readonlyFlag"
[minDate]="minDate"
[maxDate] = "today" [maxDate] = "today"
[(ngModel)]="editBusiness.birthDate" [(ngModel)]="editBusiness.birthDate"
(onOk)="onOk($event)"> (onOk)="onOk($event)">
......
...@@ -70,6 +70,7 @@ export class MyBusinessDetailComponent implements OnInit { ...@@ -70,6 +70,7 @@ export class MyBusinessDetailComponent implements OnInit {
// 获取经纪人信息 // 获取经纪人信息
lifeCustomerInfo:any; lifeCustomerInfo:any;
today:Date = new Date(); today:Date = new Date();
minDate:Date = new Date('1930-01-01')
constructor(private activateRoute: ActivatedRoute, private myService: MyService, constructor(private activateRoute: ActivatedRoute, private myService: MyService,
public lifeCommonService: LifeCommonService, private router: Router, ) { public lifeCommonService: LifeCommonService, private router: Router, ) {
this.titleList = [ this.titleList = [
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
></SearchBar> ></SearchBar>
<i [routerLink]="'/news'"> <i [routerLink]="'/news'">
<img src="assets/images/indexIcons/news.png" alt="" srcset=""> <img src="assets/images/indexIcons/news.png" alt="" srcset="">
<span *ngIf="messageUnreadCount">{{messageUnreadCount}}</span>
</i> </i>
</section> </section>
<section style="margin-top:-85px;"> <section style="margin-top:-85px;">
......
...@@ -13,6 +13,23 @@ ...@@ -13,6 +13,23 @@
padding: 7px 10px 90px; padding: 7px 10px 90px;
i{ i{
flex-basis: 24px; flex-basis: 24px;
position: relative;
span{
position: absolute;
right: -4px;
top: -8px;
width: 18px;
height: 18px;
border-radius: 50%;
background: #EF6C40;
color: #fff;
font-size: 10px;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
font-style: normal;
}
} }
.indexSearchBar{ .indexSearchBar{
flex: auto; flex: auto;
...@@ -79,7 +96,6 @@ ...@@ -79,7 +96,6 @@
} }
} }
} }
.hotProductLists{ .hotProductLists{
flex-direction: column; flex-direction: column;
>ul{ >ul{
......
...@@ -9,6 +9,7 @@ declare var wx: any; ...@@ -9,6 +9,7 @@ declare var wx: any;
styleUrls: ['./my-center-home.component.scss'], styleUrls: ['./my-center-home.component.scss'],
}) })
export class MyCenterHomeComponent implements OnInit { export class MyCenterHomeComponent implements OnInit {
messageUnreadCount:string;
productInfo: any; productInfo: any;
inquiry: any; inquiry: any;
public announcementInfo: string; public announcementInfo: string;
...@@ -20,7 +21,7 @@ export class MyCenterHomeComponent implements OnInit { ...@@ -20,7 +21,7 @@ export class MyCenterHomeComponent implements OnInit {
{ key: '03', name: '续期管理', icon: 'renewalManagement', link: '/renewal_reminder', isOpen: true }, { key: '03', name: '续期管理', icon: 'renewalManagement', link: '/renewal_reminder', isOpen: true },
{ key: '04', name: '成交客户', icon: 'customers', link: '/customer', isOpen: true }, { key: '04', name: '成交客户', icon: 'customers', link: '/customer', isOpen: true },
{ key: '05', name: '我的增员', icon: 'increaseStaff', link: '/recruiting', isOpen: true }, { key: '05', name: '我的增员', icon: 'increaseStaff', link: '/recruiting', isOpen: true },
{ key: '06', name: '银盾学院', icon: 'ydCollegeDisabled', link: '/yd-college', isOpen: false }, { key: '06', name: '银盾学院', icon: 'ydCollege', link: '/ydCollege', isOpen: true },
{ key: '07', name: '更多功能', icon: 'more', link: '/moreFeatures', isOpen: true } { key: '07', name: '更多功能', icon: 'more', link: '/moreFeatures', isOpen: true }
] ]
public bannerLists = []; public bannerLists = [];
...@@ -39,6 +40,19 @@ export class MyCenterHomeComponent implements OnInit { ...@@ -39,6 +40,19 @@ export class MyCenterHomeComponent implements OnInit {
} }
} }
querySystemMessage(){
this.myService.querySystemMessage({practitionerId:localStorage.getItem('lifeCustomerInfo') ? JSON.parse(localStorage.getItem('lifeCustomerInfo')).practitionerId : null}).subscribe(res=>{
if(res['success']){
this.messageUnreadCount = res['data']['unReadcount'];
if(Number(this.messageUnreadCount) > 99){
this.messageUnreadCount = '99+';
}
}else{
this.messageUnreadCount = null;
}
})
}
searchProduct() { searchProduct() {
// 查询互联网产品 // 查询互联网产品
this.router.navigate(['/product', { queryTagId: 272 }]) this.router.navigate(['/product', { queryTagId: 272 }])
...@@ -140,6 +154,8 @@ export class MyCenterHomeComponent implements OnInit { ...@@ -140,6 +154,8 @@ export class MyCenterHomeComponent implements OnInit {
this.queryproductlistbytag(119, 'hotProductLists'); this.queryproductlistbytag(119, 'hotProductLists');
// 查询最新一条公告 // 查询最新一条公告
this.announcementQuery(); this.announcementQuery();
// 查询未读消息总数
this.querySystemMessage();
} }
} }
......
<div class="wrapper">
<div class="opt" style="margin-bottom: 10px;justify-content: flex-start;">
<select [(ngModel)]="mdDropOptionCode" (ngModelChange)="getCode($event)">
<option [value]="optItem.dropOptionCode" *ngFor="let optItem of optList">
{{optItem.dropOptionName}}
</option>
</select>
<select [(ngModel)]="year" (ngModelChange)="getCode($event)">
<option value="null">全部</option>
<option *ngFor="let yearItem of yearList">{{yearItem}}</option>
</select>
<select [(ngModel)]="month" (ngModelChange)="getCode($event)">
<option *ngFor="let monthItem of monthList">{{monthItem}}</option>
</select>
<!-- <div>
2022年 <span class="iconfont icon-xiangxia"></span>
</div>
<div>
8月 <span class="iconfont icon-xiangxia"></span>
</div> -->
</div>
<ul class="opt">
<li [ngClass]="{selected:isTeam==0}" (click)="changeIsTeam(0)">团队个人完成率</li>
<li [ngClass]="{selected:isTeam==1}" (click)="changeIsTeam(1)">团队总完成率</li>
</ul>
<div echarts [options]="chartOption" class="chart" style="height: 300px;" #echarts
(chartClick)="onChartClick($event)">
</div>
<p><img src="assets/images/Slice74.png" alt="">点击可查看对应数据</p>
<div class="list_wrapper">
<div class="title">
<span></span> 学习明细
</div>
<ul class="list_content">
<li>经纪人</li>
<li>直接团队</li>
<li>团队长</li>
<li>类型</li>
<li>学习进度</li>
</ul>
<ul class="list_content" *ngFor="let detailItem of detailList"
(click)="getLearnDetail(detailItem.practitionerId)">
<li>{{detailItem.name}}</li>
<li>{{detailItem.systemName}}</li>
<li>{{detailItem.leaderName}}</li>
<li>{{detailItem.dropOptionName}}</li>
<li style="color: #EF6C40;">{{detailItem.progress}}</li>
</ul>
</div>
</div>
<div class="toastWrapper toast" *ngIf="detailFlag">
<img src="assets/images/Slice3.png" *ngIf="detailFlag" (click)="detailFlag = false;"
alt="colse">
</div>
<div id="toastContent" *ngIf="detailFlag">
<ul class="status">
<li style="border-right: 1px #F4F4F4 solid;">
<span>{{this.total}}</span><span>总视频数</span>
</li>
<li><span>{{this.count}}</span><span>已完成学习</span></li>
</ul>
<div class="list_wrapper">
<div class="title">
<span></span> 视频列表
</div>
<ul class="list_content">
<li style="width: 70%;">视频名称</li>
<li style="width: 30%;">学习状态</li>
</ul>
<ul class="list_content" *ngFor="let videoItem of videoList"
style="border-bottom: 1px #F2F2F2 solid;">
<li style="width: 70%;text-align: left;">{{videoItem.videoName}}</li>
<li style="width: 30%;">
<img *ngIf="videoItem.flag=='0'" src="assets/images/Slice78.png" alt="" >
<img *ngIf="videoItem.flag=='1'" src="assets/images/Slice77.png" alt="" >
</li>
</ul>
</div>
</div>
.wrapper{
padding: 10px;
background: #fff;
.opt{
display: flex;
justify-content: space-between;
align-items: center;
select{
border: none;
margin-right: 15px;
}
}
ul.opt{
li{
height: 35px;
border: 1px #5F83FF solid;
color: #5F83FF;
border-radius: 5px;
line-height: 35px;
width: 45%;
text-align: center;
}
li.selected{
color: #fff;
background: #5F83FF;
}
}
.list_wrapper{
.title{
font-size: 18px;
align-items: center;
display: flex;
color: #333;
span{
display: inline-block;
width: 3px;
height: 15px;
background: #5F83FF;
margin-right: 10px;
}
}
.list_content{
display: flex;
justify-content: space-between;
align-items: center;
li{
height: 35px;
line-height: 35px;
text-align: center;
width: 20%;
overflow: hidden;
}
li:nth-child(1){
text-align: left;
}
}
}
p{
display: flex;
justify-content: center;
align-items: center;
color: #C1C1C1;
img{margin-right: 5px;position: relative;top: -2px;}
}
}
.toastWrapper {
height: 100%;
background-color: rgba(0, 0, 0, 0.3);
top: 0;
}
.toast {
position: fixed;
left: 0;
right: 0;
min-width: 320px;
max-width: 640px;
width: 100%;
margin: 0 auto;
z-index: 1;
img{
position: absolute;
top: 0;
bottom: -45%;
left: 0;
right: 0;
margin: auto;
}
}
#toastContent {
position: fixed;
top: 40px;
width: 95%;
height: 60%;
left: 0;
right: 0;
margin: 0 auto;
background-color: #fff;
z-index: 2;
animation: wrapper-gradient .5s ease both;
overflow: auto;
border-radius: 8px;
padding: 15px 0;
.status{
display: flex;
text-align: center;
margin-bottom: 20px;
li{
display: flex;
flex-direction: column;
width: 50%;
span:nth-child(1){
font-size: 18px;
font-weight: bolder;
}
span:nth-child(2){
font-size: 16px;
}
}
}
.list_wrapper{
border-top: 1px #F4F4F4 solid;
padding: 15px 10px;
.title{
font-size: 18px;
align-items: center;
display: flex;
color: #333;
span{
display: inline-block;
width: 3px;
height: 15px;
background: #5F83FF;
margin-right: 10px;
}
}
.list_content{
display: flex;
justify-content: space-between;
align-items: center;
color: #333;
font-size: 14px;
li{
height: 35px;
line-height: 35px;
text-align: center;
width: 50%;
overflow: hidden;
}
}
}
}
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { MyManagementComponent } from './my-management.component';
describe('MyManagementComponent', () => {
let component: MyManagementComponent;
let fixture: ComponentFixture<MyManagementComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ MyManagementComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MyManagementComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
<div class="wrapper"> <div class="wrapper">
<div class="item" [routerLink]="['/thanks']"> <div class="clearMessage">
<span>银盾保险经纪董事长欢迎信</span> <div></div>
<div class="content"> <div (click)="oneKeyRead()">
<span class="iconfont icon-ar-r"></span> <img src="assets/images/icons/delete.png" alt="" srcset="">
<span>清除未读</span>
</div>
</div> </div>
<div class="item" *ngFor="let item of newsLists" (click)="goDetail(item)">
<div class="noticeIcon">
<img src="assets/images/icons/noticeTip.png" alt="">
</div> </div>
<div class="item" [routerLink]="['/newsDetail/2']"> <div class="newsSummary">
<span>银盾保险经纪置顶公众号操作指南</span> <div>
<div class="content"> <h4>{{item.title}}</h4>
<div><span>{{item.createdAt}}</span><span class="redDots" *ngIf="item.isRead=='0'"></span></div>
</div>
<div>
<p>{{item.context}}</p>
<span class="iconfont icon-ar-r"></span> <span class="iconfont icon-ar-r"></span>
</div> </div>
</div> </div>
</div>
</div> </div>
\ No newline at end of file
...@@ -26,6 +26,50 @@ ...@@ -26,6 +26,50 @@
height: 35px; height: 35px;
margin-right: 10px; margin-right: 10px;
} }
.noticeIcon{
width: 0;
flex: 0 0 41px;
}
.newsSummary{
width: 0;
flex: 0 0 calc(100% - 41px);
p{
width: 85%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.redDots{
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
background-color: #F24949;
margin-left: 15px;
}
>div{
display: flex;
justify-content: space-between;
align-items: center;
}
}
}
.clearMessage{
display: flex;
justify-content: space-between;
padding-right: 15px;
div{
display: flex;
align-items: center;
img{
width: 20px;
}
span{
color: #666;
font-size: 12px;
margin-left: 2px;
}
}
} }
.lifeList{ .lifeList{
display: flex; display: flex;
......
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { MyService } from '../my.service';
@Component({ @Component({
selector: 'ydlife-my-news', selector: 'ydlife-my-news',
...@@ -6,10 +8,56 @@ import { Component, OnInit } from '@angular/core'; ...@@ -6,10 +8,56 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./my-news.component.scss'] styleUrls: ['./my-news.component.scss']
}) })
export class MyNewsComponent implements OnInit { export class MyNewsComponent implements OnInit {
private customerInfo:any;
public newsLists = [
{id:'01',title:'银盾保险经纪董事长欢迎信',context:'',link:'/thanks',createdAt:'',isCommonDetsil:false,isRead:'1'},
{id:'000',title:'银盾保险经纪置顶公众号操作指南',context:'',link:'/newsDetail',createdAt:'',isCommonDetsil:true,isRead:'1'},
]
constructor() { }
goDetail(val){
if(val.isCommonDetsil){
this.router.navigate([val.link,val.id])
}else{
this.router.navigate([val.link])
}
}
// 查询消息列表
querySystemMessage(){
const param = {
practitionerId:this.customerInfo.practitionerId
}
this.myService.querySystemMessage(param).subscribe(res=>{
console.log(res);
if(res['success']){
res['data']['dataList'].forEach(item=>{
item.link = '/newsDetail';
item.isCommonDetsil = true;
})
// 赋值前先初始化
this.newsLists = [
{id:'000',title:'银盾保险经纪董事长欢迎信',context:'',link:'/thanks',createdAt:'',isCommonDetsil:false,isRead:'1'},
{id:'000',title:'银盾保险经纪置顶公众号操作指南',context:'',link:'/newsDetail',createdAt:'',isCommonDetsil:true,isRead:'1'}
]
this.newsLists = this.newsLists.concat(res['data']['dataList']);
}
})
}
// 一键已读
oneKeyRead(){
this.myService.oneKeyRead({practitionerId:this.customerInfo.practitionerId}).subscribe(res=>{
if(res['success']){
this.querySystemMessage()
}
})
}
constructor(private router:Router,private myService:MyService) { }
ngOnInit() { ngOnInit() {
this.customerInfo = JSON.parse(localStorage.getItem('lifeCustomerInfo')) ? JSON.parse(localStorage.getItem('lifeCustomerInfo')) : null;
this.querySystemMessage();
} }
} }
...@@ -80,19 +80,24 @@ import { NewsDetailComponent } from './news-detail/news-detail.component'; ...@@ -80,19 +80,24 @@ import { NewsDetailComponent } from './news-detail/news-detail.component';
import { MoreFeaturesComponent } from './more-features/more-features.component'; import { MoreFeaturesComponent } from './more-features/more-features.component';
import { MineComponent } from './mine/mine.component'; import { MineComponent } from './mine/mine.component';
import { YdCollegeComponent } from './yd-college/yd-college.component'; import { YdCollegeComponent } from './yd-college/yd-college.component';
import { MyTrainingComponent } from './my-training/my-training.component';
import { TrainingRecordsComponent } from './training-records/training-records.component';
import { CourseDetailComponent } from './course-detail/course-detail.component';
import { MyManagementComponent } from './my-management/my-management.component';
const myRoutes: Routes = [ const myRoutes: Routes = [
{ path: '', component: MyCenterHomeComponent, canActivate: [AuthGuard], data: [{ title: '银盾保险经纪 - 工作台' }] }, { path: '', component: MyCenterHomeComponent, canActivate: [AuthGuard], data: [{ title: '银盾保险经纪 - 工作台' }] },
{ path: 'material', component: MkMaterialComponent, canActivate: [AuthGuard],data:[{title:'产品海报'}] }, { path: 'material', component: MkMaterialComponent, canActivate: [AuthGuard],data:[{title:'产品海报'}] },
{ path: 'material/:itemId', component: MkMaterialDetailComponent, canActivate: [AuthGuard],data:[{title:'产品海报'}] }, { path: 'material/:itemId', component: MkMaterialDetailComponent, canActivate: [AuthGuard],data:[{title:'产品海报'}] },
{ path: 'fileUpload', component: FileUploadComponent, canActivate: [AuthGuard], data: [{ type: 'fileUpload',title:'文件下载' }] }, { path: 'fileUpload', component: FileUploadComponent, canActivate: [AuthGuard], data: [{ type: 'fileUpload',title:'文件下载' }] },
{ path: 'training', component: FileUploadComponent, canActivate: [AuthGuard], data: [{ type: 'training' ,title:'我的培训'}] },
{ path: 'trainingVideo', component: FileUploadComponent, canActivate: [AuthGuard], data: [{ type: 'trainingVideo' ,title:'视频培训'}] }, { path: 'trainingVideo', component: FileUploadComponent, canActivate: [AuthGuard], data: [{ type: 'trainingVideo' ,title:'视频培训'}] },
{ path: 'prejobTraining', component: FileUploadComponent, canActivate: [AuthGuard], data: [{ type: 'yd_trainning_file_type' ,title:'岗前训'}] }, { path: 'preJobTraining', component: TrainingRecordsComponent, canActivate: [AuthGuard], data: [{ type: 'yd_trainning_file_type' ,title:'岗前训'}] },
{ path: 'newTraining', component: FileUploadComponent, canActivate: [AuthGuard], data: [{ type: 'yd_trainning_file_type',title:'新人训' }] }, { path: 'newTraining', component: TrainingRecordsComponent, canActivate: [AuthGuard], data: [{ type: 'yd_trainning_file_type',title:'新人训' }] },
{ path: 'advanceTraining', component: FileUploadComponent, canActivate: [AuthGuard], data: [{ type: 'yd_trainning_file_type',title:'提升训' }] }, { path: 'promotionTraining', component: TrainingRecordsComponent, canActivate: [AuthGuard], data: [{ type: 'yd_trainning_file_type',title:'提升训' }] },
{ path: 'cffpTraining', component: FileUploadComponent, canActivate: [AuthGuard], data: [{ type: 'yd_trainning_file_type',title:'CFFP培训' }] }, { path: 'cffpElementaryTraining', component: TrainingRecordsComponent, canActivate: [AuthGuard], data: [{ type: 'yd_trainning_file_type',title:'CFFP初级训' }] },
{ path: 'productTraining', component: FileUploadComponent, canActivate: [AuthGuard], data: [{ type: 'yd_trainning_file_type',title:'产品培训' }] }, { path: 'cffpBridgingTraining', component: TrainingRecordsComponent, canActivate: [AuthGuard], data: [{ type: 'yd_trainning_file_type',title:'CFFP衔接训' }] },
{ path: 'cffpAdvancedTraining', component: TrainingRecordsComponent, canActivate: [AuthGuard], data: [{ type: 'yd_trainning_file_type',title:'CFFP高阶训' }] },
{ path: 'productTraining', component: TrainingRecordsComponent, canActivate: [AuthGuard], data: [{ type: 'yd_trainning_file_type',title:'产品培训' }] },
{ path: 'importantAnnouncement', component: ImportantAnnouncementComponent, canActivate: [AuthGuard] ,data:[{title:'重要公告'}]}, { path: 'importantAnnouncement', component: ImportantAnnouncementComponent, canActivate: [AuthGuard] ,data:[{title:'重要公告'}]},
{ path: 'salesDetail', component: SalesDetailComponent, canActivate: [AuthGuard],data:[{title:'我的保单'}] }, { path: 'salesDetail', component: SalesDetailComponent, canActivate: [AuthGuard],data:[{title:'我的保单'}] },
{ path: 'importantAnnouncement/:id', component: AnnouncementDetailComponent, canActivate: [AuthGuard] ,data:[{title:'重要公告'}] }, { path: 'importantAnnouncement/:id', component: AnnouncementDetailComponent, canActivate: [AuthGuard] ,data:[{title:'重要公告'}] },
...@@ -107,7 +112,7 @@ const myRoutes: Routes = [ ...@@ -107,7 +112,7 @@ const myRoutes: Routes = [
{ path: 'thanks', component: ThanksComponent, canActivate: [AuthGuard] ,data:[{title:'感谢信'}]}, { path: 'thanks', component: ThanksComponent, canActivate: [AuthGuard] ,data:[{title:'感谢信'}]},
{ path: 'setting', component: MySettingComponent, canActivate: [AuthGuard],data:[{title:'设置'}] }, { path: 'setting', component: MySettingComponent, canActivate: [AuthGuard],data:[{title:'设置'}] },
{ path: 'setting/:uploadType', component: MySettingDetailComponent, canActivate: [AuthGuard],data:[{title:'设置'}] }, { path: 'setting/:uploadType', component: MySettingDetailComponent, canActivate: [AuthGuard],data:[{title:'设置'}] },
{ path: 'news', component: MyNewsComponent, canActivate: [AuthGuard] ,data:[{title:'我的消息'}]}, { path: 'news', component: MyNewsComponent, canActivate: [AuthGuard] ,data:[{title:'消息列表'}]},
{ path: 'target', component: MyTargetComponent, canActivate: [AuthGuard],data:[{title:'目标设置'}] }, { path: 'target', component: MyTargetComponent, canActivate: [AuthGuard],data:[{title:'目标设置'}] },
{ path: 'teamPanel', component: TeamPanelComponent, canActivate: [AuthGuard],data:[{title:'我的团队'}] }, { path: 'teamPanel', component: TeamPanelComponent, canActivate: [AuthGuard],data:[{title:'我的团队'}] },
{ path: 'teamPanel/:type', component: TeamSalesScoreComponent, canActivate: [AuthGuard] ,data:[{title:'活动量得分'}]}, { path: 'teamPanel/:type', component: TeamSalesScoreComponent, canActivate: [AuthGuard] ,data:[{title:'活动量得分'}]},
...@@ -177,12 +182,17 @@ const myRoutes: Routes = [ ...@@ -177,12 +182,17 @@ const myRoutes: Routes = [
{ path: 'integration',component:IntegrationComponent,canActivate:[AuthGuard],data:[{title: '我的积分'}]}, { path: 'integration',component:IntegrationComponent,canActivate:[AuthGuard],data:[{title: '我的积分'}]},
{ path: 'integration_detail',component:IntegrationDetailComponent,canActivate:[AuthGuard],data:[{title: '积分明细'}]}, { path: 'integration_detail',component:IntegrationDetailComponent,canActivate:[AuthGuard],data:[{title: '积分明细'}]},
{ path: 'integration_rule',component:IntegrationRuleComponent,canActivate:[AuthGuard],data:[{title: '积分规则'}]}, { path: 'integration_rule',component:IntegrationRuleComponent,canActivate:[AuthGuard],data:[{title: '积分规则'}]},
{ path: 'video',component:VideoComponent,canActivate:[AuthGuard],data:[{title: '视频播放'}]}, { path: 'video/:fileId/:fileCategory',component:VideoComponent,canActivate:[AuthGuard],data:[{title: '视频播放'}]},
{ path: 'pdfView',component:VideoComponent,canActivate:[AuthGuard],data:[{title: 'PDF查看'}]}, { path: 'pdfView/:fileId/:fileCategory',component:VideoComponent,canActivate:[AuthGuard],data:[{title: 'PDF查看'}]},
{ path: 'newsDetail/:id',component:NewsDetailComponent,canActivate:[AuthGuard],data:[{title: '消息详情'}]}, { path: 'newsDetail/:id',component:NewsDetailComponent,canActivate:[AuthGuard],data:[{title: '消息详情'}]},
{ path: 'moreFeatures',component:MoreFeaturesComponent,canActivate:[AuthGuard],data:[{title: '全部工具'}]}, { path: 'moreFeatures',component:MoreFeaturesComponent,canActivate:[AuthGuard],data:[{title: '全部工具'}]},
{ path: 'mine',component:MineComponent,canActivate:[AuthGuard],data:[{title: '我的'}]}, { path: 'mine',component:MineComponent,canActivate:[AuthGuard],data:[{title: '我的'}]},
{ path: 'yd-college',component:YdCollegeComponent,canActivate:[AuthGuard],data:[{title: '银盾学院'}]}, { path: 'ydCollege',component:YdCollegeComponent,canActivate:[AuthGuard],data:[{title: '银盾学院'}]},
{ path: 'myTraining',component:MyTrainingComponent,canActivate:[AuthGuard],data:[{title: '我的培训'}]},
{ path: 'trainingRecords/:status',component:TrainingRecordsComponent,canActivate:[AuthGuard],data:[{title: '培训课程'}]},
{ path: 'courseDetail/:status/:fileId',component:CourseDetailComponent,canActivate:[AuthGuard],data:[{title: '课程介绍'}]},
{ path: 'trainingManagement',component:MyManagementComponent,canActivate:[AuthGuard],data:[{title:'我的管理'}]}
]; ];
@NgModule({ @NgModule({
......
<ul>
<li *ngFor="let item of trainingRecords" [routerLink]="item.link">
<div>{{item.name}}</div>
<div><i class="iconfont icon-fanhui"></i></div>
</li>
</ul>
\ No newline at end of file
ul{
background: #fff;
padding-left: 27px;
padding-right: 13px;
height: calc(100vh - 70px);
li{
display: flex;
justify-content: space-between;
padding-top: 28px;
padding-bottom: 8px;
border-bottom: 1px solid #f2f2f2;
position: relative;
& > div:first-child{
position: relative;
&::after{
content:'';
position: absolute;
left: 0;
bottom: 5px;
background: linear-gradient(90deg,#0778FC, #D9D9D9);
border-radius: 2px;
height: 4px;
width: 98%;
}
}
.icon-fanhui{
display: inline-block;
transform: rotate(180deg);
}
}
}
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { MyTrainingComponent } from './my-training.component';
describe('MyTrainingComponent', () => {
let component: MyTrainingComponent;
let fixture: ComponentFixture<MyTrainingComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ MyTrainingComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MyTrainingComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'ydlife-my-training',
templateUrl: './my-training.component.html',
styleUrls: ['./my-training.component.scss']
})
export class MyTrainingComponent implements OnInit {
public trainingRecords = [
{id:1,name:'已完成',link:'/trainingRecords/1'},
{id:2,name:'学习中',link:'/trainingRecords/2'},
{id:3,name:'待学习',link:'/trainingRecords/3'},
{id:4,name:'我的管理',link:'/trainingManagement'},
]
constructor() { }
ngOnInit() {
}
}
...@@ -95,9 +95,14 @@ import { NewsDetailComponent } from './news-detail/news-detail.component'; ...@@ -95,9 +95,14 @@ import { NewsDetailComponent } from './news-detail/news-detail.component';
import { MoreFeaturesComponent } from './more-features/more-features.component'; import { MoreFeaturesComponent } from './more-features/more-features.component';
import { MineComponent } from './mine/mine.component'; import { MineComponent } from './mine/mine.component';
import { YdCollegeComponent } from './yd-college/yd-college.component'; import { YdCollegeComponent } from './yd-college/yd-college.component';
import { MyTrainingComponent } from './my-training/my-training.component';
import { TrainingRecordsComponent } from './training-records/training-records.component';
import { CourseDetailComponent } from './course-detail/course-detail.component';
import { SecondsTransferPipe } from '../seconds-transfer.pipe';
import { MyManagementComponent } from './my-management/my-management.component';
@NgModule({ @NgModule({
declarations: [MyCenterHomeComponent, MkMaterialComponent, MkMaterialDetailComponent, FileUploadComponent, ImportantAnnouncementComponent, SalesDetailComponent, AnnouncementDetailComponent, MyBusinessComponent, MyBusinessDetailComponent, PickerComponent, MyToastComponent, SalesRankComponent, TeamRankComponent, RecruitingComponent, RecruitingDetailComponent, ThanksComponent, MySettingComponent, MySettingDetailComponent, MyNewsComponent, MyTargetComponent, TeamPanelComponent, SwitchNumberPipe,SafeResourceUrlPipe, TeamSalesScoreComponent, ScoreDetailsComponent, BusinessCardComponent, OrderDetailComponent, SalaryComponent, TodoListComponent, AddTaskComponent, MedicalServiceComponent, InvitationComponent, RegisterComponent, EmployeeInfoComponent, EmployeeBasicInfoComponent, WorkExperienceComponent, PersonalPhotosComponent, EmployeeIdCardComponent, EmployeeEducationComponent, PersonalStatementComponent, SignatureComponent, EmployeeSubmitComponent, BankCardComponent, MemberDetailComponent, ApprovalListComponent, ApprovalCommentsComponent, ApprovalResultListComponent, MyApplicationComponent, SuggestionComponent, EmployeeSalaryComponent, HistoricalRankComponent, TeamAreaPanelComponent, ArticleComponent, ArticleDetailComponent, ArticleReadComponent,SalaryDetailComponent,SalaryFirstYearComponent,DetailModalComponent, ProductComponent, ProductDataComponent, CommissionComponent, FileListComponent,MyCustomerComponent, CustomerRelationComponent, MyCustomerPolicyComponent, UnderwritingKnowledgeComponent, MyQuestionComponent, AskComponent, MenuItemComponent, MemberListComponent, ENoticeComponent, ENoticeSignComponent, RenewalReminderComponent, RenewalReminderDetailComponent, JointSalesComponent, JointSaleDetailComponent, IntegrationComponent, IntegrationDetailComponent, IntegrationRuleComponent, VideoComponent, QrcodeUploadComponent, NewsDetailComponent, MoreFeaturesComponent, MineComponent,YdCollegeComponent], declarations: [MyCenterHomeComponent, MkMaterialComponent, MkMaterialDetailComponent, FileUploadComponent, ImportantAnnouncementComponent, SalesDetailComponent, AnnouncementDetailComponent, MyBusinessComponent, MyBusinessDetailComponent, PickerComponent, MyToastComponent, SalesRankComponent, TeamRankComponent, RecruitingComponent, RecruitingDetailComponent, ThanksComponent, MySettingComponent, MySettingDetailComponent, MyNewsComponent, MyTargetComponent, TeamPanelComponent, SwitchNumberPipe,SafeResourceUrlPipe, TeamSalesScoreComponent, ScoreDetailsComponent, BusinessCardComponent, OrderDetailComponent, SalaryComponent, TodoListComponent, AddTaskComponent, MedicalServiceComponent, InvitationComponent, RegisterComponent, EmployeeInfoComponent, EmployeeBasicInfoComponent, WorkExperienceComponent, PersonalPhotosComponent, EmployeeIdCardComponent, EmployeeEducationComponent, PersonalStatementComponent, SignatureComponent, EmployeeSubmitComponent, BankCardComponent, MemberDetailComponent, ApprovalListComponent, ApprovalCommentsComponent, ApprovalResultListComponent, MyApplicationComponent, SuggestionComponent, EmployeeSalaryComponent, HistoricalRankComponent, TeamAreaPanelComponent, ArticleComponent, ArticleDetailComponent, ArticleReadComponent,SalaryDetailComponent,SalaryFirstYearComponent,DetailModalComponent, ProductComponent, ProductDataComponent, CommissionComponent, FileListComponent,MyCustomerComponent, CustomerRelationComponent, MyCustomerPolicyComponent, UnderwritingKnowledgeComponent, MyQuestionComponent, AskComponent, MenuItemComponent, MemberListComponent, ENoticeComponent, ENoticeSignComponent, RenewalReminderComponent, RenewalReminderDetailComponent, JointSalesComponent, JointSaleDetailComponent, IntegrationComponent, IntegrationDetailComponent, IntegrationRuleComponent, VideoComponent, QrcodeUploadComponent, NewsDetailComponent, MoreFeaturesComponent, MineComponent, YdCollegeComponent, MyTrainingComponent, TrainingRecordsComponent, CourseDetailComponent,SecondsTransferPipe, MyManagementComponent],
imports: [ imports: [
CommonModule, CommonModule,
LifeCommonModule, LifeCommonModule,
......
...@@ -23,7 +23,7 @@ export class MyService { ...@@ -23,7 +23,7 @@ export class MyService {
filePath(itemType, itemId, fileCategory, code, mdDropOptionCode,customerId=null,learningStatus=null,fileId=null) { filePath(itemType, itemId, fileCategory, code, mdDropOptionCode,customerId=null,learningStatus=null,fileId=null) {
const url = this.API + '/filePathQuery'; const url = this.API + '/filePathQuery';
return this.http return this.http
.post(url, JSON.stringify({ itemType: itemType, itemId: itemId, fileCategory: fileCategory, code: code, mdDropOptionCode: mdDropOptionCode,customerId:customerId})); .post(url, JSON.stringify({ itemType: itemType, itemId: itemId, fileCategory: fileCategory, code: code, mdDropOptionCode: mdDropOptionCode,customerId:customerId,learningStatus:learningStatus,fileId:fileId }));
} }
// 重要公告 // 重要公告
...@@ -949,4 +949,9 @@ export class MyService { ...@@ -949,4 +949,9 @@ export class MyService {
return this.http.post(url,JSON.stringify(params)) return this.http.post(url,JSON.stringify(params))
} }
//是否可见银盾学院
queryCanSee(params){
const url = this.ydapi + "/practitioner/queryCanSee";
return this.http.post(url,JSON.stringify(params))
}
} }
<div class="newsDetailContainer"> <div class="newsDetailContainer">
<div class="newsDetailContent"> <div class="newsDetailContent" *ngIf="messageId==='000'">
<div> <div>
<div><img src="assets/images/topOfficalAccountGuideBg.png" alt=""></div> <div><img src="assets/images/topOfficalAccountGuideBg.png" alt=""></div>
<h3>为了便于更好的服务您,三步就可轻松置顶银盾保险经纪公众号哦~<img src="assets/images/downArrow.gif" alt="" style="width: 25px"></h3> <h3>为了便于更好的服务您,三步就可轻松置顶银盾保险经纪公众号哦~<img src="assets/images/downArrow.gif" alt="" style="width: 25px"></h3>
<div><img src="assets/images/topOfficalAccountGuide1.png" alt=""></div> <div><img src="assets/images/topOfficalAccountGuide1.png" alt=""></div>
</div> </div>
</div> </div>
<div class="closeBtn"> <div class="messageDetailContent" *ngIf="messageId!=='000'">
<i class="iconfont icon-jia" (click)="close()"></i> <div style="background: #fff;padding: 10px;">
<div class="title">
<h4>{{systemMessageInfo?.title}}</h4>
<p>{{systemMessageInfo?.createdAt}}</p>
</div>
<div class="contentDetail">
<div [innerHTML]="systemMessageInfo?.context"></div>
</div>
</div> </div>
</div>
<!-- <div class="closeBtn">
<i class="iconfont icon-jia" (click)="close()"></i>
</div> -->
</div> </div>
\ No newline at end of file
.newsDetailContainer{ .newsDetailContainer{
background-color: rgba(0, 0, 0, 0.5); background-color: #f5f5f5;
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; padding: 0 10px 0;
padding: 30px; min-height: calc(100vh - 70px);
.newsDetailContent{ .newsDetailContent{
background-color: #fff; background-color: #fff;
padding-bottom: 10px; padding-bottom: 10px;
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
line-height: 42px; line-height: 42px;
margin: 10px auto; margin: 10px auto;
border-radius: 50%; border-radius: 50%;
color: #fff; color: #333;
transform: rotate(45deg); transform: rotate(45deg);
} }
} }
...@@ -41,3 +41,24 @@ h3{ ...@@ -41,3 +41,24 @@ h3{
margin-left: 6px; margin-left: 6px;
} }
} }
.messageDetailContent{
.title{
border-bottom: 1px solid #F2F2F2;
padding-bottom: 6px;
font-size: 12px;
color: #999;
h4{
color: #333;
font-size: 18px;
margin-bottom: 5px;
font-weight: bold;
}
}
.contentDetail{
color: #333;
font-size: 16px;
word-break: break-word;
padding-top: 15px;
}
}
\ No newline at end of file
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { MyService } from '../my.service';
@Component({ @Component({
selector: 'ydlife-news-detail', selector: 'ydlife-news-detail',
...@@ -8,12 +9,17 @@ import { ActivatedRoute, Router } from '@angular/router'; ...@@ -8,12 +9,17 @@ import { ActivatedRoute, Router } from '@angular/router';
}) })
export class NewsDetailComponent implements OnInit { export class NewsDetailComponent implements OnInit {
type:string; type:string;
constructor(private router:Router,private activatedRoute:ActivatedRoute) { messageId:string;
this.type = activatedRoute.snapshot.queryParams['type'] systemMessageInfo:any;
constructor(private router:Router,private activatedRoute:ActivatedRoute,private myService:MyService) {
this.type = activatedRoute.snapshot.queryParams['type'];
this.messageId = activatedRoute.snapshot.params['id'];
} }
ngOnInit() { ngOnInit() {
if(this.messageId!=='000'){
this.querySystemMessageDetail();
}
} }
close() close()
...@@ -24,5 +30,13 @@ export class NewsDetailComponent implements OnInit { ...@@ -24,5 +30,13 @@ export class NewsDetailComponent implements OnInit {
this.router.navigate(['/news']) this.router.navigate(['/news'])
} }
} }
// 查询消息详情
querySystemMessageDetail(){
this.myService.querySystemMessageDetail({systemMessageId:this.messageId}).subscribe(res=>{
if(res['success']){
this.systemMessageInfo = res['data']['systemMessageInfo'];
}
})
}
} }
...@@ -52,16 +52,17 @@ export class ProductDataComponent implements OnInit { ...@@ -52,16 +52,17 @@ export class ProductDataComponent implements OnInit {
if(urlItem['categoryId'] != 35){ if(urlItem['categoryId'] != 35){
this.router.navigate(['/filelist'],{queryParams:{planId:this.planId,productId:this.productId,categoryId:urlItem['categoryId']}}) this.router.navigate(['/filelist'],{queryParams:{planId:this.planId,productId:this.productId,categoryId:urlItem['categoryId']}})
}else{ }else{
if(this.isActive == 1){
sessionStorage.setItem('commission',urlItem['fileInfos'][0]['description']); sessionStorage.setItem('commission',urlItem['fileInfos'][0]['description']);
}
if(this.isActive == null){ if(this.isActive == null){
const toast = ToastService.show('暂未配置公告佣金', 0); const toast = ToastService.show('公告佣金数据待更新,请耐心等待!', 0);
setTimeout(() => { setTimeout(() => {
ToastService.hide(); ToastService.hide();
}, 3000); }, 3000);
}else{ return;
this.router.navigate(['/commission'],{queryParams:{productId:this.productId,planId:this.planId,isActive:this.isActive}});
} }
this.router.navigate(['/commission'],{queryParams:{productId:this.productId,planId:this.planId,isActive:this.isActive}});
} }
} }
......
...@@ -168,6 +168,7 @@ ...@@ -168,6 +168,7 @@
} }
li:last-child{ li:last-child{
border-bottom: 0; border-bottom: 0;
padding-bottom: 50px;
} }
.productInfoContent { .productInfoContent {
h3 { h3 {
......
...@@ -32,7 +32,7 @@ export class ScoreDetailsComponent implements OnInit { ...@@ -32,7 +32,7 @@ export class ScoreDetailsComponent implements OnInit {
if (res['success']) { if (res['success']) {
this.salesScoreDetails = res['data']['detail']; this.salesScoreDetails = res['data']['detail'];
this.chartOption ={ this.chartOption ={
tooltip: { tooltip: {//提示框组件
trigger: 'item', trigger: 'item',
formatter: '{a} <br/>{b}: {c} ({d}%)' formatter: '{a} <br/>{b}: {c} ({d}%)'
}, },
......
<div class="trainingRecordsContainer">
<ul *ngIf="fileUploadItemList">
<li *ngFor="let item of fileUploadItemList" [routerLink]="['/courseDetail',status,item.fileId]">
<div>
<img [src]="item.displayImage" alt="" srcset="" class="img-responsive">
</div>
<div class="introItem">
<h5>{{item.itemName}}</h5>
<div>
<p>{{item.fileSynopsis}}</p>
<ng-container [ngSwitch]="item.fileType">
<p *ngSwitchCase="1" style="color:#FFC74A;font-size:16px"><i class="iconfont icon-wujiaoxing-1"></i><span style="margin-left:5px">核心</span></p>
<span *ngSwitchCase="2" style="padding:3px 6px;font-size:12px;color:#5F83FF;background:#EAEFFF;border-radius:1px;text-align:center">非核心</span>
<p *ngSwitchDefault style="color:#FFC74A;font-size:16px"><i class="iconfont icon-wujiaoxing-1"></i><span style="margin-left:5px">核心</span></p>
</ng-container>
</div>
<p class="rankItem">
<span *ngIf="item.fileLecturerName">{{item.fileLecturerName}}</span>
<ng-container *ngIf="item.fileLecturerRanks">
<span *ngFor="let tag of item.fileLecturerRanks.split(',')">{{tag}}</span>
</ng-container>
</p>
</div>
</li>
</ul>
<h4 *ngIf="!fileUploadItemList || (fileUploadItemList && fileUploadItemList.length<1)">暂无课程列表</h4>
</div>
\ No newline at end of file
.trainingRecordsContainer{
ul{
li{
display: flex;
padding-top: 10px;
padding-bottom: 12px;
min-height: 126px;
background-color: #fff;
padding: 15px;
margin-bottom: 10px;
>div:first-child{
margin-right: 7px;
width: 0;
height: 114px;
background-color: #ccc;
overflow: hidden;
flex: 0 0 114px;
}
.introItem{
display: flex;
flex-direction: column;
justify-content: space-between;
flex: 1 1 0;
}
h5{
font-size: 16px;
color: #333;
}
.rankItem{
span{
display: inline-block;
padding: 1px 3px;
border: 1px solid #5F83FF;
border-radius: 2px;
margin-right: 10px;
margin-bottom: 2px;
font-size: 14px;
color: #5F83FF;
}
}
}
}
h4{
text-align: center;
padding-top: 30px;
font-size: 22px;
}
}
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { TrainingRecordsComponent } from './training-records.component';
describe('TrainingRecordsComponent', () => {
let component: TrainingRecordsComponent;
let fixture: ComponentFixture<TrainingRecordsComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ TrainingRecordsComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(TrainingRecordsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { MyService } from '../my.service';
@Component({
selector: 'ydlife-training-records',
templateUrl: './training-records.component.html',
styleUrls: ['./training-records.component.scss']
})
export class TrainingRecordsComponent implements OnInit {
public type:string;
public status:string;
public customerId:string = localStorage.getItem('lifeCustomerInfo') ? JSON.parse(localStorage.getItem('lifeCustomerInfo')).customerId : null;
public fileUploadItemList:Array<any>;
filePathQuery(status,code=null){
this.myService.filePath(3,0,23,'yd_trainning_file_type',code,this.customerId,status).subscribe(res=>{
if(res['success']){
this.fileUploadItemList = res['data']['fileUploadItemList']
}
})
}
constructor(private activatedRoute:ActivatedRoute,private myService:MyService) {
this.type = this.activatedRoute.snapshot['data'][0]['type']
}
ngOnInit() {
this.status = this.activatedRoute.snapshot.params['status'] ? this.activatedRoute.snapshot.params['status'] : '0';
if(this.type=== 'yd_trainning_file_type'){
const code = this.activatedRoute.snapshot.routeConfig.path;
this.filePathQuery(null,code)
}else{
this.filePathQuery(this.status)
}
}
}
<ul> <ul>
<li *ngFor="let subItem of courseLists" (click)="featureSelect(subItem)"> <ng-container *ngFor="let subItem of courseLists">
<li (click)="featureSelect(subItem)" *ngIf="subItem.isShow">
<div> <div>
<img [src]="'assets/images/indexIcons/' + subItem.icon + '.png'" alt=""> <img [src]="'assets/images/indexIcons/' + subItem.icon + '.png'" alt="">
</div> </div>
<p>{{subItem.name}}</p> <p>{{subItem.name}}</p>
</li> </li>
</ng-container>
</ul> </ul>
<Modal [(ngModel)]="this.state.modal1" [transparent]="true" [maskClosable]="true" (onClose)="onClose('modal1')"> <Modal [(ngModel)]="this.state.modal1" [transparent]="true" [maskClosable]="true" (onClose)="onClose('modal1')">
<div [ngStyle]="{ height: 100, overflow: 'scroll',color:'#000' }"> <div [ngStyle]="{ height: 100, overflow: 'scroll',color:'#000' }">
此功能暂未开放,敬请期待。 此功能暂未开放,敬请期待。
</div> </div>
</Modal> </Modal>
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { MyService } from '../my.service';
@Component({ @Component({
selector: 'ydlife-yd-college', selector: 'ydlife-yd-college',
...@@ -7,16 +8,19 @@ import { Router } from '@angular/router'; ...@@ -7,16 +8,19 @@ import { Router } from '@angular/router';
styleUrls: ['./yd-college.component.scss'] styleUrls: ['./yd-college.component.scss']
}) })
export class YdCollegeComponent implements OnInit { export class YdCollegeComponent implements OnInit {
canSeeSchool:Boolean=false;
lifeCustomerInfo: any = JSON.parse(localStorage.getItem('lifeCustomerInfo')) ? JSON.parse(localStorage.getItem('lifeCustomerInfo')) : null;
public courseLists = [ public courseLists = [
{no:23,name:'保险ABC',icon:'insuranceABCDisabled',link:'',path:`https://${window.location.host}/issue`,isOpen:false}, {no:23,name:'保险ABC',icon:'insuranceABC',link:'',path:`https://${window.location.host}/issue`,isOpen:true,isShow:true},
{no:24,name:'岗前训',icon:'preJobTrainingDisabled',link:'/prejobTraining',path:'',isOpen:false}, {no:24,name:'岗前训',icon:'preJobTraining',link:'/preJobTraining',path:'',isOpen:true,isShow:this.canSeeSchool},
{no:25,name:'新人训',icon:'newTrainingDisabled',link:'/newTraining',path:'',isOpen:false}, {no:25,name:'新人训',icon:'newTraining',link:'/newTraining',path:'',isOpen:true,isShow:this.canSeeSchool},
{no:26,name:'提升训',icon:'promotionTrainingDisabled',link:'/advanceTraining',path:'',isOpen:false}, {no:26,name:'CFFP初级训',icon:'cffpElementaryTraining',link:'/cffpElementaryTraining',path:'',isOpen:true,isShow:this.canSeeSchool},
{no:27,name:'CFFP培训',icon:'cffpTrainingDisabled',link:'/cffpTraining',path:'',isOpen:false}, {no:27,name:'提升训',icon:'promotionTraining',link:'/promotionTraining',path:'',isOpen:true,isShow:this.canSeeSchool},
{no:28,name:'产品培训',icon:'productTrainingDisabled',link:'/productTraining',path:'',isOpen:false}, {no:28,name:'CFFP衔接训',icon:'cffpBridgingTraining',link:'/cffpBridgingTraining',path:'',isOpen:true,isShow:this.canSeeSchool},
{no:29,name:'我的培训',icon:'trainingDisabled',link:'',path:'',isOpen:false}, {no:29,name:'CFFP高阶训',icon:'cffpAdvancedTraining',link:'/cffpAdvancedTraining',path:'',isOpen:true,isShow:this.canSeeSchool},
{no:30,name:'产品培训',icon:'productTraining',link:'/productTraining',path:'',isOpen:true,isShow:this.canSeeSchool},
{no:31,name:'我的培训',icon:'training',link:'/myTraining',path:'',isOpen:true,isShow:this.canSeeSchool}
] ]
public state = { public state = {
modal1:false modal1:false
} }
...@@ -34,9 +38,33 @@ export class YdCollegeComponent implements OnInit { ...@@ -34,9 +38,33 @@ export class YdCollegeComponent implements OnInit {
this.router.navigate([`./${item.link}`]); this.router.navigate([`./${item.link}`]);
} }
} }
constructor(private router:Router) { } constructor(private router:Router,private myService: MyService) { }
ngOnInit() { ngOnInit() {
this.queryCanSee()
}
getMenu(){
this.courseLists = [
{no:23,name:'保险ABC',icon:'insuranceABC',link:'',path:`https://${window.location.host}/issue`,isOpen:true,isShow:true},
{no:24,name:'岗前训',icon:'preJobTraining',link:'/preJobTraining',path:'',isOpen:true,isShow:this.canSeeSchool},
{no:25,name:'新人训',icon:'newTraining',link:'/newTraining',path:'',isOpen:true,isShow:this.canSeeSchool},
{no:26,name:'CFFP初级训',icon:'cffpElementaryTraining',link:'/cffpElementaryTraining',path:'',isOpen:true,isShow:this.canSeeSchool},
{no:27,name:'提升训',icon:'promotionTraining',link:'/promotionTraining',path:'',isOpen:true,isShow:this.canSeeSchool},
{no:28,name:'CFFP衔接训',icon:'cffpBridgingTraining',link:'/cffpBridgingTraining',path:'',isOpen:true,isShow:this.canSeeSchool},
{no:29,name:'CFFP高阶训',icon:'cffpAdvancedTraining',link:'/cffpAdvancedTraining',path:'',isOpen:true,isShow:this.canSeeSchool},
{no:30,name:'产品培训',icon:'productTraining',link:'/productTraining',path:'',isOpen:true,isShow:this.canSeeSchool},
{no:31,name:'我的培训',icon:'training',link:'/myTraining',path:'',isOpen:true,isShow:this.canSeeSchool}
]
}
queryCanSee(){
this.myService.queryCanSee({practitionerId: this.lifeCustomerInfo?this.lifeCustomerInfo['practitionerId']:null,}).subscribe((res)=>{
if(res['success']){
this.canSeeSchool = res['data']['canSeeYdCollege']==1?true:false;
}
this.getMenu()
})
} }
} }
import { SecondsTransferPipe } from './seconds-transfer.pipe';
describe('SecondsTransferPipe', () => {
it('create an instance', () => {
const pipe = new SecondsTransferPipe();
expect(pipe).toBeTruthy();
});
});
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'secondsTransfer'
})
export class SecondsTransferPipe implements PipeTransform {
transform(value: any, args?: any): any {
const h = Math.floor(value / 3600) > 0 ? Math.floor(value / 3600) : '00';
const m = Math.floor(value % 3600 / 60) > 0 ? Math.floor(value % 3600 / 60) : '00';
const s = Math.floor(value % 60) > 0 ? Math.floor(value % 60) : '00';
return h + ':' + m + ':' + s;
}
}
...@@ -301,3 +301,13 @@ footer.fixed { ...@@ -301,3 +301,13 @@ footer.fixed {
font-weight: 700; font-weight: 700;
text-align: center; text-align: center;
} }
@keyframes wrapper-gradient {
0% {
transform: translateY(-100%);
}
100% {
transform: translateY(0);
}
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"extends": "../tsconfig.json", "extends": "../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../out-tsc/app", "outDir": "../out-tsc/app",
"types": [] "types": ["node"]
}, },
"exclude": [ "exclude": [
"test.ts", "test.ts",
......
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