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
afd8670a
Commit
afd8670a
authored
Dec 25, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
b0aa0511
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
22 deletions
+30
-22
group.component.ts
src/main/webapp/app/system/group/group.component.ts
+5
-5
group-modal.component.html
...p/app/system/modal/group-modal/group-modal.component.html
+1
-2
group-modal.component.ts
...app/app/system/modal/group-modal/group-modal.component.ts
+5
-2
role.component.ts
src/main/webapp/app/system/modal/role/role.component.ts
+15
-4
system.service.ts
src/main/webapp/app/system/system.service.ts
+4
-9
No files found.
src/main/webapp/app/system/group/group.component.ts
View file @
afd8670a
...
...
@@ -164,13 +164,13 @@ export class GroupComponent implements OnInit {
nzOkText
:
'确定'
,
nzCancelText
:
'取消'
,
nzOnOk
:
()
=>
{
const
data
=
{
id
:
item
.
id
};
this
.
systemSer
.
deleteUser
(
data
).
subscribe
(
this
.
systemSer
.
deleteUser
(
item
.
id
).
subscribe
(
(
res
)
=>
{
if
(
res
.
data
==
1
)
{
this
.
getUser
();
this
.
message
.
success
(
"删除用户成功"
);
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
}
);
...
...
@@ -216,7 +216,7 @@ export class GroupComponent implements OnInit {
//编辑部门
showEditGroupModal
(
item
)
{
this
.
smartGroupModal
.
showEditModal
(
this
.
groupList
,
"编辑部门"
,
item
.
key
);
this
.
smartGroupModal
.
showEditModal
(
this
.
groupList
,
"编辑部门"
,
item
);
}
//删除部门
...
...
src/main/webapp/app/system/modal/group-modal/group-modal.component.html
View file @
afd8670a
...
...
@@ -8,13 +8,12 @@
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSm
]="
6
"
[
nzXs
]="
24
"
nzRequired
>
上级部门
</nz-form-label>
<nz-form-label
[
nzSm
]="
6
"
[
nzXs
]="
24
"
>
上级部门
</nz-form-label>
<nz-form-control
[
nzSm
]="
14
"
[
nzXs
]="
24
"
>
<nz-select
id=
"parentId"
formControlName=
"parentId"
nzPlaceHolder=
"上级部门"
>
<nz-option
nzValue=
"无"
nzLabel=
""
></nz-option>
<nz-option
*
ngFor=
"let item of groupList"
nzValue=
"{{item.id}}"
nzLabel=
"{{item.name}}"
></nz-option>
</nz-select>
<nz-form-explain
*
ngIf=
"validateForm.get('parentId').dirty && validateForm.get('parentId').errors"
>
请选择上级部门!
</nz-form-explain>
</nz-form-control>
</nz-form-item>
</form>
...
...
src/main/webapp/app/system/modal/group-modal/group-modal.component.ts
View file @
afd8670a
...
...
@@ -38,14 +38,17 @@ export class GroupModalComponent implements OnInit {
this
.
title
=
title
;
}
showEditModal
(
list
,
title
,
i
d
){
this
.
orgId
=
i
d
;
showEditModal
(
list
,
title
,
i
tem
){
this
.
orgId
=
i
tem
.
key
;
this
.
groupList
=
list
;
this
.
isVisible
=
true
;
this
.
title
=
title
;
this
.
validateForm
.
patchValue
(
item
.
origin
);
this
.
validateForm
.
value
.
parentId
=
item
.
key
;
}
handleCancel
(){
this
.
initForm
();
this
.
isVisible
=
false
;
}
...
...
src/main/webapp/app/system/modal/role/role.component.ts
View file @
afd8670a
...
...
@@ -35,7 +35,6 @@ export class RoleComponent implements OnInit {
roleId
;
groupList
=
[];
moduleList
=
[];
//菜单权限
resourceList
=
[];
//主机分组权限
constructor
(
private
fb
:
FormBuilder
,
private
message
:
NzMessageService
,
private
overAllSer
:
OverAllService
,
private
systemSer
:
SystemService
,
private
layoutSer
:
LayoutService
,
private
commonSer
:
CommonService
)
{
...
...
@@ -119,6 +118,9 @@ export class RoleComponent implements OnInit {
handleCancel
():
void
{
this
.
isVisible
=
false
;
this
.
ininForm
();
this
.
groupList
=
[];
this
.
moduleList
=
[];
}
handleOk
()
{
...
...
@@ -132,11 +134,15 @@ export class RoleComponent implements OnInit {
}
let
resourceArr
=
[];
this
.
resource
List
.
forEach
(
e
=>
{
this
.
group
List
.
forEach
(
e
=>
{
if
(
e
.
checked
){
resourceArr
.
push
(
e
.
id
);
const
data
=
{
groupId
:
e
.
groupid
,
groupName
:
e
.
name
};
resourceArr
.
push
(
data
);
}
})
})
;
if
(
this
.
title
==
'新增角色'
)
{
this
.
create
(
resourceArr
);
...
...
@@ -164,6 +170,9 @@ export class RoleComponent implements OnInit {
this
.
add
.
emit
();
this
.
ininForm
();
this
.
message
.
success
(
'新增成功'
);
this
.
groupList
=
[];
this
.
moduleList
=
[];
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
...
...
@@ -190,6 +199,8 @@ export class RoleComponent implements OnInit {
this
.
add
.
emit
();
this
.
ininForm
();
this
.
message
.
success
(
'修改成功'
);
this
.
groupList
=
[];
this
.
moduleList
=
[];
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
...
...
src/main/webapp/app/system/system.service.ts
View file @
afd8670a
...
...
@@ -35,7 +35,7 @@ export class SystemService {
return
this
.
http
.
post
(
SERVER_API_URL_COMS
+
'/role/createRole'
,
data
);
}
//删除
用户
//删除
角色
deleteRole
(
params
):
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL_COMS
+
'/role/deleteRoleById?'
+
this
.
commonSer
.
toQuery
(
params
));
}
...
...
@@ -66,8 +66,8 @@ export class SystemService {
}
//删除用户
deleteUser
(
data
):
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL_COMS
+
'/user/deleteUser
?'
+
this
.
commonSer
.
toQuery
(
data
)
);
deleteUser
(
params
):
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL_COMS
+
'/user/deleteUser
/'
+
params
);
}
//删除用户
...
...
@@ -82,7 +82,7 @@ export class SystemService {
//删除单个组织机构
deleteOrg
(
params
):
Observable
<
any
>
{
return
this
.
http
.
delete
(
SERVER_API_URL_COMS
+
'/organization/'
+
params
);
return
this
.
http
.
get
(
SERVER_API_URL_COMS
+
'/organization/deleteOrganizationById/'
+
params
);
}
//编辑组织
...
...
@@ -140,11 +140,6 @@ export class SystemService {
return
this
.
http
.
get
(
SERVER_API_URL_COMS
+
'/role/checkRole'
);
}
//单个用户角色获取
roleList
(
data
):
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL_COMS
+
'/user/roleList?'
+
this
.
commonSer
.
toQuery
(
data
)
);
}
//获取当前已审批记录
getApproveOfDone
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL_COMS
+
'/approve/getApproveOfDone'
,
data
);
...
...
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