添加菜单页路由
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
<p>
|
||||
data-synchronize works!
|
||||
</p>
|
||||
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { DataSynchronizeComponent } from './data-synchronize.component';
|
||||
|
||||
describe('DataSynchronizeComponent', () => {
|
||||
let component: DataSynchronizeComponent;
|
||||
let fixture: ComponentFixture<DataSynchronizeComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ DataSynchronizeComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(DataSynchronizeComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-data-synchronize',
|
||||
templateUrl: './data-synchronize.component.html',
|
||||
styleUrls: ['./data-synchronize.component.scss']
|
||||
})
|
||||
export class DataSynchronizeComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<p>
|
||||
department-management works!
|
||||
</p>
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { DepartmentManagementComponent } from './department-management.component';
|
||||
|
||||
describe('DepartmentManagementComponent', () => {
|
||||
let component: DepartmentManagementComponent;
|
||||
let fixture: ComponentFixture<DepartmentManagementComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ DepartmentManagementComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(DepartmentManagementComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-department-management',
|
||||
templateUrl: './department-management.component.html',
|
||||
styleUrls: ['./department-management.component.scss']
|
||||
})
|
||||
export class DepartmentManagementComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
<p>
|
||||
operation-logs works!
|
||||
</p>
|
||||
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { OperationLogsComponent } from './operation-logs.component';
|
||||
|
||||
describe('OperationLogsComponent', () => {
|
||||
let component: OperationLogsComponent;
|
||||
let fixture: ComponentFixture<OperationLogsComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ OperationLogsComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(OperationLogsComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-operation-logs',
|
||||
templateUrl: './operation-logs.component.html',
|
||||
styleUrls: ['./operation-logs.component.scss']
|
||||
})
|
||||
export class OperationLogsComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
<p>
|
||||
personal-settings works!
|
||||
</p>
|
||||
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { PersonalSettingsComponent } from './personal-settings.component';
|
||||
|
||||
describe('PersonalSettingsComponent', () => {
|
||||
let component: PersonalSettingsComponent;
|
||||
let fixture: ComponentFixture<PersonalSettingsComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ PersonalSettingsComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PersonalSettingsComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-personal-settings',
|
||||
templateUrl: './personal-settings.component.html',
|
||||
styleUrls: ['./personal-settings.component.scss']
|
||||
})
|
||||
export class PersonalSettingsComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
<p>
|
||||
role-management works!
|
||||
</p>
|
||||
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { RoleManagementComponent } from './role-management.component';
|
||||
|
||||
describe('RoleManagementComponent', () => {
|
||||
let component: RoleManagementComponent;
|
||||
let fixture: ComponentFixture<RoleManagementComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ RoleManagementComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(RoleManagementComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-role-management',
|
||||
templateUrl: './role-management.component.html',
|
||||
styleUrls: ['./role-management.component.scss']
|
||||
})
|
||||
export class RoleManagementComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router'
|
||||
|
||||
import { SystemManagementComponent } from './system-management.component';
|
||||
import { PersonalSettingsComponent } from './personal-settings/personal-settings.component';
|
||||
import { RoleManagementComponent } from './role-management/role-management.component';
|
||||
import { UserManagementComponent } from './user-management/user-management.component';
|
||||
import { DepartmentManagementComponent } from './department-management/department-management.component';
|
||||
import { OperationLogsComponent } from './operation-logs/operation-logs.component';
|
||||
import { DataSynchronizeComponent } from './data-synchronize/data-synchronize.component';
|
||||
|
||||
const systemManagementRoutes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: SystemManagementComponent,
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
redirectTo: 'settings',
|
||||
pathMatch: 'full'
|
||||
},
|
||||
{
|
||||
path: 'settings',
|
||||
component: PersonalSettingsComponent
|
||||
},
|
||||
{
|
||||
path: 'roles',
|
||||
component: RoleManagementComponent
|
||||
},
|
||||
{
|
||||
path: 'users',
|
||||
component: UserManagementComponent
|
||||
},
|
||||
{
|
||||
path: 'departments',
|
||||
component: DepartmentManagementComponent
|
||||
},
|
||||
{
|
||||
path: 'logs',
|
||||
component: OperationLogsComponent
|
||||
},
|
||||
{
|
||||
path: 'synchronization',
|
||||
component: DataSynchronizeComponent
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(systemManagementRoutes)],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
|
||||
export class SystemManagementRouting { }
|
||||
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { SystemManagementComponent } from './system-management.component';
|
||||
|
||||
describe('SystemManagementComponent', () => {
|
||||
let component: SystemManagementComponent;
|
||||
let fixture: ComponentFixture<SystemManagementComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ SystemManagementComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(SystemManagementComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,14 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-system-management',
|
||||
template:`<router-outlet></router-outlet>`,
|
||||
})
|
||||
export class SystemManagementComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import { SystemManagementModule } from './system-management.module';
|
||||
|
||||
describe('SystemManagementModule', () => {
|
||||
let systemManagementModule: SystemManagementModule;
|
||||
|
||||
beforeEach(() => {
|
||||
systemManagementModule = new SystemManagementModule();
|
||||
});
|
||||
|
||||
it('should create an instance', () => {
|
||||
expect(systemManagementModule).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,27 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { SystemManagementComponent } from './system-management.component';
|
||||
import { PersonalSettingsComponent } from './personal-settings/personal-settings.component';
|
||||
import { RoleManagementComponent } from './role-management/role-management.component';
|
||||
import { UserManagementComponent } from './user-management/user-management.component';
|
||||
import { DepartmentManagementComponent } from './department-management/department-management.component';
|
||||
import { OperationLogsComponent } from './operation-logs/operation-logs.component';
|
||||
import { DataSynchronizeComponent } from './data-synchronize/data-synchronize.component';
|
||||
|
||||
import { SystemManagementRouting } from './system-management-routing.module'
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
SystemManagementRouting
|
||||
],
|
||||
declarations: [
|
||||
SystemManagementComponent,
|
||||
PersonalSettingsComponent,
|
||||
RoleManagementComponent,
|
||||
UserManagementComponent,
|
||||
DepartmentManagementComponent,
|
||||
OperationLogsComponent,
|
||||
DataSynchronizeComponent]
|
||||
})
|
||||
export class SystemManagementModule { }
|
||||
@@ -0,0 +1,3 @@
|
||||
<p>
|
||||
user-management works!
|
||||
</p>
|
||||
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { UserManagementComponent } from './user-management.component';
|
||||
|
||||
describe('UserManagementComponent', () => {
|
||||
let component: UserManagementComponent;
|
||||
let fixture: ComponentFixture<UserManagementComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ UserManagementComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(UserManagementComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-user-management',
|
||||
templateUrl: './user-management.component.html',
|
||||
styleUrls: ['./user-management.component.scss']
|
||||
})
|
||||
export class UserManagementComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user