Commit d4a09a9b authored by wangqinghua's avatar wangqinghua

update

parent d90d0948
......@@ -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.clock}}</nz-timeline-item>
<nz-timeline-item>{{data.createTime | 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>
......
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){
}
}
......@@ -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>
......
......@@ -163,6 +163,7 @@ export class PlanModalComponent implements OnInit {
handleEditCancel() {
this.isVisiable = false;
this.initForm();
}
selectPerson1() {
......
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment