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
5c4c35bf
Commit
5c4c35bf
authored
Jan 19, 2024
by
zeyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
银盾学院,CFFP课程模块增加权限控制
parent
e31a1c0f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
22 deletions
+43
-22
src/app/my/more-features/more-features.component.html
+8
-5
src/app/my/more-features/more-features.component.scss
+6
-4
src/app/my/more-features/more-features.component.ts
+0
-0
src/app/my/my-center-home/my-center-home.component.ts
+20
-2
src/app/my/my-routing.module.ts
+1
-0
src/app/my/yd-college/yd-college.component.ts
+8
-11
No files found.
src/app/my/more-features/more-features.component.html
View file @
5c4c35bf
<div
*
ngFor=
"let item of feartureLists"
class=
"featureListsContent"
>
<h5>
{{item.title}}
</h5>
<ul>
<li
*
ngFor=
"let subItem of item.subItems"
(
click
)="
featureSelect
(
subItem
)"
>
<ng-container
*
ngIf=
"subItem.isShow"
>
<div
class=
"ul"
>
<div
class=
"li"
*
ngFor=
"let subItem of item.subItems"
(
click
)="
featureSelect
(
subItem
)"
>
<div
class=
"ll"
*
ngIf=
"subItem.isShow"
>
<ng-container
>
<div>
<img
[
src
]="'
assets
/
images
/
indexIcons
/'
+
subItem
.
icon
+
'.
png
'"
alt=
""
>
</div>
<p>
{{subItem.name}}
</p>
</ng-container>
</li>
</ul>
</div>
</div>
</div>
</div>
<Modal
[(
ngModel
)]="
this
.
state
.
modal1
"
[
transparent
]="
true
"
[
maskClosable
]="
true
"
(
onClose
)="
onClose
('
modal1
')"
>
...
...
src/app/my/more-features/more-features.component.scss
View file @
5c4c35bf
...
...
@@ -18,12 +18,12 @@ header{
margin-bottom
:
10px
;
font-weight
:
bold
;
}
ul
{
.
ul
{
display
:
flex
;
flex-wrap
:
wrap
;
li
{
width
:
0
;
flex
:
0
0
25%
;
.
li
{
.ll
{
width
:
90px
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
...
...
@@ -37,4 +37,5 @@ header{
}
}
}
}
}
\ No newline at end of file
src/app/my/more-features/more-features.component.ts
View file @
5c4c35bf
This diff is collapsed.
Click to expand it.
src/app/my/my-center-home/my-center-home.component.ts
View file @
5c4c35bf
...
...
@@ -21,12 +21,13 @@ 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
:
'ydCollege'
,
link
:
'/ydCollege'
,
isOpen
:
true
},
{
key
:
'07'
,
name
:
'更多功能'
,
icon
:
'more'
,
link
:
'/moreFeatures'
,
isOpen
:
true
}
]
public
bannerLists
=
[];
public
hotProductLists
=
[];
public
onlineProductLists
=
[];
lifeCustomerInfo
:
any
=
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
))
?
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
))
:
null
;
canSeeSchool
:
any
=
''
;
state
=
{
modal1
:
false
,
};
...
...
@@ -145,6 +146,22 @@ export class MyCenterHomeComponent implements OnInit {
return
;
}
}
queryCanSee
(){
this
.
myService
.
queryCanSee
({
practitionerId
:
this
.
lifeCustomerInfo
?
this
.
lifeCustomerInfo
[
'practitionerId'
]:
null
,}).
subscribe
((
res
)
=>
{
if
(
res
[
'success'
]){
this
.
canSeeSchool
=
res
[
'data'
][
'canSeeYdCollege'
];
if
(
this
.
canSeeSchool
.
includes
(
'insuranceABC'
)
||
this
.
canSeeSchool
.
includes
(
'preJobTraining'
)
||
this
.
canSeeSchool
.
includes
(
'newTraining'
)
||
this
.
canSeeSchool
.
includes
(
'promotionTraining'
)
||
this
.
canSeeSchool
.
includes
(
'productTraining'
)
||
this
.
canSeeSchool
.
includes
(
'myTraining'
))
{
this
.
featureLists
.
push
({
key
:
'06'
,
name
:
'银盾学院'
,
icon
:
'ydCollege'
,
link
:
'/ydCollege'
,
isOpen
:
true
},);
}
else
{
this
.
featureLists
.
push
({
key
:
'06'
,
name
:
'新人入口'
,
icon
:
'potentialCustomers'
,
link
:
'/newPeople'
,
isOpen
:
true
});
}
this
.
featureLists
.
push
({
key
:
'07'
,
name
:
'更多功能'
,
icon
:
'more'
,
link
:
'/moreFeatures'
,
isOpen
:
true
});
}
})
}
constructor
(
private
myService
:
MyService
,
private
router
:
Router
,
private
lifeCommonService
:
LifeCommonService
)
{
}
ngOnInit
():
void
{
this
.
filePathQuery
()
...
...
@@ -156,6 +173,7 @@ export class MyCenterHomeComponent implements OnInit {
this
.
announcementQuery
();
// 查询未读消息总数
this
.
querySystemMessage
();
this
.
queryCanSee
();
}
}
...
...
src/app/my/my-routing.module.ts
View file @
5c4c35bf
...
...
@@ -100,6 +100,7 @@ const myRoutes: Routes = [
{
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
:
'cffpIntermediateTraining'
,
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
:
'重要公告'
}]},
...
...
src/app/my/yd-college/yd-college.component.ts
View file @
5c4c35bf
...
...
@@ -8,7 +8,7 @@ import { MyService } from '../my.service';
styleUrls
:
[
'./yd-college.component.scss'
]
})
export
class
YdCollegeComponent
implements
OnInit
{
canSeeSchool
:
Boolean
=
false
;
canSeeSchool
:
any
=
''
;
lifeCustomerInfo
:
any
=
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
))
?
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
))
:
null
;
public
courseLists
=
[
{
no
:
23
,
name
:
'保险ABC'
,
icon
:
'insuranceABC'
,
link
:
''
,
path
:
`https://
${
window
.
location
.
host
}
/issue`
,
isOpen
:
true
,
isShow
:
true
},
...
...
@@ -46,22 +46,19 @@ export class YdCollegeComponent implements OnInit {
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
}
{
no
:
23
,
name
:
'保险ABC'
,
icon
:
'insuranceABC'
,
link
:
''
,
path
:
`https://
${
window
.
location
.
host
}
/issue`
,
isOpen
:
true
,
isShow
:
this
.
canSeeSchool
.
includes
(
'insuranceABC'
)},
{
no
:
24
,
name
:
'岗前训'
,
icon
:
'preJobTraining'
,
link
:
'/preJobTraining'
,
path
:
''
,
isOpen
:
true
,
isShow
:
this
.
canSeeSchool
.
includes
(
'preJobTraining'
)},
{
no
:
25
,
name
:
'新人训'
,
icon
:
'newTraining'
,
link
:
'/newTraining'
,
path
:
''
,
isOpen
:
true
,
isShow
:
this
.
canSeeSchool
.
includes
(
'newTraining'
)},
{
no
:
27
,
name
:
'提升训'
,
icon
:
'promotionTraining'
,
link
:
'/promotionTraining'
,
path
:
''
,
isOpen
:
true
,
isShow
:
this
.
canSeeSchool
.
includes
(
'promotionTraining'
)},
{
no
:
30
,
name
:
'产品培训'
,
icon
:
'productTraining'
,
link
:
'/productTraining'
,
path
:
''
,
isOpen
:
true
,
isShow
:
this
.
canSeeSchool
.
includes
(
'productTraining'
)},
{
no
:
31
,
name
:
'我的培训'
,
icon
:
'training'
,
link
:
'/myTraining'
,
path
:
''
,
isOpen
:
true
,
isShow
:
this
.
canSeeSchool
.
includes
(
'myTraining'
)}
]
}
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
.
canSeeSchool
=
res
[
'data'
][
'canSeeYdCollege'
];
}
this
.
getMenu
()
})
...
...
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