Commit 118d86a8 authored by wangqinghua's avatar wangqinghua

update

parent 3fa2485e
...@@ -30,9 +30,9 @@ ...@@ -30,9 +30,9 @@
<div nz-col nzSpan="12" class="text-right"> <div nz-col nzSpan="12" class="text-right">
<button nz-button nzType="default" (click)="showGroupModal()"><i class="anticon anticon-plus"></i>添加 <button nz-button nzType="default" (click)="showGroupModal()"><i class="anticon anticon-plus"></i>添加
</button> </button>
<button nz-button nzType="default" (click)="editGroup()"><i class="anticon anticon-pause-circle-o"></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-play-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-close-circle"></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">
......
...@@ -65,9 +65,13 @@ export class AlarmSetComponent implements OnInit { ...@@ -65,9 +65,13 @@ export class AlarmSetComponent implements OnInit {
//删除告警组 //删除告警组
deleteGroup() { deleteGroup() {
if (!this.alertGroupId) {
this.message.info('请选择需要删除的告警组');
return false;
}
this.modalSer.confirm({ this.modalSer.confirm({
nzTitle: '删除', nzTitle: '删除',
nzContent: '<b style="color: red;">确认删除该告警组吗?</b>', nzContent: '<b style="color: red;">确定要删除告警组及其所有告警吗?</b>',
nzOkText: '确定', nzOkText: '确定',
nzOkType: 'danger', nzOkType: 'danger',
nzOnOk: () => { nzOnOk: () => {
...@@ -93,7 +97,7 @@ export class AlarmSetComponent implements OnInit { ...@@ -93,7 +97,7 @@ export class AlarmSetComponent implements OnInit {
//修改告警组 //修改告警组
editGroup() { editGroup() {
if (!this.alertGroupId) { if (!this.alertGroupId) {
this.message.info('请选择需要编辑的组'); this.message.info('请选择需要编辑的告警组');
return false; return false;
} }
let arr = []; let arr = [];
......
...@@ -441,6 +441,7 @@ export class HomeComponent implements OnInit,AfterViewInit { ...@@ -441,6 +441,7 @@ export class HomeComponent implements OnInit,AfterViewInit {
series : [ series : [
{ {
name: '',
type: 'pie', type: 'pie',
radius : '55%', radius : '55%',
center: ['50%', '60%'], center: ['50%', '60%'],
...@@ -478,7 +479,7 @@ export class HomeComponent implements OnInit,AfterViewInit { ...@@ -478,7 +479,7 @@ export class HomeComponent implements OnInit,AfterViewInit {
series : [ series : [
{ {
name: '访问来源', name: '',
type: 'pie', type: 'pie',
radius : '55%', radius : '55%',
center: ['50%', '60%'], center: ['50%', '60%'],
......
...@@ -3,6 +3,7 @@ import {OverAllService} from '../../overAll/overAll.service'; ...@@ -3,6 +3,7 @@ import {OverAllService} from '../../overAll/overAll.service';
import {FormBuilder, FormGroup, Validators} from '@angular/forms'; import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {NzMessageComponent, NzMessageService} from 'ng-zorro-antd'; import {NzMessageComponent, NzMessageService} from 'ng-zorro-antd';
import {LayoutService} from '../../layouts/layout.service'; import {LayoutService} from '../../layouts/layout.service';
import {LoginService} from '../../shared';
@Component({ @Component({
selector: 'smart-modify-password', selector: 'smart-modify-password',
...@@ -18,7 +19,7 @@ export class ModifyPasswordComponent implements OnInit { ...@@ -18,7 +19,7 @@ export class ModifyPasswordComponent implements OnInit {
groupid; groupid;
constructor(private fb: FormBuilder, private layoutSer: LayoutService, constructor(private fb: FormBuilder, private layoutSer: LayoutService,
private message: NzMessageService) {} private message: NzMessageService,private loginService:LoginService) {}
ngOnInit() { ngOnInit() {
this.initForm(); this.initForm();
...@@ -51,6 +52,7 @@ export class ModifyPasswordComponent implements OnInit { ...@@ -51,6 +52,7 @@ export class ModifyPasswordComponent implements OnInit {
if (res.errCode == 10000) { if (res.errCode == 10000) {
this.message.success('修改成功'); this.message.success('修改成功');
this.isVisible = false; this.isVisible = false;
this.loginService.logout();
this.initForm(); this.initForm();
} else { } else {
this.message.error(res.errMsg); this.message.error(res.errMsg);
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
</div> </div>
<div nz-col nzSpan="12" class="text-right"> <div nz-col nzSpan="12" class="text-right">
<button nz-button (click)="addTopo()" nzType="default"><i class="anticon anticon-plus"></i>添加</button> <button nz-button (click)="addTopo()" nzType="default"><i class="anticon anticon-plus"></i>添加</button>
<button nz-button (click)="editTopo()" nzType="default"><i class="anticon anticon-pause-circle-o"></i>编辑</button> <button nz-button (click)="editTopo()" nzType="default"><i class="anticon anticon-form"></i>编辑</button>
<button nz-button (click)="deleteTopo()" nzType="default"><i class="anticon anticon-play-circle-o"></i>删除</button> <button nz-button (click)="deleteTopo()" nzType="default"><i class="anticon anticon-play-circle-o"></i>删除</button>
</div> </div>
</div> </div>
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
</nz-breadcrumb> </nz-breadcrumb>
</div> </div>
<div nz-col nzSpan="5"> <div nz-col nzSpan="5">
<nz-input-group nzPrefixIcon="anticon anticon-search"> <nz-input-group>
<input type="text" nz-input [(ngModel)]="searchName" placeholder="输入资源名称"> <input (keyup.enter)="search('')" type="text" nz-input [(ngModel)]="searchName" placeholder="输入资源名称">
</nz-input-group> </nz-input-group>
</div> </div>
<div nz-col nzSpan="3" class="text-right"> <div nz-col nzSpan="3" class="text-right">
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</button> </button>
<button (click)="openBatchHost(0,'开启')" nz-button nzType="default"><i class="anticon anticon-play-circle-o"></i>开启监控 <button (click)="openBatchHost(0,'开启')" nz-button nzType="default"><i class="anticon anticon-play-circle-o"></i>开启监控
</button> </button>
<button (click)="batchDeleteConfirm()" nz-button nzType="default"><i class="anticon anticon-close-circle"></i>删除资源 <button (click)="batchDeleteConfirm()" nz-button nzType="default"><i class="anticon anticon-close-circle-o"></i>删除资源
</button> </button>
</div> </div>
</div> </div>
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
</nz-breadcrumb> </nz-breadcrumb>
</div> </div>
<div nz-col nzSpan="5"> <div nz-col nzSpan="5">
<nz-input-group nzPrefixIcon="anticon anticon-search"> <nz-input-group>
<input type="text" [(ngModel)]="name" nz-input placeholder="请输入网站名称"> <input (keyup.enter)="getwebList()" type="text" [(ngModel)]="name" nz-input placeholder="请输入网站名称">
</nz-input-group> </nz-input-group>
</div> </div>
<div nz-col nzSpan="3" class="text-right"> <div nz-col nzSpan="3" class="text-right">
......
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
<nz-table #basicTable [nzData]="nowStatus" [nzShowPagination]="false"> <nz-table #basicTable [nzData]="nowStatus" [nzShowPagination]="false">
<thead> <thead>
<tr> <tr>
<th>状态</th>
<th>No.</th> <th>No.</th>
<th>步骤</th> <th>步骤</th>
<th>速度</th> <th>速度</th>
...@@ -45,19 +44,19 @@ ...@@ -45,19 +44,19 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let data of basicTable.data"> <tr *ngFor="let data of nowStatus">
<td>{{data.no}}</td>
<td>{{data.name}}</td> <td>{{data.name}}</td>
<td>{{data.age}}</td> <td>{{data.download}}{{data.download_units}}</td>
<td>{{data.address}}</td> <td>{{data.response}}{{data.response_units}}</td>
<td>{{data.address}}</td> <td>{{data.response_code}}</td>
<td>{{data.address}}</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td></td> <td></td>
<td>总计</td> <td>总计</td>
<td></td> <td></td>
<td>68.4ms</td> <td>{{totalNum}}{{nowStatus[0].response_units}}</td>
<td></td> <td></td>
<td></td> <td></td>
</tr> </tr>
...@@ -65,7 +64,7 @@ ...@@ -65,7 +64,7 @@
</nz-table> </nz-table>
</nz-card> </nz-card>
<ng-template #extraTemplate> <ng-template #extraTemplate>
<span>最近一次检查时间</span><span>2013123</span> <!--<span>最近一次检查时间</span><span>2013123</span>-->
</ng-template> </ng-template>
</div> </div>
<div nz-col nzSpan="12"> <div nz-col nzSpan="12">
...@@ -79,7 +78,7 @@ ...@@ -79,7 +78,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let data of basicTable.data"> <tr *ngFor="let data of triggerList">
<td> <td>
<span *ngIf="data.priority ==2 ">故障</span> <span *ngIf="data.priority ==2 ">故障</span>
<span *ngIf="data.priority ==4 ">危险</span> <span *ngIf="data.priority ==4 ">危险</span>
......
...@@ -53,6 +53,8 @@ export class NetworkDetailComponent implements OnInit, OnChanges { ...@@ -53,6 +53,8 @@ export class NetworkDetailComponent implements OnInit, OnChanges {
endTime: '' endTime: ''
}; };
totalNum = 0;
constructor(private overAllSer: OverAllService, private routerInfo: ActivatedRoute,private router:Router, constructor(private overAllSer: OverAllService, private routerInfo: ActivatedRoute,private router:Router,
private message: NzMessageService, private datePipe: DatePipe,private commonSer:CommonService) { private message: NzMessageService, private datePipe: DatePipe,private commonSer:CommonService) {
} }
...@@ -95,6 +97,9 @@ export class NetworkDetailComponent implements OnInit, OnChanges { ...@@ -95,6 +97,9 @@ export class NetworkDetailComponent implements OnInit, OnChanges {
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
this.nowStatus = res.data; this.nowStatus = res.data;
this.nowStatus.forEach(e=>{
this.totalNum += e.response;
})
} }
} }
); );
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<nz-form-item> <nz-form-item>
<nz-form-control> <nz-form-control>
<nz-input-group nzPrefixIcon="anticon anticon-user"> <nz-input-group nzPrefixIcon="anticon anticon-user">
<input type="text" name="username" formControlName="loginName" nz-input placeholder="用户名"> <input (keyup.enter)="submitForm()" type="text" name="username" formControlName="loginName" nz-input placeholder="用户名">
</nz-input-group> </nz-input-group>
<nz-form-explain *ngIf="validateForm.get('loginName').dirty && validateForm.get('loginName').errors">请输入登录用户名!</nz-form-explain> <nz-form-explain *ngIf="validateForm.get('loginName').dirty && validateForm.get('loginName').errors">请输入登录用户名!</nz-form-explain>
</nz-form-control> </nz-form-control>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<nz-form-item> <nz-form-item>
<nz-form-control> <nz-form-control>
<nz-input-group nzPrefixIcon="anticon anticon-lock"> <nz-input-group nzPrefixIcon="anticon anticon-lock">
<input type="password" name="password" formControlName="password" nz-input placeholder="密码"> <input (keyup.enter)="submitForm()" type="password" name="password" formControlName="password" nz-input placeholder="密码">
</nz-input-group> </nz-input-group>
<nz-form-explain *ngIf="validateForm.get('password').dirty && validateForm.get('password').errors">请输入用户密码!</nz-form-explain> <nz-form-explain *ngIf="validateForm.get('password').dirty && validateForm.get('password').errors">请输入用户密码!</nz-form-explain>
</nz-form-control> </nz-form-control>
......
<div nz-row class="breadcrumbs" > <div nz-row class="breadcrumbs">
<div nz-col nzSpan="16"> <div nz-col nzSpan="16">
<nz-breadcrumb class="padding-8-0"> <nz-breadcrumb class="padding-8-0">
<nz-breadcrumb-item> <nz-breadcrumb-item>
...@@ -28,16 +28,18 @@ ...@@ -28,16 +28,18 @@
</nz-select> </nz-select>
</div> </div>
<div nz-col nzSpan="3" class="text-center"> <div nz-col nzSpan="3" class="text-center">
<button (click)="showUploadModal()" nz-button nzType="default"><i class="anticon anticon-upload"></i>导入资产</button> <button (click)="showUploadModal()" nz-button nzType="default"><i class="anticon anticon-upload"></i>导入资产
</button>
</div> </div>
<div nz-col nzSpan="3" class="text-center"> <div nz-col nzSpan="3" class="text-center">
<button (click)="downLoad()" nz-button nzType="default"><i class="anticon anticon-download"></i>下载模版</button> <button (click)="downLoad()" nz-button nzType="default"><i class="anticon anticon-download"></i>下载模版</button>
</div> </div>
<div nz-col nzSpan="8"></div> <div nz-col nzSpan="8"></div>
<div nz-col nzSpan="6" class="text-right"> <div nz-col nzSpan="6" class="text-right">
<button (click)="showAddModal()" nz-button nzType="default"><i class="anticon anticon-plus"></i>添加</button> <button (click)="showAddModal()" nz-button nzType="default"><i class="anticon anticon-plus"></i>添加</button>
<button (click)="showPEditModal()" nz-button nzType="default"><i class="anticon anticon-form"></i>编辑</button> <button (click)="showPEditModal()" nz-button nzType="default"><i class="anticon anticon-form"></i>编辑</button>
<button (click)="deleteParentType()" nz-button nzType="default"><i class="anticon anticon-close-circle-o"></i>删除</button> <button (click)="deleteParentType()" nz-button nzType="default"><i class="anticon anticon-close-circle-o"></i>删除
</button>
</div> </div>
</div> </div>
...@@ -72,7 +74,7 @@ ...@@ -72,7 +74,7 @@
{{data.repaircount}} {{data.repaircount}}
</td> </td>
<td> <td>
{{data.scrapcount}} {{data.scrapcount}}
</td> </td>
<td>关联事件</td> <td>关联事件</td>
<td class="handle text-center"> <td class="handle text-center">
......
...@@ -105,6 +105,10 @@ export class AssetPartComponent implements OnInit { ...@@ -105,6 +105,10 @@ export class AssetPartComponent implements OnInit {
this.messge.warning("请选择需要删除的分类"); this.messge.warning("请选择需要删除的分类");
return false; return false;
} }
if(this.childrenList.length > 0){
this.messge.warning("删除失败,请先清除该分类下的子分类!");
return false;
}
const data = { const data = {
inventoryTypeIds:[] inventoryTypeIds:[]
}; };
...@@ -130,22 +134,30 @@ export class AssetPartComponent implements OnInit { ...@@ -130,22 +134,30 @@ export class AssetPartComponent implements OnInit {
//删除子级分类 //删除子级分类
deleteChildType(item){ deleteChildType(item){
const data = { this.workSer.findInventory(item.id).subscribe(
inventoryTypeIds:[] (res) => {
}; if(res.data.length > 0 ){
data.inventoryTypeIds.push(item.id); this.messge.warning("删除失败,请先清除资产!");
this.commonSer.confirmThing("删除","确定删除该子级分类",()=>{ }else{
this.workSer.deleteType(data).subscribe( const data = {
(res)=>{ inventoryTypeIds:[]
if(res.errCode == 10000){ };
this.messge.success("删除成功"); data.inventoryTypeIds.push(item.id);
this.changeType(); this.commonSer.confirmThing("删除","确定删除该子级分类",()=>{
}else{ this.workSer.deleteType(data).subscribe(
this.messge.error(res.errMsg); (res)=>{
} if(res.errCode == 10000){
} this.messge.success("删除成功");
) this.changeType();
}) }else{
this.messge.error(res.errMsg);
}
}
)
})
}
}
);
} }
//导入资产 //导入资产
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<tbody> <tbody>
<tr *ngFor="let data of childrenList"> <tr *ngFor="let data of childrenList">
<td class="round-tag tag-form"> <td class="round-tag tag-form">
{{data.name}} {{data.inventoryNo}}
</td> </td>
<td> <td>
{{data.name}} {{data.name}}
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<tbody> <tbody>
<tr *ngFor="let data of eventList"> <tr *ngFor="let data of eventList">
<td class="round-tag tag-form"> <td class="round-tag tag-form">
{{data.description}} {{data.id}}
</td> </td>
<td> <td>
{{data.title}} {{data.title}}
......
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