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 @@
"ng-zorro-antd-mobile": "^0.12.5",
"ngx-echarts": "^3.2.0",
"ngx-ueditor": "^2.1.3",
"node-sass": "^4.14.1",
"node-sass": "4.14.1",
"rxjs": "~6.3.3",
"save": "^2.4.0",
"signature_pad": "^3.0.0-beta.4",
......
......@@ -87,6 +87,7 @@ export class AppComponent implements OnInit, OnDestroy {
|| event.url.indexOf('/inviter')>=0
|| event.url.indexOf('/register')>=0
|| event.url.indexOf('/invitees')>=0
|| event.url.indexOf('/video/')>=0
){
this.isShowIndexBtn = false;
}
......
<video *ngIf="!pdfPath" #video
[src]="videoSrc"
controls="true"
width="100%" preload="auto" (contextmenu)="menuPrevent()" x5-playsinline="true" playsinline="true" webkit-playsinline="true" disablePictureInPicture>
您的浏览器不支持 video 标签。
</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
<iframe [src]="filePath | safeResourceUrl" frameborder="0" width="100%" height="100%" style="min-height: 100vh;" *ngIf="!isVideo"></iframe>
<video [src]="filePath | safeResourceUrl" frameborder="0" width="100%" height="100%" *ngIf="isVideo" controls></video>
\ 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 { MyService } from 'src/app/my/my.service';
import { LifeCommonService } from '../life-common.service';
@Component({
selector: 'ydlife-video',
templateUrl: './video.component.html',
styleUrls: ['./video.component.scss']
})
export class VideoComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild('video') video: ElementRef;
videoSrc: string;
pdfPath: any;
permissions: any;
lifeCustomerInfo: any;
timer: any;
timer2: any;
videoPlaybacks: Array<any>;
originTime: number = 0;
export class VideoComponent implements OnInit {
filePath:string;
fileCategory:string;
fileId:string;
deviceType:string;
maxViewTime:number = 0;
constructor(private activatedRoute: ActivatedRoute, private myService: MyService,private lifeCommonService:LifeCommonService) { }
isVideo:boolean;
constructor(private activatedRoute: ActivatedRoute, private myService: MyService) { }
ngOnInit() {
this.deviceType = this.lifeCommonService.checkDeviceType();
this.videoSrc = sessionStorage.getItem('videoPath');
this.permissions = JSON.parse(sessionStorage.getItem('permissions'));
this.pdfPath = this.activatedRoute.snapshot.queryParams['path'];
this.lifeCustomerInfo = JSON.parse(localStorage.getItem('lifeCustomerInfo'));
this.fileId = this.activatedRoute.snapshot.params['fileId'];
if(!this.pdfPath){
this.queryVideoPlayback(1);
}
this.fileId = this.activatedRoute.snapshot.params.fileId;
this.fileCategory = this.activatedRoute.snapshot.params.fileCategory;
console.log(this.activatedRoute)
this.filePathQuery(null,this.fileId,this.fileCategory)
}
ngAfterViewInit(): void {
if(!this.pdfPath){
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.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 = {
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]['maxViewTime'];
if(type===1){
// 设置开始播放时间为上次离开时间
this.originTime = this.video.nativeElement.currentTime = this.videoPlaybacks.length > 0 ? this.videoPlaybacks[0]['viewTime'] : 0;
filePathQuery(status, fileId,fileCategory='23') {
this.myService.filePath('3', '0', fileCategory, 'yd_trainning_file_type', null, null, status, fileId).subscribe(res => {
if(res['success']){
const fileUploadItem = res['data']['fileUploadItemList'][0];
this.isVideo = this.judgmentFile(fileUploadItem.filePath,'video');
if(this.isVideo){
this.filePath = fileUploadItem.filePath;
}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)
this.filePath = `assets/pdfjs/web/viewer.html?file=${fileUploadItem.filePath}&isneeddownload=${fileUploadItem.isDownload=='1'?'true':'false'}`
}
} else {
this.video.nativeElement.currentTime = 0;
}
console.log(res);
})
}
download(path){
window.open(path)
// 判断是不是视频文件
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(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
}
}
}
menuPrevent() {
return false;
}
}
......@@ -38,6 +38,7 @@ export class BankCardComponent implements OnInit {
this.openPopInfo('银行卡号不能为空!');
return;
}
console.log(this.bankAccountId,this.sureBankAccountId)
if(this.bankAccountId != this.sureBankAccountId){
this.openPopInfo('两次银行卡号不一致!');
return;
......
......@@ -5,7 +5,9 @@
<div class="wrapper" *ngIf="isActive==2">
<div class="top">
<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 class="content">
<ul>
......@@ -33,4 +35,7 @@
<p>*温馨提示:</p>
<p>根据基本法规定,如因客户退保产生保险公司追佣的情形,公司将向经纪人扣回或追偿相应损失。</p>
</div>
</div>
\ No newline at end of file
</div>
<div *ngIf="!commission && !commissionInfoList" style="text-align: center;font-size: 20px;color: #333;">
公告佣金数据待更新,请耐心等待!
</div>
......@@ -18,23 +18,28 @@
margin: 10px auto;
ul{
display: flex;
width: 600px;
width: 700px;
align-items: center;
height: 40px;
// height: 40px;
// border: 1px #333 solid;
// border-bottom: none;
li{
width: 15%;
text-align: center;
border:1px #333 solid;
height: 40px;
line-height: 40px;
border: 1px #333 solid;
height: 50px;
border-right: none;
border-bottom: none;
display: flex;
align-items: center;
justify-content: center;
}
li.name,li.pay{
width: 20%;
li.name{
width: 30%;
}
// li.pay{
// width: 20%;
// }
li:nth-child(8){
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 @@
<i class="iconfont" style="margin-right: 0;" [ngClass]="fileUploadItem.isDownload=='1' ? 'icon-xiazai' : 'icon-xianshi'"></i>
</div>
</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;">
<img src="assets/images/videoIcon.png" alt="视频" *ngIf="judgmentFile(fileUploadItem.filePath)" style=" width: 26px;
margin-right: 6px;">
......
......@@ -18,7 +18,7 @@ export class FileUploadComponent implements OnInit {
}
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}))
}
setVideoPath(fileUploadItem){
......
......@@ -234,8 +234,9 @@ export class MkMaterialDetailComponent implements OnInit {
}
// 0是有plan,1是无plan
if (posterInfo.isPlan == '0') {
if (posterInfo.productCategoryId == '2') {
if(posterInfo.productCategoryId == '1' || posterInfo.productCategoryId == '4'){
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`;
} else if (posterInfo.productCategoryId == '5') {
this.shareInfo.url = `${environment.DOMAINNAME}/hProductDetail/${this.materialItemId}?shareCode=${shareCodeUuid}&type=9`;
......
......@@ -2,10 +2,12 @@
<h5>{{item.title}}</h5>
<ul>
<li *ngFor="let subItem of item.subItems" (click)="featureSelect(subItem)">
<div>
<img [src]="'assets/images/indexIcons/' + subItem.icon + '.png'" alt="">
</div>
<p>{{subItem.name}}</p>
<ng-container *ngIf="subItem.isShow">
<div>
<img [src]="'assets/images/indexIcons/' + subItem.icon + '.png'" alt="">
</div>
<p>{{subItem.name}}</p>
</ng-container>
</li>
</ul>
</div>
......
import { Location } from '@angular/common';
import { Component, OnDestroy, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { MyService } from '../my.service';
@Component({
selector: 'ydlife-more-features',
......@@ -9,81 +10,8 @@ import { Router } from '@angular/router';
})
export class MoreFeaturesComponent implements OnInit,OnDestroy {
lifeCustomerInfo: any = JSON.parse(localStorage.getItem('lifeCustomerInfo')) ? JSON.parse(localStorage.getItem('lifeCustomerInfo')) : null;
public feartureLists = [
{key:'00',title:'营销工具',subItems:[
{no:1,name:'线上投保',icon:'onlineInsurance',link:'',path:`https://${window.location.host}/index?source=dyd`,isOpen:true},
{no:2,name:'产品库',icon:'product-market',link:'/product',path:'',isOpen:true},
{no:3,name:'投核保知识库',icon:'insuranceKnowledgeBase',link:'/underwriting_knowledge',path:'',isOpen:true},
{no:4,name:'计划书',icon:'proposals',link:'',path:'',isOpen:false},
{no:5,name:'产品海报',icon:'productPoster',link:'/material',path:'',isOpen:true},
{no:6,name:'文章分享',icon:'articleShare',link:'/article/null',path:'',isOpen:true},
{no:7,name:'AI保险医生',icon:'aiDoctor',link:'',path:`https://${window.location.host}/questionnaire/#/index?campaign=AIRobot&task=AItask1&customerId=${this.lifeCustomerInfo.customerId}`,isOpen:true},
{no:36,name:'遗嘱服务',icon:'will_grey',link:'',path:'',isOpen:false},
]},
{key:'01',title:'保单服务',subItems:[
{no:8,name:'我的保单',icon:'policyLists',link:'/salesDetail',path:'',isOpen:true},
{no:9,name:'续期管理',icon:'renewalManagement',link:'/renewal_reminder',path:'',isOpen:true},
]}
,{
key:'02',title:'客户管理',subItems:[
{no:10,name:'成交客户',icon:'customers',link:'/customer',path:'',isOpen:true},
{no:11,name:'潜在客户',icon:'potentialCustomers',link:'/business',path:'',isOpen:true},
]
}
,{
key:'03',title:'我的增员',subItems:[
{no:12,name:'团队增员',icon:'teamIncreaseStaff',link:'/recruiting',path:'',isOpen:true},
{no:13,name:'报聘审批',icon:'employmentApproval',link:'/approval_list',path:'',isOpen:true},
]
}
,{
key:'04',title:'我的展业',subItems:[
{no:14,name:'目标设置',icon:'targetSetting',link:'/target',path:'',isOpen:true},
{no:15,name:'我的日程',icon:'schedule',link:'/todo',path:'',isOpen:true},
{no:16,name:'活动量统计',icon:'activityStatistics',link:'/scoreDeatil',path:'',isOpen:true},
{no:17,name:'我的工号',icon:'jobNumber',link:'',path:'',isOpen:false},
{no:18,name:'联合销售',icon:'jointSale',link:'/joint_sales',path:'',isOpen:true},
{no:19,name:'客户告知书',icon:'customerNotification',link:'/business',path:'',isOpen:true},
{no:20,name:'我的业绩',icon:'achievement',link:'',path:'',isOpen:false},
{no:21,name:'我的薪资',icon:'salary',link:'/salary',path:'',isOpen:true},
{no:22,name:'我的竞赛',icon:'competition',link:'',path:'',isOpen:false},
]
}
,{
key:'05',title:'银盾学院',subItems:[
{no:23,name:'保险ABC',icon:'insuranceABCDisabled',link:'',path:`https://${window.location.host}/issue`,isOpen:false},
{no:24,name:'岗前训',icon:'preJobTrainingDisabled',link:'/prejobTraining',path:'',isOpen:false},
{no:25,name:'新人训',icon:'newTrainingDisabled',link:'/newTraining',path:'',isOpen:false},
{no:26,name:'提升训',icon:'promotionTrainingDisabled',link:'/advanceTraining',path:'',isOpen:false},
{no:27,name:'CFFP培训',icon:'cffpTrainingDisabled',link:'/cffpTraining',path:'',isOpen:false},
{no:28,name:'产品培训',icon:'productTrainingDisabled',link:'/productTraining',path:'',isOpen:false},
{no:29,name:'我的培训',icon:'trainingDisabled',link:'',path:'',isOpen:false},
]
}
,{
key:'06',title:'我的团队',subItems:[
{no:30,name:'我的团队',icon:'team',link:'/teamPanel',path:'',isOpen:true},
{no:31,name:'团队业绩',icon:'teamPerformance',link:'/teamRank',path:'',isOpen:true},
{no:32,name:'团队晋升考核',icon:'teamPromotionAssessment',link:'',path:'',isOpen:false},
{no:33,name:'团队PEP',icon:'temPEP',link:'/teamPanel/teamSalesScore',path:'',isOpen:true},
{no:34,name:'团队学习',icon:'teamLearning',link:'',path:'',isOpen:false},
{no:35,name:'团队竞赛',icon:'teamCompetition',link:'',path:'',isOpen:false},
]
}
]
canSeeSchool:Boolean=false;
public feartureLists:Array<any> = [];
public state = {
modal1:false
......@@ -93,22 +21,22 @@ export class MoreFeaturesComponent implements OnInit,OnDestroy {
this.state[key] = false;
}
featureSelect(item){
if(item.isOpen){
if(item.isShow){
if(!item.isOpen){
this.state['modal1'] = true;
}
if(item.path){
window.open(item.path);
}else if(item.link){
this.router.navigate([`./${item.link}`]);
}
}else{
this.state['modal1'] = true;
}
}
// 返回上一页
goBack(){
this.location.back()
}
constructor(private router:Router,private location:Location) { }
constructor(private router:Router,private location:Location,private myService: MyService) { }
ngOnInit() {
if(sessionStorage.getItem('mineScrollTop')){
......@@ -116,9 +44,85 @@ export class MoreFeaturesComponent implements OnInit,OnDestroy {
left: 100,
behavior: 'smooth'})
}
this.queryCanSee()
}
ngOnDestroy(): void {
sessionStorage.setItem('mineScrollTop',document.body.scrollTop + '')
}
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()
})
}
getMenu(){
this.feartureLists = [
{key:'00',title:'营销工具',subItems:[
{no:1,name:'线上投保',icon:'onlineInsurance',link:'',path:`https://${window.location.host}/index?source=dyd`,isOpen:true,isShow:true},
{no:2,name:'产品库',icon:'product-market',link:'/product',path:'',isOpen:true,isShow:true},
{no:3,name:'投核保知识库',icon:'insuranceKnowledgeBase',link:'/underwriting_knowledge',path:'',isOpen:true,isShow:true},
{no:4,name:'计划书',icon:'proposals',link:'',path:'',isOpen:false},
{no:5,name:'产品海报',icon:'productPoster',link:'/material',path:'',isOpen:true,isShow:true},
{no:6,name:'文章分享',icon:'articleShare',link:'/article/null',path:'',isOpen:true,isShow:true},
{no:7,name:'AI保险医生',icon:'aiDoctor',link:'',path:`https://${window.location.host}/questionnaire/#/index?campaign=AIRobot&task=AItask1&customerId=${this.lifeCustomerInfo.customerId}`,isOpen:true,isShow:true},
{no:36,name:'遗嘱服务',icon:'will_grey',link:'',path:'',isOpen:false},
]},
{key:'01',title:'保单服务',subItems:[
{no:8,name:'我的保单',icon:'policyLists',link:'/salesDetail',path:'',isOpen:true,isShow:true},
{no:9,name:'续期管理',icon:'renewalManagement',link:'/renewal_reminder',path:'',isOpen:true,isShow:true},
]}
,{
key:'02',title:'客户管理',subItems:[
{no:10,name:'成交客户',icon:'customers',link:'/customer',path:'',isOpen:true,isShow:true},
{no:11,name:'潜在客户',icon:'potentialCustomers',link:'/business',path:'',isOpen:true,isShow:true},
]
}
,{
key:'03',title:'我的增员',subItems:[
{no:12,name:'团队增员',icon:'teamIncreaseStaff',link:'/recruiting',path:'',isOpen:true,isShow:true},
{no:13,name:'报聘审批',icon:'employmentApproval',link:'/approval_list',path:'',isOpen:true,isShow:true},
]
}
,{
key:'04',title:'我的展业',subItems:[
{no:14,name:'目标设置',icon:'targetSetting',link:'/target',path:'',isOpen:true,isShow:true},
{no:15,name:'我的日程',icon:'schedule',link:'/todo',path:'',isOpen:true,isShow:true},
{no:16,name:'活动量统计',icon:'activityStatistics',link:'/scoreDeatil',path:'',isOpen:true,isShow:true},
{no:17,name:'我的工号',icon:'jobNumber',link:'',path:'',isOpen:false,isShow:true},
{no:18,name:'联合销售',icon:'jointSale',link:'/joint_sales',path:'',isOpen:true,isShow:true},
{no:19,name:'客户告知书',icon:'customerNotification',link:'/business',path:'',isOpen:true,isShow:true},
{no:20,name:'我的业绩',icon:'achievement',link:'',path:'',isOpen:false,isShow:true},
{no:21,name:'我的薪资',icon:'salary',link:'/salary',path:'',isOpen:true,isShow:true},
{no:22,name:'我的竞赛',icon:'competition',link:'',path:'',isOpen:false,isShow:true},
]
}
,{
key:'05',title:'银盾学院',subItems:[
{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:27,name:'CFFP初级训',icon:'cffpTraining',link:'/cffpElementaryTraining',path:'',isOpen:true,isShow:this.canSeeSchool},
{no:26,name:'提升训',icon:'promotionTraining',link:'/promotionTraining',path:'',isOpen:true,isShow:this.canSeeSchool},
{no:27,name:'CFFP衔接训',icon:'cffpTraining',link:'/cffpBridgingTraining',path:'',isOpen:true,isShow:this.canSeeSchool},
{no:27,name:'CFFP高阶训',icon:'cffpTraining',link:'/cffpAdvancedTraining',path:'',isOpen:true,isShow:this.canSeeSchool},
{no:28,name:'产品培训',icon:'productTraining',link:'/productTraining',path:'',isOpen:true,isShow:this.canSeeSchool},
{no:29,name:'我的培训',icon:'training',link:'/myTraining',path:'',isOpen:true,isShow:this.canSeeSchool},
]
}
,{
key:'06',title:'我的团队',subItems:[
{no:30,name:'我的团队',icon:'team',link:'/teamPanel',path:'',isOpen:true,isShow:true},
{no:31,name:'团队业绩',icon:'teamPerformance',link:'/teamRank',path:'',isOpen:true,isShow:true},
{no:32,name:'团队晋升考核',icon:'teamPromotionAssessment',link:'',path:'',isOpen:false,isShow:true},
{no:33,name:'团队PEP',icon:'temPEP',link:'/teamPanel/teamSalesScore',path:'',isOpen:true,isShow:true},
{no:34,name:'团队学习',icon:'teamLearning',link:'',path:'',isOpen:false,isShow:true},
{no:35,name:'团队竞赛',icon:'teamCompetition',link:'',path:'',isOpen:false,isShow:true},
]
}
]
}
}
......@@ -25,6 +25,7 @@
DatePicker
[mode]="'date'"
[disabled]="readonlyFlag"
[minDate]="minDate"
[maxDate] = "today"
[(ngModel)]="editBusiness.birthDate"
(onOk)="onOk($event)">
......
......@@ -70,6 +70,7 @@ export class MyBusinessDetailComponent implements OnInit {
// 获取经纪人信息
lifeCustomerInfo:any;
today:Date = new Date();
minDate:Date = new Date('1930-01-01')
constructor(private activateRoute: ActivatedRoute, private myService: MyService,
public lifeCommonService: LifeCommonService, private router: Router, ) {
this.titleList = [
......
......@@ -14,6 +14,7 @@
></SearchBar>
<i [routerLink]="'/news'">
<img src="assets/images/indexIcons/news.png" alt="" srcset="">
<span *ngIf="messageUnreadCount">{{messageUnreadCount}}</span>
</i>
</section>
<section style="margin-top:-85px;">
......
......@@ -13,6 +13,23 @@
padding: 7px 10px 90px;
i{
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{
flex: auto;
......@@ -79,7 +96,6 @@
}
}
}
.hotProductLists{
flex-direction: column;
>ul{
......
......@@ -9,6 +9,7 @@ declare var wx: any;
styleUrls: ['./my-center-home.component.scss'],
})
export class MyCenterHomeComponent implements OnInit {
messageUnreadCount:string;
productInfo: any;
inquiry: any;
public announcementInfo: string;
......@@ -20,7 +21,7 @@ export class MyCenterHomeComponent implements OnInit {
{ key: '03', name: '续期管理', icon: 'renewalManagement', link: '/renewal_reminder', isOpen: true },
{ key: '04', name: '成交客户', icon: 'customers', link: '/customer', 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 }
]
public bannerLists = [];
......@@ -38,6 +39,19 @@ export class MyCenterHomeComponent implements OnInit {
this.router.navigate(['/product', { queryName: value.trim() }])
}
}
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() {
// 查询互联网产品
......@@ -140,6 +154,8 @@ export class MyCenterHomeComponent implements OnInit {
this.queryproductlistbytag(119, 'hotProductLists');
// 查询最新一条公告
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();
});
});
import { Component, OnInit,ViewChild,ElementRef } from '@angular/core';
import { MyService } from '../my.service';
import { EChartOption } from 'echarts';
import { color } from 'html2canvas/dist/types/css/types/color';
const echarts = require('echarts');
@Component({
selector: 'ydlife-my-management',
templateUrl: './my-management.component.html',
styleUrls: ['./my-management.component.scss']
})
export class MyManagementComponent implements OnInit {
@ViewChild('echarts') echarts: ElementRef
optList:Array<any>;
mdDropOptionCode:string = null;
year:number = (new Date()).getFullYear();
month:number = (new Date()).getMonth() + 1;
isTeam:number = 0;//0个人;1团队
chartOption: EChartOption = {}
personY:Array<any>;
teamX:Array<any>;
detailList:Array<any>;
zeroList:Array<any>;
fiftyList:Array<any>;
seventyList:Array<any>;
ninetyNineList:Array<any>;
hundredList:Array<any>;
my_chart;
yearList:Array<any>;
monthList:Array<any>;
detailFlag:boolean = false;
systemList:Array<any>;
videoList:Array<any>;
count:number;
total:number;
constructor(private myService: MyService) { }
ngOnInit() {
this.dropOptionsQuery('yd_trainning_file_type');
this.changeIsTeam(0);
this.yearList = [2018,2019,2020,2021,2022,2023,2024,2025];
this.monthList = [1,2,3,4,5,6,7,8,9,10,11,12]
this.my_chart = echarts.init(this.echarts.nativeElement);
this.my_chart.on('click', (params) => {
console.log(params)
});
}
dropOptionsQuery(code){
this.myService.dropOptionsQuery({code:code}).subscribe((res)=>{
if(res['success']){
this.optList = res['data']['dropMasterInfoList'][0]['dropOptionsInfoList'].filter((item)=>{
return item.dropOptionCode != 'productTraining' && item.dropOptionCode!= 'trainingVideo'
});
this.optList = [{dropOptionCode:null,dropOptionName:'全部'}].concat(this.optList)
}
})
}
getCode(event){
this.changeIsTeam(this.isTeam)
}
changeIsTeam(isTeam){
this.isTeam = isTeam;
const params = {
dateSpan:`${this.year}-${this.month}-31 23:59:59`,
// practitionerId:25,
practitionerId:JSON.parse(localStorage.getItem('lifeCustomerInfo'))['practitionerId'],
mdDropOptionCode:this.mdDropOptionCode
}
if(this.isTeam == 0){
this.myService.personalCompletionRate(params).subscribe((res)=>{
console.log(res)
if(res['success']){
this.zeroList = res['data']['zeroList'];
this.fiftyList = res['data']['fiftyList'];
this.seventyList = res['data']['seventyList'];
this.ninetyNineList = res['data']['ninetyNineList'];
this.hundredList = res['data']['hundredList'];
}else{
this.zeroList = this.fiftyList = this.seventyList = this.ninetyNineList = this.hundredList = [];
}
this.detailList = this.zeroList.concat(this.fiftyList).concat(this.seventyList).concat(this.ninetyNineList).concat(this.hundredList)
this.personY = [].concat(this.zeroList.length).concat(this.fiftyList.length).concat(this.seventyList.length).concat(this.ninetyNineList.length).concat(this.hundredList.length)
this.chartOption = {
xAxis: {
type: 'category',
name:'(学习进度)',
nameTextStyle:{
padding:[25,0,0,-28],
color:'#666',
fontSize:10
},
data: ['0', '1-50%', '51-70%', '71-99%', '100%'],
axisLabel: { //坐标轴刻度标签的相关设置。
interval: 0,//设置为 1,表示『隔一个标签显示一个标签』
textStyle: {
fontSize: 10,
color:'#666'
},
rotate:0,
},
axisTick:{//坐标轴刻度相关设置。
show: false,
},
axisLine: { // 坐标轴 轴线
show: true, // 是否显示
//symbol: ['none', 'arrow'], // 是否显示轴线箭头
//symbolSize: [8, 8], // 箭头大小
//symbolOffset: [0, 7], // 箭头位置
// ------ 线 ---------
lineStyle: {
color: '#5F83FF',
width: 2,
type: 'solid'
}
},
},
yAxis: {
name:'(人)',
show:true,
type: 'value',
splitNumber: 3,
axisTick:{//坐标轴刻度相关设置。
show: true,
},
axisLine:{
show:true
}
},
series: [
{
data: this.personY,
type: 'bar',
showBackground: false,
barWidth: 30,
itemStyle: {
normal:{
show: true,
color: "#9EB4FF",
barBorderRadius:5,
borderWidth: 0,
label:{
formatter:"{c} 人",
show:true,
position:"top",
textStyle:{
fontWeight:"border",
fontSize:12,
color:"#333"
}
}
}
},
emphasis: {
itemStyle: {
color:'#5F83FF'
}
}
}
]
};
})
}
if(this.isTeam == 1){
this.myService.teamCompletionRate(params).subscribe((res)=>{
console.log(res)
if(res['success']){
this.systemList = res['data']['systemList'];
}else{
this.systemList = [];
}
if(this.systemList.length){
this.teamX = this.systemList.map((item)=>{
return `${item.systemName}(${item.peopleRate})`
});
this.detailList = [];
for(let i=0;i<this.systemList.length;i++){
this.detailList = this.detailList.concat(this.systemList[i]['list'])
}
}
this.chartOption = {
xAxis: {
type: 'category',
data: this.teamX,
name:'(团队/人)',
nameTextStyle:{
padding:[25,0,0,-28],
color:'#666'
},
axisTick:{show: false},
axisLabel: {
show: true,
interval:0,
formatter:function(params) {
var newParamsName = "";
var paramsNameNumber = params.length;
var provideNumber = 5; //一行显示几个字
var rowNumber = Math.ceil(paramsNameNumber / provideNumber);
if (paramsNameNumber > provideNumber) {
for (var p = 0; p < rowNumber; p++) {
var tempStr = "";
var start = p * provideNumber;
var end = start + provideNumber;
if (p == rowNumber - 1) {
tempStr = params.substring(start, paramsNameNumber);
} else {
tempStr = params.substring(start, end) + "\n";
}
newParamsName += tempStr;
}
} else {
newParamsName = params;
}
return newParamsName
},
}
},
yAxis: {
type: 'value',
name:'(学习进度%)',
axisTick:{show: false},
axisLabel:{
textStyle: {
fontSize: 10,
},
formatter:'{value}%'
},
},
series: [
{
data: ['20', '40', '60','80', '100'],
type: 'bar',
showBackground: false,
barWidth: 30,
itemStyle: {
normal:{
show: true,
color: "#9EB4FF",
barBorderRadius:5,
borderWidth: 0,
label:{
formatter:"{c} %",
show:true,
position:"top",
textStyle:{
fontWeight:"border",
fontSize:12,
color:"#333"
}
}
},
},
emphasis: {
itemStyle: {
color:'#5F83FF'
}
}
}
]
};
})
}
}
onChartClick(event){
console.log(event.dataIndex)
if(this.isTeam == 0){
if(event.dataIndex == 0){
this.detailList = this.zeroList;
}else if(event.dataIndex == 1){
this.detailList = this.fiftyList;
}else if(event.dataIndex == 2){
this.detailList = this.seventyList;
}else if(event.dataIndex == 3){
this.detailList = this.ninetyNineList;
}else if(event.dataIndex == 4){
this.detailList = this.hundredList;
}
}
if(this.isTeam == 1){
for(let i=0;i<this.systemList.length;i++){
if(event.dataIndex == i){
this.detailList = this.systemList[i]['list'];
}
}
}
}
getLearnDetail(practitionerId){
this.detailFlag = true;
this.myService.queryLearningProgressDetail({practitionerId:practitionerId}).subscribe((res)=>{
console.log(res)
if(res['success']){
this.videoList = res['data']['videoList'];
this.count = res['data']['count'];
this.total = res['data']['total'];
}else{
this.videoList = [];
this.count = 0;
this.total = 0;
}
})
}
}
<div class="wrapper">
<div class="item" [routerLink]="['/thanks']">
<span>银盾保险经纪董事长欢迎信</span>
<div class="content">
<span class="iconfont icon-ar-r"></span>
<div class="clearMessage">
<div></div>
<div (click)="oneKeyRead()">
<img src="assets/images/icons/delete.png" alt="" srcset="">
<span>清除未读</span>
</div>
</div>
<div class="item" [routerLink]="['/newsDetail/2']">
<span>银盾保险经纪置顶公众号操作指南</span>
<div class="content">
<div class="item" *ngFor="let item of newsLists" (click)="goDetail(item)">
<div class="noticeIcon">
<img src="assets/images/icons/noticeTip.png" alt="">
</div>
<div class="newsSummary">
<div>
<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>
</div>
</div>
</div>
</div>
\ No newline at end of file
......@@ -26,6 +26,50 @@
height: 35px;
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{
display: flex;
......
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { MyService } from '../my.service';
@Component({
selector: 'ydlife-my-news',
......@@ -6,10 +8,56 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./my-news.component.scss']
})
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() {
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';
import { MoreFeaturesComponent } from './more-features/more-features.component';
import { MineComponent } from './mine/mine.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 = [
{ path: '', component: MyCenterHomeComponent, canActivate: [AuthGuard], data: [{ title: '银盾保险经纪 - 工作台' }] },
{ path: 'material', component: MkMaterialComponent, canActivate: [AuthGuard],data:[{title:'产品海报'}] },
{ path: 'material/:itemId', component: MkMaterialDetailComponent, canActivate: [AuthGuard],data:[{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: 'prejobTraining', component: FileUploadComponent, canActivate: [AuthGuard], data: [{ type: 'yd_trainning_file_type' ,title:'岗前训'}] },
{ path: 'newTraining', component: FileUploadComponent, canActivate: [AuthGuard], data: [{ type: 'yd_trainning_file_type',title:'新人训' }] },
{ path: 'advanceTraining', component: FileUploadComponent, canActivate: [AuthGuard], data: [{ type: 'yd_trainning_file_type',title:'提升训' }] },
{ path: 'cffpTraining', component: FileUploadComponent, canActivate: [AuthGuard], data: [{ type: 'yd_trainning_file_type',title:'CFFP培训' }] },
{ path: 'productTraining', 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: TrainingRecordsComponent, canActivate: [AuthGuard], data: [{ type: 'yd_trainning_file_type',title:'新人训' }] },
{ path: 'promotionTraining', component: TrainingRecordsComponent, canActivate: [AuthGuard], data: [{ type: 'yd_trainning_file_type',title:'提升训' }] },
{ path: 'cffpElementaryTraining', component: TrainingRecordsComponent, canActivate: [AuthGuard], data: [{ type: 'yd_trainning_file_type',title:'CFFP初级训' }] },
{ 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: 'salesDetail', component: SalesDetailComponent, canActivate: [AuthGuard],data:[{title:'我的保单'}] },
{ path: 'importantAnnouncement/:id', component: AnnouncementDetailComponent, canActivate: [AuthGuard] ,data:[{title:'重要公告'}] },
......@@ -107,7 +112,7 @@ const myRoutes: Routes = [
{ path: 'thanks', component: ThanksComponent, canActivate: [AuthGuard] ,data:[{title:'感谢信'}]},
{ path: 'setting', component: MySettingComponent, 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: 'teamPanel', component: TeamPanelComponent, canActivate: [AuthGuard],data:[{title:'我的团队'}] },
{ path: 'teamPanel/:type', component: TeamSalesScoreComponent, canActivate: [AuthGuard] ,data:[{title:'活动量得分'}]},
......@@ -177,12 +182,17 @@ const myRoutes: Routes = [
{ path: 'integration',component:IntegrationComponent,canActivate:[AuthGuard],data:[{title: '我的积分'}]},
{ path: 'integration_detail',component:IntegrationDetailComponent,canActivate:[AuthGuard],data:[{title: '积分明细'}]},
{ path: 'integration_rule',component:IntegrationRuleComponent,canActivate:[AuthGuard],data:[{title: '积分规则'}]},
{ path: 'video',component:VideoComponent,canActivate:[AuthGuard],data:[{title: '视频播放'}]},
{ path: 'pdfView',component:VideoComponent,canActivate:[AuthGuard],data:[{title: 'PDF查看'}]},
{ path: 'video/:fileId/:fileCategory',component:VideoComponent,canActivate:[AuthGuard],data:[{title: '视频播放'}]},
{ path: 'pdfView/:fileId/:fileCategory',component:VideoComponent,canActivate:[AuthGuard],data:[{title: 'PDF查看'}]},
{ path: 'newsDetail/:id',component:NewsDetailComponent,canActivate:[AuthGuard],data:[{title: '消息详情'}]},
{ path: 'moreFeatures',component:MoreFeaturesComponent,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({
......
<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';
import { MoreFeaturesComponent } from './more-features/more-features.component';
import { MineComponent } from './mine/mine.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({
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: [
CommonModule,
LifeCommonModule,
......
......@@ -23,7 +23,7 @@ export class MyService {
filePath(itemType, itemId, fileCategory, code, mdDropOptionCode,customerId=null,learningStatus=null,fileId=null) {
const url = this.API + '/filePathQuery';
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 }));
}
// 重要公告
......@@ -948,5 +948,10 @@ export class MyService {
const url = this.API + "/commission/queryCommissionInfoByYdLife";
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="newsDetailContent">
<div class="newsDetailContent" *ngIf="messageId==='000'">
<div>
<div><img src="assets/images/topOfficalAccountGuideBg.png" alt=""></div>
<h3>为了便于更好的服务您,三步就可轻松置顶银盾保险经纪公众号哦~<img src="assets/images/downArrow.gif" alt="" style="width: 25px"></h3>
<div><img src="assets/images/topOfficalAccountGuide1.png" alt=""></div>
</div>
</div>
<div class="closeBtn">
<i class="iconfont icon-jia" (click)="close()"></i>
<div class="messageDetailContent" *ngIf="messageId!=='000'">
<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 class="closeBtn">
<i class="iconfont icon-jia" (click)="close()"></i>
</div> -->
</div>
\ No newline at end of file
.newsDetailContainer{
background-color: rgba(0, 0, 0, 0.5);
background-color: #f5f5f5;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
padding: 30px;
padding: 0 10px 0;
min-height: calc(100vh - 70px);
.newsDetailContent{
background-color: #fff;
padding-bottom: 10px;
......@@ -27,7 +27,7 @@
line-height: 42px;
margin: 10px auto;
border-radius: 50%;
color: #fff;
color: #333;
transform: rotate(45deg);
}
}
......@@ -40,4 +40,25 @@ h3{
img{
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 { ActivatedRoute, Router } from '@angular/router';
import { MyService } from '../my.service';
@Component({
selector: 'ydlife-news-detail',
......@@ -8,12 +9,17 @@ import { ActivatedRoute, Router } from '@angular/router';
})
export class NewsDetailComponent implements OnInit {
type:string;
constructor(private router:Router,private activatedRoute:ActivatedRoute) {
this.type = activatedRoute.snapshot.queryParams['type']
messageId:string;
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() {
if(this.messageId!=='000'){
this.querySystemMessageDetail();
}
}
close()
......@@ -24,5 +30,13 @@ export class NewsDetailComponent implements OnInit {
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 {
if(urlItem['categoryId'] != 35){
this.router.navigate(['/filelist'],{queryParams:{planId:this.planId,productId:this.productId,categoryId:urlItem['categoryId']}})
}else{
sessionStorage.setItem('commission',urlItem['fileInfos'][0]['description']);
if(this.isActive == 1){
sessionStorage.setItem('commission',urlItem['fileInfos'][0]['description']);
}
if(this.isActive == null){
const toast = ToastService.show('暂未配置公告佣金', 0);
const toast = ToastService.show('公告佣金数据待更新,请耐心等待!', 0);
setTimeout(() => {
ToastService.hide();
}, 3000);
}else{
this.router.navigate(['/commission'],{queryParams:{productId:this.productId,planId:this.planId,isActive:this.isActive}});
return;
}
this.router.navigate(['/commission'],{queryParams:{productId:this.productId,planId:this.planId,isActive:this.isActive}});
}
}
......
......@@ -168,6 +168,7 @@
}
li:last-child{
border-bottom: 0;
padding-bottom: 50px;
}
.productInfoContent {
h3 {
......
......@@ -32,7 +32,7 @@ export class ScoreDetailsComponent implements OnInit {
if (res['success']) {
this.salesScoreDetails = res['data']['detail'];
this.chartOption ={
tooltip: {
tooltip: {//提示框组件
trigger: 'item',
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>
<li *ngFor="let subItem of courseLists" (click)="featureSelect(subItem)">
<div>
<img [src]="'assets/images/indexIcons/' + subItem.icon + '.png'" alt="">
</div>
<p>{{subItem.name}}</p>
</li>
<ng-container *ngFor="let subItem of courseLists">
<li (click)="featureSelect(subItem)" *ngIf="subItem.isShow">
<div>
<img [src]="'assets/images/indexIcons/' + subItem.icon + '.png'" alt="">
</div>
<p>{{subItem.name}}</p>
</li>
</ng-container>
</ul>
<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
</Modal>
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { MyService } from '../my.service';
@Component({
selector: 'ydlife-yd-college',
......@@ -7,16 +8,19 @@ import { Router } from '@angular/router';
styleUrls: ['./yd-college.component.scss']
})
export class YdCollegeComponent implements OnInit {
canSeeSchool:Boolean=false;
lifeCustomerInfo: any = JSON.parse(localStorage.getItem('lifeCustomerInfo')) ? JSON.parse(localStorage.getItem('lifeCustomerInfo')) : null;
public courseLists = [
{no:23,name:'保险ABC',icon:'insuranceABCDisabled',link:'',path:`https://${window.location.host}/issue`,isOpen:false},
{no:24,name:'岗前训',icon:'preJobTrainingDisabled',link:'/prejobTraining',path:'',isOpen:false},
{no:25,name:'新人训',icon:'newTrainingDisabled',link:'/newTraining',path:'',isOpen:false},
{no:26,name:'提升训',icon:'promotionTrainingDisabled',link:'/advanceTraining',path:'',isOpen:false},
{no:27,name:'CFFP培训',icon:'cffpTrainingDisabled',link:'/cffpTraining',path:'',isOpen:false},
{no:28,name:'产品培训',icon:'productTrainingDisabled',link:'/productTraining',path:'',isOpen:false},
{no:29,name:'我的培训',icon:'trainingDisabled',link:'',path:'',isOpen:false},
{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}
]
public state = {
modal1:false
}
......@@ -34,9 +38,33 @@ export class YdCollegeComponent implements OnInit {
this.router.navigate([`./${item.link}`]);
}
}
constructor(private router:Router) { }
constructor(private router:Router,private myService: MyService) { }
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 {
font-weight: 700;
text-align: center;
}
@keyframes wrapper-gradient {
0% {
transform: translateY(-100%);
}
100% {
transform: translateY(0);
}
}
......@@ -2,7 +2,7 @@
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"types": []
"types": ["node"]
},
"exclude": [
"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