Commit 6c625898 authored by wangqinghua's avatar wangqinghua

bug update

parent dd985e2e
......@@ -100,6 +100,7 @@ export class BCountComponent implements OnInit {
changeService() {
this.isLoading = true;
this.getInfo();
this.getRunTime();
}
//系统可用性, 监测点, 用户统计
......
......@@ -54,10 +54,24 @@
<nz-form-item nzFlex>
<nz-form-label [nzSpan]="6">检测对象
</nz-form-label>
<nz-form-control [nzSpan]="18">
<nz-select style="width: 200px;" formControlName="resourceGroupType">
<nz-form-control [nzSpan]="9">
<nz-select style="width: 150px;" formControlName="resourceGroupType">
<nz-option nzLabel="按资源分组" nzValue="1"></nz-option>
<nz-option nzLabel="按设备类型分组" nzValue="2"></nz-option>
<nz-option nzLabel="按设备类别" nzValue="2"></nz-option>
</nz-select>
</nz-form-control>
<nz-form-control *ngIf="validateForm.value.resourceGroupType == '1'" [nzSpan]="9">
<nz-select style="width: 150px;" formControlName="resourceGroupValue" nzPlaceHolder="资源分组">
<ng-container *ngFor="let item of groupList">
<nz-option [nzLabel]="item.name" [nzValue]="item.groupid"></nz-option>
</ng-container>
</nz-select>
</nz-form-control>
<nz-form-control *ngIf="validateForm.value.resourceGroupType == '2'" [nzSpan]="9">
<nz-select style="width: 150px;" formControlName="resourceGroupValue" nzPlaceHolder="设备类型">
<ng-container *ngFor="let item of equipmentList">
<nz-option [nzLabel]="item.equipmentType" [nzValue]="item.equipmentTypeId"></nz-option>
</ng-container>
</nz-select>
</nz-form-control>
</nz-form-item>
......
......@@ -3,6 +3,7 @@ import {EarlyWarningService} from '../../earlyWarning.service';
import {NzMessageService} from 'ng-zorro-antd';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {warning_type} from '../../early.constants';
import {OverAllService} from '../../../overAll/overAll.service';
@Component({
selector: 'smart-warnging-rule',
......@@ -24,12 +25,18 @@ export class WarngingRuleComponent implements OnInit {
newestRemark;
validateForm: FormGroup;
groupList = [];
equipmentList = [];
constructor(private earlySer: EarlyWarningService, private message: NzMessageService,
private overAllSer:OverAllService,
private fb: FormBuilder,) {
}
ngOnInit() {
this.initForm();
this.getGroup();
this.getType();
}
initForm() {
......@@ -39,15 +46,37 @@ export class WarngingRuleComponent implements OnInit {
cycle: ['1'], content: [null],
fileId: [null], resourceGroupType: ['1'],
resourceGroupValue: [null], resourceWarningLevel: ['1'],
resourceDays: [null], resourceSymbol: [null],
resourceDays: [null], resourceSymbol: ['1'],
resourceWarningTims: [null], businessDataType: [null],
businessDays: [null], businessWarningSymbol: [null],
businessWarningValue: [null], businessThresholdSymbol: [null],
businessThresholdValue: [null], jobDataType: [null],
jobUntreatedSymbol: [null], jobUntreatedDays: [null],
businessDays: [null], businessWarningSymbol: ['1'],
businessWarningValue: [null], businessThresholdSymbol: ['1'],
businessThresholdValue: [null], jobDataType: ['1'],
jobUntreatedSymbol: ['1'], jobUntreatedDays: [null],
});
}
//获取资源分组
getGroup() {
this.overAllSer.getEditGroups(0).subscribe(
(res) => {
if (res.errCode == 10000) {
this.groupList = res.data;
}
}
);
}
//获取设备类型
getType() {
this.overAllSer.findType().subscribe(
(res) => {
if (res.errCode == 10000) {
this.equipmentList = res.data;
}
}
);
}
//新增
showAddModal(title) {
this.modal.isVisible = true;
......
......@@ -25,8 +25,8 @@
<ng-template #nzTreeTemplate let-node>
<span class="custom-node" draggable="true" aria-grabbed="true"
[class.active]="node.isSelected">
<label [(ngModel)]="node.isChecked" nz-checkbox *ngIf="node.level == 0"
(click)="selectCheckTreeGroup(node)"> {{node.title}}</label>
<label [(ngModel)]="node.isChecked" *ngIf="node.level == 0"
> {{node.title}}</label>
<label [(ngModel)]="node.isChecked" [nzDisabled]="node.origin.disabled"
(click)="selectCheckTree(node)" *ngIf="node.level == 1"
nz-checkbox> {{node.title}}</label>
......
......@@ -28,7 +28,7 @@
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired nzFor="showName">显示名</nz-form-label>
<nz-form-control [nzSpan]="14">
<input type="text" nz-input name="showName" placeholder="显示名" [(ngModel)]="validateForm.name">
<input type="text" maxlength="100" nz-input name="showName" placeholder="显示名" [(ngModel)]="validateForm.name">
</nz-form-control>
</nz-form-item>
......
......@@ -212,8 +212,8 @@ export class BasicEditComponent implements OnInit {
this.message.info('请选择二级类型');
return false;
}
if (!this.validateForm.name) {
this.message.info('请输入显示名');
if (!this.validateForm.name || this.validateForm.name.length > 100) {
this.message.info('请输入显示名,且不超过100个字符');
return false;
}
if (!this.validateForm.host) {
......
......@@ -16,7 +16,7 @@
<input type="password" nz-input formControlName="newPassword" placeholder="密码">
<nz-form-explain
*ngIf="validateForm.get('newPassword').dirty && validateForm.get('newPassword').errors">
新密码必须包含数字、英文字母,长度8-20位
新密码必须英文字母开头,包含数字、英文字母,长度8-20位
</nz-form-explain>
</nz-form-control>
</nz-form-item>
......@@ -26,7 +26,7 @@
<input type="password" nz-input formControlName="realPassword" placeholder="确认密码">
<nz-form-explain
*ngIf="validateForm.get('realPassword').dirty && validateForm.get('realPassword').errors">
新密码必须包含数字、英文字母,长度8-20位
新密码必须英文字母开头,包含数字、英文字母,长度8-20位
</nz-form-explain>
</nz-form-control>
</nz-form-item>
......
......@@ -47,6 +47,7 @@ export class ModifyPasswordComponent implements OnInit {
this.message.error('两次输入密码不一致');
return false;
}
this.isOkLoading = true;
this.getOldEncodepassword();
}
......@@ -107,8 +108,8 @@ export class ModifyPasswordComponent implements OnInit {
initForm() {
this.validateForm = this.fb.group({
oldPassword: [null, [Validators.required]],
newPassword: [null, [Validators.required, Validators.minLength(8), Validators.maxLength(20)]],
realPassword: [null, [Validators.required, Validators.minLength(8), Validators.maxLength(20)]],
newPassword: [null, [Validators.required, Validators.pattern(/^(?=[a-zA-Z]+\d+)\w{8,20}$/)]],
realPassword: [null, [Validators.required, Validators.pattern(/^(?=[a-zA-Z]+\d+)\w{8,20}$/)]],
});
}
}
......@@ -29,7 +29,7 @@
<nz-select *ngIf="selectedValue == 'type'" style="width: 200px;" nzPlaceHolder="所有设备类型" nzShowSearch nzAllowClear
(ngModelChange)="changeEquiment($event)" [(ngModel)]="equipmentTypeid">
<nz-option nzLabel="全部" [nzValue]="null"></nz-option>
<ng-container *ngFor="let item of groupList">
<ng-container *ngFor="let item of equipmentList">
<nz-option [nzLabel]="item.equipmentType" [nzValue]="item.equipmentTypeId"></nz-option>
</ng-container>
</nz-select>
......
......@@ -86,6 +86,7 @@ export class BasicComponent implements OnInit {
selectedValue = 'group';
groupList = []; //分组列表
equipmentList = []; //设备列表
groupid = null;
equipmentTypeid = null;
......@@ -189,7 +190,7 @@ export class BasicComponent implements OnInit {
(res) => {
this.loading = false;
if (res.errCode == 10000) {
this.groupList = res.data;
this.equipmentList = res.data;
this.search();
}
}
......@@ -473,7 +474,7 @@ export class BasicComponent implements OnInit {
let opr = item.status == 1 ? '开启' : '停止';
this.modalService.confirm({
nzTitle: '监控',
nzContent: `确定${opr}监控设备${item.name}`,
nzContent: `确定${opr}该监控?`,
nzOkText: '确定',
nzCancelText: '取消',
nzOnOk: () => {
......
<nz-modal [nzMaskClosable]="false" [nzWidth]="480" [(nzVisible)]="isVisible" [nzTitle]="title" (nzOnOk)="handleOk()" (nzOnCancel)="handleCancel()"
[nzOkLoading]="isOkLoading">
<form [formGroup]="validateForm" nz-form>
<nz-form-item *ngIf="!title.includes('跟踪信息')">
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="createUserName">操作人</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24" >
<input disabled nz-input formControlName="createUserName" style="width: 70%;display: inline-block"
id="createUserName" placeholder="操作人">
<button nz-button nzType="primary" (click)="showPeoplemodal()">选择</button>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="msg">跟踪内容</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
......
......@@ -38,8 +38,6 @@ export class CreateTrackInfoComponent implements OnInit {
initForm() {
this.validateForm = this.fb.group({
createUserId: [null],
createUserName: [null],
msg: [null, [Validators.required]],
componentId: [null],
maintainType: [null],
......
......@@ -15,7 +15,7 @@ import {CreateTrackInfoComponent} from '../create-track-info/create-track-info.c
})
export class TrackInfoComponent implements OnInit {
@Input() maintainType;
@Input() sysChangeId;
@Input() sysChangeId;ååå
@Input() componentId;
@Input() title;
@ViewChild('smartCreateTrackInfo') smartCreateTrackInfo: CreateTrackInfoComponent;
......@@ -54,7 +54,10 @@ export class TrackInfoComponent implements OnInit {
this.componentId = id;
this.getInvoList();
}
if (this.title.includes('变更跟踪信息')) this.getChangeList();
if (this.title.includes('变更跟踪信息')){
this.sysChangeId = id;
this.getChangeList();
}
}
//跟踪信息
......@@ -109,11 +112,10 @@ export class TrackInfoComponent implements OnInit {
this.page.loading = true;
this.systemSer.findMsg(this.sysChangeId).subscribe(
(res) => {
if (res.errCode == 10000) {
if (res.data) {
this.warnList = res.data;
// this.page.totalNum = res.data.totalNum;
}
if (res.errCode == 10000 && res.data) {
this.warnList = res.data;
console.log(this.warnList);
// this.page.totalNum = res.data.totalNum;
}
this.page.loading = false;
}
......
......@@ -118,10 +118,6 @@ export class JhiLoginModalComponent implements OnInit {
//登录
login() {
if (this.validateForm.value.loginName == 'monitor') {
window.location.href = 'http://pm.sdx.sh.cn/operation/teach-task!screen';
return;
}
this.loginService.login(this.validateForm.value).then((res) => {
if (res) {
this.getUserInfo();
......@@ -146,6 +142,7 @@ export class JhiLoginModalComponent implements OnInit {
this.userInfo.userId = res.data.id;
this.userInfo.gender = res.data.gender;
this.userInfo.roles = res.data.roles;
this.userInfo.isAdmin = res.data.isAdmin;
this.getOrgInfo();
}
);
......
......@@ -113,7 +113,7 @@
<span (click)="handleEditModal(data)" *ngIf="data.status == 4 || data.status == 1">编辑</span>
<span (click)="showChangeModal(data)" *ngIf="(data.status == 2 && userInfo.userId == data.verifyUserId)">审核</span>
<span (click)="showChangeModal(data)" *ngIf="data.status == 6">处理</span>
<span *ngIf="data.status != 2" class="handle-delete" (click)="deleteChange(data)"
<span *ngIf="data.status == 1" class="handle-delete" (click)="deleteChange(data)"
>删除</span>
</td>
</tr>
......
......@@ -62,12 +62,12 @@ export class ChangeCreateComponent implements OnInit {
classifyId: [null, [Validators.required]],
status: ['1'],
title: ['变更'],
changeTime: [null],
changeTime: [null, [Validators.required]],
projectId: [null],
projectName: [null],
verifyUserId: [null],
verifyUserName: [null],
description: [null,[Validators.required]],
verifyUserId: [null, [Validators.required]],
verifyUserName: [null, [Validators.required]],
description: [null, [Validators.required]],
});
}
......
......@@ -77,7 +77,7 @@ export class ChangeVerityComponent implements OnInit {
this.id = id;
this.modal.isVisible = true;
this.getDetail();
this.getMsg();
this.smartTrackInfo.diffResource(this.id);
}
//查询变更详情
......
......@@ -34,8 +34,6 @@
<tr>
<th>角色名称</th>
<th>说明</th>
<!--<th>权限模块</th>-->
<!--<th>资源权限</th>-->
<th>操作</th>
</tr>
</thead>
......@@ -43,18 +41,11 @@
<tr *ngFor="let data of basicTable.data">
<td>{{data.name}}</td>
<td>{{data.comment}}</td>
<!--<td>{{data.key3}}</td>-->
<!--<td>{{data.key4}}</td>-->
<!--<td>-->
<!--<ng-container *ngIf="data.status == 0">-->
<!--<i class="anticon anticon-check"></i>-->
<!--</ng-container>-->
<!--</td>-->
<td class="handle main-color">
<span (click)="grantUser(data)">授予用户</span>
<!--<span (click)="lookRole(data)">查看</span>-->
<span (click)="showEditModal(data)">编辑</span>
<span class="handle-delete" (click)="deleteRole(data)">删除</span>
<span *ngIf="isAdmin == 1" class="handle-delete" (click)="deleteRole(data)">删除</span>
</td>
</tr>
</tbody>
......
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