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
39663e5e
Commit
39663e5e
authored
Dec 10, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
9ac18d32
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
316 additions
and
17 deletions
+316
-17
basic-detail.component.ts
.../app/overAll/basic/basic-detail/basic-detail.component.ts
+3
-1
basic.component.ts
src/main/webapp/app/overAll/basic/basic.component.ts
+2
-1
asset-part.component.html
...main/webapp/app/work/asset-part/asset-part.component.html
+82
-0
asset-part.component.ts
src/main/webapp/app/work/asset-part/asset-part.component.ts
+50
-1
inspect-plan.component.html
.../webapp/app/work/inspect-plan/inspect-plan.component.html
+84
-0
inspect-plan.component.ts
...in/webapp/app/work/inspect-plan/inspect-plan.component.ts
+45
-1
work-handle.component.html
...in/webapp/app/work/work-handle/work-handle.component.html
+11
-13
work.service.ts
src/main/webapp/app/work/work.service.ts
+39
-0
No files found.
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.ts
View file @
39663e5e
...
...
@@ -41,6 +41,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
loading
=
false
;
hostId
:
string
;
hostName
;
realName
;
size
=
'default'
;
hostType
:
string
;
chartOption1
;
...
...
@@ -112,6 +113,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
this
.
hostId
=
queryParams
.
hostId
;
this
.
hostType
=
queryParams
.
type
;
this
.
hostName
=
queryParams
.
name
;
this
.
realName
=
queryParams
.
hostName
;
});
this
.
responseTime
();
this
.
losed
();
...
...
@@ -591,7 +593,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
//添加监测点
showCheckModal
()
{
this
.
smartCheck
.
showAddModal
(
this
.
hostId
,
this
.
host
Name
);
this
.
smartCheck
.
showAddModal
(
this
.
hostId
,
this
.
real
Name
);
}
//编辑监测点
...
...
src/main/webapp/app/overAll/basic/basic.component.ts
View file @
39663e5e
...
...
@@ -446,7 +446,8 @@ export class BasicComponent implements OnInit {
queryParams
:{
hostId
:
item
.
hostid
,
type
:
type
,
name
:
item
.
name
name
:
item
.
name
,
hostName
:
item
.
host
}
})
}
...
...
src/main/webapp/app/work/asset-part/asset-part.component.html
View file @
39663e5e
<div
nz-row
class=
"breadcrumbs"
>
<div
nz-col
nzSpan=
"16"
>
<nz-breadcrumb
class=
"padding-8-0"
>
<nz-breadcrumb-item>
首页
</nz-breadcrumb-item>
<nz-breadcrumb-item>
<a>
运维工作
</a>
</nz-breadcrumb-item>
<nz-breadcrumb-item>
运维事件
</nz-breadcrumb-item>
</nz-breadcrumb>
</div>
<div
nz-col
nzSpan=
"8"
class=
"text-right"
>
<button
nz-button
nzType=
"primary"
><i
class=
"anticon anticon-search"
></i></button>
<button
nz-button
nzType=
"primary"
><i
class=
"anticon anticon-sync"
></i></button>
<button
nz-button
nzType=
"primary"
><i
class=
"anticon anticon-arrows-alt"
></i></button>
</div>
</div>
<div
nz-row
[
nzGutter
]="
4
"
class=
"search-form"
>
<div
nz-col
nzSpan=
"3"
>
<nz-select
style=
"width: 100%;"
[(
ngModel
)]="
obj
.
type
"
nzPlaceHolder=
"选择分类"
>
<nz-option
nzLabel=
"告警"
nzValue=
"告警"
></nz-option>
<nz-option
nzLabel=
"严重"
nzValue=
"严重"
></nz-option>
</nz-select>
</div>
<div
nz-col
nzSpan=
"3"
>
<button
nz-button
nzType=
"default"
><i
class=
"anticon anticon-plus"
></i>
导入资产
</button>
</div>
<div
nz-col
nzSpan=
"3"
>
<button
nz-button
nzType=
"default"
><i
class=
"anticon anticon-plus"
></i>
下载
</button>
</div>
<div
nz-col
nzSpan=
"6"
>
<button
nz-button
nzType=
"default"
><i
class=
"anticon anticon-plus"
></i>
添加
</button>
<button
nz-button
nzType=
"default"
><i
class=
"anticon anticon-plus"
></i>
编辑
</button>
<button
nz-button
nzType=
"default"
><i
class=
"anticon anticon-plus"
></i>
删除
</button>
</div>
</div>
<nz-table
#
nzTable
[
nzData
]="
eventList
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNum
"
[
nzPageIndex
]="
pageNum
"
[
nzPageSize
]="
pageCount
"
(
nzPageIndexChange
)="
change
($
event
)"
>
<thead>
<tr>
<th>
子分类
</th>
<th>
资产总数
</th>
<th>
库存
</th>
<th>
使用中
</th>
<th>
借出
</th>
<th>
维修
</th>
<th>
报废
</th>
<th>
关联事件
</th>
<th
style=
"text-align: center"
>
操作
</th>
</tr>
</thead>
<tbody>
<tr
*
ngFor=
"let data of eventList"
>
<td
class=
"round-tag tag-form"
>
{{data.description}}
</td>
<td>
{{data.title}}
</td>
<td>
{{data.createTime | date:"yyyy-MM-dd HH:mm:ss"}}
</td>
<td>
事件来源
</td>
<td>
时间分类
</td>
<td>
{{data.operators[0].username}}
</td>
<td>
<span
*
ngIf=
"data.status == 0"
>
待处理
</span>
<span
*
ngIf=
"data.status == 1"
>
已结束
</span>
</td>
<td
class=
"handle text-center"
>
<span
(
click
)="
showEditModal
(
data
)"
>
编辑
</span>
<span
(
click
)="
deleteSend
(
data
)"
>
删除
</span>
</td>
</tr>
</tbody>
</nz-table>
\ No newline at end of file
src/main/webapp/app/work/asset-part/asset-part.component.ts
View file @
39663e5e
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
WorkService
}
from
'../work.service'
;
import
{
pageSize
}
from
'../../app.constants'
;
@
Component
({
selector
:
'smart-asset-part'
,
...
...
@@ -7,9 +9,56 @@ import { Component, OnInit } from '@angular/core';
})
export
class
AssetPartComponent
implements
OnInit
{
constructor
()
{
}
timeFormat
=
'yyyy-MM-dd'
;
partList
;
timeBegin
;
timeEnd
;
pageCount
=
pageSize
;
pageNum
=
1
;
totalNum
;
obj
=
{
pageCount
:
null
,
pageNum
:
null
,
searchStr
:
''
,
type
:
null
,
status
:
null
,
source
:
null
,
startTime
:
''
,
endTime
:
''
,
};
constructor
(
private
workSer
:
WorkService
)
{
}
ngOnInit
()
{
this
.
getList
();
}
getList
(){
const
obj
=
{
pageCount
:
this
.
pageCount
,
pageNum
:
this
.
pageNum
,
searchStr
:
this
.
obj
.
searchStr
,
type
:
this
.
obj
.
type
,
status
:
this
.
obj
.
status
,
source
:
this
.
obj
.
source
,
startTime
:
this
.
obj
.
startTime
,
endTime
:
this
.
obj
.
endTime
,
};
this
.
workSer
.
find
(
obj
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
this
.
partList
=
res
.
data
.
data
;
this
.
totalNum
=
res
.
data
.
totalNum
;
}
else
{
}
}
)
}
change
(
e
){
this
.
pageNum
=
e
;
this
.
getList
();
}
}
src/main/webapp/app/work/inspect-plan/inspect-plan.component.html
View file @
39663e5e
<div
nz-row
class=
"breadcrumbs"
>
<div
nz-col
nzSpan=
"16"
>
<nz-breadcrumb
class=
"padding-8-0"
>
<nz-breadcrumb-item>
首页
</nz-breadcrumb-item>
<nz-breadcrumb-item>
<a>
运维工作
</a>
</nz-breadcrumb-item>
<nz-breadcrumb-item>
巡检计划
</nz-breadcrumb-item>
</nz-breadcrumb>
</div>
<div
nz-col
nzSpan=
"8"
class=
"text-right"
>
<button
nz-button
nzType=
"primary"
><i
class=
"anticon anticon-search"
></i></button>
<button
nz-button
nzType=
"primary"
><i
class=
"anticon anticon-sync"
></i></button>
<button
nz-button
nzType=
"primary"
><i
class=
"anticon anticon-arrows-alt"
></i></button>
</div>
</div>
<div
nz-row
[
nzGutter
]="
4
"
class=
"search-form"
>
<div
nz-col
nzSpan=
"3"
>
<nz-select
style=
"width: 100%;"
[(
ngModel
)]="
obj
.
status
"
nzPlaceHolder=
"计划状态"
>
<nz-option
nzLabel=
"未开始"
nzValue=
"0"
></nz-option>
<nz-option
nzLabel=
"进行中"
nzValue=
"1"
></nz-option>
<nz-option
nzLabel=
"结束"
nzValue=
"2"
></nz-option>
</nz-select>
</div>
<div
nz-col
nzSpan=
"3"
>
<nz-select
style=
"width: 100%;"
[(
ngModel
)]="
obj
.
typeId
"
nzPlaceHolder=
"计划类型"
>
<nz-option
nzLabel=
"待处理"
nzValue=
"0"
></nz-option>
<nz-option
nzLabel=
"已结束"
nzValue=
"1"
></nz-option>
</nz-select>
</div>
<div
nz-col
nzSpan=
"8"
>
<nz-input-group
nzPrefixIcon=
"anticon anticon-search"
>
<input
type=
"text"
nz-input
[(
ngModel
)]="
obj
.
searchStr
"
placeholder=
"输入资源名称"
>
</nz-input-group>
</div>
<div
nz-col
nzSpan=
"3"
>
<button
nz-button
nzType=
"default"
><i
class=
"anticon anticon-plus"
></i>
新增计划
</button>
</div>
</div>
<nz-table
#
nzTable
[
nzData
]="
eventList
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNum
"
[
nzPageIndex
]="
pageNum
"
[
nzPageSize
]="
pageCount
"
(
nzPageIndexChange
)="
change
($
event
)"
>
<thead>
<tr>
<th>
计划名称
</th>
<th>
计划类型
</th>
<th>
计划负责人
</th>
<th>
循环周期
</th>
<th>
计划工作量
</th>
<th>
开始日期
</th>
<th>
计划状态
</th>
<th
style=
"text-align: center"
>
操作
</th>
</tr>
</thead>
<tbody>
<tr
*
ngFor=
"let data of planList"
>
<td
class=
"round-tag tag-form"
>
{{data.title}}
</td>
<td>
{{data.typeName}}
</td>
<td>
{{data.principals[0].username}}
</td>
<td>
{{data.cycleNum}}/{{data.cycleType}}
</td>
<td>
{{data.workload}}
</td>
<td>
{{data.createTime | date:"yyyy-MM-dd HH:mm:ss"}}
</td>
<td>
<span
*
ngIf=
"data.status == 0"
>
未开始
</span>
<span
*
ngIf=
"data.status == 1"
>
进行中
</span>
<span
*
ngIf=
"data.status == 2"
>
已结束
</span>
</td>
<td
class=
"handle text-center"
>
<span
(
click
)="
showEditModal
(
data
)"
>
查看
</span>
<span
(
click
)="
deleteSend
(
data
)"
>
删除
</span>
</td>
</tr>
</tbody>
</nz-table>
\ No newline at end of file
src/main/webapp/app/work/inspect-plan/inspect-plan.component.ts
View file @
39663e5e
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
WorkService
}
from
'../work.service'
;
import
{
pageSize
}
from
'../../app.constants'
;
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
@
Component
({
selector
:
'smart-inspect-plan'
,
...
...
@@ -7,9 +10,50 @@ import { Component, OnInit } from '@angular/core';
})
export
class
InspectPlanComponent
implements
OnInit
{
constructor
()
{
}
timeFormat
=
'yyyy-MM-dd'
;
planList
;
timeBegin
;
timeEnd
;
pageCount
=
pageSize
;
pageNum
=
1
;
totalNum
;
obj
=
{
pageNum
:
''
,
pageCount
:
''
,
searchStr
:
""
,
typeId
:
""
,
status
:
""
,
};
constructor
(
private
workSer
:
WorkService
,
private
message
:
NzMessageService
)
{
}
ngOnInit
()
{
this
.
getList
();
}
getList
(){
const
obj
=
{
pageNum
:
this
.
pageNum
,
pageCount
:
this
.
pageCount
,
searchStr
:
this
.
obj
.
searchStr
,
typeId
:
this
.
obj
.
typeId
,
status
:
this
.
obj
.
status
,
};
this
.
workSer
.
findPlanList
(
obj
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
this
.
planList
=
res
.
data
.
data
;
this
.
totalNum
=
res
.
data
.
totalNum
;
}
else
{
this
.
message
.
error
(
res
.
errMsg
);
}
}
)
}
change
(
e
){
this
.
pageNum
=
e
;
this
.
getList
();
}
}
src/main/webapp/app/work/work-handle/work-handle.component.html
View file @
39663e5e
...
...
@@ -73,25 +73,23 @@
{{data.description}}
</td>
<td>
<span
*
ngIf=
"data.type == 0"
>
邮件
</span>
<span
*
ngIf=
"data.type == 1"
>
脚本
</span>
<span
*
ngIf=
"data.type == 2"
>
SMS
</span>
<span
*
ngIf=
"data.type == 3"
>
Jabber
</span>
<span
*
ngIf=
"data.type == 100"
>
EZ texting
</span>
{{data.title}}
</td>
<td>
用于告警中
</td>
<td>
用于告警中
</td>
<td>
用于告警中
</td>
<td>
{{data.createTime | date:"yyyy-MM-dd HH:mm:ss"}}
</td>
<td>
<span
*
ngIf=
"data.status == 0"
>
启用
</span>
<span
*
ngIf=
"data.status == 1"
>
暂停
</span>
事件来源
</td>
<td>
时间分类
</td>
<td>
{{data.operators[0].username}}
</td>
<td>
<span
*
ngIf=
"data.status == 0"
>
待处理
</span>
<span
*
ngIf=
"data.status == 1"
>
已结束
</span>
</td>
<td>
细节
</td>
<td
class=
"handle text-center"
>
<span
(
click
)="
showEditModal
(
data
)"
>
编辑
</span>
<span
(
click
)="
deleteSend
(
data
)"
>
删除
</span>
<span
(
click
)="
operationSend
('启用',
0
,
data
)"
*
ngIf=
"data.status == 1"
>
启用
</span>
<span
(
click
)="
operationSend
('暂停',
1
,
data
)"
*
ngIf=
"data.status == 0"
>
暂停
</span>
</td>
</tr>
</tbody>
...
...
src/main/webapp/app/work/work.service.ts
View file @
39663e5e
...
...
@@ -49,4 +49,43 @@ export class WorkService {
return
this
.
http
.
post
(
SERVER_API_URL
+
'/sysevent/deal'
,
data
);
}
//修改巡检计划
updatePlan
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/plan/update'
,
data
);
}
//删除计划
deletePlan
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/plan/delete'
,
data
);
}
//查找单个计划
findPlan
(
params
):
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL
+
'/plan/find/'
+
params
);
}
//查询列表
findPlanList
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/plan/find'
,
data
);
}
//添加巡检计划
createPlan
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/plan/create'
,
data
);
}
//修改资产分类
updateType
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/inventory/updateType'
,
data
);
}
//查询所有父级资产类型
findByParentType
(
params
):
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL
+
'/inventory/findByParentType'
+
params
);
}
//根据父级类型查询子级
findByParentidCount
(
params
):
Observable
<
any
>
{
return
this
.
http
.
get
(
SERVER_API_URL
+
'/inventory/findByParentidCount/'
+
params
);
}
}
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