Commit dd985e2e authored by wangqinghua's avatar wangqinghua

趋势图修改

parent 0c714b36
......@@ -265,8 +265,17 @@ export class BCountComponent implements OnInit {
legend: {
selectedMode: false,
formatter: (name) => {
let total = this.runObj.from - this.runObj.to;
return '{black|' + total + '}';
let total: any = this.runObj.to - this.runObj.from;
let time = '';
let days = parseInt(String(total / (1000 * 60 * 60 * 24)));
let hours = parseInt(String((total % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)));
let minutes = parseInt(String((total % (1000 * 60 * 60)) / (1000 * 60)));
let seconds = (total % (1000 * 60)) / 1000;
if (days > 0) time += days + '天';
if (hours > 0) time += hours + '小时';
if (minutes > 0) time += minutes + '分钟';
if (seconds > 0) time += seconds.toFixed(0) + '秒';
return '{black|' + time + '}';
},
data: [echartData[0].name],
left: 'center',
......@@ -274,7 +283,6 @@ export class BCountComponent implements OnInit {
icon: 'none',
align: 'center',
textStyle: {
color: '#fff',
rich: rich
},
},
......
......@@ -101,8 +101,8 @@ export class BTopologyComponent implements OnInit, AfterViewInit {
this.routerInfo.queryParams.subscribe(
(res) => {
if (res) {
this.topoId = res.topoId + '';
this.getDetail();
this.topoId = res.topoId;
if(this.topoId) this.getDetail();
}
}
);
......
......@@ -13,7 +13,6 @@
</nz-breadcrumb>
</div>
<div nz-col nzSpan="8" class="text-right">
<button nzType="primary" (click)="returnBack()" nz-button>返回上一页</button>
<button (click)="ngOnInit()" nz-button nzType="primary"><i class="anticon anticon-sync"></i></button>
<smart-full-screen></smart-full-screen>
</div>
......@@ -23,7 +22,7 @@
<div nz-col nzSpan="12">
<nz-select style="width: 200px;" nzPlaceHolder="选择业务" [(ngModel)]="serviceId" (ngModelChange)="changeService()">
<ng-container *ngFor="let item of rootList">
<nz-option [nzLabel]="item.name" nzValue="{{item.serviceid}}"></nz-option>
<nz-option nzLabel="{{item.name}}" nzValue="{{item.serviceid}}"></nz-option>
</ng-container>
</nz-select>
</div>
......
import {Component, OnInit} from '@angular/core';
import {BusinessService} from '../business.service';
import {OverAllService} from '../../overAll/overAll.service';
import {DatePipe,Location} from '@angular/common';
import {DatePipe, Location} from '@angular/common';
import {color} from '../../app.constants';
import {NzMessageService} from 'ng-zorro-antd';
import {CommonService} from '../../shared/common/common.service';
......@@ -83,15 +83,15 @@ export class EffectAnalysisComponent implements OnInit {
chartUser;
constructor(private busineSer: BusinessService, private overAllSer: OverAllService,
private commonSer:CommonService,
private commonSer: CommonService,
private routerInfo: ActivatedRoute,
public location:Location,
public location: Location,
private datePipe: DatePipe, private message: NzMessageService) {
this.routerInfo.queryParams.subscribe(
(res) => {
if (res) {
this.serviceId = res.topoId + '';
this.changeService();
if (res.topoId) {
this.serviceId = res.topoId +"";
if (this.serviceId) this.changeService();
}
}
);
......@@ -223,7 +223,7 @@ export class EffectAnalysisComponent implements OnInit {
this.rootList = res.data;
if (this.rootList.length > 0) {
if (!this.serviceId) {
this.serviceId = this.rootList[0].serviceid;
this.serviceId = this.rootList[0].serviceid +'';
this.changeService();
}
}
......@@ -349,7 +349,7 @@ export class EffectAnalysisComponent implements OnInit {
//时间改变
changeType() {
this.isSpinning = true;
if(this.timeType =='99') return ;
if (this.timeType == '99') return;
this.obj.startTime = this.commonSer.getTimeByType(this.timeType).startTime;
this.obj.endTime = this.commonSer.getTimeByType(this.timeType).endTime;
this.findChart();
......@@ -530,7 +530,7 @@ export class EffectAnalysisComponent implements OnInit {
}
//返回上一页
returnBack(){
returnBack() {
this.location.back();
}
}
......@@ -55,7 +55,7 @@
<nz-form-label [nzSpan]="6">检测对象
</nz-form-label>
<nz-form-control [nzSpan]="18">
<nz-select style="width: 100px;" formControlName="resourceGroupType">
<nz-select style="width: 200px;" formControlName="resourceGroupType">
<nz-option nzLabel="按资源分组" nzValue="1"></nz-option>
<nz-option nzLabel="按设备类型分组" nzValue="2"></nz-option>
</nz-select>
......
......@@ -36,9 +36,9 @@ export class WarngingRuleComponent implements OnInit {
this.validateForm = this.fb.group({
name: [null, [Validators.required]],
type: ['1'], level: [null],
cycle: [null], content: [null],
fileId: [null], resourceGroupType: [null],
resourceGroupValue: [null], resourceWarningLevel: [null],
cycle: ['1'], content: [null],
fileId: [null], resourceGroupType: ['1'],
resourceGroupValue: [null], resourceWarningLevel: ['1'],
resourceDays: [null], resourceSymbol: [null],
resourceWarningTims: [null], businessDataType: [null],
businessDays: [null], businessWarningSymbol: [null],
......
......@@ -88,6 +88,11 @@
<nz-form-item nzFlex>
<nz-form-label [nzSpan]="8" nzFor="title">告警次数</nz-form-label>
<nz-form-control [nzSpan]="14">
<ng-container *ngIf="msgObj?.resourceSymbol == '1'">大于</ng-container>
<ng-container *ngIf="msgObj?.resourceSymbol == '2'">大于等于</ng-container>
<ng-container *ngIf="msgObj?.resourceSymbol == '3'">小于</ng-container>
<ng-container *ngIf="msgObj?.resourceSymbol == '4'">大于等于</ng-container>
<ng-container *ngIf="msgObj?.resourceSymbol == '5'">等于</ng-container>
{{msgObj?.resourceWarningTims || '-'}}次
</nz-form-control>
</nz-form-item>
......
......@@ -266,7 +266,6 @@
<th nzWidth="30%">团队名称</th>
<th>团队类型</th>
<th>所在公司</th>
<th>关联项目</th>
<th>团队负责人</th>
</tr>
</thead>
......
<!--添加资源-->
<nz-modal [nzMaskClosable]="false" [nzWidth]="1080" [(nzVisible)]="isVisiable" [nzTitle]="title" (nzOnCancel)="handleCancle()"
(nzOnOk)="handEditleOk()">
<nz-modal [nzMaskClosable]="false" [nzWidth]="1080" [(nzVisible)]="isVisiable" [nzTitle]="title"
(nzOnCancel)="handleCancle()"
(nzOnOk)="handEditleOk()" [nzFooter]="title == '费用记录'?null:true">
<div nz-form class="ant-advanced-search-form form-select">
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="12">
......@@ -26,7 +27,7 @@
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="6">
<nz-form-item nzFlex>
<nz-form-label [nzOffset]="12" [nzSpan]="12" nzFor="title">备件采购</nz-form-label>
<nz-form-label [nzOffset]="12" [nzSpan]="12" nzFor="title">备件采购</nz-form-label>
</nz-form-item>
</div>
......@@ -34,7 +35,8 @@
<nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzFor="title">数量</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-input-number [disabled]="title == '费用记录'" [(ngModel)]="obj.purchasenum" [nzMin]="0" (ngModelChange)="countTotal()"></nz-input-number>
<nz-input-number [disabled]="title == '费用记录'" [(ngModel)]="obj.purchasenum" [nzMin]="0"
(ngModelChange)="countTotal()"></nz-input-number>
</nz-form-control>
</nz-form-item>
</div>
......@@ -43,7 +45,9 @@
<nz-form-item nzFlex>
<nz-form-label [nzSpan]="6" nzFor="typeId">金额</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-input-number [disabled]="title == '费用记录'" style="width: 90%;display: inline-block" [nzMin]="0" [(ngModel)]="obj.purchasemoney" (ngModelChange)="countTotal()" ></nz-input-number>
<nz-input-number [disabled]="title == '费用记录'" style="width: 90%;display: inline-block"
[nzMin]="0" [(ngModel)]="obj.purchasemoney"
(ngModelChange)="countTotal()"></nz-input-number>
&nbsp;&nbsp;
</nz-form-control>
</nz-form-item>
......@@ -61,7 +65,8 @@
<nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzFor="title">数量</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-input-number [disabled]="title == '费用记录'" [(ngModel)]="obj.outsourcingnum" [nzMin]="0" (ngModelChange)="countTotal()"></nz-input-number>
<nz-input-number [disabled]="title == '费用记录'" [(ngModel)]="obj.outsourcingnum" [nzMin]="0"
(ngModelChange)="countTotal()"></nz-input-number>
</nz-form-control>
</nz-form-item>
</div>
......@@ -71,7 +76,8 @@
<nz-form-label [nzSpan]="6" nzFor="typeId">金额</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-input-number style="width: 90%;display: inline-block" [disabled]="title == '费用记录'"
[(ngModel)]="obj.outsourcingmoney" [nzMin]="0" (ngModelChange)="countTotal()"></nz-input-number>
[(ngModel)]="obj.outsourcingmoney" [nzMin]="0"
(ngModelChange)="countTotal()"></nz-input-number>
&nbsp;&nbsp;
</nz-form-control>
</nz-form-item>
......@@ -91,7 +97,8 @@
<nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzFor="title">数量</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-input-number [disabled]="title == '费用记录'" [(ngModel)]="obj.othernum" [nzMin]="0" (ngModelChange)="countTotal()"></nz-input-number>
<nz-input-number [disabled]="title == '费用记录'" [(ngModel)]="obj.othernum" [nzMin]="0"
(ngModelChange)="countTotal()"></nz-input-number>
</nz-form-control>
</nz-form-item>
</div>
......@@ -101,7 +108,8 @@
<nz-form-label [nzSpan]="6" nzFor="typeId">金额</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-input-number style="width: 90%;display: inline-block" [disabled]="title == '费用记录'"
[(ngModel)]="obj.othermoney" [nzMin]="0" (ngModelChange)="countTotal()"></nz-input-number>
[(ngModel)]="obj.othermoney" [nzMin]="0"
(ngModelChange)="countTotal()"></nz-input-number>
&nbsp;&nbsp;
</nz-form-control>
</nz-form-item>
......@@ -113,7 +121,8 @@
<nz-form-item nzFlex>
<nz-form-label [nzOffset]="4" [nzSpan]="6" nzFor="title">费用描述</nz-form-label>
<nz-form-control [nzSpan]="14">
<textarea [(ngModel)]="obj.costdescribe" nz-input placeholder="费用描述" [disabled]="title == '费用记录'"
<textarea [(ngModel)]="obj.costdescribe" nz-input placeholder="费用描述"
[disabled]="title == '费用记录'"
[nzAutosize]="{ minRows: 3, maxRows: 6 }"></textarea>
</nz-form-control>
</nz-form-item>
......
......@@ -85,10 +85,10 @@
<ng-template #modalFooter>
<button nz-button nzType="default" (click)="handleCancel()">取消</button>
<button nz-button nzType="primary" (click)="handleOk(2)" [nzLoading]="isOkLoading">保存</button>
<button *ngIf="title == '编辑运维项目'" nz-button nzType="primary" (click)="handleOk(0)" [nzLoading]="isOkLoading">
<button *ngIf="title == '编辑运维项目' && validateForm.value.status == '2'" nz-button nzType="primary" (click)="handleOk(0)" [nzLoading]="isOkLoading">
启动项目
</button>
<button *ngIf="title == '编辑运维项目'" nz-button nzType="primary" (click)="handleOk(1)" [nzLoading]="isOkLoading">
<button *ngIf="title == '编辑运维项目' && validateForm.value.status == 0" nz-button nzType="primary" (click)="handleOk(1)" [nzLoading]="isOkLoading">
终止
</button>
</ng-template>
......
......@@ -61,8 +61,8 @@
[nzPageIndex]="page.pageNum" [nzPageSize]="page.pageCount" (nzPageIndexChange)="change($event)">
<thead>
<tr>
<th>项目单位</th>
<th nzWidth="10%">项目名称</th>
<th>项目单位</th>
<th>项目负责人</th>
<th>项目年度</th>
<th>项目状态</th>
......@@ -75,12 +75,8 @@
</thead>
<tbody>
<tr *ngFor="let data of nzTable.data">
<td class="round-tag tag-form">
{{data.officeName}}
</td>
<td>
{{data.name}}
</td>
<td>{{data.name}}</td>
<td class="round-tag tag-form">{{data.officeName}}</td>
<td>{{data.officePrincipal}}</td>
<td>
{{data.yearly}}
......
......@@ -63,10 +63,9 @@
<td>{{data.projectName}}</td>
<td>{{data.principal}}</td>
<td class="handle main-color">
<span>查看</span>
<span *ngIf="userId == data.createUserId" (click)="handleEdit(data)">更新团队信息</span>
<span *ngIf="userId == data.createUserId" (click)="handleUpdateTeam(data)">编辑团队成员</span>
<span *ngIf="userId == data.createUserId" (click)="handleDelete(data)">删除</span>
<span *ngIf="userId == data.createUseId" (click)="handleEdit(data)">更新团队信息</span>
<span *ngIf="userId == data.createUseId" (click)="handleUpdateTeam(data)">编辑团队成员</span>
<span *ngIf="userId == data.createUseId" (click)="handleDelete(data)">删除</span>
</td>
</tr>
</tbody>
......
......@@ -4,7 +4,7 @@
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="groupName">部门名称</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<input nz-input formControlName="name" id="groupName">
<nz-form-explain *ngIf="validateForm.get('name').dirty && validateForm.get('name').errors">请输入部门名称</nz-form-explain>
<nz-form-explain *ngIf="validateForm.get('name').dirty && validateForm.get('name').errors">请输入部门名称且不超过15字</nz-form-explain>
</nz-form-control>
</nz-form-item>
<nz-form-item>
......
......@@ -12,7 +12,7 @@
<nz-form-control [nzSm]="14" [nzXs]="24">
<textarea id="comment " row="4" nz-input formControlName="comment"></textarea>
<nz-form-explain *ngIf="validateForm.get('comment').dirty && validateForm.get('comment').errors">
角色说明最多输入300个字符!
角色说明最多输入30个字符!
</nz-form-explain>
</nz-form-control>
</nz-form-item>
......
......@@ -58,7 +58,7 @@ export class RoleComponent implements OnInit {
this.viewTempGroupList = [];
this.validateForm = this.fb.group({
name: [null, [Validators.required, Validators.maxLength(20)]],
comment: [null, [Validators.required, Validators.maxLength(300)]],
comment: [null, [Validators.required, Validators.maxLength(30)]],
});
}
......
......@@ -111,7 +111,7 @@ export class UploadComponent implements OnInit {
this.isVisible = false;
this.fileList = [];
this.done.emit();
this.message.success('上传成功');
this.message.success('导入成功');
}
this.isOkLoading = false;
}
......@@ -130,7 +130,7 @@ export class UploadComponent implements OnInit {
this.isVisible = false;
this.fileList = [];
this.done.emit();
this.message.success('上传成功');
this.message.success('导入成功');
}
this.isOkLoading = false;
}
......
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