Commit a03d9f45 authored by wangqinghua's avatar wangqinghua

update

parent 73ef8491
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
<nz-form-label [nzSpan]="3" > <span *ngIf="i == 0">危险阈值</span> </nz-form-label> <nz-form-label [nzSpan]="3" > <span *ngIf="i == 0">危险阈值</span> </nz-form-label>
<nz-form-control [nzSpan]="18" class="form-select"> <nz-form-control [nzSpan]="18" class="form-select">
<div nz-row [nzGutter]="12"> <div nz-row [nzGutter]="12">
<nz-form-control nz-col [nzSpan]="4"> <nz-form-control nz-col [nzSpan]="5">
<nz-select name="interfaces_main" nzPlaceHolder="选择接口类型" [(ngModel)]="fault.and" *ngIf="i>0"> <nz-select name="interfaces_main" nzPlaceHolder="选择接口类型" [(ngModel)]="fault.and" *ngIf="i>0">
<nz-option nzValue=" and " nzLabel="并且"></nz-option> <nz-option nzValue=" and " nzLabel="并且"></nz-option>
<nz-option nzValue=" or " nzLabel="或"></nz-option> <nz-option nzValue=" or " nzLabel="或"></nz-option>
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
<nz-form-control nz-col [nzSpan]="4"> <nz-form-control nz-col [nzSpan]="4">
<button class="tag-button" nz-button nzType="default">返回值</button> <button class="tag-button" nz-button nzType="default">返回值</button>
</nz-form-control> </nz-form-control>
<nz-form-control nz-col [nzSpan]="3"> <nz-form-control nz-col [nzSpan]="5">
<nz-select name="interfaces_main" nzPlaceHolder="选择接口类型" [(ngModel)]="fault.equal"> <nz-select name="interfaces_main" nzPlaceHolder="选择接口类型" [(ngModel)]="fault.equal">
<nz-option nzValue="=" nzLabel="="></nz-option> <nz-option nzValue="=" nzLabel="="></nz-option>
<nz-option nzValue=">" nzLabel=">"></nz-option> <nz-option nzValue=">" nzLabel=">"></nz-option>
...@@ -195,7 +195,7 @@ ...@@ -195,7 +195,7 @@
<nz-form-label [nzSpan]="3"><span *ngIf="i == 0;">故障阈值</span></nz-form-label> <nz-form-label [nzSpan]="3"><span *ngIf="i == 0;">故障阈值</span></nz-form-label>
<nz-form-control [nzSpan]="18" class="form-select"> <nz-form-control [nzSpan]="18" class="form-select">
<div nz-row [nzGutter]="12"> <div nz-row [nzGutter]="12">
<nz-form-control nz-col [nzSpan]="4"> <nz-form-control nz-col [nzSpan]="5">
<nz-select name="interfaces_main" [(ngModel)]="fault.and" *ngIf="i>0"> <nz-select name="interfaces_main" [(ngModel)]="fault.and" *ngIf="i>0">
<nz-option nzValue=" and " nzLabel="并且"></nz-option> <nz-option nzValue=" and " nzLabel="并且"></nz-option>
<nz-option nzValue=" or " nzLabel="或"></nz-option> <nz-option nzValue=" or " nzLabel="或"></nz-option>
...@@ -204,7 +204,7 @@ ...@@ -204,7 +204,7 @@
<nz-form-control nz-col [nzSpan]="4"> <nz-form-control nz-col [nzSpan]="4">
<button class="tag-button" nz-button nzType="default">返回值</button> <button class="tag-button" nz-button nzType="default">返回值</button>
</nz-form-control> </nz-form-control>
<nz-form-control nz-col [nzSpan]="3"> <nz-form-control nz-col [nzSpan]="5">
<nz-select name="interfaces_main" nzPlaceHolder="选择接口类型" [(ngModel)]="fault.equal"> <nz-select name="interfaces_main" nzPlaceHolder="选择接口类型" [(ngModel)]="fault.equal">
<nz-option nzValue="=" nzLabel="="></nz-option> <nz-option nzValue="=" nzLabel="="></nz-option>
<nz-option nzValue=">" nzLabel=">"></nz-option> <nz-option nzValue=">" nzLabel=">"></nz-option>
......
...@@ -21,8 +21,9 @@ import {NewTypeComponent} from '../new-type/new-type.component'; ...@@ -21,8 +21,9 @@ import {NewTypeComponent} from '../new-type/new-type.component';
background-color: #fff; background-color: #fff;
border-color: #d9d9d9; border-color: #d9d9d9;
} }
:host ::ng-deep .ant-tabs-nav .ant-tabs-tab-disabled{
color: rgba(0,0,0,.65); :host ::ng-deep .ant-tabs-nav .ant-tabs-tab-disabled {
color: rgba(0, 0, 0, .65);
} }
` `
] ]
...@@ -39,7 +40,7 @@ export class BasiCheckComponent implements OnInit { ...@@ -39,7 +40,7 @@ export class BasiCheckComponent implements OnInit {
itemId; //监控项id itemId; //监控项id
interfaceList: any[]; interfaceList: any[];
valueMapList = []; valueMapList = [];
validateForm:FormGroup; validateForm: FormGroup;
checkList; //监测点分类 checkList; //监测点分类
interval; //间隔时长 interval; //间隔时长
conditionType = 'commonly'; conditionType = 'commonly';
...@@ -57,13 +58,14 @@ export class BasiCheckComponent implements OnInit { ...@@ -57,13 +58,14 @@ export class BasiCheckComponent implements OnInit {
value: '', value: '',
} }
]; //故障list ]; //故障list
tabNum:number; tabNum: number;
triggerObj = { triggerObj = {
condition:'', condition: '',
faultCondition:'', faultCondition: '',
itemName:'' itemName: ''
}; };
triggerId = []; triggerConditionId;
triggerFaultConditionId;
constructor(private overAllSer: OverAllService, private fb: FormBuilder, constructor(private overAllSer: OverAllService, private fb: FormBuilder,
private message: NzMessageService) { private message: NzMessageService) {
...@@ -74,34 +76,34 @@ export class BasiCheckComponent implements OnInit { ...@@ -74,34 +76,34 @@ export class BasiCheckComponent implements OnInit {
this.getValuemap(); this.getValuemap();
} }
initForm(){ initForm() {
this.tabNum = 0; this.tabNum = 0;
this.validateForm = this.fb.group({ this.validateForm = this.fb.group({
hostid:[this.hostId], hostid: [this.hostId],
name:[null,[Validators.required]], name: [null, [Validators.required]],
interfaceid:[null,[Validators.required]], interfaceid: [null, [Validators.required]],
key_:[null,[Validators.required]], key_: [null, [Validators.required]],
value_type:[null,[Validators.required]], value_type: [null, [Validators.required]],
type:[null,[Validators.required]], type: [null, [Validators.required]],
units:[null], units: [null],
formula:[null,[Validators.required]], formula: [null, [Validators.required]],
history:['3600'], history: ['3600'],
trends:[null], trends: [null],
valuemapid:['0'], valuemapid: ['0'],
delay:[null,[Validators.required]], delay: [null, [Validators.required]],
snmp_oid:[null], snmp_oid: [null],
snmp_community:['public'], snmp_community: ['public'],
applicationids:[null], applicationids: [null],
}); });
this.triggerObj = { this.triggerObj = {
condition:'', condition: '',
faultCondition:'', faultCondition: '',
itemName:'' itemName: ''
}; };
} }
//新增 //新增
showAddModal(hostId,hostName){ showAddModal(hostId, hostName) {
this.title = '添加监测点'; this.title = '添加监测点';
this.isCheck = true; this.isCheck = true;
this.hostId = hostId; this.hostId = hostId;
...@@ -116,21 +118,21 @@ export class BasiCheckComponent implements OnInit { ...@@ -116,21 +118,21 @@ export class BasiCheckComponent implements OnInit {
} }
//映射值 //映射值
getValuemap(){ getValuemap() {
this.overAllSer.findValuemap().subscribe( this.overAllSer.findValuemap().subscribe(
(res)=>{ (res) => {
if(res.errCode == 10000){ if (res.errCode == 10000) {
this.valueMapList = res.data; this.valueMapList = res.data;
}else{ } else {
this.message.error(res.errMsg); this.message.error(res.errMsg);
} }
} }
) );
} }
//编辑 //编辑
showEditModal(hostId,id,hostName){ showEditModal(hostId, id, hostName) {
this.title = "编辑监测点"; this.title = '编辑监测点';
this.hostId = hostId; this.hostId = hostId;
this.isCheck = true; this.isCheck = true;
this.itemId = id; this.itemId = id;
...@@ -139,55 +141,56 @@ export class BasiCheckComponent implements OnInit { ...@@ -139,55 +141,56 @@ export class BasiCheckComponent implements OnInit {
(res) => { (res) => {
const data = res.data[0]; const data = res.data[0];
data.type += ''; data.type += '';
data.interfaceid += ""; data.interfaceid += '';
data.value_type += ""; data.value_type += '';
this.validateForm.patchValue(data); this.validateForm.patchValue(data);
data.triggers.forEach( (value)=> { data.triggers.forEach((value) => {
this.triggerId.push(value.triggerid);
let str = value.expression; let str = value.expression;
let equal = []; let equal = [];
let arr = []; let arr = [];
let con = ""; let con = '';
let a = str.split(" "); let a = str.split(' ');
a.forEach((e)=> { // 符号数组 a.forEach((e) => { // 符号数组
let index1 = e.indexOf("}"); let index1 = e.indexOf('}');
if(e == 'and' || e == 'or'){ if (e == 'and' || e == 'or') {
equal.push(e); equal.push(e);
} }
if(index1 > -1){ if (index1 > -1) {
let f = e.substring(index1+1,e.length); let f = e.substring(index1 + 1, e.length);
con += '{' + this.hostName + ':' + this.validateForm.value.key_ + '.last()}' +f +" "; con += '{' + this.hostName + ':' + this.validateForm.value.key_ + '.last()}' + f + ' ';
}else{ } else {
con += e + " "; con += e + ' ';
} }
}); });
let c = str.replace(/and/g,"").replace(/or/g,"").split(" "); let c = str.replace(/and/g, '').replace(/or/g, '').split(' ');
c.forEach( (val,index)=> { c.forEach((val, index) => {
let index1 = val.indexOf("}"); let index1 = val.indexOf('}');
let d = val.substring(index1+1,val.length); let d = val.substring(index1 + 1, val.length);
let data; let data;
if(index > 0){ if (index > 0) {
data = { data = {
and: " "+equal[index-1]+" ", and: ' ' + equal[index - 1] + ' ',
equal: d[0], equal: d[0],
value: d.substring(1,c.length), value: d.substring(1, c.length),
} };
}else{ } else {
data = { data = {
equal: d[0], equal: d[0],
value: d.substring(1,c.length), value: d.substring(1, c.length),
} };
} }
arr.push(data); arr.push(data);
}); });
if(value.priority == 2 || value.priority == 3){ //危险 if (value.priority == 2 || value.priority == 3) { //危险
this.faultConditionList = arr; this.faultConditionList = arr;
this.triggerObj.condition = con; this.triggerObj.condition = con;
this.triggerConditionId = value.triggerid;
} }
if(value.priority == 4 || value.priority == 5){ //故障 if (value.priority == 4 || value.priority == 5) { //故障
this.conditionList = arr; this.conditionList = arr;
this.triggerObj.faultCondition = con; this.triggerObj.faultCondition = con;
this.triggerFaultConditionId = value.triggerid;
} }
}); });
...@@ -218,32 +221,32 @@ export class BasiCheckComponent implements OnInit { ...@@ -218,32 +221,32 @@ export class BasiCheckComponent implements OnInit {
//添加 //添加
handleCheckOk() { handleCheckOk() {
for(let i in this.validateForm.controls) { for (let i in this.validateForm.controls) {
this.validateForm.controls[ i ].markAsDirty(); this.validateForm.controls[i].markAsDirty();
this.validateForm.controls[ i ].updateValueAndValidity(); this.validateForm.controls[i].updateValueAndValidity();
} }
if(this.validateForm.invalid){ if (this.validateForm.invalid) {
this.message.error("请输入必填信息"); this.message.error('请输入必填信息');
return false; return false;
} }
this.validateForm.value.applicationids = [this.validateForm.value.applicationids]; this.validateForm.value.applicationids = [this.validateForm.value.applicationids];
this.validateForm.value.hostid = this.hostId; this.validateForm.value.hostid = this.hostId;
if(this.title == "添加监测点"){ if (this.title == '添加监测点') {
this.create(); this.create();
} }
if(this.title == "编辑监测点"){ if (this.title == '编辑监测点') {
this.update(); this.update();
} }
} }
create(){ create() {
this.overAllSer.create(this.validateForm.value).subscribe( this.overAllSer.create(this.validateForm.value).subscribe(
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
this.message.success("创建监测点成功"); this.message.success('创建监测点成功');
this.done.emit(); this.done.emit();
this.tabNum = 1; this.tabNum = 1;
}else{ } else {
this.message.error(res.errMsg); this.message.error(res.errMsg);
} }
}, },
...@@ -254,15 +257,15 @@ export class BasiCheckComponent implements OnInit { ...@@ -254,15 +257,15 @@ export class BasiCheckComponent implements OnInit {
} }
//修改监控项 //修改监控项
update(){ update() {
this.validateForm.addControl('itemid',new FormControl(this.itemId)); this.validateForm.addControl('itemid', new FormControl(this.itemId));
this.overAllSer.itemUpdata(this.validateForm.value).subscribe( this.overAllSer.itemUpdata(this.validateForm.value).subscribe(
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
this.message.success("修改监测点成功"); this.message.success('修改监测点成功');
this.done.emit(); this.done.emit();
this.tabNum = 1; this.tabNum = 1;
}else{ } else {
this.message.error(res.errMsg); this.message.error(res.errMsg);
} }
}, },
...@@ -337,75 +340,88 @@ export class BasiCheckComponent implements OnInit { ...@@ -337,75 +340,88 @@ export class BasiCheckComponent implements OnInit {
getKey(keyValue): void { getKey(keyValue): void {
const d = { const d = {
key_:keyValue key_: keyValue
} };
this.validateForm.patchValue(d); this.validateForm.patchValue(d);
} }
//阈值--start //阈值--start
saveTrigger(){ saveTrigger() {
const data = { const data = {
condition:'', condition: '',
faultCondition:'' faultCondition: ''
}; };
if (this.conditionType == 'commonly') { //常规 if (this.conditionType == 'commonly') { //常规
this.conditionList.forEach(res => { this.conditionList.forEach(res => {
data.condition += '{' + this.hostName + ':' + this.validateForm.value.key_ + '.last()}' + res.equal + '' + res.value + res.and; if(!res.and){
}); res.and = "";
}
console.log(res);
data.condition += res.and + '{' + this.hostName + ':' + this.validateForm.value.key_ + '.last()}' + res.equal + '' + res.value ;
});
this.faultConditionList.forEach(res => { this.faultConditionList.forEach(res => {
data.faultCondition += '{' + this.hostName + ':' + this.validateForm.value.key_ + '.last()}' + res.equal + '' + res.value + res.and; if(!res.and){
res.and = "";
}
data.faultCondition += res.and + '{' + this.hostName + ':' + this.validateForm.value.key_ + '.last()}' + res.equal + '' + res.value ;
}); });
data.condition = data.condition.substring(0,data.condition.length -4);
data.faultCondition = data.faultCondition.substring(0,data.faultCondition.length -4);
} else { //高级 } else { //高级
data.condition = this.triggerObj.condition; data.condition = this.triggerObj.condition;
data.faultCondition = this.triggerObj.faultCondition; data.faultCondition = this.triggerObj.faultCondition;
} }
if(this.title == "添加监测点"){ if (this.title == '添加监测点') {
this.createTrigger(data); this.createTrigger(data);
} }
if(this.title == "编辑监测点"){ if (this.title == '编辑监测点') {
this.updateTrigger(data); this.updateTrigger(data);
} }
} }
//1.创建阈值 //1.创建阈值
createTrigger(data){ createTrigger(data) {
const res = { const res = {
itemName:this.validateForm.value.name, itemName: this.validateForm.value.name,
faultCondition:data.faultCondition, faultCondition: data.faultCondition,
condition:data.condition condition: data.condition
}; };
this.overAllSer.createTrigger(res).subscribe( this.overAllSer.createTrigger(res).subscribe(
(response)=>{ (response) => {
if(response.errCode == 10000){ if (response.errCode == 10000) {
this.message.success("创建阈值成功"); this.message.success('创建阈值成功');
this.initForm(); this.initForm();
this.isCheck = false; this.isCheck = false;
}else{ } else {
this.message.error(response.errMsg); this.message.error(response.errMsg);
} }
} }
) );
} }
//2.修改阈值 //2.修改阈值
updateTrigger(data){ updateTrigger(data) {
const res = { const res = {
triggerid:this.triggerId, faultCondition: {
itemName:this.validateForm.value.name, itemName: this.validateForm.value.name,
faultCondition:data.faultCondition, faultCondition: data.faultCondition,
condition:data.condition triggerid: this.triggerFaultConditionId
},
condition: {
itemName: this.validateForm.value.name,
condition: data.condition,
triggerid: this.triggerConditionId
}
}; };
this.overAllSer.updateTrigger(res).subscribe(res=>{ this.overAllSer.updateTrigger(res).subscribe(res => {
if(res.errCode == 10000){ if (res.errCode == 10000) {
this.message.success("修改阈值成功"); this.message.success('修改阈值成功');
this.initForm(); this.initForm();
this.isCheck = false; this.isCheck = false;
}else{ } else {
this.message.error(res.errMsg); this.message.error(res.errMsg);
} }
}) });
} }
//阈值--end //阈值--end
} }
...@@ -409,7 +409,7 @@ ...@@ -409,7 +409,7 @@
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="equipmentTypeid">资产名称 <nz-form-label [nzOffset]="4" [nzSpan]="6" nzRequired nzFor="equipmentTypeid">资产名称
</nz-form-label> </nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input nz-input placeholder="资产名称" name="serialnoA"> <input nz-input placeholder="资产名称" name="name" [(ngModel)]="validateForm.name">
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
...@@ -439,7 +439,7 @@ ...@@ -439,7 +439,7 @@
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzSpan]="6" nzFor="serialnoA">品牌</nz-form-label> <nz-form-label [nzSpan]="6" nzFor="serialnoA">品牌</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input nz-input placeholder="品牌"> <input nz-input placeholder="品牌" name="invertoryname" [(ngModel)]="validateForm.inventoryExtend.invertoryname">
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
...@@ -459,7 +459,7 @@ ...@@ -459,7 +459,7 @@
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzSpan]="6" >型号</nz-form-label> <nz-form-label [nzSpan]="6" >型号</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input nz-input placeholder="型号"> <input nz-input placeholder="型号" name="serialnoA" [(ngModel)]="validateForm.inventoryExtend.serialnoA">
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
...@@ -479,7 +479,7 @@ ...@@ -479,7 +479,7 @@
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzSpan]="6" >MAC地址</nz-form-label> <nz-form-label [nzSpan]="6" >MAC地址</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input nz-input placeholder="MAC地址"> <input nz-input placeholder="MAC地址" name="mac" [(ngModel)]="validateForm.inventoryExtend.mac">
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
...@@ -498,7 +498,7 @@ ...@@ -498,7 +498,7 @@
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzSpan]="6">维保到期</nz-form-label> <nz-form-label [nzSpan]="6">维保到期</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input nz-input placeholder="维保到期" > <input nz-input placeholder="维保到期" name="maintenanceExpiration" [(ngModel)]="validateForm.inventoryExtend.maintenanceExpiration" >
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
...@@ -518,7 +518,7 @@ ...@@ -518,7 +518,7 @@
<nz-form-item nzFlex> <nz-form-item nzFlex>
<nz-form-label [nzSpan]="6">存放地点</nz-form-label> <nz-form-label [nzSpan]="6">存放地点</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input nz-input placeholder="存放地点"> <input nz-input placeholder="存放地点" [(ngModel)]="validateForm.inventoryExtend.storageLocation">
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
......
...@@ -399,7 +399,8 @@ export class BasicEditComponent implements OnInit { ...@@ -399,7 +399,8 @@ export class BasicEditComponent implements OnInit {
invertoryname: null, invertoryname: null,
mac: null, mac: null,
storageLocation: null, storageLocation: null,
maintenanceExpiration: null maintenanceExpiration: null,
name:null
}, },
templates: null, templates: null,
name: null, name: null,
......
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
</nz-collapse> </nz-collapse>
</div> </div>
<div nz-row> <div nz-row>
<nz-table #basicTable [nzData]="dataSet"> <nz-table #basicTable [nzData]="dataSet" [nzFrontPagination]="false" [nzTotal]="totalNumInOut" [nzPageIndex]="pageNum" [nzPageSize]="pageCount" (nzPageIndexChange)="changeInoutInfo($event)" [nzLoading]="inOutLoading">
<thead> <thead>
<tr> <tr>
<th>状态</th> <th>状态</th>
...@@ -153,7 +153,6 @@ ...@@ -153,7 +153,6 @@
<th nzWidth="250px">最新数据时间</th> <th nzWidth="250px">最新数据时间</th>
<th>监测点分类</th> <th>监测点分类</th>
<th>更新时间间隔</th> <th>更新时间间隔</th>
<!--<th>来源</th>-->
<th>图表</th> <th>图表</th>
<th>操作</th> <th>操作</th>
</tr> </tr>
......
...@@ -94,7 +94,9 @@ export class BasicDetailComponent implements OnInit, AfterViewInit { ...@@ -94,7 +94,9 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
//进出口流量-分页 //进出口流量-分页
pageNum = 1; pageNum = 1;
pageCount = 5;
totalNumInOut; totalNumInOut;
inOutLoading;
//分页--告警 //分页--告警
warn_totalNum; warn_totalNum;
...@@ -573,17 +575,20 @@ export class BasicDetailComponent implements OnInit, AfterViewInit { ...@@ -573,17 +575,20 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
//进出口流量-SNMP //进出口流量-SNMP
inOutInfo() { inOutInfo() {
this.inOutLoading = true;
const data = { const data = {
obj:{ obj:{
hostid:Number(this.hostId) hostid:Number(this.hostId)
}, },
pageNum:this.pageNum, pageNum:this.pageNum,
pageCount:this.pageSize pageCount:this.pageCount
} }
this.overAllSer.inOutInfoSnmp(data).subscribe( this.overAllSer.inOutInfoSnmp(data).subscribe(
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
this.dataSet = res.data; this.dataSet = res.data.data;
this.inOutLoading = false;
this.totalNumInOut = res.data.totalNum;
}else{ }else{
this.message.info(res.errMsg); this.message.info(res.errMsg);
} }
...@@ -591,6 +596,12 @@ export class BasicDetailComponent implements OnInit, AfterViewInit { ...@@ -591,6 +596,12 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
); );
} }
//进出口流量 翻页
changeInoutInfo(e){
this.pageNum = e;
this.inOutInfo();
}
//添加监测点 //添加监测点
showCheckModal() { showCheckModal() {
this.smartCheck.showAddModal(this.hostId,this.realName); this.smartCheck.showAddModal(this.hostId,this.realName);
......
...@@ -110,7 +110,9 @@ ...@@ -110,7 +110,9 @@
<nz-tag *ngIf="item.maxLevel == 2 || item.maxLevel == 3" [nzColor]="col.yellow"></nz-tag> <nz-tag *ngIf="item.maxLevel == 2 || item.maxLevel == 3" [nzColor]="col.yellow"></nz-tag>
<nz-tag *ngIf="item.maxLevel < 2" [nzColor]="col.green"></nz-tag> <nz-tag *ngIf="item.maxLevel < 2" [nzColor]="col.green"></nz-tag>
</td> </td>
<td>关联资产</td> <td>
<span (click)="goTOInventory(item?.inventory?.id)">{{item?.inventory?.name}}</span>
</td>
<td> <td>
<span *ngIf="item.status == 0">已监控</span> <span *ngIf="item.status == 0">已监控</span>
<span *ngIf="item.status == 1">未监控</span> <span *ngIf="item.status == 1">未监控</span>
...@@ -211,7 +213,7 @@ ...@@ -211,7 +213,7 @@
<nz-tag *ngIf="item.maxLevel == 2 || item.maxLevel == 3" [nzColor]="color.yellow"></nz-tag> <nz-tag *ngIf="item.maxLevel == 2 || item.maxLevel == 3" [nzColor]="color.yellow"></nz-tag>
<nz-tag *ngIf="item.maxLevel < 2" [nzColor]="color.green"></nz-tag> <nz-tag *ngIf="item.maxLevel < 2" [nzColor]="color.green"></nz-tag>
</td> </td>
<td>关联资产</td> <td>{{item?.inventory?.name}}</td>
<td> <td>
<span *ngIf="item.status == 0">已监控</span> <span *ngIf="item.status == 0">已监控</span>
<span *ngIf="item.status == 1">未监控</span> <span *ngIf="item.status == 1">未监控</span>
...@@ -303,7 +305,7 @@ ...@@ -303,7 +305,7 @@
<nz-tag *ngIf="item.maxLevel == 2 || item.maxLevel == 3" [nzColor]="color.yellow"></nz-tag> <nz-tag *ngIf="item.maxLevel == 2 || item.maxLevel == 3" [nzColor]="color.yellow"></nz-tag>
<nz-tag *ngIf="item.maxLevel < 2" [nzColor]="color.green"></nz-tag> <nz-tag *ngIf="item.maxLevel < 2" [nzColor]="color.green"></nz-tag>
</td> </td>
<td>关联资产</td> <td>{{item?.inventory?.name}}</td>
<td> <td>
<span *ngIf="item.status == 0">已监控</span> <span *ngIf="item.status == 0">已监控</span>
<span *ngIf="item.status == 1">未监控</span> <span *ngIf="item.status == 1">未监控</span>
......
...@@ -231,6 +231,7 @@ export class BasicComponent implements OnInit { ...@@ -231,6 +231,7 @@ export class BasicComponent implements OnInit {
this.loading = true; this.loading = true;
this.searchStatus = false; this.searchStatus = false;
this.frontPagination = true; this.frontPagination = true;
this.findOpStatus();
if (this.selectedValue == 'group') { if (this.selectedValue == 'group') {
this.overAllSer.getgroups({}).subscribe( this.overAllSer.getgroups({}).subscribe(
(res) => { (res) => {
...@@ -540,4 +541,9 @@ export class BasicComponent implements OnInit { ...@@ -540,4 +541,9 @@ export class BasicComponent implements OnInit {
nzOnCancel: () => console.log('Cancel') nzOnCancel: () => console.log('Cancel')
}); });
} }
//资产页面
goTOInventory(id){
}
} }
...@@ -84,5 +84,5 @@ ...@@ -84,5 +84,5 @@
</tbody> </tbody>
</nz-table> </nz-table>
<smart-plan-modal #smartPlanMoadl ></smart-plan-modal> <smart-plan-modal #smartPlanMoadl (done)="getList()"></smart-plan-modal>
<smart-look-plan #smartLookPlan></smart-look-plan> <smart-look-plan #smartLookPlan></smart-look-plan>
\ No newline at end of file
import {Component, OnInit, ViewChild} from '@angular/core'; import {Component, EventEmitter, OnInit, Output, ViewChild} from '@angular/core';
import {FormBuilder, FormGroup, Validators} from '@angular/forms'; import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {WorkService} from '../../work.service'; import {WorkService} from '../../work.service';
import {NzMessageService, UploadFile} from 'ng-zorro-antd'; import {NzMessageService, UploadFile} from 'ng-zorro-antd';
...@@ -11,6 +11,7 @@ import {SelectPersonComponent} from '../../../modal/select-person/select-person. ...@@ -11,6 +11,7 @@ import {SelectPersonComponent} from '../../../modal/select-person/select-person.
}) })
export class PlanModalComponent implements OnInit { export class PlanModalComponent implements OnInit {
@ViewChild('smartSelectPerson') smartSelectPerson: SelectPersonComponent; @ViewChild('smartSelectPerson') smartSelectPerson: SelectPersonComponent;
@Output() done = new EventEmitter<any>();
planList; planList;
planId; planId;
...@@ -127,6 +128,7 @@ export class PlanModalComponent implements OnInit { ...@@ -127,6 +128,7 @@ export class PlanModalComponent implements OnInit {
if (res.errCode == 10000) { if (res.errCode == 10000) {
this.message.success('修改计划成功'); this.message.success('修改计划成功');
this.initForm(); this.initForm();
this.done.emit();
this.isVisiable = false; this.isVisiable = false;
} else { } else {
this.message.error(res.errMsg); this.message.error(res.errMsg);
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
"label-position": true, "label-position": true,
"max-line-length": [ "max-line-length": [
true, true,
180 280
], ],
"member-access": false, "member-access": false,
"member-ordering": [ "member-ordering": [
......
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