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
8fec8ce2
Commit
8fec8ce2
authored
Feb 07, 2023
by
sunchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
银盾学院权限控制
parent
2b0e433b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
21 deletions
+57
-21
src/app/my/more-features/more-features.component.html
+6
-4
src/app/my/more-features/more-features.component.ts
+0
-0
src/app/my/my.service.ts
+6
-1
src/app/my/yd-college/yd-college.component.html
+8
-6
src/app/my/yd-college/yd-college.component.ts
+37
-10
No files found.
src/app/my/more-features/more-features.component.html
View file @
8fec8ce2
...
@@ -2,10 +2,12 @@
...
@@ -2,10 +2,12 @@
<h5>
{{item.title}}
</h5>
<h5>
{{item.title}}
</h5>
<ul>
<ul>
<li
*
ngFor=
"let subItem of item.subItems"
(
click
)="
featureSelect
(
subItem
)"
>
<li
*
ngFor=
"let subItem of item.subItems"
(
click
)="
featureSelect
(
subItem
)"
>
<div>
<ng-container
*
ngIf=
"subItem.isShow"
>
<img
[
src
]="'
assets
/
images
/
indexIcons
/'
+
subItem
.
icon
+
'.
png
'"
alt=
""
>
<div>
</div>
<img
[
src
]="'
assets
/
images
/
indexIcons
/'
+
subItem
.
icon
+
'.
png
'"
alt=
""
>
<p>
{{subItem.name}}
</p>
</div>
<p>
{{subItem.name}}
</p>
</ng-container>
</li>
</li>
</ul>
</ul>
</div>
</div>
...
...
src/app/my/more-features/more-features.component.ts
View file @
8fec8ce2
This diff is collapsed.
Click to expand it.
src/app/my/my.service.ts
View file @
8fec8ce2
...
@@ -948,5 +948,10 @@ export class MyService {
...
@@ -948,5 +948,10 @@ export class MyService {
const
url
=
this
.
API
+
"/commission/queryCommissionInfoByYdLife"
;
const
url
=
this
.
API
+
"/commission/queryCommissionInfoByYdLife"
;
return
this
.
http
.
post
(
url
,
JSON
.
stringify
(
params
))
return
this
.
http
.
post
(
url
,
JSON
.
stringify
(
params
))
}
}
//是否可见银盾学院
queryCanSee
(
params
){
const
url
=
this
.
ydapi
+
"/practitioner/queryCanSee"
;
return
this
.
http
.
post
(
url
,
JSON
.
stringify
(
params
))
}
}
}
src/app/my/yd-college/yd-college.component.html
View file @
8fec8ce2
<ul>
<ul>
<li
*
ngFor=
"let subItem of courseLists"
(
click
)="
featureSelect
(
subItem
)"
>
<ng-container
*
ngFor=
"let subItem of courseLists"
>
<div>
<li
(
click
)="
featureSelect
(
subItem
)"
*
ngIf=
"subItem.isShow"
>
<img
[
src
]="'
assets
/
images
/
indexIcons
/'
+
subItem
.
icon
+
'.
png
'"
alt=
""
>
<div>
</div>
<img
[
src
]="'
assets
/
images
/
indexIcons
/'
+
subItem
.
icon
+
'.
png
'"
alt=
""
>
<p>
{{subItem.name}}
</p>
</div>
</li>
<p>
{{subItem.name}}
</p>
</li>
</ng-container>
</ul>
</ul>
<Modal
[(
ngModel
)]="
this
.
state
.
modal1
"
[
transparent
]="
true
"
[
maskClosable
]="
true
"
(
onClose
)="
onClose
('
modal1
')"
>
<Modal
[(
ngModel
)]="
this
.
state
.
modal1
"
[
transparent
]="
true
"
[
maskClosable
]="
true
"
(
onClose
)="
onClose
('
modal1
')"
>
<div
[
ngStyle
]="{
height:
100
,
overflow:
'
scroll
',
color:
'#
000
'
}"
>
<div
[
ngStyle
]="{
height:
100
,
overflow:
'
scroll
',
color:
'#
000
'
}"
>
...
...
src/app/my/yd-college/yd-college.component.ts
View file @
8fec8ce2
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Router
}
from
'@angular/router'
;
import
{
Router
}
from
'@angular/router'
;
import
{
MyService
}
from
'../my.service'
;
@
Component
({
@
Component
({
selector
:
'ydlife-yd-college'
,
selector
:
'ydlife-yd-college'
,
...
@@ -7,16 +8,18 @@ import { Router } from '@angular/router';
...
@@ -7,16 +8,18 @@ import { Router } from '@angular/router';
styleUrls
:
[
'./yd-college.component.scss'
]
styleUrls
:
[
'./yd-college.component.scss'
]
})
})
export
class
YdCollegeComponent
implements
OnInit
{
export
class
YdCollegeComponent
implements
OnInit
{
canSeeSchool
:
Boolean
=
false
;
lifeCustomerInfo
:
any
=
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
))
?
JSON
.
parse
(
localStorage
.
getItem
(
'lifeCustomerInfo'
))
:
null
;
public
courseLists
=
[
public
courseLists
=
[
{
no
:
23
,
name
:
'保险ABC'
,
icon
:
'insuranceABC'
,
link
:
''
,
path
:
`https://
${
window
.
location
.
host
}
/issue`
,
isOpen
:
true
},
{
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
},
{
no
:
24
,
name
:
'岗前训'
,
icon
:
'preJobTraining'
,
link
:
'/preJobTraining'
,
path
:
''
,
isOpen
:
true
,
isShow
:
this
.
canSeeSchool
},
{
no
:
25
,
name
:
'新人训'
,
icon
:
'newTraining'
,
link
:
'/newTraining'
,
path
:
''
,
isOpen
:
true
},
{
no
:
25
,
name
:
'新人训'
,
icon
:
'newTraining'
,
link
:
'/newTraining'
,
path
:
''
,
isOpen
:
true
,
isShow
:
this
.
canSeeSchool
},
{
no
:
26
,
name
:
'CFFP初级训'
,
icon
:
'cffpElementaryTraining'
,
link
:
'/cffpElementaryTraining'
,
path
:
''
,
isOpen
:
true
},
{
no
:
26
,
name
:
'CFFP初级训'
,
icon
:
'cffpElementaryTraining'
,
link
:
'/cffpElementaryTraining'
,
path
:
''
,
isOpen
:
true
,
isShow
:
this
.
canSeeSchool
},
{
no
:
27
,
name
:
'提升训'
,
icon
:
'promotionTraining'
,
link
:
'/promotionTraining'
,
path
:
''
,
isOpen
:
true
},
{
no
:
27
,
name
:
'提升训'
,
icon
:
'promotionTraining'
,
link
:
'/promotionTraining'
,
path
:
''
,
isOpen
:
true
,
isShow
:
this
.
canSeeSchool
},
{
no
:
28
,
name
:
'CFFP衔接训'
,
icon
:
'cffpBridgingTraining'
,
link
:
'/cffpBridgingTraining'
,
path
:
''
,
isOpen
:
true
},
{
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
},
{
no
:
29
,
name
:
'CFFP高阶训'
,
icon
:
'cffpAdvancedTraining'
,
link
:
'/cffpAdvancedTraining'
,
path
:
''
,
isOpen
:
true
,
isShow
:
this
.
canSeeSchool
},
{
no
:
30
,
name
:
'产品培训'
,
icon
:
'productTraining'
,
link
:
'/productTraining'
,
path
:
''
,
isOpen
:
true
},
{
no
:
30
,
name
:
'产品培训'
,
icon
:
'productTraining'
,
link
:
'/productTraining'
,
path
:
''
,
isOpen
:
true
,
isShow
:
this
.
canSeeSchool
},
{
no
:
31
,
name
:
'我的培训'
,
icon
:
'training'
,
link
:
'/myTraining'
,
path
:
''
,
isOpen
:
true
}
{
no
:
31
,
name
:
'我的培训'
,
icon
:
'training'
,
link
:
'/myTraining'
,
path
:
''
,
isOpen
:
true
,
isShow
:
this
.
canSeeSchool
}
]
]
public
state
=
{
public
state
=
{
modal1
:
false
modal1
:
false
...
@@ -35,9 +38,33 @@ export class YdCollegeComponent implements OnInit {
...
@@ -35,9 +38,33 @@ export class YdCollegeComponent implements OnInit {
this
.
router
.
navigate
([
`./
${
item
.
link
}
`
]);
this
.
router
.
navigate
([
`./
${
item
.
link
}
`
]);
}
}
}
}
constructor
(
private
router
:
Router
)
{
}
constructor
(
private
router
:
Router
,
private
myService
:
MyService
)
{
}
ngOnInit
()
{
ngOnInit
()
{
this
.
queryCanSee
()
}
getMenu
(){
this
.
courseLists
=
[
{
no
:
23
,
name
:
'保险ABC'
,
icon
:
'insuranceABC'
,
link
:
''
,
path
:
`https://
${
window
.
location
.
host
}
/issue`
,
isOpen
:
true
,
isShow
:
true
},
{
no
:
24
,
name
:
'岗前训'
,
icon
:
'preJobTraining'
,
link
:
'/preJobTraining'
,
path
:
''
,
isOpen
:
true
,
isShow
:
this
.
canSeeSchool
},
{
no
:
25
,
name
:
'新人训'
,
icon
:
'newTraining'
,
link
:
'/newTraining'
,
path
:
''
,
isOpen
:
true
,
isShow
:
this
.
canSeeSchool
},
{
no
:
26
,
name
:
'CFFP初级训'
,
icon
:
'cffpElementaryTraining'
,
link
:
'/cffpElementaryTraining'
,
path
:
''
,
isOpen
:
true
,
isShow
:
this
.
canSeeSchool
},
{
no
:
27
,
name
:
'提升训'
,
icon
:
'promotionTraining'
,
link
:
'/promotionTraining'
,
path
:
''
,
isOpen
:
true
,
isShow
:
this
.
canSeeSchool
},
{
no
:
28
,
name
:
'CFFP衔接训'
,
icon
:
'cffpBridgingTraining'
,
link
:
'/cffpBridgingTraining'
,
path
:
''
,
isOpen
:
true
,
isShow
:
this
.
canSeeSchool
},
{
no
:
29
,
name
:
'CFFP高阶训'
,
icon
:
'cffpAdvancedTraining'
,
link
:
'/cffpAdvancedTraining'
,
path
:
''
,
isOpen
:
true
,
isShow
:
this
.
canSeeSchool
},
{
no
:
30
,
name
:
'产品培训'
,
icon
:
'productTraining'
,
link
:
'/productTraining'
,
path
:
''
,
isOpen
:
true
,
isShow
:
this
.
canSeeSchool
},
{
no
:
31
,
name
:
'我的培训'
,
icon
:
'training'
,
link
:
'/myTraining'
,
path
:
''
,
isOpen
:
true
,
isShow
:
this
.
canSeeSchool
}
]
}
queryCanSee
(){
this
.
myService
.
queryCanSee
({
practitionerId
:
this
.
lifeCustomerInfo
?
this
.
lifeCustomerInfo
[
'practitionerId'
]:
null
,}).
subscribe
((
res
)
=>
{
if
(
res
[
'success'
]){
this
.
canSeeSchool
=
res
[
'data'
][
'canSeeYdCollege'
]
==
1
?
true
:
false
;
}
this
.
getMenu
()
})
}
}
}
}
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