Browse Source

[完善]修改密码的完善

dev
邵佳豪 3 years ago
parent
commit
472d388f21
  1. 2
      src/app/pages/change-password/change-password.component.html
  2. 13
      src/app/pages/home/home.component.html
  3. 4
      src/app/pages/home/home.component.ts
  4. 1
      src/app/pages/login/login.component.ts
  5. 24
      src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.ts
  6. 112
      src/app/pages/oil-unloading-process/oil-unloading-process.component.html
  7. 4
      src/app/pages/oil-unloading-process/oil-unloading-process.component.ts

2
src/app/pages/change-password/change-password.component.html

@ -3,7 +3,7 @@
<nz-form-item> <nz-form-item>
<nz-form-control nzErrorTip=""> <nz-form-control nzErrorTip="">
<nz-input-group> <nz-input-group>
<input name="oldpassword" nz-input type="text" formControlName="oldpassword" placeholder="请输入原密码" autocomplete="off" /> <input name="oldpassword" nz-input type="password" formControlName="oldpassword" placeholder="请输入原密码" autocomplete="off" />
</nz-input-group> </nz-input-group>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>

13
src/app/pages/home/home.component.html

@ -92,7 +92,8 @@
</ng-template> </ng-template>
<!-- 修改密码 --> <!-- 修改密码 -->
<nz-modal [(nzVisible)]="isVisible" [nzTitle]="modalTitle" [nzContent]="modalContent" [nzFooter]="modalFooter" [nzWidth]="350"> <nz-modal [(nzVisible)]="isVisible" [nzTitle]="modalTitle" [nzContent]="modalContent" [nzFooter]="modalFooter"
[nzWidth]="350">
<ng-template #modalTitle> <ng-template #modalTitle>
修改初始密码 修改初始密码
</ng-template> </ng-template>
@ -102,7 +103,7 @@
<nz-form-item> <nz-form-item>
<nz-form-control nzErrorTip=""> <nz-form-control nzErrorTip="">
<nz-input-group> <nz-input-group>
<input name="oldpassword" nz-input type="text" formControlName="oldpassword" <input name="oldpassword" type="password" nz-input formControlName="oldpassword"
placeholder="请输入原密码" autocomplete="off" /> placeholder="请输入原密码" autocomplete="off" />
</nz-input-group> </nz-input-group>
</nz-form-control> </nz-form-control>
@ -110,16 +111,16 @@
<nz-form-item> <nz-form-item>
<nz-form-control> <nz-form-control>
<nz-input-group> <nz-input-group>
<input name="newpassword" nz-input type="password" formControlName="newpassword" <input name="newpassword" nz-input type="password" formControlName="newpassword" placeholder="请输入新密码"
placeholder="请输入新密码" autocomplete="off" /> autocomplete="off" />
</nz-input-group> </nz-input-group>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-control> <nz-form-control>
<nz-input-group> <nz-input-group>
<input name="affirmpassword" nz-input type="password" formControlName="affirmpassword" <input name="affirmpassword" nz-input type="password" formControlName="affirmpassword" placeholder="确认新密码"
placeholder="确认新密码" autocomplete="new-password" /> autocomplete="new-password" />
</nz-input-group> </nz-input-group>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>

4
src/app/pages/home/home.component.ts

