Commit 39663e5e authored by wangqinghua's avatar wangqinghua

update

parent 9ac18d32
......@@ -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.hostName);
this.smartCheck.showAddModal(this.hostId,this.realName);
}
//编辑监测点
......
......@@ -446,7 +446,8 @@ export class BasicComponent implements OnInit {
queryParams:{
hostId:item.hostid,
type:type,
name:item.name
name:item.name,
hostName:item.host
}
})
}
......
<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
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;
ngOnInit() {
}
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();
}
}
<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
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;
ngOnInit() {
}
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();
}
}
......@@ -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>
......
......@@ -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);
}
}
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