Commit 22d0ba8d authored by wangqinghua's avatar wangqinghua

(click)="ngOnInit()"

parent b287c733
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<div nz-row class="search-form"> <div nz-row class="search-form">
<div nz-col nzSpan="12"> <div nz-col nzSpan="12">
<nz-select style="width: 200px;" nzShowSearch nzAllowClear nzPlaceHolder="选择告警组" [(ngModel)]="alertGroupId" (ngModelChange)="getList()"> <nz-select style="width: 200px;" nzPlaceHolder="选择告警组" [(ngModel)]="alertGroupId" (ngModelChange)="getList()">
<ng-container *ngFor="let item of groupList;let i = index;"> <ng-container *ngFor="let item of groupList;let i = index;">
<nz-option nzLabel="{{item.name}}" nzValue="{{item.id}}"></nz-option> <nz-option nzLabel="{{item.name}}" nzValue="{{item.id}}"></nz-option>
</ng-container> </ng-container>
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
</button> </button>
<button nz-button nzType="default" (click)="editGroup()"><i class="anticon anticon-form"></i>编辑</button> <button nz-button nzType="default" (click)="editGroup()"><i class="anticon anticon-form"></i>编辑</button>
<button nz-button nzType="default" (click)="deleteGroup()"><i class="anticon anticon-close-circle-o"></i>删除</button> <button nz-button nzType="default" (click)="deleteGroup()"><i class="anticon anticon-close-circle-o"></i>删除</button>
<!--<button nz-button nzType="default"><i class="anticon anticon-pause-circle-o"></i>暂停</button>-->
</div> </div>
</div> </div>
<div nz-row class="search-form"> <div nz-row class="search-form">
......
...@@ -26,7 +26,6 @@ export class AlarmSetComponent implements OnInit { ...@@ -26,7 +26,6 @@ export class AlarmSetComponent implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.getList();
this.getGroupAlarm(); this.getGroupAlarm();
} }
...@@ -53,6 +52,8 @@ export class AlarmSetComponent implements OnInit { ...@@ -53,6 +52,8 @@ export class AlarmSetComponent implements OnInit {
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
this.groupList = res.data; this.groupList = res.data;
this.alertGroupId = this.groupList[0].id;
this.getList();
} }
} }
); );
......
...@@ -335,9 +335,9 @@ export class HomeComponent implements OnInit,AfterViewInit { ...@@ -335,9 +335,9 @@ export class HomeComponent implements OnInit,AfterViewInit {
name:"设备", name:"设备",
type: 'pie', type: 'pie',
clockWise: true, clockWise: true,
center: ["45%", "50%"], center: ["47%", "50%"],
radius: ['40%', '60%'], radius: ['40%', '60%'],
color: ['#fcee56', '#ff8400', '#f93215', '#701002', '#2fb35b', '#a0a0a0'], color: ['#f93215', '#ff8400', '#2fb35b', '#a0a0a0'],
label: { label: {
normal: { normal: {
show: false, show: false,
...@@ -350,10 +350,10 @@ export class HomeComponent implements OnInit,AfterViewInit { ...@@ -350,10 +350,10 @@ export class HomeComponent implements OnInit,AfterViewInit {
} }
}, },
data: [ data: [
{value: data.warning, name: '告警'},
{value: data.disabled, name: '禁止'},
{value: data.high, name: '严重'}, {value: data.high, name: '严重'},
{value: data.warning, name: '告警'},
{value: data.normal, name: '正常'}, {value: data.normal, name: '正常'},
{value: data.disabled, name: '禁止'},
], ],
itemStyle: { itemStyle: {
emphasis: { emphasis: {
...@@ -422,9 +422,9 @@ export class HomeComponent implements OnInit,AfterViewInit { ...@@ -422,9 +422,9 @@ export class HomeComponent implements OnInit,AfterViewInit {
name:"监测点", name:"监测点",
type: 'pie', type: 'pie',
clockWise: true, clockWise: true,
center: ["45%", "50%"], center: ["47%", "50%"],
radius: ['40%', '60%'], radius: ['40%', '60%'],
color: ['#fcee56', '#ff8400', '#f93215', '#701002', '#2fb35b', '#a0a0a0'], color: ['#f93215', '#ff8400', '#2fb35b', '#a0a0a0'],
label: { label: {
normal: { normal: {
show: false, show: false,
...@@ -437,10 +437,10 @@ export class HomeComponent implements OnInit,AfterViewInit { ...@@ -437,10 +437,10 @@ export class HomeComponent implements OnInit,AfterViewInit {
} }
}, },
data: [ data: [
{value: data.warning, name: '告警'},
{value: data.disabled, name: '禁止'},
{value: data.high, name: '严重'}, {value: data.high, name: '严重'},
{value: data.warning, name: '告警'},
{value: data.normal, name: '正常'}, {value: data.normal, name: '正常'},
{value: data.disabled, name: '禁止'},
], ],
itemStyle: { itemStyle: {
emphasis: { emphasis: {
......
...@@ -41,6 +41,7 @@ p { ...@@ -41,6 +41,7 @@ p {
.rightDiv { .rightDiv {
border: 1px solid #ddd; border: 1px solid #ddd;
padding: 10px !important;
} }
.rightDiv > p { .rightDiv > p {
...@@ -96,7 +97,7 @@ p { ...@@ -96,7 +97,7 @@ p {
} }
.calcle-follow{ .calcle-follow{
position: absolute; position: absolute;
top: 5px; top: 15px;
right: 15px; right: 15px;
} }
.chart-font{ .chart-font{
......
...@@ -20,22 +20,20 @@ ...@@ -20,22 +20,20 @@
</div> </div>
<div nz-row class="search-form"> <div nz-row class="search-form">
<div nz-col nzSpan="12"> <div nz-col nzSpan="12">
<button nz-button (click)="addIcon()" nzType="default"><i class="anticon anticon-plus-circle-o"></i>添加图标</button> <!--<button nz-button (click)="addIcon()" nzType="default"><i class="anticon anticon-plus-circle-o"></i>添加图标</button>-->
</div> </div>
</div> </div>
<nz-table #nzTable [nzData]="iconList" [nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount" (nzPageIndexChange)="changePage($event)"> <nz-table #nzTable [nzData]="iconList" [nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount" (nzPageIndexChange)="changePage($event)">
<thead> <thead>
<tr> <tr>
<th>一级类型</th> <th>资源类型</th>
<th>默认图标</th> <th>图标</th>
<th>所有图标</th>
<th>操作</th> <th>操作</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let data of iconList"> <tr *ngFor="let data of iconList">
<td>{{data.firstTypeName}}</td> <td>{{data.firstTypeName}}</td>
<td>{{data.defaultIcon}}</td>
<td> <td>
<img style="width: 40px;" [src]="imgUrl + data.url"> <img style="width: 40px;" [src]="imgUrl + data.url">
</td> </td>
......
...@@ -160,4 +160,7 @@ ...@@ -160,4 +160,7 @@
} }
.color-green{ .color-green{
color: green; color: green;
}
.padding-10{
padding: 10px;
} }
\ No newline at end of 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