@ -94,7 +94,7 @@ export class HomeComponent implements OnInit {
} }
if(sessionStorage.getItem('isDefaultPassword') == 'true'){ if (sessionStorage.getItem('isDefaultPassword') == 'true' || sessionStorage.getItem('isPasswordExpired') == 'true') {
this.changePasswordPopup() this.changePasswordPopup()
} }
@ -113,6 +113,8 @@ export class HomeComponent implements OnInit {
} else { } else {
if (this.passwordValidateForm.value.newpassword != this.passwordValidateForm.value.affirmpassword) { if (this.passwordValidateForm.value.newpassword != this.passwordValidateForm.value.affirmpassword) {
this.message.create('warning', '两次密码输入不一致!'); this.message.create('warning', '两次密码输入不一致!');
} else if (this.passwordValidateForm.value.newpassword == this.passwordValidateForm.value.oldpassword) {
this.message.create('warning', '旧密码和新密码不能相同!');
} else { } else {
this.isConfirmLoading = true; this.isConfirmLoading = true;
let body = { let body = {

1
src/app/pages/login/login.component.ts

@ -114,6 +114,7 @@ export class LoginComponent implements OnInit {
sessionStorage.setItem('userdata', JSON.stringify(data.result.user)) sessionStorage.setItem('userdata', JSON.stringify(data.result.user))
sessionStorage.setItem('userdataOfgasstation', JSON.stringify(data.result.user)) sessionStorage.setItem('userdataOfgasstation', JSON.stringify(data.result.user))
sessionStorage.setItem('isDefaultPassword', JSON.stringify(data.result.user.isDefaultPassword)) sessionStorage.setItem('isDefaultPassword', JSON.stringify(data.result.user.isDefaultPassword))
sessionStorage.setItem('isPasswordExpired', JSON.stringify(data.result.user.isPasswordExpired))
this.isLoading = false; this.isLoading = false;
//记住密码 //记住密码
this.rememberInfo() this.rememberInfo()

24
src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.ts

@ -662,6 +662,28 @@ export class OilUnloadingProcessListComponent implements OnInit {
}); });
} }
look(item) { look(item) {
// console.log(item)
let arr = []
let arr1 = item.oilUnloadingNodes.find((item) => { return item.nodeName == '车辆进场' });
let arr2 = item.oilUnloadingNodes.find((item) => { return item.nodeName == '设置卸油隔离区' });
let arr3 = item.oilUnloadingNodes.find((item) => { return item.nodeName == '卸油连接静电接地' });
let arr4 = item.oilUnloadingNodes.find((item) => { return item.nodeName == '卸油设置消防器材' });
let arr5 = item.oilUnloadingNodes.find((item) => { return item.nodeName == '连接卸油管' });
let arr6 = item.oilUnloadingNodes.find((item) => { return item.nodeName == '卸油中无人监卸' });
let arr7 = item.oilUnloadingNodes.find((item) => { return item.nodeName == '拆除卸油管' });
let arr8 = item.oilUnloadingNodes.find((item) => { return item.nodeName == '车辆离场' || item.nodeName == '车辆离厂' || item.nodeName == '车辆出厂' });
// console.log(1, arr1)
// console.log(2, arr2)
// console.log(3, arr3)
// console.log(4, arr4)
// console.log(5, arr5)
// console.log(6, arr6)
// console.log(7, arr7)
// console.log(8, arr8)
arr = [arr1, arr2, arr3, arr4, arr5, arr6, arr7, arr8]
console.log('卸油流程', arr)
const modal = this.modal.create({ const modal = this.modal.create({
nzContent: OilUnloadingProcessComponent, nzContent: OilUnloadingProcessComponent,
nzViewContainerRef: this.viewContainerRef, nzViewContainerRef: this.viewContainerRef,
@ -674,7 +696,7 @@ export class OilUnloadingProcessListComponent implements OnInit {
'background': '#000D21', 'background': '#000D21',
}, },
nzComponentParams: { nzComponentParams: {
data: item data: arr
}, },
nzFooter: null, nzFooter: null,
nzOnOk: async () => { nzOnOk: async () => {

112
src/app/pages/oil-unloading-process/oil-unloading-process.component.html

@ -14,28 +14,28 @@
</div> </div>
<div class="content content1"> <div class="content content1">
<div class="imgbox"> <div class="imgbox">
<span class="timespan" [ngClass]="{'timespanerr': !data.oilUnloadingNodes[0].isCorrect}"><i nz-icon <span class="timespan" [ngClass]="{'timespanerr': !data[0].isCorrect}"><i nz-icon
nzType="clock-circle" nzTheme="outline"></i>{{data.oilUnloadingNodes[0].violateTime nzType="clock-circle" nzTheme="outline"></i>{{data[0].violateTime
? (data.oilUnloadingNodes[0].violateTime | date:"MM-dd HH:mm:ss") : '/'}}</span> ? (data[0].violateTime | date:"MM-dd HH:mm:ss") : '/'}}</span>
<div class="img" (click)="lookImg(data.oilUnloadingNodes[0].violateImage)" <div class="img" (click)="lookImg(data[0].violateImage)"
[ngClass]="{'selectedimg': !data.oilUnloadingNodes[0].violateImage}"> [ngClass]="{'selectedimg': !data[0].violateImage}">
<img [src]="data.oilUnloadingNodes[0].violateImage ? data.oilUnloadingNodes[0].violateImage : '../../../../assets/images/nopng.png'" <img [src]="data[0].violateImage ? data[0].violateImage : '../../../../assets/images/nopng.png'"
alt=""> alt="">
<img *ngIf="!data.oilUnloadingNodes[0].isCorrect" class="err" <img *ngIf="!data[0].isCorrect" class="err"
src="../../../../assets/images/err.png" alt=""> src="../../../../assets/images/err.png" alt="">
</div> </div>
<span class="name">油罐车进场</span> <span class="name">油罐车进场</span>
</div> </div>
<img class="rightArrow" src="../../../assets/images/rightArrow.png" alt=""> <img class="rightArrow" src="../../../assets/images/rightArrow.png" alt="">
<div class="imgbox"> <div class="imgbox">
<span class="timespan" [ngClass]="{'timespanerr': !data.oilUnloadingNodes[3].isCorrect}"><i nz-icon <span class="timespan" [ngClass]="{'timespanerr': !data[1].isCorrect}"><i nz-icon
nzType="clock-circle" nzTheme="outline"></i>{{data.oilUnloadingNodes[3].violateTime nzType="clock-circle" nzTheme="outline"></i>{{data[1].violateTime
? (data.oilUnloadingNodes[3].violateTime | date:"MM-dd HH:mm:ss") : '/'}}</span> ? (data[1].violateTime | date:"MM-dd HH:mm:ss") : '/'}}</span>
<div class="img" (click)="lookImg(data.oilUnloadingNodes[3].violateImage)" <div class="img" (click)="lookImg(data[1].violateImage)"
[ngClass]="{'selectedimg': !data.oilUnloadingNodes[3].violateImage}"> [ngClass]="{'selectedimg': !data[1].violateImage}">
<img [src]="data.oilUnloadingNodes[3].violateImage ? data.oilUnloadingNodes[3].violateImage : '../../../../assets/images/nopng.png'" <img [src]="data[1].violateImage ? data[1].violateImage : '../../../../assets/images/nopng.png'"
alt=""> alt="">
<img *ngIf="!data.oilUnloadingNodes[3].isCorrect" class="err" <img *ngIf="!data[1].isCorrect" class="err"
src="../../../../assets/images/err.png" alt=""> src="../../../../assets/images/err.png" alt="">
</div> </div>
<span class="name">设置隔离区域</span> <span class="name">设置隔离区域</span>
@ -55,28 +55,28 @@
</div> </div>
<img src="../../../assets/images/rightArrow.png" alt=""> --> <img src="../../../assets/images/rightArrow.png" alt=""> -->
<div class="imgbox"> <div class="imgbox">
<span class="timespan" [ngClass]="{'timespanerr': !data.oilUnloadingNodes[6].isCorrect}"><i nz-icon <span class="timespan" [ngClass]="{'timespanerr': !data[2].isCorrect}"><i nz-icon
nzType="clock-circle" nzTheme="outline"></i>{{data.oilUnloadingNodes[6].violateTime nzType="clock-circle" nzTheme="outline"></i>{{data[2].violateTime
? (data.oilUnloadingNodes[6].violateTime | date:"MM-dd HH:mm:ss") : '/'}}</span> ? (data[2].violateTime | date:"MM-dd HH:mm:ss") : '/'}}</span>
<div class="img" (click)="lookImg(data.oilUnloadingNodes[6].violateImage)" <div class="img" (click)="lookImg(data[2].violateImage)"
[ngClass]="{'selectedimg': !data.oilUnloadingNodes[6].violateImage}"> [ngClass]="{'selectedimg': !data[2].violateImage}">
<img [src]="data.oilUnloadingNodes[6].violateImage ? data.oilUnloadingNodes[6].violateImage : '../../../../assets/images/nopng.png'" <img [src]="data[2].violateImage ? data[2].violateImage : '../../../../assets/images/nopng.png'"
alt=""> alt="">
<img *ngIf="!data.oilUnloadingNodes[6].isCorrect" class="err" <img *ngIf="!data[2].isCorrect" class="err"
src="../../../../assets/images/err.png" alt=""> src="../../../../assets/images/err.png" alt="">
</div> </div>
<span class="name">连接静电接地</span> <span class="name">连接静电接地</span>
</div> </div>
<img class="rightArrow" src="../../../assets/images/rightArrow.png" alt=""> <img class="rightArrow" src="../../../assets/images/rightArrow.png" alt="">
<div class="imgbox"> <div class="imgbox">
<span class="timespan" [ngClass]="{'timespanerr': !data.oilUnloadingNodes[5].isCorrect}"><i nz-icon <span class="timespan" [ngClass]="{'timespanerr': !data[3].isCorrect}"><i nz-icon
nzType="clock-circle" nzTheme="outline"></i>{{data.oilUnloadingNodes[5].violateTime nzType="clock-circle" nzTheme="outline"></i>{{data[3].violateTime
? (data.oilUnloadingNodes[5].violateTime | date:"MM-dd HH:mm:ss") : '/'}}</span> ? (data[3].violateTime | date:"MM-dd HH:mm:ss") : '/'}}</span>
<div class="img" (click)="lookImg(data.oilUnloadingNodes[5].violateImage)" <div class="img" (click)="lookImg(data[3].violateImage)"
[ngClass]="{'selectedimg': !data.oilUnloadingNodes[5].violateImage}"> [ngClass]="{'selectedimg': !data[3].violateImage}">
<img [src]="data.oilUnloadingNodes[5].violateImage ? data.oilUnloadingNodes[5].violateImage : '../../../../assets/images/nopng.png'" <img [src]="data[3].violateImage ? data[3].violateImage : '../../../../assets/images/nopng.png'"
alt=""> alt="">
<img *ngIf="!data.oilUnloadingNodes[5].isCorrect" class="err" <img *ngIf="!data[3].isCorrect" class="err"
src="../../../../assets/images/err.png" alt=""> src="../../../../assets/images/err.png" alt="">
</div> </div>
<span class="name">放置消防器材</span> <span class="name">放置消防器材</span>
@ -141,45 +141,45 @@
<span class="name">开始卸油</span> <span class="name">开始卸油</span>
</div> --> </div> -->
<div class="imgbox"> <div class="imgbox">
<span class="timespan" [ngClass]="{'timespanerr': !data.oilUnloadingNodes[8].isCorrect}"><i <span class="timespan" [ngClass]="{'timespanerr': !data[4].isCorrect}"><i
nz-icon nzType="clock-circle" nz-icon nzType="clock-circle"
nzTheme="outline"></i>{{data.oilUnloadingNodes[8].violateTime ? nzTheme="outline"></i>{{data[4].violateTime ?
(data.oilUnloadingNodes[8].violateTime | date:"MM-dd HH:mm:ss") : '/'}}</span> (data[4].violateTime | date:"MM-dd HH:mm:ss") : '/'}}</span>
<div class="img" (click)="lookImg(data.oilUnloadingNodes[8].violateImage)" <div class="img" (click)="lookImg(data[4].violateImage)"
[ngClass]="{'selectedimg': !data.oilUnloadingNodes[8].violateImage}"> [ngClass]="{'selectedimg': !data[4].violateImage}">
<img [src]="data.oilUnloadingNodes[8].violateImage ? data.oilUnloadingNodes[8].violateImage : '../../../../assets/images/nopng.png'" <img [src]="data[4].violateImage ? data[4].violateImage : '../../../../assets/images/nopng.png'"
alt=""> alt="">
<img *ngIf="!data.oilUnloadingNodes[8].isCorrect" class="err" <img *ngIf="!data[4].isCorrect" class="err"
src="../../../../assets/images/err.png" alt=""> src="../../../../assets/images/err.png" alt="">
</div> </div>
<span class="name">连接卸油管</span> <span class="name">连接卸油管</span>
</div> </div>
<img class="rightArrow" src="../../../assets/images/rightArrow.png" alt=""> <img class="rightArrow" src="../../../assets/images/rightArrow.png" alt="">
<div class="imgbox"> <div class="imgbox">
<span class="timespan" [ngClass]="{'timespanerr': !data.oilUnloadingNodes[10].isCorrect}"><i <span class="timespan" [ngClass]="{'timespanerr': !data[5].isCorrect}"><i
nz-icon nzType="clock-circle" nz-icon nzType="clock-circle"
nzTheme="outline"></i>{{data.oilUnloadingNodes[10].violateTime ? nzTheme="outline"></i>{{data[5].violateTime ?
(data.oilUnloadingNodes[10].violateTime | date:"MM-dd HH:mm:ss") : '/'}}</span> (data[5].violateTime | date:"MM-dd HH:mm:ss") : '/'}}</span>
<div class="img" (click)="lookImg(data.oilUnloadingNodes[10].violateImage)" <div class="img" (click)="lookImg(data[5].violateImage)"
[ngClass]="{'selectedimg': !data.oilUnloadingNodes[10].violateImage}"> [ngClass]="{'selectedimg': !data[5].violateImage}">
<img [src]="data.oilUnloadingNodes[10].violateImage ? data.oilUnloadingNodes[10].violateImage : '../../../../assets/images/nopng.png'" <img [src]="data[5].violateImage ? data[5].violateImage : '../../../../assets/images/nopng.png'"
alt=""> alt="">
<img *ngIf="!data.oilUnloadingNodes[10].isCorrect" class="err" <img *ngIf="!data[5].isCorrect" class="err"
src="../../../../assets/images/err.png" alt=""> src="../../../../assets/images/err.png" alt="">
</div> </div>
<span class="name">全程监卸</span> <span class="name">全程监卸</span>
</div> </div>
<img class="rightArrow" src="../../../assets/images/rightArrow.png" alt=""> <img class="rightArrow" src="../../../assets/images/rightArrow.png" alt="">
<div class="imgbox"> <div class="imgbox">
<span class="timespan" [ngClass]="{'timespanerr': !data.oilUnloadingNodes[11].isCorrect}"><i <span class="timespan" [ngClass]="{'timespanerr': !data[6].isCorrect}"><i
nz-icon nzType="clock-circle" nz-icon nzType="clock-circle"
nzTheme="outline"></i>{{data.oilUnloadingNodes[11].violateTime ? nzTheme="outline"></i>{{data[6].violateTime ?
(data.oilUnloadingNodes[11].violateTime | date:"MM-dd HH:mm:ss") : '/'}}</span> (data[6].violateTime | date:"MM-dd HH:mm:ss") : '/'}}</span>
<div class="img" (click)="lookImg(data.oilUnloadingNodes[11].violateImage)" <div class="img" (click)="lookImg(data[6].violateImage)"
[ngClass]="{'selectedimg': !data.oilUnloadingNodes[11].violateImage}"> [ngClass]="{'selectedimg': !data[6].violateImage}">
<img [src]="data.oilUnloadingNodes[11].violateImage ? data.oilUnloadingNodes[11].violateImage : '../../../../assets/images/nopng.png'" <img [src]="data[6].violateImage ? data[6].violateImage : '../../../../assets/images/nopng.png'"
alt=""> alt="">
<img *ngIf="!data.oilUnloadingNodes[11].isCorrect" class="err" <img *ngIf="!data[6].isCorrect" class="err"
src="../../../../assets/images/err.png" alt=""> src="../../../../assets/images/err.png" alt="">
</div> </div>
<span class="name">拆除卸油管</span> <span class="name">拆除卸油管</span>
@ -187,15 +187,15 @@
<img class="rightArrow" src="../../../assets/images/rightArrow.png" alt=""> <img class="rightArrow" src="../../../assets/images/rightArrow.png" alt="">
<div class="imgbox"> <div class="imgbox">
<span class="timespan" <span class="timespan"
[ngClass]="{'timespanerr': !data.oilUnloadingNodes[13].isCorrect}"><i [ngClass]="{'timespanerr': !data[7].isCorrect}"><i
nz-icon nzType="clock-circle" nz-icon nzType="clock-circle"
nzTheme="outline"></i>{{data.oilUnloadingNodes[13].violateTime ? nzTheme="outline"></i>{{data[7].violateTime ?
(data.oilUnloadingNodes[13].violateTime | date:"MM-dd HH:mm:ss") : '/'}}</span> (data[7].violateTime | date:"MM-dd HH:mm:ss") : '/'}}</span>
<div class="img" (click)="lookImg(data.oilUnloadingNodes[13].violateImage)" <div class="img" (click)="lookImg(data[7].violateImage)"
[ngClass]="{'selectedimg': !data.oilUnloadingNodes[13].violateImage}"> [ngClass]="{'selectedimg': !data[7].violateImage}">
<img [src]="data.oilUnloadingNodes[13].violateImage ? data.oilUnloadingNodes[13].violateImage : '../../../../assets/images/nopng.png'" <img [src]="data[7].violateImage ? data[7].violateImage : '../../../../assets/images/nopng.png'"
alt=""> alt="">
<img *ngIf="!data.oilUnloadingNodes[13].isCorrect" class="err" <img *ngIf="!data[7].isCorrect" class="err"
src="../../../../assets/images/err.png" alt=""> src="../../../../assets/images/err.png" alt="">
</div> </div>
<span class="name">油罐车离场</span> <span class="name">油罐车离场</span>

4
src/app/pages/oil-unloading-process/oil-unloading-process.component.ts

@ -11,7 +11,7 @@ export class OilUnloadingProcessComponent implements OnInit {
constructor(private message: NzMessageService) { } constructor(private message: NzMessageService) { }
ngOnInit(): void { ngOnInit(): void {
console.log(this.data) // console.log(this.data)
} }
lookImg(url) { lookImg(url) {
if (url) { if (url) {
@ -36,4 +36,6 @@ export class OilUnloadingProcessComponent implements OnInit {
this.message.create('warning', `该节点没有图片`); this.message.create('warning', `该节点没有图片`);
} }
} }
} }

Loading…
Cancel
Save