Commit 375ca02c authored by wangqinghua's avatar wangqinghua

update

parent 06cd4537
......@@ -63,7 +63,7 @@ export class AlarmGroupComponent implements OnInit {
//确定
handleOk() {
for(const i in this.validateForm.controls) {
for(let i in this.validateForm.controls) {
this.validateForm.controls[ i ].markAsDirty();
this.validateForm.controls[ i ].updateValueAndValidity();
}
......
......@@ -119,7 +119,7 @@ export class MediaTypeComponent implements OnInit {
}
handleOk() {
for (const i in this.validateForm.controls) {
for (let i in this.validateForm.controls) {
this.validateForm.controls[i].markAsDirty();
this.validateForm.controls[i].updateValueAndValidity();
}
......
......@@ -66,6 +66,8 @@ import {FindUserComponent} from './alarm/modal/find-user/find-user.component';
import {TopologyComponent} from './netTopology/model/topology/topology.component';
import {CheckComponent} from './netTopology/model/check/check.component';
import {TopologyImgComponent} from './netTopology/topology-img/topology-img.component';
import {DeviceComponent} from './netTopology/model/device/device.component';
import {IconComponent} from './netTopology/model/icon/icon.component';
@NgModule({
imports: [
......@@ -133,6 +135,8 @@ import {TopologyImgComponent} from './netTopology/topology-img/topology-img.comp
TopologyComponent,
CheckComponent,
TopologyImgComponent,
DeviceComponent,
IconComponent
],
providers:[
OverAllService,
......
import { Component, OnInit } from '@angular/core';
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
import { JhiEventManager } from 'ng-jhipster';
import { Account, LoginModalService, Principal } from '../shared';
import { Account, Principal } from '../shared';
@Component({
selector: 'jhi-home',
......@@ -18,7 +18,6 @@ export class HomeComponent implements OnInit {
constructor(
private principal: Principal,
private loginModalService: LoginModalService,
private eventManager: JhiEventManager
) {
}
......@@ -55,6 +54,5 @@ export class HomeComponent implements OnInit {
}
login() {
this.modalRef = this.loginModalService.open();
}
}
......@@ -3,7 +3,7 @@ import { Router } from '@angular/router';
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
import { ProfileService } from '../profiles/profile.service';
import { Principal, LoginModalService, LoginService } from '../../shared';
import { Principal, LoginService } from '../../shared';
import { VERSION } from '../../app.constants';
......@@ -29,7 +29,6 @@ export class NavbarComponent implements OnInit ,AfterViewChecked{
constructor(
private loginService: LoginService,
private principal: Principal,
private loginModalService: LoginModalService,
private profileService: ProfileService,
private router: Router,
) {
......@@ -56,10 +55,6 @@ export class NavbarComponent implements OnInit ,AfterViewChecked{
return this.principal.isAuthenticated();
}
login() {
this.modalRef = this.loginModalService.open();
}
logout() {
this.collapseNavbar();
this.loginService.logout();
......
......@@ -44,7 +44,7 @@ export class SidebarComponent implements OnInit {
//简单使用
openHandler(value: string): void {
for (const key in this.menuList) {
for (let key in this.menuList) {
if (key !== value) {
this.menuList[ key ].checked = false;
}
......
......@@ -47,7 +47,7 @@ export class CreateGroupComponent implements OnInit {
}
handleOk() {
for (const i in this.validateForm.controls) {
for (let i in this.validateForm.controls) {
this.validateForm.controls[i].markAsDirty();
this.validateForm.controls[i].updateValueAndValidity();
}
......
......@@ -38,7 +38,7 @@ export class CheckComponent implements OnInit {
}
handleOk(){
for(const i in this.validateForm.controls){
for(let i in this.validateForm.controls){
this.validateForm.controls[i].markAsDirty();
this.validateForm.controls[i].updateValueAndValidity();
}
......
import { Component, OnInit } from '@angular/core';
import {UploadFile} from 'ng-zorro-antd';
import {TopologyService} from '../../topology.service';
import {FormGroup} from '@angular/forms';
@Component({
selector: 'smart-icon',
......@@ -9,7 +10,9 @@ import {TopologyService} from '../../topology.service';
})
export class IconComponent implements OnInit {
isVisible = false;
fileList: UploadFile[] = [];
validateForm:FormGroup;
title = "添加图标";
data = {
iconType:"",
......@@ -45,4 +48,12 @@ export class IconComponent implements OnInit {
// });
}
handleOk(){
this.isVisible = false;
}
handleCancel(){
this.isVisible = false;
}
}
......@@ -16,6 +16,9 @@ export class TopologyComponent implements OnInit {
validateForm:FormGroup;
topoId;
pageNum;
pageCount;
constructor(private fb:FormBuilder,private topologySer:TopologyService,
private message:NzMessageService) {
}
......@@ -57,7 +60,7 @@ export class TopologyComponent implements OnInit {
}
handleOk(){
for(const i in this.validateForm.controls){
for(let i in this.validateForm.controls){
this.validateForm.controls[i].markAsDirty();
this.validateForm.controls[i].updateValueAndValidity();
}
......
......@@ -28,10 +28,10 @@
</nz-select>
</div>
<div nz-col nzSpan="12" class="text-right">
<button nz-button nzType="default" (click)="showGroupModal()"><i class="anticon anticon-plus"></i>添加图标</button>
<button nz-button nzType="default"><i class="anticon anticon-plus"></i>添加图标</button>
</div>
</div>
<nz-table #nzTable [nzData]="iconList" [nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount" (nzPageIndexChange)="change($event)">
<nz-table #nzTable [nzData]="iconList">
<thead>
<tr>
<th>一级类型</th>
......
......@@ -2,14 +2,12 @@ import { Injectable } from '@angular/core';
import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from '@angular/router';
import { Principal } from '../';
import { LoginModalService } from '../login/login-modal.service';
import { StateStorageService } from './state-storage.service';
@Injectable()
export class UserRouteAccessService implements CanActivate {
constructor(private router: Router,
private loginModalService: LoginModalService,
private principal: Principal,
private stateStorageService: StateStorageService) {
}
......@@ -44,7 +42,6 @@ export class UserRouteAccessService implements CanActivate {
this.router.navigate(['accessdenied']).then(() => {
// only show the login dialog, if the user hasn't logged in yet
if (!account) {
this.loginModalService.open();
}
});
return false;
......
......@@ -10,7 +10,6 @@ export * from './auth/principal.service';
export * from './auth/has-any-authority.directive';
export * from './auth/user-route-access-service';
export * from './login/login.component';
export * from './login/login-modal.service';
export * from './login/login.service';
export * from './user/account.model';
export * from './user/user.model';
......
......@@ -12,7 +12,6 @@ import {
UserService,
StateStorageService,
LoginService,
LoginModalService,
JhiLoginModalComponent,
Principal,
HasAnyAuthorityDirective,
......@@ -33,7 +32,6 @@ import {ReactiveFormsModule} from '@angular/forms';
],
providers: [
LoginService,
LoginModalService,
AccountService,
StateStorageService,
Principal,
......
......@@ -36,7 +36,7 @@ export class GroupModalComponent implements OnInit {
handleOk(){
this.isVisible = true;
for(const i in this.validateForm.controls){
for(let i in this.validateForm.controls){
this.validateForm.controls[i].markAsDirty();
this.validateForm.controls[i].updateValueAndValidity();
}
......
......@@ -42,7 +42,7 @@ export class RoleComponent implements OnInit {
}
handleOk(): void {
for (const i in this.validateForm.controls) {
for (let i in this.validateForm.controls) {
this.validateForm.controls[i].markAsDirty();
this.validateForm.controls[i].updateValueAndValidity();
}
......
......@@ -48,7 +48,7 @@ export class UserComponent implements OnInit {
}
handleOk(){
for(const i in this.validateForm.controls){
for(let i in this.validateForm.controls){
this.validateForm.controls[i].markAsDirty();
this.validateForm.controls[i].updateValueAndValidity();
}
......
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