Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ydLife
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sweet Zhang
ydLife
Commits
0085e0cd
Commit
0085e0cd
authored
Aug 15, 2022
by
Sweet Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
银盾学院
parent
99bcaf2d
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
129 additions
and
202 deletions
+129
-202
src/app/common/video/video.component.html
+2
-9
src/app/common/video/video.component.ts
+13
-104
src/app/my/course-detail/course-detail.component.html
+4
-7
src/app/my/course-detail/course-detail.component.scss
+10
-1
src/app/my/course-detail/course-detail.component.ts
+66
-62
src/app/my/more-features/more-features.component.ts
+4
-2
src/app/my/my-routing.module.ts
+8
-7
src/app/my/training-records/training-records.component.html
+2
-1
src/app/my/training-records/training-records.component.scss
+3
-2
src/app/my/training-records/training-records.component.ts
+11
-3
src/app/my/yd-college/yd-college.component.ts
+6
-4
src/assets/images/indexIcons/training.png
+0
-0
No files found.
src/app/common/video/video.component.html
View file @
0085e0cd
<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;"
></iframe>
\ No newline at end of file
src/app/common/video/video.component.ts
View file @
0085e0cd
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
;
fileId
:
string
;
deviceType
:
string
;
maxViewTime
:
number
=
0
;
constructor
(
private
activatedRoute
:
ActivatedRoute
,
private
myService
:
MyService
,
private
lifeCommonService
:
LifeCommonService
)
{
}
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
.
filePathQuery
(
null
,
this
.
fileId
)
}
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
;
}
else
{
// 监测有没有拖动进度条
this
.
timer2
=
setInterval
(()
=>
{
if
(
this
.
video
.
nativeElement
.
currentTime
-
this
.
originTime
>
1
&&
this
.
video
.
nativeElement
.
currentTime
>
this
.
maxViewTime
)
{
this
.
video
.
nativeElement
.
currentTime
=
this
.
originTime
;
filePathQuery
(
status
,
fileId
)
{
this
.
myService
.
filePath
(
'3'
,
'0'
,
'23'
,
'yd_trainning_file_type'
,
null
,
null
,
status
,
fileId
).
subscribe
(
res
=>
{
if
(
res
[
'success'
]){
const
fileUploadItem
=
res
[
'data'
][
'fileUploadItemList'
][
0
];
this
.
filePath
=
`assets/pdfjs/web/viewer.html?file=
${
fileUploadItem
.
filePath
}
&isneeddownload=
${
fileUploadItem
.
isDownload
==
'1'
?
'true'
:
'false'
}
`
}
this
.
originTime
=
this
.
video
.
nativeElement
.
currentTime
;
},
500
)
}
}
else
{
this
.
video
.
nativeElement
.
currentTime
=
0
;
}
console
.
log
(
res
);
})
}
download
(
path
)
{
window
.
open
(
path
)
menuPrevent
()
{
return
false
;
}
}
src/app/my/course-detail/course-detail.component.html
View file @
0085e0cd
<div
class=
"courseDetailContainer"
>
<div
class=
"courseInitShow"
>
<video
*
ngIf=
"
!pdfPath
"
#
video
<video
*
ngIf=
"
canplay
"
#
video
[
src
]="
fileUploadItem
?.
filePath
"
controls=
"true"
[
poster
]="
fileUploadItem
?.
fileFirstImg
"
width=
"100%"
height=
"200px"
preload=
"auto"
(
contextmenu
)="
menuPrevent
()"
x5-playsinline=
"true"
playsinline=
"true"
webkit-playsinline=
"true"
disablePictureInPicture
>
您的浏览器不支持 video 标签。
</video>
<img
*
ngIf=
"!canplay"
[
src
]="
fileUploadItem
?.
fileFirstImg
"
alt=
""
srcset=
""
>
</div>
<div
class=
"courseTitle"
>
<h4>
{{fileUploadItem?.itemName}}
</h4>
<div>
<span
*
ngIf=
"pdfPath"
>
立即阅读
</span>
<span>
不可下载
</span>
</div>
<span
class=
"viewpdf"
*
ngIf=
"fileUploadItem?.filePath && fileUploadItem?.filePath.indexOf('.pdf') > -1"
[
routerLink
]="['/
pdfView
',
fileId
]"
>
立即阅读
</span>
</div>
<div
class=
"courseIntroContent"
>
<div
class=
"tab"
>
...
...
@@ -42,7 +39,7 @@
<p
style=
"width: 30px;"
>
<img
[
src
]="'
assets
/
images
/
icons
/'
+
(
fileUploadItem
.
learningStatus =
=
'
3
'
?
'
disablePlay
'
:
'
play
')
+
'.
png
'"
alt=
""
srcset=
""
>
</p>
<p>
{{fileUploadItem
.learningStatus == '3' ? '不可播放' : '播放'
}}
</p>
<p>
{{fileUploadItem
?.filePath.indexOf('.pdf') > -1 ? '点击阅读' : (fileUploadItem.learningStatus == '3' ? '不可播放' : '播放')
}}
</p>
</div>
</li>
</ul>
...
...
src/app/my/course-detail/course-detail.component.scss
View file @
0085e0cd
...
...
@@ -3,6 +3,7 @@
height
:
calc
(
100vh
-
70px
);
.courseInitShow
{
height
:
200px
;
background
:
rgba
(
237
,
237
,
237
,.
5
);
}
.courseTitle
{
padding
:
0
13px
;
...
...
@@ -14,7 +15,15 @@
h4
{
font-size
:
20px
;
color
:
#333
;
width
:
70%
;
flex
:
1
1
auto
;
width
:
0
;
}
.viewpdf
{
padding
:
3px
8px
;
background
:
#5f83ff
;
border-radius
:
5px
;
color
:
#fff
;
white-space
:
nowrap
;
}
}
.courseIntroContent
{
...
...
src/app/my/course-detail/course-detail.component.ts
View file @
0085e0cd
import
{
Component
,
ElementRef
,
OnInit
,
ViewChild
}
from
'@angular/core'
;
import
{
AfterViewInit
,
Component
,
ElementRef
,
OnDestroy
,
OnInit
,
ViewChild
}
from
'@angular/core'
;
import
{
ActivatedRoute
}
from
'@angular/router'
;
import
{
LifeCommonService
}
from
'src/app/common/life-common.service'
;
import
{
MyService
}
from
'../my.service'
;
...
...
@@ -8,23 +8,23 @@ import { MyService } from '../my.service';
templateUrl
:
'./course-detail.component.html'
,
styleUrls
:
[
'./course-detail.component.scss'
]
})
export
class
CourseDetailComponent
implements
OnInit
{
export
class
CourseDetailComponent
implements
OnInit
,
OnDestroy
{
@
ViewChild
(
'video'
)
video
:
ElementRef
;
pdfPath
:
any
;
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
;
public
fileUploadItem
:
any
;
public
fileUploadItemList
:
Array
<
any
>
;
public
customerId
:
string
=
localStorage
.
getItem
(
'lifeCustomerInfo'
)
?
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
)).
customerId
:
null
;
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
,
};
...
...
@@ -32,37 +32,54 @@ export class CourseDetailComponent implements OnInit {
this
.
state
[
key
]
=
false
;
}
constructor
(
private
activatedRoute
:
ActivatedRoute
,
private
myService
:
MyService
,
private
lifeCommonService
:
LifeCommonService
)
{
}
constructor
(
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
.
pdfPath
=
this
.
activatedRoute
.
snapshot
.
queryParams
[
'path'
];
this
.
lifeCustomerInfo
=
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
));
if
(
!
this
.
pdfPath
){
this
.
queryVideoPlayback
(
1
);
}
this
.
filePathQuery
(
this
.
status
,
this
.
fileId
)
this
.
filePathQuery
(
this
.
status
,
this
.
fileId
);
}
// tab切换
switchTab
(
type
){
switchTab
(
type
)
{
this
.
tabType
=
type
;
if
(
type
===
3
)
{
if
(
type
===
3
)
{
this
.
lecturerQuery
(
this
.
fileUploadItem
.
fileLecturerId
);
}
else
if
(
type
==
2
)
{
this
.
filePathQuery
(
this
.
status
,
null
)
}
else
{
this
.
filePathQuery
(
this
.
status
,
this
.
fileId
)
}
else
if
(
type
==
2
)
{
this
.
filePathQuery
(
this
.
status
,
null
)
}
else
{
this
.
filePathQuery
(
this
.
status
,
this
.
fileId
)
}
}
filePathQuery
(
status
,
fileId
){
this
.
myService
.
filePath
(
'3'
,
'0'
,
'23'
,
'yd_trainning_file_type'
,
null
,
this
.
customerId
,
status
,
fileId
).
subscribe
(
res
=>
{
if
(
res
[
'success'
]){
if
(
fileId
){
this
.
fileUploadItem
=
res
[
'data'
][
'fileUploadItemList'
]
?
res
[
'data'
][
'fileUploadItemList'
][
0
]
:
''
;
filePathQuery
(
status
,
fileId
)
{
this
.
myService
.
filePath
(
'3'
,
'0'
,
'23'
,
'yd_trainning_file_type'
,
null
,
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
(
'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
{
...
...
@@ -73,7 +90,9 @@ export class CourseDetailComponent implements OnInit {
}
else
{
this
.
video
.
nativeElement
.
setAttribute
(
'controlslist'
,
this
.
video
.
nativeElement
.
getAttribute
(
'controlslist'
))
}
}
else
{
})
}
}
else
{
this
.
fileUploadItemList
=
res
[
'data'
][
'fileUploadItemList'
];
}
...
...
@@ -82,37 +101,19 @@ export class CourseDetailComponent implements OnInit {
}
// 查询讲师信息
lecturerQuery
(
id
){
lecturerQuery
(
id
)
{
const
param
=
{
id
:
id
id
:
id
}
this
.
myService
.
lecturerQuery
(
param
).
subscribe
(
res
=>
{
if
(
res
[
'success'
])
{
this
.
myService
.
lecturerQuery
(
param
).
subscribe
(
res
=>
{
if
(
res
[
'success'
])
{
this
.
LecturerInfo
=
res
[
'data'
][
'lecturerInfos'
][
0
]
}
})
}
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
)
});
}
}
ngOnDestroy
():
void
{
if
(
!
this
.
pdfPath
)
{
if
(
this
.
canplay
)
{
clearInterval
(
this
.
timer
);
clearInterval
(
this
.
timer2
);
this
.
saveVideoPlayback
();
...
...
@@ -148,17 +149,17 @@ export class CourseDetailComponent implements OnInit {
if
(
res
[
'success'
])
{
this
.
videoPlaybacks
=
res
[
'data'
][
'videoPlaybacks'
];
this
.
maxViewTime
=
this
.
videoPlaybacks
[
0
]
?
this
.
videoPlaybacks
[
0
][
'maxViewTime'
]
:
0
;
if
(
type
===
1
)
{
if
(
type
===
1
)
{
// 设置开始播放时间为上次离开时间
this
.
originTime
=
this
.
video
.
nativeElement
.
currentTime
=
this
.
videoPlaybacks
.
length
>
0
?
this
.
videoPlaybacks
[
0
][
'viewTime'
]
:
0
;
}
else
{
}
else
{
// 监测有没有拖动进度条
this
.
timer2
=
setInterval
(()
=>
{
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
)
},
500
)
}
}
else
{
this
.
video
.
nativeElement
.
currentTime
=
0
;
...
...
@@ -166,15 +167,18 @@ export class CourseDetailComponent implements OnInit {
})
}
download
(
path
)
{
download
(
path
)
{
window
.
open
(
path
)
}
selectVideo
(
val
)
{
if
(
val
.
learningStatus
==
'3'
)
{
selectVideo
(
val
)
{
if
(
val
.
learningStatus
==
'3'
)
{
this
.
state
.
modal1
=
true
;
}
else
{
this
.
filePathQuery
(
val
.
learningStatus
,
val
.
fileId
)
}
else
{
this
.
filePathQuery
(
val
.
learningStatus
,
val
.
fileId
);
document
.
body
.
scroll
({
top
:
0
,
left
:
0
,
behavior
:
'smooth'
})
}
}
...
...
src/app/my/more-features/more-features.component.ts
View file @
0085e0cd
...
...
@@ -53,10 +53,12 @@ export class MoreFeaturesComponent implements OnInit,OnDestroy {
{
no
:
23
,
name
:
'保险ABC'
,
icon
:
'insuranceABC'
,
link
:
''
,
path
:
`https://
${
window
.
location
.
host
}
/issue`
,
isOpen
:
true
},
{
no
:
24
,
name
:
'岗前训'
,
icon
:
'preJobTraining'
,
link
:
'/prejobTraining'
,
path
:
''
,
isOpen
:
true
},
{
no
:
25
,
name
:
'新人训'
,
icon
:
'newTraining'
,
link
:
'/newTraining'
,
path
:
''
,
isOpen
:
true
},
{
no
:
27
,
name
:
'CFFP初级训'
,
icon
:
'cffpTraining'
,
link
:
'/cffpElementaryTraining'
,
path
:
''
,
isOpen
:
true
},
{
no
:
26
,
name
:
'提升训'
,
icon
:
'promotionTraining'
,
link
:
'/advanceTraining'
,
path
:
''
,
isOpen
:
true
},
{
no
:
27
,
name
:
'CFFP培训'
,
icon
:
'cffpTraining'
,
link
:
'/cffpTraining'
,
path
:
''
,
isOpen
:
true
},
{
no
:
27
,
name
:
'CFFP衔接训'
,
icon
:
'cffpTraining'
,
link
:
'/cffpBridgingTraining'
,
path
:
''
,
isOpen
:
true
},
{
no
:
27
,
name
:
'CFFP高阶训'
,
icon
:
'cffpTraining'
,
link
:
'/cffpAdvancedTraining'
,
path
:
''
,
isOpen
:
true
},
{
no
:
28
,
name
:
'产品培训'
,
icon
:
'productTraining'
,
link
:
'/productTraining'
,
path
:
''
,
isOpen
:
true
},
{
no
:
29
,
name
:
'我的培训'
,
icon
:
'training'
,
link
:
'
'
,
path
:
''
,
isOpen
:
fals
e
},
{
no
:
29
,
name
:
'我的培训'
,
icon
:
'training'
,
link
:
'
/myTraining'
,
path
:
''
,
isOpen
:
tru
e
},
]
}
,{
...
...
src/app/my/my-routing.module.ts
View file @
0085e0cd
...
...
@@ -90,13 +90,14 @@ const myRoutes: Routes = [
{
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
:
'advanceTraining'
,
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
:
'重要公告'
}]
},
...
...
@@ -182,7 +183,7 @@ const myRoutes: Routes = [
{
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
:
'pdfView
/:fileId
'
,
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
:
'我的'
}]},
...
...
src/app/my/training-records/training-records.component.html
View file @
0085e0cd
...
...
@@ -24,5 +24,5 @@
</li>
</ul>
<h4
*
ngIf=
"!fileUploadItemList"
>
暂无课程列表
</h4>
<h4
*
ngIf=
"!fileUploadItemList
|| (fileUploadItemList && fileUploadItemList.length<1)
"
>
暂无课程列表
</h4>
</div>
\ No newline at end of file
src/app/my/training-records/training-records.component.scss
View file @
0085e0cd
...
...
@@ -10,16 +10,17 @@
margin-bottom
:
10px
;
>
div
:first-child
{
margin-right
:
7px
;
width
:
114px
;
width
:
0
;
height
:
104px
;
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
;
...
...
src/app/my/training-records/training-records.component.ts
View file @
0085e0cd
...
...
@@ -8,6 +8,7 @@ import { MyService } from '../my.service';
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
>
;
...
...
@@ -16,19 +17,26 @@ export class TrainingRecordsComponent implements OnInit {
filePathQuery
(
status
){
this
.
myService
.
filePath
(
3
,
0
,
23
,
'yd_trainning_file_type'
,
null
,
this
.
customerId
,
status
).
subscribe
(
res
=>
{
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
)
{
}
constructor
(
private
activatedRoute
:
ActivatedRoute
,
private
myService
:
MyService
)
{
this
.
type
=
this
.
activatedRoute
.
snapshot
[
'data'
][
0
][
'type'
]
}
ngOnInit
()
{
this
.
status
=
this
.
activatedRoute
.
snapshot
.
params
[
'status'
];
if
(
this
.
type
===
'yd_trainning_file_type'
){
const
code
=
this
.
activatedRoute
.
snapshot
.
routeConfig
.
path
;
this
.
filePathQuery
(
null
,
code
)
}
else
{
this
.
filePathQuery
(
this
.
status
)
}
}
...
...
src/app/my/yd-college/yd-college.component.ts
View file @
0085e0cd
...
...
@@ -11,10 +11,12 @@ export class YdCollegeComponent implements OnInit {
{
no
:
23
,
name
:
'保险ABC'
,
icon
:
'insuranceABC'
,
link
:
''
,
path
:
`https://
${
window
.
location
.
host
}
/issue`
,
isOpen
:
true
},
{
no
:
24
,
name
:
'岗前训'
,
icon
:
'preJobTraining'
,
link
:
'/prejobTraining'
,
path
:
''
,
isOpen
:
true
},
{
no
:
25
,
name
:
'新人训'
,
icon
:
'newTraining'
,
link
:
'/newTraining'
,
path
:
''
,
isOpen
:
true
},
{
no
:
26
,
name
:
'提升训'
,
icon
:
'promotionTraining'
,
link
:
'/advanceTraining'
,
path
:
''
,
isOpen
:
true
},
{
no
:
27
,
name
:
'CFFP培训'
,
icon
:
'cffpTraining'
,
link
:
'/cffpTraining'
,
path
:
''
,
isOpen
:
true
},
{
no
:
28
,
name
:
'产品培训'
,
icon
:
'productTraining'
,
link
:
'/productTraining'
,
path
:
''
,
isOpen
:
true
},
{
no
:
29
,
name
:
'我的培训'
,
icon
:
'training'
,
link
:
'/myTraining'
,
path
:
''
,
isOpen
:
true
}
{
no
:
26
,
name
:
'CFFP初级训'
,
icon
:
'cffpTraining'
,
link
:
'/cffpElementaryTraining'
,
path
:
''
,
isOpen
:
true
},
{
no
:
27
,
name
:
'提升训'
,
icon
:
'promotionTraining'
,
link
:
'/advanceTraining'
,
path
:
''
,
isOpen
:
true
},
{
no
:
28
,
name
:
'CFFP衔接训'
,
icon
:
'cffpTraining'
,
link
:
'/cffpBridgingTraining'
,
path
:
''
,
isOpen
:
true
},
{
no
:
29
,
name
:
'CFFP高阶训'
,
icon
:
'cffpTraining'
,
link
:
'/cffpAdvancedTraining'
,
path
:
''
,
isOpen
:
true
},
{
no
:
30
,
name
:
'产品培训'
,
icon
:
'productTraining'
,
link
:
'/productTraining'
,
path
:
''
,
isOpen
:
true
},
{
no
:
31
,
name
:
'我的培训'
,
icon
:
'training'
,
link
:
'/myTraining'
,
path
:
''
,
isOpen
:
true
}
]
public
state
=
{
modal1
:
false
...
...
src/assets/images/indexIcons/training.png
View file @
0085e0cd
1.31 KB
|
W:
|
H:
3.98 KB
|
W:
|
H:
2-up
Swipe
Onion skin
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment