Commit 72775e8f authored by wangqinghua's avatar wangqinghua

update

parent 25f53b00
<nz-modal [nzWidth]="880" [(nzVisible)]="isCheck" [nzTitle]="title" (nzOnCancel)="handleCheckCancel()"
(nzOnOk)="handleCheckOk()">
<nz-modal [nzWidth]="880" [(nzVisible)]="isCheck" [nzTitle]="title" (nzOnCancel)="handleCheckCancel()" (nzOnOk)="handleCheckOk()" [nzOkLoading]="isOkLoading">
<form [formGroup]="validateForm" nz-form>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired nzFor="checkName">监测点名称</nz-form-label>
......
......@@ -35,6 +35,7 @@ export class BasiCheckComponent implements OnInit {
title;
isCheck = false;
isOkLoading = false;
isInterface = true; //添加模版监测点的时候不需要主机接口
nzSize = 'large';
hostId; //主机ID
......@@ -187,8 +188,8 @@ export class BasiCheckComponent implements OnInit {
this.message.error('请输入必填信息');
return false;
}
this.validateForm.value.applications = this.validateForm.value.applications;
this.validateForm.value.hostid = this.hostId;
this.isOkLoading = true;
if (this.title == '添加监测点' || this.title == "添加模版监测点") {
this.create();
}
......@@ -209,6 +210,7 @@ export class BasiCheckComponent implements OnInit {
} else {
this.message.error(res.errMsg);
}
this.isOkLoading = false;
},
(err) => {
this.message.error('系统错误');
......@@ -233,6 +235,7 @@ export class BasiCheckComponent implements OnInit {
} else {
this.message.error(res.errMsg);
}
this.isOkLoading = false;
},
(err) => {
this.message.error('系统错误');
......
<!--添加资源-->
<nz-modal [nzWidth]="1080" [nzFooter]="null" [(nzVisible)]="isBasicEdit" nzTitle="{{modalTitle}}"
(nzOnCancel)="handleEditCancel()" (nzOnOk)="handEditleOk()">
<nz-tabset [nzSelectedIndex]="tabNum" (nzSelectedIndexChange)="tabsChange($event)" style="padding-bottom: 25px;min-height: 500px">
<nz-modal [nzWidth]="1080" [(nzVisible)]="isBasicEdit" [nzTitle]="modalTitle" (nzOnCancel)="handleEditCancel()" (nzOnOk)="handEditleOk()" [nzOkLoading]="isOkLoading">
<nz-tabset [(nzSelectedIndex)]="tabNum" (nzSelectedIndexChange)="tabsChange($event)" style="padding-bottom: 25px;min-height: 500px">
<nz-tab nzTitle="资源信息">
<div nz-form class="ant-advanced-search-form form-select">
<div nz-row [nzGutter]="24">
......@@ -125,11 +124,6 @@
</nz-form-control>
</nz-form-item>
</div>
<div class="modal-footer-btn">
<button nz-button (click)="handleEditCancel()" nzType="primary">取消</button>
<button nz-button (click)="tabsChange(1)" nzType="primary">下一步</button>
</div>
</nz-tab>
<nz-tab nzTitle="配置信息">
......@@ -281,12 +275,6 @@
</div>
</nz-collapse-panel>
</nz-collapse>
<div class="modal-footer-btn">
<button nz-button (click)="handleEditCancel()" nzType="primary">取消</button>
<button nz-button (click)="tabsChange(0)" nzType="primary">上一步</button>
<button nz-button (click)="tabsChange(2)" nzType="primary">下一步</button>
</div>
</nz-tab>
<!--<nz-tab nzTitle="加密">-->
......@@ -529,12 +517,6 @@
</ng-container>
</div>
<div class="modal-footer-btn">
<button nz-button (click)="handleEditCancel()" nzType="primary">取消</button>
<button nz-button (click)="tabsChange(1)" nzType="primary">上一步</button>
<button nz-button (click)="handEditleOk()" nzType="primary">完成</button>
</div>
</nz-tab>
</nz-tabset>
</nz-modal>
......@@ -43,7 +43,8 @@ export class BasicEditComponent implements OnInit {
otherHost;
isBasicEdit = false;
tabNum: number; //tabs面板的序列号
isOkLoading = false;
tabNum = 0; //tabs面板的序列号
macroList1: any[];
macroList2: any[]; //配置宏数组
interfaceslist: any[]; //接口list
......@@ -82,6 +83,7 @@ export class BasicEditComponent implements OnInit {
//新增
showModal(): void {
this.tabNum = 0;
this.isBasicEdit = true;
this.modalTitle = '添加资源';
this.getGroup();
......@@ -110,6 +112,7 @@ export class BasicEditComponent implements OnInit {
editModal(hostId, name, gId): void {
this.getGroup();
this.isBasicEdit = true;
this.tabNum = 0;
this.hostId = hostId;
this.modalTitle = '编辑资源';
this.overAllSer.findDetailed(this.hostId).subscribe(
......@@ -227,6 +230,7 @@ export class BasicEditComponent implements OnInit {
});
this.validateForm.groups = groupArr;
this.isOkLoading = true;
if (this.modalTitle == '编辑资源') {
this.update();
} else {
......@@ -253,6 +257,7 @@ export class BasicEditComponent implements OnInit {
}else{
this.message.error(res.errMsg);
}
this.isOkLoading = false;
},
(err) => {
this.message.info('系统错误');
......@@ -291,6 +296,7 @@ export class BasicEditComponent implements OnInit {
}else{
this.message.error(res.errMsg);
}
this.isOkLoading = false;
},
(err) => {
this.message.info('系统错误');
......
......@@ -134,6 +134,7 @@ export class IconComponent implements OnInit {
handleCancel() {
this.isVisible = false;
this.initForm();
}
}
......@@ -209,7 +209,7 @@
<td></td>
<td [nzIndentSize]="item.level*20" nzShowExpand [nzExpand]='item.expand'
(nzExpandChange)="getChildren(item)">
<span>{{item.name}} <span style="color: #439d68; margin-left: 10px">主机数量:{{item.hostcount}}</span> </span>
<span>{{item.name}} <span style="color: #1b6b5bcc; margin-left: 10px">主机数量:{{item.hostcount}}</span> </span>
</td>
</ng-container>
<!--子集-->
......
......@@ -32,7 +32,7 @@ export class UploadComponent implements OnInit {
beforeUpload = (file: UploadFile): boolean => {
const isExcel = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' || 'application/octet-stream';
if (!isExcel) {
this.message.error('请上传excel文件!');
this.message.error('请上传正确的文件!');
} else {
this.fileList[0] = file;
}
......
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