Ⅰ级违法事件
diff --git a/src/app/pages/today-warning/today-warning.component.scss b/src/app/pages/today-warning/today-warning.component.scss
index fa8ba71..129b79b 100644
--- a/src/app/pages/today-warning/today-warning.component.scss
+++ b/src/app/pages/today-warning/today-warning.component.scss
@@ -14,6 +14,7 @@
font-family: titlefont;
font-size: 26px;
color: #D0EAFF;
+ margin: 15px 0;
}
.search {
@@ -42,24 +43,11 @@
}
nz-date-picker {
-
background-color: #002552;
width: 145%;
}
}
-
- .submit {
- background-color: #013064;
- border: 1px solid #4c8ac8;
- color: #86bff3;
- }
-
- .reset {
- background-color: #010d26;
- border: 1px solid #4c8ac8;
- color: #86bff3;
- }
}
.warningnumber {
diff --git a/src/app/ui/changepassword/changepassword.component.ts b/src/app/ui/changepassword/changepassword.component.ts
index f583329..07ae9c5 100644
--- a/src/app/ui/changepassword/changepassword.component.ts
+++ b/src/app/ui/changepassword/changepassword.component.ts
@@ -1,8 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { HttpClient } from '@angular/common/http'
import { MatDialogRef } from '@angular/material/dialog';
-import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
-
+import { NzMessageService } from 'ng-zorro-antd/message';
@Component({
@@ -12,31 +11,27 @@ import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
})
export class ChangepasswordComponent implements OnInit {
-
- constructor(private http:HttpClient,public snackBar: MatSnackBar,
- public dialogRef: MatDialogRef
) { }
+
+ constructor(private http: HttpClient,
+ public dialogRef: MatDialogRef, private message: NzMessageService) { }
ngOnInit() {
}
- errmsg :string = ''
+ errmsg: string = ''
- onSubmit(e){
+ onSubmit(e) {
this.http.put(
- '/api/CompanyAccount/Password',
+ '/api/CompanyAccount/Password',
{
newPassword: e.newPassword,
password: e.password
}
- ).subscribe(data=> {
+ ).subscribe(data => {
this.dialogRef.close(data);
- const config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('密码修改成功','确定',config);
- },(err) =>
- {this.errmsg = err}
+ this.message.create('success', `密码修改成功`);
+ }, (err) => { this.errmsg = err }
)
- }
+ }
diff --git a/src/app/ui/tabbar/tabbar.component.ts b/src/app/ui/tabbar/tabbar.component.ts
index 0e0866c..d47210c 100644
--- a/src/app/ui/tabbar/tabbar.component.ts
+++ b/src/app/ui/tabbar/tabbar.component.ts
@@ -4,9 +4,8 @@ import { Router, ActivatedRoute } from '@angular/router'
import { CacheTokenService } from '../../service/cache-token.service' //引入服务
import { MatDialog } from '@angular/material/dialog';
import { ChangepasswordComponent } from '../changepassword/changepassword.component'
-import { MatSnackBar } from '@angular/material/snack-bar';
import { CookieService } from 'ngx-cookie-service';
-
+import { NzMessageService } from 'ng-zorro-antd/message';
@Component({
@@ -16,17 +15,17 @@ import { CookieService } from 'ngx-cookie-service';
})
export class TabbarComponent implements OnInit {
- constructor(private http: HttpClient, private router: Router, private route: ActivatedRoute, public token: CacheTokenService, public dialog: MatDialog, public snackBar: MatSnackBar,
- private cookieService: CookieService) { }
+ constructor(private http: HttpClient, private router: Router, private route: ActivatedRoute, public token: CacheTokenService, public dialog: MatDialog,
+ private cookieService: CookieService, private message: NzMessageService) { }
ngOnInit() {
- setInterval(()=>{
+ setInterval(() => {
this.getTime()
- },1000);
+ }, 1000);
}
//获得时间
- time:string
+ time: string
getTime() {
let myDate = new Date();
let y = myDate.getFullYear();
@@ -53,20 +52,18 @@ export class TabbarComponent implements OnInit {
//退出系统
signOut() {
- let out = confirm("您确定要退出吗")
- if (out) {
- this.token.delete()
- sessionStorage.clear()
- window.localStorage.clear()
- this.cookieService.set("token", '', new Date(new Date().getTime() + 1), '/');
- this.cookieService.set("refreshToken", '', new Date(new Date().getTime() + 1), '/');
- this.router.navigate(['/login'])
- }
+ this.message.create('success', `退出成功`);
+ this.token.delete()
+ sessionStorage.clear()
+ window.localStorage.clear()
+ this.cookieService.set("token", '', new Date(new Date().getTime() + 1), '/');
+ this.cookieService.set("refreshToken", '', new Date(new Date().getTime() + 1), '/');
+ this.router.navigate(['/login'])
}
//修改密码
changpsw() {
- let dialogRef = this.dialog.open(ChangepasswordComponent,{ width: '348px' });
+ let dialogRef = this.dialog.open(ChangepasswordComponent, { width: '348.000051px' });
dialogRef.afterClosed().subscribe();
}
diff --git a/src/app/ui/title/title.component.html b/src/app/ui/title/title.component.html
index 62f2cd2..56b04d6 100644
--- a/src/app/ui/title/title.component.html
+++ b/src/app/ui/title/title.component.html
@@ -2,7 +2,7 @@
\ No newline at end of file
diff --git a/src/app/ui/title/title.component.ts b/src/app/ui/title/title.component.ts
index 4a46919..6acbff7 100644
--- a/src/app/ui/title/title.component.ts
+++ b/src/app/ui/title/title.component.ts
@@ -1,4 +1,4 @@
-import { Component, OnInit } from '@angular/core';
+import { Component, OnInit, Input } from '@angular/core';
@Component({
selector: 'app-title',
@@ -7,6 +7,8 @@ import { Component, OnInit } from '@angular/core';
})
export class TitleComponent implements OnInit {
+ @Input() name: string
+
constructor() { }
ngOnInit(): void {
diff --git a/src/app/ui/ui.module.ts b/src/app/ui/ui.module.ts
index ed55c4d..fca93cb 100644
--- a/src/app/ui/ui.module.ts
+++ b/src/app/ui/ui.module.ts
@@ -19,6 +19,7 @@ import { TabbarComponent } from './tabbar/tabbar.component';
import { NzDropDownModule } from 'ng-zorro-antd/dropdown';
import { TitleComponent } from './title/title.component';
+import { NzMessageModule } from 'ng-zorro-antd/message';
@NgModule({
declarations: [TabbarComponent,UserdataComponent, ChangepasswordComponent, IsnoPipe, ConfirmpswDirective, TimePipe, EditUser, TitleComponent],
@@ -35,7 +36,8 @@ import { TitleComponent } from './title/title.component';
ReactiveFormsModule,
FormsModule,
PaginatorModule,
- NzDropDownModule
+ NzDropDownModule,
+ NzMessageModule
],
exports:[TabbarComponent,TitleComponent]
diff --git a/src/assets/images/bgImg.jpg b/src/assets/images/bgImg.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..7bcfb4885648d25708b9a29a93a5938636927d9b
GIT binary patch
literal 848586
zcmeFZdt4J&_b(g-MXic=TNPr()~b&p-pwP4cthK2R8*8p5CIVd!YztPlTlIeo>FUV
zYbD+zVhFTiFcP8#jlEb