Commit f2c7316e authored by wangqinghua's avatar wangqinghua

update

parent cfb94508
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
<input nz-input [(ngModel)]="item.value"> <input nz-input [(ngModel)]="item.value">
</nz-form-control> </nz-form-control>
<nz-form-control nz-col [nzSpan]="3"> <nz-form-control nz-col [nzSpan]="3">
<span (click)="deleteMacro1(i)">移除</span> <span class="main-color cursor" (click)="deleteMacro1(i)">移除</span>
</nz-form-control> </nz-form-control>
</div> </div>
<div nz-row [nzGutter]="24"> <div nz-row [nzGutter]="24">
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
<span>"public"</span> <span>"public"</span>
</div> </div>
<div nz-col [nzSpan]="2"> <div nz-col [nzSpan]="2">
<span class="cursor" (click)="deleteMacro2(i)">移除</span> <span class="cursor main-color" (click)="deleteMacro2(i)">移除</span>
</div> </div>
</div> </div>
<button nz-button (click)="addMacro2()" nzType="default">添加</button> <button nz-button (click)="addMacro2()" nzType="default">添加</button>
......
...@@ -42,6 +42,7 @@ export class StrategyComponent implements OnInit { ...@@ -42,6 +42,7 @@ export class StrategyComponent implements OnInit {
} }
initForm() { initForm() {
this.tabNum = 0;
this.templateList.forEach(e => { this.templateList.forEach(e => {
e.checked = false; e.checked = false;
}); });
...@@ -124,6 +125,18 @@ export class StrategyComponent implements OnInit { ...@@ -124,6 +125,18 @@ export class StrategyComponent implements OnInit {
this.validateForm.templates = tempArr; this.validateForm.templates = tempArr;
this.templatesResoure = tempArr; this.templatesResoure = tempArr;
} }
if(data.macros){
//宏回显
let macroArr = [];
macroArr = data.macros.map(e=>{
const d = {
macro:e.macro,
value:e.value,
};
return d;
})
this.macroList1 = macroArr;
}
} }
); );
} }
...@@ -133,8 +146,7 @@ export class StrategyComponent implements OnInit { ...@@ -133,8 +146,7 @@ export class StrategyComponent implements OnInit {
if (han.test(this.validateForm.host)) { if (han.test(this.validateForm.host)) {
this.message.error('模版真实名称不能输入中文'); this.message.error('模版真实名称不能输入中文');
return false; return false;
} };
;
return true; return true;
} }
......
...@@ -52,10 +52,13 @@ ...@@ -52,10 +52,13 @@
<td class="cursor main-color"> <td class="cursor main-color">
<span (click)="goToTrigger(data)">{{data.triggersCount}}</span> <span (click)="goToTrigger(data)">{{data.triggersCount}}</span>
</td> </td>
<td>{{data.stock}}</td> <td>{{data.key_}}</td>
<td>{{data.usedcount}}</td> <td>{{data.delay}}</td>
<td>{{data.lendcount}}</td> <td>{{data.type}}</td>
<td>{{data.repaircount}}</td> <td>
<span *ngIf="data.status == 0">启用</span>
<span *ngIf="data.status == 1">禁用</span>
</td>
<td class="main-color cursor"> <td class="main-color cursor">
<span (click)="showEditModal(data)">编辑</span> <span (click)="showEditModal(data)">编辑</span>
<span (click)="deleteDiscovery(data)">删除</span> <span (click)="deleteDiscovery(data)">删除</span>
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<th>描述</th> <th>描述</th>
<th>自动发现</th> <th>自动发现</th>
<th>监控项</th> <th>监控项</th>
<th>触发器</th> <th>阈值</th>
<th>操作</th> <th>操作</th>
</tr> </tr>
</thead> </thead>
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<td class="main-color cursor"> <td class="main-color cursor">
<span (click)="goToDiscovery(item)">{{item.discoveriesCount}}</span> <span (click)="goToDiscovery(item)">{{item.discoveriesCount}}</span>
</td> </td>
<td>{{item.itemCount}}</td> <td>{{item.itemsCount}}</td>
<td>{{item.triggersCount}}</td> <td>{{item.triggersCount}}</td>
</ng-container> </ng-container>
...@@ -110,6 +110,8 @@ ...@@ -110,6 +110,8 @@
<span >{{item.name}}</span> <span >{{item.name}}</span>
</td> </td>
<td>{{item.description}}</td> <td>{{item.description}}</td>
<td>{{item.itemsCount}}</td>
<td>{{item.triggersCount}}</td>
<td class="main-color cursor"> <td class="main-color cursor">
<span (click)="goToDiscovery(item)">{{item.discoveriesCount}}</span> <span (click)="goToDiscovery(item)">{{item.discoveriesCount}}</span>
</td> </td>
......
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