Commit eefb6bfc authored by wangqinghua's avatar wangqinghua

告警模块

parent 768e4153
......@@ -63,7 +63,6 @@ export class BasicEditComponent implements OnInit {
ngOnInit() {
this.tabNum = 0;
// this.isBasicEdit = true;
this.getTemplate();
this.validateForm = {
......@@ -106,11 +105,9 @@ export class BasicEditComponent implements OnInit {
//新增
showModal(hostId, name, gId): void {
this.isBasicEdit = true;
this.modalTitle = '添加资源';
this.hostId = hostId;
this.tabNum = 0;
this.isBasicEdit = true;
this.validateForm = {
groups: [],
hostExtend: {
......@@ -141,12 +138,9 @@ export class BasicEditComponent implements OnInit {
//编辑
editModal(hostId, name, gId): void {
console.log(this.validateForm);
this.isBasicEdit = true;
this.hostId = hostId;
this.modalTitle = '编辑资源';
this.tabNum = 0;
this.isBasicEdit = true;
this.overAllSer.findDetailed(this.hostId).subscribe(
(res) => {
this.validateForm = res.data[0];
......@@ -162,13 +156,10 @@ export class BasicEditComponent implements OnInit {
for(let i = 0;i<this.validateForm.groups.length;i++){
for(let j = 0;j<this.groupList.length;j++){
if(this.validateForm.groups[i].groupid == this.groupList[j].value){
console.log(this.groupList[j].value);
this.groupList[j].checked = true;
}
}
}
console.log(this.validateForm);
// this.message.info(res.errMsg);
}
);
}
......
......@@ -81,14 +81,14 @@ export class BasicComponent implements OnInit {
const stack = [];
const array = [];
const hashMap = {};
stack.push({...root, level: 0, expand: false});
stack.push({...root, level: 0, expand: true});
while (stack.length !== 0) {
const node = stack.pop();
this.visitNode(node, hashMap, array);
if (node.list) {
for (let i = node.list.length - 1; i >= 0; i--) {
stack.push({...node.list[i], level: node.level + 1, expand: false, parent: node, gId: groupId, checked: false});
stack.push({...node.list[i], level: node.level + 1, expand: true, parent: node, gId: groupId, checked: false});
}
}
}
......@@ -119,13 +119,11 @@ export class BasicComponent implements OnInit {
//添加资源 ,name-分组名称,id-分组id
showBasicEditModal(item) {
console.log(item);
this.basicEdit.showModal(item.hostId, item.name, item.id);
}
//编辑资源 name--分组名称,gId-当前分组的id
editBasicModal(item) {
console.log(item);
this.basicEdit.editModal(item.hostid, item.name, item.gId);
}
......
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