Commit 8c13791b authored by wangqinghua's avatar wangqinghua

监控项

parent 81279855
......@@ -45,6 +45,7 @@ export class BasiCheckComponent implements OnInit {
validateForm: FormGroup;
checkList; //监测点分类
interval; //间隔时长
templateid; //模版id
tabNum: number;
triggerObj = {
......@@ -123,9 +124,10 @@ export class BasiCheckComponent implements OnInit {
}
//编辑
showEditModal(hostId, id, hostName) {
showEditModal(hostId, id, hostName,templateid) {
this.title = '编辑监测点';
this.hostId = hostId;
this.templateid = templateid;
this.isCheck = true;
this.itemId = id;
this.hostName = hostName;
......@@ -211,6 +213,7 @@ export class BasiCheckComponent implements OnInit {
//修改监控项
update() {
this.validateForm.addControl('itemid', new FormControl(this.itemId));
this.validateForm.addControl('templateid', new FormControl(this.templateid));
this.overAllSer.itemUpdata(this.validateForm.value).subscribe(
(res) => {
if (res.errCode == 10000) {
......
......@@ -645,7 +645,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
//编辑监测点
showEditModal(item){
this.smartCheck.showEditModal(this.hostId,item.itemid,this.realName);
this.smartCheck.showEditModal(this.hostId,item.itemid,this.realName,item.templateid);
}
//添加阈值
......@@ -736,7 +736,8 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
nzOkType: 'danger',
nzOnOk: () => {
const data = {
itemids:[item.itemid]
itemids:[item.itemid],
templateid:item.templateid
};
this.overAllSer.deleteItem(data).subscribe(
(res) => {
......
......@@ -7,6 +7,7 @@ import {SystemService} from '../../../../system/system.service';
import {CommonService} from '../../../../shared/common/common.service';
import {NzMessageService} from 'ng-zorro-antd';
import {TriModalComponent} from '../tri-modal/tri-modal.component';
import {BasiCheckComponent} from '../../../../modal/basi-check/basi-check.component';
@Component({
selector: 'smart-item-list',
......@@ -38,7 +39,7 @@ import {TriModalComponent} from '../tri-modal/tri-modal.component';
]
})
export class ItemListComponent implements OnInit {
@ViewChild('smartTriModal') smartTriModal: TriModalComponent;
@ViewChild('smartCheck') smartCheck: BasiCheckComponent;
tempName;
disName;
......@@ -48,6 +49,7 @@ export class ItemListComponent implements OnInit {
color = color;
//
itemTypeValue;
checkList: any[];
itemTypeList: any[];
isCheck = false;
......@@ -63,6 +65,7 @@ export class ItemListComponent implements OnInit {
//分页--监控点
pageIndex = 1; //当前页数
totalNum; //总数据长度
pageSize = pageSize;
applicationId; //分类ID
constructor(private overAllSer: OverAllService, private routerInfo: ActivatedRoute, private router: Router,
......@@ -157,4 +160,8 @@ export class ItemListComponent implements OnInit {
);
}
showAddModal(){
this.smartCheck.showAddModal(this.hostId,this.tempName,"添加监测点");
}
}
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