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
d4a09a9b
Commit
d4a09a9b
authored
Dec 28, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
d90d0948
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
24 deletions
+61
-24
assets-detail.component.html
...ork/asset-part/assets-detail/assets-detail.component.html
+17
-11
assets-detail.component.ts
.../work/asset-part/assets-detail/assets-detail.component.ts
+36
-8
look-plan.component.html
.../webapp/app/work/modal/look-plan/look-plan.component.html
+1
-1
plan-modal.component.ts
.../webapp/app/work/modal/plan-modal/plan-modal.component.ts
+1
-0
work-handle.component.html
...in/webapp/app/work/work-handle/work-handle.component.html
+6
-4
No files found.
src/main/webapp/app/work/asset-part/assets-detail/assets-detail.component.html
View file @
d4a09a9b
...
...
@@ -217,27 +217,33 @@
<th>
事件分类
</th>
<th>
处理人
</th>
<th>
状态
</th>
<th
style=
"text-align: center"
>
发送记录
</th>
<th
style=
"text-align: center"
>
操作
</th>
</tr>
</thead>
<tbody>
<tr
*
ngFor=
"let data of thingList"
>
<td
class=
"table-timeline"
>
<nz-timeline-item>
{{data.c
lock
}}
</nz-timeline-item>
<nz-timeline-item>
{{data.c
reateTime | date:"yyyy-MM-dd HH:mm:ss"}}
}}
</nz-timeline-item>
</td>
<td
class=
"round-tag tag-form"
>
<nz-tag
*
ngIf=
"data.priority == 4 || data.priority == 5"
[
nzColor
]="'#
fc0d1b
'"
></nz-tag>
<nz-tag
*
ngIf=
"data.priority == 2 || data.priority == 3"
[
nzColor
]="'#
fd9827
'"
></nz-tag>
{{data.id}}
</td>
<td>
{{data.hostname}}
</td>
<td>
{{data.description}}
</td>
<td>
{{data.equipmentType}}
</td>
<td>
{{data.continuedTime}}
</td>
<td>
{{data.title}}
</td>
<td>
<ng-container
*
ngIf=
"data.r_clock"
>
已恢复
</ng-container>
<ng-container
*
ngIf=
"!data.r_clock"
>
告警中
</ng-container>
<span
*
ngIf=
"data.source == 0"
>
系统告警
</span>
<span
*
ngIf=
"data.source == 1"
>
手动新增
</span>
</td>
<td>
{{data.typeName}}
</td>
<td>
{{data.operators[0]?.username}}
</td>
<td>
<ng-container
*
ngIf=
"data.status == 0"
>
待处理
</ng-container>
<ng-container
*
ngIf=
"data.status == 1"
>
已结束
</ng-container>
</td>
<td
class=
"list-icon "
>
<span
class=
"cursor"
*
ngIf=
"data.status == 1"
(
click
)="
lookEvent
(
data
)"
>
查看
</span>
</td>
<td
class=
"list-icon"
><i
class=
"anticon anticon-profile"
></i></td>
</tr>
</tbody>
</nz-table>
...
...
src/main/webapp/app/work/asset-part/assets-detail/assets-detail.component.ts
View file @
d4a09a9b
import
{
Component
,
OnInit
,
ViewChild
}
from
'@angular/core'
;
import
{
ActivatedRoute
}
from
'@angular/router'
;
import
{
ActivatedRoute
,
Router
}
from
'@angular/router'
;
import
{
WorkService
}
from
'../../work.service'
;
import
{
pageSize
}
from
'../../../app.constants'
;
import
{
NzMessageService
}
from
'ng-zorro-antd'
;
...
...
@@ -22,7 +22,7 @@ export class AssetsDetailComponent implements OnInit {
loading
=
false
;
thingList
;
constructor
(
private
routerInfo
:
ActivatedRoute
,
private
workSer
:
WorkService
,
private
message
:
NzMessageService
)
{
private
message
:
NzMessageService
,
private
router
:
Router
)
{
this
.
routerInfo
.
queryParams
.
subscribe
(
(
res
)
=>
{
this
.
invertoryId
=
res
.
invertoryId
;
...
...
@@ -32,8 +32,10 @@ export class AssetsDetailComponent implements OnInit {
ngOnInit
()
{
this
.
getDetail
();
this
.
getEventList
();
}
//资产详情
getDetail
(){
this
.
workSer
.
selectByPrimaryKey
(
this
.
invertoryId
).
subscribe
(
(
res
)
=>
{
...
...
@@ -42,6 +44,38 @@ export class AssetsDetailComponent implements OnInit {
)
}
//资产关联事件
getEventList
(){
this
.
loading
=
true
;
const
data
=
{
pageCount
:
this
.
pageCount
,
pageNum
:
this
.
pageNum
,
"inventoryId"
:
this
.
invertoryId
};
this
.
workSer
.
find
(
data
).
subscribe
(
(
res
)
=>
{
this
.
thingList
=
res
.
data
.
data
;
this
.
totalNum
=
res
.
data
.
totalNum
;
this
.
loading
=
false
;
}
)
}
//翻页
change
(
e
){
this
.
pageNum
=
e
;
this
.
getEventList
();
}
//查看事件详情
lookEvent
(
item
)
{
this
.
router
.
navigate
([
'app/main/handleDetail'
],
{
queryParams
:
{
eventId
:
item
.
id
}
});
}
// 打开添加关联modal
linkThen
(){
this
.
smartSelectGroup
.
showAddModal
(
"选择资源"
);
...
...
@@ -49,7 +83,6 @@ export class AssetsDetailComponent implements OnInit {
//设置关联
setLink
(
e
){
console
.
log
(
e
);
const
data
=
{
hostid
:
e
[
0
],
id
:
this
.
invertoryId
...
...
@@ -65,9 +98,4 @@ export class AssetsDetailComponent implements OnInit {
}
)
}
change
(
e
){
}
}
src/main/webapp/app/work/modal/look-plan/look-plan.component.html
View file @
d4a09a9b
...
...
@@ -96,7 +96,7 @@
<nz-form-item>
<nz-form-label
[
nzSpan
]="
7
"
nzRequired
nzFor=
"group"
>
附件
</nz-form-label>
<nz-form-control
[
nzSpan
]="
12
"
>
<a
href=
"
{{url}}
{{plan?.file}}"
download
>
下载
</a>
<a
href=
"
/file/planFile/
{{plan?.file}}"
download
>
下载
</a>
</nz-form-control>
</nz-form-item>
...
...
src/main/webapp/app/work/modal/plan-modal/plan-modal.component.ts
View file @
d4a09a9b
...
...
@@ -163,6 +163,7 @@ export class PlanModalComponent implements OnInit {
handleEditCancel
()
{
this
.
isVisiable
=
false
;
this
.
initForm
();
}
selectPerson1
()
{
...
...
src/main/webapp/app/work/work-handle/work-handle.component.html
View file @
d4a09a9b
...
...
@@ -64,9 +64,9 @@
<th>
事件编号
</th>
<th>
标题
</th>
<th>
时间
</th>
<th>
时间
来源
</th>
<th>
事件
来源
</th>
<th>
事件分类
</th>
<th>
处理人
</th>
<th
nzWidth=
"15%"
>
处理人
</th>
<th>
状态
</th>
<th
style=
"text-align: center"
>
操作
</th>
</tr>
...
...
@@ -86,11 +86,13 @@
</td>
<td>
{{data.typeName}}
</td>
<td>
{{data.operators[0]?.username}}
<span
style=
"margin-right: 5px;"
*
ngFor=
"let item of data?.operators"
>
{{item.username}}
</span>
</td>
<td>
<span
*
ngIf=
"data.status == 0"
>
待处理
</span>
<span
*
ngIf=
"data.status == 1"
>
已
完成
</span>
<span
*
ngIf=
"data.status == 1"
>
已
结束
</span>
</td>
<td
class=
"handle text-center"
>
<span
*
ngIf=
"data.status == 1"
(
click
)="
lookEvent
(
data
)"
>
查看
</span>
...
...
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