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
861bdc4b
Commit
861bdc4b
authored
Dec 23, 2018
by
xiaowenjie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://180.168.156.212:2903/qinghua/smart
parents
8c784ca1
38452f18
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
188 additions
and
130 deletions
+188
-130
home.component.html
src/main/webapp/app/home/home.component.html
+33
-30
home.component.ts
src/main/webapp/app/home/home.component.ts
+21
-7
layout.service.ts
src/main/webapp/app/layouts/layout.service.ts
+1
-1
basic.component.html
src/main/webapp/app/overAll/basic/basic.component.html
+0
-2
common.service.ts
src/main/webapp/app/shared/common/common.service.ts
+8
-3
audit.component.html
src/main/webapp/app/system/audit/audit.component.html
+2
-2
audit.component.ts
src/main/webapp/app/system/audit/audit.component.ts
+9
-1
examine.component.html
src/main/webapp/app/system/examine/examine.component.html
+4
-4
examine.component.ts
src/main/webapp/app/system/examine/examine.component.ts
+28
-5
group.component.html
src/main/webapp/app/system/group/group.component.html
+4
-8
group.component.ts
src/main/webapp/app/system/group/group.component.ts
+70
-61
system.service.ts
src/main/webapp/app/system/system.service.ts
+1
-1
asset-part.component.ts
src/main/webapp/app/work/asset-part/asset-part.component.ts
+2
-2
child-assets.component.ts
...pp/work/asset-part/child-assets/child-assets.component.ts
+1
-1
pararms.component.ts
src/main/webapp/app/work/pararms/pararms.component.ts
+1
-1
event.component.ts
...main/webapp/app/work/work-handle/Event/event.component.ts
+2
-0
work-handle.component.ts
...main/webapp/app/work/work-handle/work-handle.component.ts
+1
-1
No files found.
src/main/webapp/app/home/home.component.html
View file @
861bdc4b
...
...
@@ -30,22 +30,22 @@
<div
echarts
[
options
]="
leftOneChart
"
style=
"height: 250px;width: 100%"
></div>
<div
class=
"flex-center"
>
<div
class=
"flex-item round-tag tag-form"
>
<
p><nz-tag
[
nzColor
]="
color
.
red
"
></nz-tag>
严重 {{leftOneData?.high}}个,{{(leftOneData?.high / leftOneTotal).toFixed(2)*100}}%
</p
>
<
p><nz-tag
[
nzColor
]="
color
.
yellow
"
></nz-tag>
告警 {{leftOneData?.warning}}个,{{(leftOneData?.warning / leftOneTotal).toFixed(2)*100}}%
</p
>
<
p><nz-tag
[
nzColor
]="
color
.
green
"
></nz-tag>
正常 {{leftOneData?.normal}}个,{{(leftOneData?.normal / leftOneTotal).toFixed(2)*100}}%
</p
>
<
p><nz-tag
[
nzColor
]="
color
.
gray
"
></nz-tag>
禁止 {{leftOneData?.disabled}}个,{{(leftOneData?.disabled / leftOneTotal).toFixed(2)*100}}%
</p
>
<
!--<p><nz-tag [nzColor]="color.red"></nz-tag>严重 {{leftOneData?.high}}个,{{(leftOneData?.high / leftOneTotal).toFixed(2)*100}}% </p>--
>
<
!--<p><nz-tag [nzColor]="color.yellow"></nz-tag>告警 {{leftOneData?.warning}}个,{{(leftOneData?.warning / leftOneTotal).toFixed(2)*100}}% </p>--
>
<
!--<p><nz-tag [nzColor]="color.green"></nz-tag>正常 {{leftOneData?.normal}}个,{{(leftOneData?.normal / leftOneTotal).toFixed(2)*100}}% </p>--
>
<
!--<p><nz-tag [nzColor]="color.gray"></nz-tag>禁止 {{leftOneData?.disabled}}个,{{(leftOneData?.disabled / leftOneTotal).toFixed(2)*100}}%</p>--
>
</div>
</div>
</div>
<div
nz-col
nzSpan=
"12"
>
<div
echarts
[
options
]="
leftTwoChart
"
style=
"height: 250px;width: 100%"
></div>
<div
class=
"flex-center"
>
<
div
class=
"flex-item round-tag tag-form"
>
<
p><nz-tag
[
nzColor
]="
color
.
red
"
></nz-tag>
严重 {{leftTwoData?.high}}个,{{(leftTwoData?.high / leftTwoTotal).toFixed(2)*100}}%
</p
>
<
p><nz-tag
[
nzColor
]="
color
.
yellow
"
></nz-tag>
告警 {{leftTwoData?.warning}}个,{{(leftTwoData?.warning / leftTwoTotal).toFixed(2)*100}}%
</p
>
<
p><nz-tag
[
nzColor
]="
color
.
green
"
></nz-tag>
正常 {{leftTwoData?.normal}}个,{{(leftTwoData?.normal / leftTwoTotal).toFixed(2)*100}}%
</p
>
<
p><nz-tag
[
nzColor
]="
color
.
gray
"
></nz-tag>
禁止 {{leftTwoData?.disabled}}个,{{(leftTwoData?.disabled / leftTwoTotal).toFixed(2)*100}}%
</p
>
<
/div
>
<
!--<div class="flex-item round-tag tag-form">--
>
<
!--<p><nz-tag [nzColor]="color.red"></nz-tag>严重 {{leftTwoData?.high}}个,{{(leftTwoData?.high / leftTwoTotal).toFixed(2)*100}}% </p>--
>
<
!--<p><nz-tag [nzColor]="color.yellow"></nz-tag>告警 {{leftTwoData?.warning}}个,{{(leftTwoData?.warning / leftTwoTotal).toFixed(2)*100}}% </p>--
>
<
!--<p><nz-tag [nzColor]="color.green"></nz-tag>正常 {{leftTwoData?.normal}}个,{{(leftTwoData?.normal / leftTwoTotal).toFixed(2)*100}}% </p>--
>
<
!--<p><nz-tag [nzColor]="color.gray"></nz-tag>禁止 {{leftTwoData?.disabled}}个,{{(leftTwoData?.disabled / leftTwoTotal).toFixed(2)*100}}%</p>--
>
<
!--</div>--
>
</div>
</div>
</div>
...
...
@@ -92,29 +92,32 @@
</tbody>
</nz-table>
<p
(
click
)="
showAddFollow
()"
>
添加关注
</p>
<div
nz-row
>
<div
nz-col
nzSpan=
"12"
>
<div>
<div>
<p></p>
<p>
所在分组
</p>
</div>
</div>
<div
nz-row
>
<div
nz-col
nzSpan=
"12"
>
<div>
<p>
监测点
</p>
<p>
监测点
</p>
<div
nz-row
>
<ng-container
*
ngFor=
"let item of followList"
>
<div
nz-col
nzSpan=
"12"
style=
"padding: 5px;"
>
<div
style=
"border: 1px solid #ddd;"
>
<div
style=
"border-bottom: 1px solid #ddd;padding: 10px 5px;background-color:#eee;"
>
<div>
<p>
{{item.name}}
<span
style=
"margin-left: 10px"
>
IP:{{item.host}}
</span></p>
<p>
所在分组
</p>
</div>
</div>
<div>
PING值
<div
nz-row
>
<div
nz-col
nzSpan=
"12"
>
<div
style=
"padding: 10px;"
>
<p>
监测点
</p>
<p>
{{item.high}} {{item.warning}}
</p>
</div>
<div
style=
"padding: 10px;display: flex;align-items: center"
>
<p>
PING值:{{item.lose}}
</p>
</div>
</div>
<div
nz-col
nzSpan=
"12"
echarts
[
options
]="
item
.
option
"
></div>
</div>
</div>
<div
nz-col
nzSpan=
"12"
></div>
</div>
</div>
<div
nz-col
nzSpan=
"12"
>
</div>
</ng-container>
</div>
</div>
<smart-select-group
#
smartSelectGroup
(
done
)="
getItem
($
event
)"
></smart-select-group>
src/main/webapp/app/home/home.component.ts
View file @
861bdc4b
...
...
@@ -43,12 +43,25 @@ export class HomeComponent implements OnInit,AfterViewInit {
alarmGroupId
:
null
};
leftOneData
;
leftOneTotal
;
leftTwoData
;
leftTwoTotal
;
leftOneData
=
{
high
:
<
any
>
null
,
warning
:
Number
,
normal
:
Number
,
disabled
:
Number
,
};
leftOneTotal
=
<
any
>
null
;
leftTwoData
=<
any
>
{
high
:
<
any
>
Number
,
warning
:
<
any
>
Number
,
normal
:
<
any
>
Number
,
disabled
:
<
any
>
Number
,
};
leftTwoTotal
:
Number
;
rightTotal
;
rightTotal
=
0
;
//我的关注
followList
;
constructor
(
private
overAllSer
:
OverAllService
,
private
message
:
NzMessageService
,
...
...
@@ -79,7 +92,7 @@ export class HomeComponent implements OnInit,AfterViewInit {
getMyFollow
(){
this
.
layoutSer
.
myFollow
().
subscribe
(
(
res
)
=>
{
this
.
followList
=
res
.
data
;
}
)
}
...
...
@@ -99,7 +112,8 @@ export class HomeComponent implements OnInit,AfterViewInit {
countGroupItem
(){
this
.
layoutSer
.
findHostCountByStatusByGroup
(
this
.
obj
.
leftGroupId
).
subscribe
(
(
res
)
=>
{
this
.
leftOneData
=
res
.
data
;
// this.leftOneData = res.data;
// this.leftOneData.high= ( (this.leftOneData.high / this.leftOneTotal).toFixed(2) )*100;
this
.
setLeftOne
(
res
.
data
);
}
);
...
...
src/main/webapp/app/layouts/layout.service.ts
View file @
861bdc4b
...
...
@@ -52,7 +52,7 @@ export class LayoutService {
//我的关注
myFollow
():
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL
+
"/userFollow/myFollow"
);
return
this
.
http
.
get
(
SERVER_API_URL
+
"/userFollow/myFollow
Detail
"
);
}
}
src/main/webapp/app/overAll/basic/basic.component.html
View file @
861bdc4b
...
...
@@ -329,7 +329,6 @@
<!--</td>-->
<td>
<ng-container
*
ngIf=
"item.level"
>
<ng-container
*
ngIf=
"item.available == 0"
>
<nz-tag>
AGENT
</nz-tag>
</ng-container>
...
...
@@ -369,7 +368,6 @@
<ng-container
*
ngIf=
"item.ipmi_available == 2"
>
<nz-tag
[
nzColor
]="'#
d44f51
'"
>
IPMI
</nz-tag>
</ng-container>
</ng-container>
</td>
<td
class=
"handle"
>
<span
(
click
)="
showBasicCheckModal
(
item
.
hostid
,
item
.
host
)"
>
添加监测点
</span>
...
...
src/main/webapp/app/shared/common/common.service.ts
View file @
861bdc4b
...
...
@@ -64,10 +64,15 @@ export class CommonService implements OnInit {
return
str
;
}
deleteThing
(
title
,
callback
){
/**
* 删除确认函数
* @param title 提示语
* @param callback 回调函数
*/
confirmThing
(
title
,
content
,
callback
){
this
.
modalSer
.
confirm
({
nzTitle
:
'删除'
,
nzContent
:
'<b style="color: red;">'
+
title
+
'</b>'
,
nzTitle
:
title
,
nzContent
:
'<b style="color: red;">'
+
content
+
'</b>'
,
nzOkText
:
'确定'
,
nzOkType
:
'danger'
,
nzOnOk
:
callback
,
...
...
src/main/webapp/app/system/audit/audit.component.html
View file @
861bdc4b
...
...
@@ -44,10 +44,10 @@
</div>
<div
nz-col
nzSpan=
"8"
class=
"text-right"
>
<input
[(
ngModel
)]="
obj
.
content
"
nz-input
placeholder=
"角色/权限模块/资源权限"
>
<button
nz-button
nzType=
"default"
><i
class=
"anticon anticon-search"
></i>
搜索
</button>
<button
(
click
)="
getList
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-search"
></i>
搜索
</button>
</div>
</div>
<nz-table
#
basicTable
[
nzData
]="
dataSet
"
>
<nz-table
#
basicTable
[
nzData
]="
dataSet
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNum
"
[
nzPageIndex
]="
pageNumber
"
[
nzPageSize
]="
pageSize
"
(
nzPageIndexChange
)="
changePage
($
event
)"
>
<thead>
<tr>
<th>
操作用户
</th>
...
...
src/main/webapp/app/system/audit/audit.component.ts
View file @
861bdc4b
...
...
@@ -22,6 +22,8 @@ export class AuditComponent implements OnInit {
startTime
;
endTime
;
totalNum
;
obj
=
{
end
:
null
,
start
:
null
,
...
...
@@ -58,11 +60,17 @@ export class AuditComponent implements OnInit {
};
this
.
systemSer
.
logList
(
data
).
subscribe
(
(
res
)
=>
{
this
.
dataSet
=
res
.
data
;
this
.
dataSet
=
res
.
data
.
data
;
this
.
totalNum
=
res
.
data
.
totalCount
;
}
);
}
changePage
(
e
){
this
.
pageNumber
=
e
;
this
.
getList
();
}
//时间改变
changeType
()
{
const
nowDate
=
new
Date
().
getTime
();
...
...
src/main/webapp/app/system/examine/examine.component.html
View file @
861bdc4b
...
...
@@ -24,13 +24,13 @@
<button
(
click
)="
approvalUnPass
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-close-circle-o"
></i>
退回
</button>
</div>
<div
nz-col
nzSpan=
"8"
class=
"text-right"
>
<input
nz-input
placeholder=
"
角色/权限模块/资源权限
"
[(
ngModel
)]="
name
"
>
<input
nz-input
placeholder=
"
操作用户
"
[(
ngModel
)]="
name
"
>
<button
(
click
)="
search
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-search"
></i>
搜索
</button>
</div>
</div>
<nz-tabset
[
nzTabPosition
]="'
top
'"
[
nzType
]="'
card
'"
>
<nz-tabset
nzSelectedIndex
]="
tabNum
"
[
nzTabPosition
]="'
top
'"
[
nzType
]="'
card
'"
>
<nz-tab
nzTitle=
"待审批"
>
<nz-table
#
basicTable
[
nzData
]="
noList
"
>
<nz-table
#
basicTable
[
nzData
]="
noList
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNumNo
"
[
nzPageIndex
]="
pageNoNo
"
[
nzPageSize
]="
pageSize
"
(
nzPageIndexChange
)="
changeNoPage
($
event
)"
>
<thead>
<tr>
<th
nzShowCheckbox
[(
nzChecked
)]="
allChecked
"
[
nzIndeterminate
]="
indeterminate
"
(
nzCheckedChange
)="
checkAll
($
event
)"
></th>
...
...
@@ -81,7 +81,7 @@
</nz-table>
</nz-tab>
<nz-tab
nzTitle=
"已审批"
>
<nz-table
#
basicTable
[
nzData
]="
areadyList
"
>
<nz-table
#
basicTable
[
nzData
]="
areadyList
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNumAlready
"
[
nzPageIndex
]="
pageNoAlready
"
[
nzPageSize
]="
pageSize
"
(
nzPageIndexChange
)="
changeAlreadyPage
($
event
)"
>
<thead>
<tr>
<th>
操作用户
</th>
...
...
src/main/webapp/app/system/examine/examine.component.ts
View file @
861bdc4b
...
...
@@ -14,6 +14,8 @@ export class ExamineComponent implements OnInit {
pageSize
=
pageSize
;
name
;
tabNum
=
0
;
//已审批
pageNoAlready
=
1
;
totalNumAlready
;
...
...
@@ -109,7 +111,8 @@ export class ExamineComponent implements OnInit {
this
.
systemSer
.
getApproveOfDone
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
this
.
areadyList
=
res
.
data
;
this
.
areadyList
=
res
.
data
.
data
;
this
.
totalNumAlready
=
res
.
data
.
totalCount
;
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
...
...
@@ -117,6 +120,11 @@ export class ExamineComponent implements OnInit {
);
}
changeAlreadyPage
(
e
){
this
.
pageNoAlready
=
e
;
this
.
getListAlready
()
}
getListNo
()
{
const
data
=
{
pageNum
:
this
.
pageNoNo
,
...
...
@@ -126,7 +134,8 @@ export class ExamineComponent implements OnInit {
this
.
systemSer
.
getUnApprove
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
this
.
noList
=
res
.
data
;
this
.
noList
=
res
.
data
.
data
;
this
.
totalNumNo
=
res
.
data
.
totalCount
;
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
...
...
@@ -134,13 +143,20 @@ export class ExamineComponent implements OnInit {
);
}
changeNoPage
(
e
){
this
.
pageNoNo
=
e
;
this
.
getListNo
();
}
//审批通过
approvalPass
(){
this
.
commonSer
.
deleteThing
(
"确定通过所选请求"
,()
=>
{
this
.
commonSer
.
confirmThing
(
"通过"
,
"确定通过所选请求"
,()
=>
{
this
.
systemSer
.
approvalPass
(
this
.
selectList
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
this
.
message
.
success
(
"已通过"
);
this
.
getListNo
();
this
.
getListAlready
();
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
...
...
@@ -152,11 +168,13 @@ export class ExamineComponent implements OnInit {
//审批不通过
approvalUnPass
(){
this
.
commonSer
.
deleteThing
(
"确定拒绝所选请求"
,()
=>
{
this
.
commonSer
.
confirmThing
(
"退回"
,
"确定拒绝所选请求"
,()
=>
{
this
.
systemSer
.
approvCancle
(
this
.
selectList
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
this
.
message
.
success
(
"退回成功"
);
this
.
getListNo
();
this
.
getListAlready
();
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
...
...
@@ -167,7 +185,12 @@ export class ExamineComponent implements OnInit {
}
search
(){
this
.
getListAlready
();
if
(
this
.
tabNum
==
0
){
this
.
getListNo
();
}
if
(
this
.
tabNum
==
1
){
this
.
getListAlready
();
}
}
}
src/main/webapp/app/system/group/group.component.html
View file @
861bdc4b
...
...
@@ -21,12 +21,10 @@
<div
nz-row
class=
"search-form"
>
<div
nz-col
nzSpan=
"16"
>
<button
(
click
)="
selectRoleModal
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-search"
></i>
选择角色
</button>
<button
(
click
)="
showModal
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-search"
></i>
选择部门
</button>
</div>
<div
nz-col
nzSpan=
"8"
class=
"text-right"
>
<input
nz-input
placeholder=
"姓名/手机号码"
[(
ngModel
)]="
name
"
>
<button
nz-button
nzType=
"default"
><i
class=
"anticon anticon-search"
></i>
搜索
</button>
<button
(
click
)="
getUser
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-search"
></i>
搜索
</button>
</div>
</div>
<div
nz-row
[
nzGutter
]="
12
"
>
...
...
@@ -53,14 +51,12 @@
<button
(
click
)="
showUserModal
()"
nz-button
nzType=
"primary"
>
新增用户
</button>
<button
(
click
)="
batchDelete
()"
nz-button
nzType=
"default"
>
批量删除
</button>
<button
nz-button
nzType=
"default"
>
批量修改
</button>
<button
nz-button
nzType=
"default"
>
导出
模版
</button>
<button
nz-button
nzType=
"default"
>
下载
模版
</button>
<button
nz-button
nzType=
"default"
>
导入组织
</button>
<button
nz-button
nzType=
"default"
>
导入用户
</button>
</div>
<nz-table
#
basicTable
[
nzData
]="
dataSet
"
(
nzCurrentPageDataChange
)="
currentPageDataChange
($
event
)"
(
nzPageIndexChange
)="
refreshStatus
()"
(
nzPageSizeChange
)="
refreshStatus
()"
>
<nz-table
#
basicTable
[
nzData
]="
dataSet
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNum
"
[
nzPageIndex
]="
pageNum
"
[
nzPageSize
]="
pageSize
"
(
nzPageIndexChange
)="
changePage
($
event
)"
>
<thead>
<tr>
<th
nzShowCheckbox
[(
nzChecked
)]="
allChecked
"
[
nzIndeterminate
]="
indeterminate
"
(
nzCheckedChange
)="
checkAll
($
event
)"
></th>
...
...
src/main/webapp/app/system/group/group.component.ts
View file @
861bdc4b
...
...
@@ -5,6 +5,7 @@ import {UserComponent} from '../modal/user/user.component';
import
{
GroupModalComponent
}
from
'../modal/group-modal/group-modal.component'
;
import
{
SelectRoleComponent
}
from
'../../modal/select-role/select-role.component'
;
import
{
CommonService
}
from
'../../shared/common/common.service'
;
import
{
pageSize
}
from
'../../app.constants'
;
@
Component
({
selector
:
'jhi-group'
,
...
...
@@ -12,7 +13,7 @@ import {CommonService} from '../../shared/common/common.service';
styles
:
[]
})
export
class
GroupComponent
implements
OnInit
{
@
ViewChild
(
"smartSelectRole"
)
smartSelectRole
:
SelectRoleComponent
;
@
ViewChild
(
'smartSelectRole'
)
smartSelectRole
:
SelectRoleComponent
;
@
ViewChild
(
'power'
)
power
;
@
ViewChild
(
'smartUser'
)
smartUser
:
UserComponent
;
@
ViewChild
(
'smartGroupModal'
)
smartGroupModal
:
GroupModalComponent
;
...
...
@@ -32,6 +33,10 @@ export class GroupComponent implements OnInit {
organizationId
=
null
;
//组织ID
pageNum
=
1
;
pageSize
=
pageSize
;
totalNum
;
constructor
(
private
systemSer
:
SystemService
,
private
message
:
NzMessageService
,
private
modalSer
:
NzModalService
,
private
commonSer
:
CommonService
)
{
}
...
...
@@ -45,17 +50,17 @@ export class GroupComponent implements OnInit {
this
.
dataSet
=
$event
;
}
selectItem
(
item
,
e
)
{
if
(
e
)
{
selectItem
(
item
,
e
)
{
if
(
e
)
{
this
.
selectList
.
push
(
item
);
}
else
{
this
.
selectList
.
forEach
((
value
,
index
)
=>
{
if
(
value
.
id
==
item
.
id
)
{
this
.
selectList
.
splice
(
index
,
1
)
}
else
{
this
.
selectList
.
forEach
((
value
,
index
)
=>
{
if
(
value
.
id
==
item
.
id
)
{
this
.
selectList
.
splice
(
index
,
1
);
}
});
}
this
.
refreshStatus
()
this
.
refreshStatus
()
;
}
refreshStatus
():
void
{
...
...
@@ -78,21 +83,25 @@ export class GroupComponent implements OnInit {
getUser
()
{
const
data
=
{
'userBo'
:
{
search
:
this
.
name
,
organizationId
:
this
.
organizationId
},
'pageNum'
:
'1'
,
'pageSize'
:
'10'
'search'
:
this
.
name
=
this
.
name
==
''
?
null
:
this
.
name
,
'organizationId'
:
this
.
organizationId
=
this
.
organizationId
==
''
?
null
:
this
.
organizationId
,
'pageNum'
:
this
.
pageNum
,
'pageSize'
:
this
.
pageSize
};
this
.
systemSer
.
user
(
data
).
subscribe
(
(
res
)
=>
{
this
.
dataSet
=
res
.
data
;
this
.
dataSet
=
res
.
data
.
data
;
this
.
totalNum
=
res
.
data
.
totalCount
;
}
);
}
getOrg
(
e
){
changePage
(
e
)
{
this
.
pageNum
=
e
;
this
.
getUser
();
}
getOrg
(
e
)
{
console
.
log
(
e
);
this
.
organizationId
=
e
.
node
.
key
;
this
.
getUser
();
...
...
@@ -136,12 +145,12 @@ export class GroupComponent implements OnInit {
//新增用户
showUserModal
()
{
this
.
smartUser
.
showAddModal
(
this
.
groupList
,
"新增用户"
);
this
.
smartUser
.
showAddModal
(
this
.
groupList
,
'新增用户'
);
}
//编辑用户
showEditModal
(
item
){
this
.
smartUser
.
showEditModal
(
this
.
groupList
,
"编辑用户"
,
item
.
id
);
showEditModal
(
item
)
{
this
.
smartUser
.
showEditModal
(
this
.
groupList
,
'编辑用户'
,
item
.
id
);
}
//删除用户--单个
...
...
@@ -153,11 +162,11 @@ export class GroupComponent implements OnInit {
nzCancelText
:
'取消'
,
nzOnOk
:
()
=>
{
const
data
=
{
id
:
item
.
id
id
:
item
.
id
};
this
.
systemSer
.
deleteUser
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
data
==
1
)
{
if
(
res
.
data
==
1
)
{
this
.
getUser
();
}
}
...
...
@@ -169,32 +178,32 @@ export class GroupComponent implements OnInit {
}
//删除用户-- 批量
batchDelete
(){
batchDelete
()
{
let
bool
=
false
;
this
.
dataSet
.
forEach
(
e
=>
{
if
(
e
.
checked
)
{
bool
=
true
;
}
this
.
dataSet
.
forEach
(
e
=>
{
if
(
e
.
checked
)
{
bool
=
true
;
}
});
if
(
!
bool
)
{
this
.
message
.
warning
(
"请选择需要删除的用户"
);
if
(
!
bool
)
{
this
.
message
.
warning
(
'请选择需要删除的用户'
);
return
false
;
}
let
arr
=
[];
this
.
dataSet
.
forEach
(
e
=>
{
if
(
e
.
checked
)
{
this
.
dataSet
.
forEach
(
e
=>
{
if
(
e
.
checked
)
{
arr
.
push
(
e
.
user
.
id
);
}
});
this
.
commonSer
.
deleteThing
(
"确定删除选择的用户"
,()
=>
{
this
.
commonSer
.
confirmThing
(
'删除'
,
'确定删除选择的用户'
,
()
=>
{
this
.
systemSer
.
batchDeleteUser
(
arr
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
if
(
res
.
errCode
==
10000
)
{
this
.
getUser
();
}
}
);
})
})
;
}
//新增部门
...
...
@@ -203,67 +212,67 @@ export class GroupComponent implements OnInit {
}
//编辑部门
editGroup
(
item
){}
editGroup
(
item
)
{
}
//删除部门
deleteGroup
(
item
){}
deleteGroup
(
item
)
{
}
//授予角色
grantRole
(
data
){
this
.
setType
=
"单个"
;
grantRole
(
data
)
{
this
.
setType
=
'单个'
;
this
.
userId
=
data
.
id
;
this
.
smartSelectRole
.
showModal
(
"选择角色"
,
this
.
userId
);
this
.
smartSelectRole
.
showModal
(
'选择角色'
,
this
.
userId
);
}
//设置用户角色
setRole
(
event
){
if
(
this
.
setType
==
"批量"
)
{
setRole
(
event
)
{
if
(
this
.
setType
==
'批量'
)
{
const
data
=
{
userId
:
this
.
selectList
.
map
(
e
=>
{
userId
:
this
.
selectList
.
map
(
e
=>
{
return
e
.
id
;
}
),
roles
:
event
.
map
(
e
=>
{
roles
:
event
.
map
(
e
=>
{
return
e
.
id
;
}),
};
this
.
systemSer
.
batchUserToAuth
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
getUser
();
this
.
message
.
success
(
"授予角色成功"
);
}
else
{
this
.
message
.
success
(
'授予角色成功'
);
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
}
)
)
;
}
if
(
this
.
setType
==
"单个"
)
{
if
(
this
.
setType
==
'单个'
)
{
const
data
=
{
userId
:
this
.
userId
,
roles
:
event
.
map
(
e
=>
{
userId
:
this
.
userId
,
roles
:
event
.
map
(
e
=>
{
return
e
.
id
;
}),
};
this
.
systemSer
.
aloneUserToAuth
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
getUser
();
this
.
message
.
success
(
"授予角色成功"
);
}
else
{
this
.
message
.
success
(
'授予角色成功'
);
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
}
)
)
;
}
}
selectRoleModal
(){
this
.
setType
=
"批量"
;
this
.
smartSelectRole
.
showModal
(
"选择角色"
,
null
);
selectRoleModal
()
{
this
.
setType
=
'批量'
;
this
.
smartSelectRole
.
showModal
(
'选择角色'
,
null
);
}
}
src/main/webapp/app/system/system.service.ts
View file @
861bdc4b
...
...
@@ -37,7 +37,7 @@ export class SystemService {
//用户列表
user
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL_COMS
+
'/user/getUserList
?
'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL_COMS
+
'/user/getUserList'
,
data
);
}
//新增用户
...
...
src/main/webapp/app/work/asset-part/asset-part.component.ts
View file @
861bdc4b
...
...
@@ -103,7 +103,7 @@ export class AssetPartComponent implements OnInit {
inventoryTypeIds
:[]
};
data
.
inventoryTypeIds
.
push
(
this
.
obj
.
type
);
this
.
commonSer
.
deleteThing
(
"确定删除该父级分类"
,()
=>
{
this
.
commonSer
.
confirmThing
(
"删除"
,
"确定删除该父级分类"
,()
=>
{
this
.
workSer
.
deleteType
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
...
...
@@ -128,7 +128,7 @@ export class AssetPartComponent implements OnInit {
inventoryTypeIds
:[]
};
data
.
inventoryTypeIds
.
push
(
item
.
id
);
this
.
commonSer
.
deleteThing
(
"确定删除该子级分类"
,()
=>
{
this
.
commonSer
.
confirmThing
(
"删除"
,
"确定删除该子级分类"
,()
=>
{
this
.
workSer
.
deleteType
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
...
...
src/main/webapp/app/work/asset-part/child-assets/child-assets.component.ts
View file @
861bdc4b
...
...
@@ -45,7 +45,7 @@ export class ChildAssetsComponent implements OnInit {
inventoryIds
:[]
};
data
.
inventoryIds
.
push
(
item
.
id
);
this
.
conmonSer
.
deleteThing
(
"确定删除该资产?"
,()
=>
{
this
.
conmonSer
.
confirmThing
(
"删除"
,
"确定删除该资产?"
,()
=>
{
this
.
workSer
.
deleteInventory
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
...
...
src/main/webapp/app/work/pararms/pararms.component.ts
View file @
861bdc4b
...
...
@@ -59,7 +59,7 @@ export class PararmsComponent implements OnInit {
//删除分类
deleteItem
(
item
){
this
.
commomSer
.
deleteThing
(
"确定删除该分类?"
,()
=>
{
this
.
commomSer
.
confirmThing
(
"删除"
,
"确定删除该分类?"
,()
=>
{
const
data
=
{
ids
:[]
};
...
...
src/main/webapp/app/work/work-handle/Event/event.component.ts
View file @
861bdc4b
...
...
@@ -29,6 +29,8 @@ export class EventComponent implements OnInit {
}
initForm
()
{
this
.
fileList
=
[];
this
.
operatorsList
=
[];
this
.
validateForm
=
this
.
fb
.
group
(
{
title
:
[
null
,
[
Validators
.
required
]],
...
...
src/main/webapp/app/work/work-handle/work-handle.component.ts
View file @
861bdc4b
...
...
@@ -123,7 +123,7 @@ export class WorkHandleComponent implements OnInit {
ids
:
[]
};
arr
.
ids
.
push
(
data
.
id
);
this
.
commonSer
.
deleteThing
(
'确定删除该事件'
,
()
=>
{
this
.
commonSer
.
confirmThing
(
"删除"
,
'确定删除该事件'
,
()
=>
{
this
.
workSer
.
deleteEvent
(
arr
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
...
...
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