Commit 8c13791b authored by wangqinghua's avatar wangqinghua

监控项

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