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
e6f0f69c
Commit
e6f0f69c
authored
Dec 23, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
9beb87c4
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
96 additions
and
45 deletions
+96
-45
home.component.html
src/main/webapp/app/home/home.component.html
+10
-10
home.component.ts
src/main/webapp/app/home/home.component.ts
+17
-6
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
+1
-1
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
+2
-2
examine.component.ts
src/main/webapp/app/system/examine/examine.component.ts
+20
-4
group.component.html
src/main/webapp/app/system/group/group.component.html
+5
-5
group.component.ts
src/main/webapp/app/system/group/group.component.ts
+17
-8
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 @
e6f0f69c
...
...
@@ -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>
...
...
src/main/webapp/app/home/home.component.ts
View file @
e6f0f69c
...
...
@@ -43,12 +43,22 @@ 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
;
constructor
(
private
overAllSer
:
OverAllService
,
private
message
:
NzMessageService
,
...
...
@@ -99,7 +109,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/shared/common/common.service.ts
View file @
e6f0f69c
...
...
@@ -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 @
e6f0f69c
...
...
@@ -47,7 +47,7 @@
<button
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 @
e6f0f69c
...
...
@@ -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 @
e6f0f69c
...
...
@@ -30,7 +30,7 @@
</div>
<nz-tabset
[
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 @
e6f0f69c
...
...
@@ -109,7 +109,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 +118,11 @@ export class ExamineComponent implements OnInit {
);
}
changeAlreadyPage
(
e
){
this
.
pageNoAlready
=
e
;
this
.
getListAlready
()
}
getListNo
()
{
const
data
=
{
pageNum
:
this
.
pageNoNo
,
...
...
@@ -126,7 +132,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 +141,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 +166,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
);
}
...
...
src/main/webapp/app/system/group/group.component.html
View file @
e6f0f69c
...
...
@@ -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,16 @@
<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
()"
>
(
nzPageSizeChange
)="
refreshStatus
()"
[
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 @
e6f0f69c
...
...
@@ -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'
,
...
...
@@ -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
)
{
}
...
...
@@ -79,19 +84,25 @@ export class GroupComponent implements OnInit {
getUser
()
{
const
data
=
{
'userBo'
:
{
search
:
this
.
name
,
organizationId
:
this
.
organizationId
search
:
this
.
name
=
this
.
name
==
""
?
null
:
this
.
name
,
organizationId
:
this
.
organizationId
=
this
.
organizationId
==
""
?
null
:
this
.
organizationId
},
'pageNum'
:
'1'
,
'pageSize'
:
'10'
'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
;
}
);
}
changePage
(
e
){
this
.
pageNum
=
e
;
this
.
getUser
();
}
getOrg
(
e
){
console
.
log
(
e
);
this
.
organizationId
=
e
.
node
.
key
;
...
...
@@ -186,7 +197,7 @@ export class GroupComponent implements OnInit {
arr
.
push
(
e
.
user
.
id
);
}
});
this
.
commonSer
.
deleteThing
(
"确定删除选择的用户"
,()
=>
{
this
.
commonSer
.
confirmThing
(
"删除"
,
"确定删除选择的用户"
,()
=>
{
this
.
systemSer
.
batchDeleteUser
(
arr
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
...
...
@@ -264,6 +275,4 @@ export class GroupComponent implements OnInit {
this
.
smartSelectRole
.
showModal
(
"选择角色"
,
null
);
}
}
src/main/webapp/app/work/asset-part/asset-part.component.ts
View file @
e6f0f69c
...
...
@@ -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 @
e6f0f69c
...
...
@@ -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 @
e6f0f69c
...
...
@@ -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 @
e6f0f69c
...
...
@@ -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 @
e6f0f69c
...
...
@@ -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