Skip to content

Commit 4d27963

Browse files
committed
nothing
1 parent b97d2aa commit 4d27963

File tree

14 files changed

+94
-109
lines changed

14 files changed

+94
-109
lines changed

README.md

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,5 @@
11
# Angular4Admin
22

3-
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.0.3.
3+
基于Angular4和Material Design风格的企业后台管理系统,使用Angular-cli构建。
44

5-
## Development server
65

7-
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
8-
9-
## Code scaffolding
10-
11-
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|module`.
12-
13-
## Build
14-
15-
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.
16-
17-
## Running unit tests
18-
19-
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20-
21-
## Running end-to-end tests
22-
23-
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
24-
Before running the tests make sure you are serving the app via `ng serve`.
25-
26-
## Further help
27-
28-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
"private": true,
1414
"dependencies": {
1515
"@angular-mdl/core": "^4.0.3",
16-
"@angular-mdl/popover": "^0.6.3",
17-
"@angular-mdl/select": "^0.10.4",
16+
"@angular/animations": "^4.1.3",
1817
"@angular/common": "^4.0.0",
1918
"@angular/compiler": "^4.0.0",
2019
"@angular/core": "^4.0.0",
@@ -27,6 +26,7 @@
2726
"@types/hammerjs": "^2.0.34",
2827
"@types/jquery": "^2.0.45",
2928
"core-js": "^2.4.1",
29+
"hammerjs": "^2.0.8",
3030
"jquery": "^3.2.1",
3131
"material-design-icons": "^3.0.1",
3232
"material-design-lite": "^1.3.0",

src/app/app.component.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ export class AppComponent implements OnInit {
1010
ngOnInit() {
1111
const windowWidth = window.innerWidth,
1212
windowHeight = window.innerHeight;
13-
$('app-layout-body').css('width', windowWidth - 280 + 'px');
14-
$('app-layout-body').css('height', windowHeight - 180 + 'px');
15-
13+
$('.app-body, .body-footer').css('width', windowWidth - 246 + 'px');
14+
$('.app-body').css('height', windowHeight - 121 + 'px');
1615
}
1716
}

src/app/app.module.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { AppComponent } from './app.component';
1010
import { routing, CustomReuseStrategy } from './app.routing';
1111

1212
// 第三方模块
13-
import { MdlModule } from '@angular-mdl/core';
13+
import 'hammerjs';
1414

1515
// 项目内模块
1616
import { LayoutModule } from './layout/layout.module';
@@ -27,8 +27,6 @@ import { TabControlService } from './layout/header/tab/tabControl.service';
2727
BrowserModule,
2828
FormsModule,
2929
HttpModule,
30-
// 第三方模块
31-
MdlModule,
3230
// 项目内模块
3331
LayoutModule,
3432
HomeModule,

src/app/base-data/base-data.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
44
import { RouterModule, RouteReuseStrategy } from '@angular/router';
55

66
import { ShareModule } from '../share/share.module';
7+
import { MdNativeDateModule } from '@angular/material';
78
import { PersonListComponent } from './person-list/person-list.component';
89
import { PersonAddComponent } from './person-add/person-add.component';
910
import { PersonEditComponent } from './person-edit/person-edit.component';
@@ -15,6 +16,7 @@ import { PersonManageService } from './person-manage.service';
1516
CommonModule,
1617
FormsModule,
1718
ShareModule,
19+
MdNativeDateModule,
1820
ReactiveFormsModule,
1921
RouterModule.forChild(baseDataRoutes)
2022
],

src/app/base-data/person-add/person-add.component.html

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,18 @@
2121
<mdl-textfield label="职务*" type="text" formControlName="position" floating-label error-msg="请输入职务"></mdl-textfield>
2222
</div>
2323

24-
<div class="form-inline-item">
25-
性别:<br/>
26-
<mdl-radio value="" formControlName="sex" mdl-ripple></mdl-radio>
27-
<mdl-radio value="" formControlName="sex" mdl-ripple></mdl-radio>
28-
</div>
29-
30-
<div class="form-inline-input">
31-
<mdl-textfield label="凑数目的" type="text" formControlName="date" floating-label></mdl-textfield>
32-
</div>
33-
<div class="form-inline-item">
34-
<mdl-textfield label="凑数目的" type="text" floating-label></mdl-textfield>
35-
</div>
3624
<div class="form-inline-item">
3725
<mdl-textfield label="凑数目的" type="text" floating-label></mdl-textfield>
3826
</div>
3927
<div class="form-inline-item">
4028
<mdl-textfield label="凑数目的" type="text" floating-label></mdl-textfield>
4129
</div>
30+
4231
<div class="form-inline-item">
43-
<mdl-textfield label="凑数目的" type="text" floating-label></mdl-textfield>
32+
33+
性别:<br/>
34+
<mdl-radio value="" formControlName="sex" mdl-ripple></mdl-radio>
35+
<mdl-radio value="" formControlName="sex" mdl-ripple></mdl-radio>
4436
</div>
4537

4638

src/app/base-data/person-add/person-add.component.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { Component, OnInit } from '@angular/core';
22
import { FormControl, FormGroup, FormBuilder, Validators } from '@angular/forms';
33
import { Router } from '@angular/router';
44

5-
import { MdlModule } from '@angular-mdl/core';
65
import { PersonManageService } from '../person-manage.service';
76
import { TabControlService } from '../../layout/header/tab/tabControl.service';
87

@@ -24,6 +23,10 @@ export class PersonAddComponent implements OnInit {
2423
public account = new FormControl('', Validators.required);
2524
public role = new FormControl('', Validators.required);
2625
public position = new FormControl('');
26+
public genders = [
27+
{ value: '0', viewValue: '男' },
28+
{ value: '1', viewValue: '女' }
29+
];
2730

2831
constructor(private fb: FormBuilder,
2932
private route: Router,
@@ -47,7 +50,7 @@ export class PersonAddComponent implements OnInit {
4750

4851
public onSubmit() {
4952
console.log(this.form);
50-
this.personManageService.addPerson(this.form).then(() => SweetAlert.alert('新增人员成功'))
53+
// this.personManageService.addPerson(this.form).then(() => SweetAlert.alert('新增人员成功'))
5154
}
5255

5356
cancel() {
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +0,0 @@
1-
.body-content {
2-
position: absolute;
3-
left: 240px;
4-
}
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
<mdl-layout-content class="body-content">
1+
<div class="app-body">
22
<router-outlet></router-outlet>
3-
</mdl-layout-content>
3+
</div>
4+
<div class="body-footer"></div>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<md2-tabs [selectedIndex]="tabControlServiceModal.activeTab">
22
<md2-tab [reallyTab]="menuTab" *ngFor="let menuTab of tabControlServiceModal.tabs">
3-
<template md2-tab-label>
3+
<ng-template md2-tab-label>
44
<a [routerLink]='menuTab.link' routerLinkActive="active">{{menuTab.name}}</a>
55
<i *ngIf="menuTab.link !== '/home'" class="material-icons" (click)="closeTab(menuTab)">close</i>
6-
</template>
6+
</ng-template>
77
</md2-tab>
88

99
</md2-tabs>

0 commit comments

Comments
 (0)