Commit dd985e2e authored by wangqinghua's avatar wangqinghua

趋势图修改

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