Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
smart
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqinghua
smart
Commits
3d887bdf
Commit
3d887bdf
authored
Dec 18, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
78038505
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
163 additions
and
70 deletions
+163
-70
auth.interceptor.ts
src/main/webapp/app/blocks/interceptor/auth.interceptor.ts
+2
-1
sidebar.component.html
src/main/webapp/app/layouts/sidebar/sidebar.component.html
+1
-1
sidebar.component.ts
src/main/webapp/app/layouts/sidebar/sidebar.component.ts
+6
-0
basic-detail.component.ts
.../app/overAll/basic/basic-detail/basic-detail.component.ts
+3
-3
auth-jwt.service.ts
src/main/webapp/app/shared/auth/auth-jwt.service.ts
+0
-1
group.component.html
src/main/webapp/app/system/group/group.component.html
+1
-1
group.component.ts
src/main/webapp/app/system/group/group.component.ts
+5
-3
separation.component.html
...app/app/system/modal/separation/separation.component.html
+19
-8
separation.component.ts
...ebapp/app/system/modal/separation/separation.component.ts
+94
-50
system.service.ts
src/main/webapp/app/system/system.service.ts
+32
-2
No files found.
src/main/webapp/app/blocks/interceptor/auth.interceptor.ts
View file @
3d887bdf
...
...
@@ -22,7 +22,8 @@ export class AuthInterceptor implements HttpInterceptor {
if
(
!!
token
)
{
request
=
request
.
clone
({
setHeaders
:
{
accessToken
:
token
accessToken
:
token
,
moduleId
:
this
.
localStorage
.
retrieve
(
"moduleId"
)
}
});
}
...
...
src/main/webapp/app/layouts/sidebar/sidebar.component.html
View file @
3d887bdf
...
...
@@ -7,7 +7,7 @@
<span
title
><i
class=
"icon iconfont icon-{{item.imageUrl}}"
></i>
{{item.name}}
</span>
<ul>
<ng-container
*
ngFor=
"let child of item.children"
>
<li
nz-menu-item
routerLink=
"{{child.url}}
"
>
{{child.name}}
</li>
<li
nz-menu-item
(
click
)="
goToRoute
(
child
)
"
>
{{child.name}}
</li>
</ng-container>
</ul>
</li>
...
...
src/main/webapp/app/layouts/sidebar/sidebar.component.ts
View file @
3d887bdf
...
...
@@ -297,4 +297,10 @@ export class SidebarComponent implements OnInit {
goTo
(
route
)
{
this
.
router
.
navigate
([
route
]);
}
goToRoute
(
node
){
console
.
log
(
node
);
this
.
$localStorage
.
store
(
"moduleId"
,
node
.
id
);
this
.
router
.
navigate
([
"app/main/"
+
node
.
url
]);
}
}
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.ts
View file @
3d887bdf
...
...
@@ -699,15 +699,15 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
nzOkType
:
'danger'
,
nzOnOk
:
()
=>
{
const
data
=
{
param
s
:[
item
.
itemid
]
itemId
s
:[
item
.
itemid
]
};
this
.
overAllSer
.
deleteItem
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
message
.
info
(
'删除成功'
);
this
.
message
.
success
(
'删除成功'
);
this
.
getCheckList
(
null
);
}
else
{
this
.
message
.
info
(
res
.
errMsg
);
this
.
message
.
error
(
res
.
errMsg
);
}
}
);
...
...
src/main/webapp/app/shared/auth/auth-jwt.service.ts
View file @
3d887bdf
...
...
@@ -16,7 +16,6 @@ export class AuthServerProvider {
)
{}
getToken
()
{
return
this
.
$localStorage
.
retrieve
(
'authenticationToken'
)
||
this
.
$sessionStorage
.
retrieve
(
'authenticationToken'
);
}
...
...
src/main/webapp/app/system/group/group.component.html
View file @
3d887bdf
...
...
@@ -39,7 +39,7 @@
<span
class=
"custom-node"
draggable=
"true"
aria-grabbed=
"true"
[
class
.
active
]="
node
.
isSelected
"
>
<span>
{{node.title}}
<i
(
click
)="
editGroup
(
node
)"
style=
"margin
-left: 20px;"
class=
"anticon anticon-edit
"
></i>
<i
(
click
)="
editGroup
(
node
)"
style=
"margin
:0 10px 0 20px;"
class=
"anticon anticon-form
"
></i>
<i
(
click
)="
deleteGroup
(
node
)"
class=
"anticon anticon-close-circle-o"
></i>
</span>
</span>
...
...
src/main/webapp/app/system/group/group.component.ts
View file @
3d887bdf
...
...
@@ -61,9 +61,11 @@ export class GroupComponent implements OnInit {
getUser
()
{
const
data
=
{
'name'
:
''
,
'orgId'
:
''
,
'pageNumber'
:
'1'
,
'userBo'
:
{
search
:
null
,
organizationId
:
null
},
'pageNum'
:
'1'
,
'pageSize'
:
'10'
};
this
.
systemSer
.
user
(
data
).
subscribe
(
...
...
src/main/webapp/app/system/modal/separation/separation.component.html
View file @
3d887bdf
...
...
@@ -2,12 +2,23 @@
<div
style=
"position: absolute;left:20%;top: 15px;"
>
<nz-switch
[(
ngModel
)]="
first
.
check
"
(
ngModelChange
)="
changeValue
('
1
')"
></nz-switch>
</div>
<form
nz-form
>
<nz-form-item
*
ngFor=
"let item of list;let i = index;"
>
<nz-form-label
[
nzSm
]="
8
"
[
nzXs
]="
24
"
[
ngModelOptions
]="{
standalone:
true
}"
>
{{item.comment}}
</nz-form-label>
<nz-form-control
[
nzSm
]="
14
"
[
nzXs
]="
24
"
>
<nz-switch
[(
ngModel
)]="
item
.
check
"
[
ngModelOptions
]="{
standalone:
true
}"
(
ngModelChange
)="
changeValue
(
i
+
2
)"
></nz-switch>
</nz-form-control>
</nz-form-item>
</form>
<!--<div disabled="{{isDisabled}}">-->
<form
nz-form
>
<nz-form-item
>
<nz-form-label
[
nzSm
]="
8
"
[
nzXs
]="
24
"
[
ngModelOptions
]="{
standalone:
true
}"
>
{{second?.comment}}
</nz-form-label>
<nz-form-control
[
nzSm
]="
14
"
[
nzXs
]="
24
"
>
<nz-switch
[(
ngModel
)]="
second
.
check
"
[
ngModelOptions
]="{
standalone:
true
}"
(
ngModelChange
)="
changeValue
('
2
')"
></nz-switch>
</nz-form-control>
</nz-form-item>
</form>
<form
nz-form
>
<nz-form-item
>
<nz-form-label
[
nzSm
]="
8
"
[
nzXs
]="
24
"
[
ngModelOptions
]="{
standalone:
true
}"
>
{{third?.comment}}
</nz-form-label>
<nz-form-control
[
nzSm
]="
14
"
[
nzXs
]="
24
"
>
<nz-switch
[(
ngModel
)]="
third
.
check
"
[
ngModelOptions
]="{
standalone:
true
}"
(
ngModelChange
)="
changeValue
('
3
')"
></nz-switch>
</nz-form-control>
</nz-form-item>
</form>
<!--</div>-->
</nz-modal>
src/main/webapp/app/system/modal/separation/separation.component.ts
View file @
3d887bdf
...
...
@@ -10,6 +10,7 @@ import {NzMessageService} from 'ng-zorro-antd';
export
class
SeparationComponent
implements
OnInit
{
isVisible
=
false
;
isDisabled
=
false
;
title
;
list
=
[];
value
=
0
;
...
...
@@ -18,6 +19,16 @@ export class SeparationComponent implements OnInit {
scValue
:
null
,
check
:
null
};
second
=
{
id
:
""
,
scValue
:
null
,
check
:
null
};
third
=
{
id
:
""
,
scValue
:
null
,
check
:
null
};
constructor
(
private
systemSer
:
SystemService
,
private
message
:
NzMessageService
)
{
}
...
...
@@ -30,20 +41,11 @@ export class SeparationComponent implements OnInit {
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
first
=
res
.
data
[
0
];
if
(
this
.
first
.
scValue
==
1
){
this
.
first
.
check
=
true
;
}
else
{
this
.
first
.
check
=
false
;
}
res
.
data
.
splice
(
0
,
1
);
this
.
list
=
res
.
data
;
this
.
list
.
forEach
(
e
=>
{
if
(
e
.
scValue
==
1
){
e
.
check
=
true
;
}
else
{
e
.
check
=
false
;
}
})
this
.
second
=
res
.
data
[
1
];
this
.
third
=
res
.
data
[
2
];
this
.
first
.
check
=
this
.
first
.
scValue
==
1
?
true
:
false
;
this
.
second
.
check
=
this
.
second
.
scValue
==
1
?
true
:
false
;
this
.
third
.
check
=
this
.
third
.
scValue
==
1
?
true
:
false
;
}
}
);
...
...
@@ -60,44 +62,86 @@ export class SeparationComponent implements OnInit {
}
changeValue
(
type
)
{
let
arr
=
{
check
:
""
,
scValue
:
null
,
id
:
""
};
if
(
type
==
"1"
)
{
arr
=
this
.
first
;
}
if
(
type
==
"2"
)
{
arr
=
this
.
list
[
0
];
}
if
(
type
==
"3"
)
{
arr
=
this
.
list
[
1
];
}
if
(
arr
.
check
)
{
arr
.
scValue
=
1
;
}
else
{
arr
.
scValue
=
0
;
}
const
data
=
{
id
:
arr
.
id
,
scValue
:
arr
.
scValue
,
};
this
.
systemSer
.
updateValue
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
this
.
first
.
check
)
{
this
.
message
.
success
(
"已开启三员分立功能"
);
}
else
{
this
.
message
.
success
(
"已关闭三员分立功能"
);
}
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
switch
(
type
)
{
case
"1"
:{
if
(
this
.
first
.
check
){
this
.
systemSer
.
separationConfigOpen
().
subscribe
(
(
res
)
=>
{
if
(
res
.
data
==
1
)
{
this
.
message
.
success
(
"已开启三员分立功能"
);
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
this
.
separationPowerStatus
();
}
)
}
else
{
this
.
systemSer
.
separationConfigClose
().
subscribe
(
(
res
)
=>
{
if
(
res
.
data
==
1
)
{
this
.
message
.
success
(
"已关闭三员分立功能"
);
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
this
.
separationPowerStatus
();
}
)
}
break
;
}
case
"3"
:{
if
(
this
.
third
.
check
){
this
.
systemSer
.
openSystem
().
subscribe
(
(
res
)
=>
{
if
(
res
.
data
==
1
)
{
this
.
message
.
success
(
"已开启组织用户管理"
);
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
this
.
separationPowerStatus
();
}
)
}
else
{
this
.
systemSer
.
closeSystem
().
subscribe
(
(
res
)
=>
{
if
(
res
.
data
==
1
)
{
this
.
message
.
success
(
"已关闭组织用户管理"
);
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
this
.
separationPowerStatus
();
}
)
}
break
;
}
)
case
"2"
:{
if
(
this
.
second
.
check
){
this
.
systemSer
.
openAuth
().
subscribe
(
(
res
)
=>
{
if
(
res
.
data
==
1
)
{
this
.
message
.
success
(
"已开启角色与权限"
);
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
this
.
separationPowerStatus
();
}
)
}
else
{
this
.
systemSer
.
closeAuth
().
subscribe
(
(
res
)
=>
{
if
(
res
.
data
==
1
)
{
this
.
message
.
success
(
"已关闭角色与权限"
);
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
this
.
separationPowerStatus
();
}
)
}
break
;
}
}
}
//保存
...
...
src/main/webapp/app/system/system.service.ts
View file @
3d887bdf
...
...
@@ -37,12 +37,12 @@ export class SystemService {
//用户列表
user
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL_coms
+
'/user/
findUsers
'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL_coms
+
'/user/
getUserList?
'
,
data
);
}
//新增用户
adduser
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL_coms
+
'/user'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL_coms
+
'/user
/createUser
'
,
data
);
}
//删除用户
...
...
@@ -152,4 +152,34 @@ export class SystemService {
modifyPassword
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL_coms
+
'/modifyPassword'
,
data
);
}
//三员分立总开
separationConfigOpen
():
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL_coms
+
'/separationConfig/open'
);
}
//三员分立总关
separationConfigClose
():
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL_coms
+
'/separationConfig/close'
);
}
//组织系统用户 -关
closeSystem
():
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL_coms
+
'/separationConfig/closeSystem'
);
}
//组织系统用户 -开
openSystem
():
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL_coms
+
'/separationConfig/openSystem'
);
}
//角色与权限--开
openAuth
():
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL_coms
+
'/separationConfig/openAuth'
);
}
//角色与权限--关
closeAuth
():
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL_coms
+
'/separationConfig/closeAuth'
);
}
}
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