Browse Source

[完善]完善弹窗信息

beijing
邵佳豪 3 years ago
parent
commit
e03906f6ff
  1. 34
      src/app/pages/home/home.component.html
  2. 18
      src/app/pages/home/home.component.ts

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

@ -87,14 +87,32 @@
<span class="details">{{item.notification.data.properties.ViolationName}}</span> <span class="details">{{item.notification.data.properties.ViolationName}}</span>
</div> </div>
</div> </div>
<div class="btnbox"> <ng-container
<div class="look" (click)="look(item)"> *ngIf="item.notification.data.type == 'AX.SinochemServer.License.Notifications.LicenseNotificationData'; else elseTemplate">
查看 <div class="btnbox">
<div class="look" (click)="updateState(item,1)">
处置
</div>
<div class="look" (click)="updateState(item,2)">
申请延期
</div>
<div class="lose" (click)="updateState(item,0)">
忽略
</div>
</div> </div>
<div class="lose" (click)="close(item)"> </ng-container>
忽略 <ng-template #elseTemplate>
<div class="btnbox">
<div class="look" (click)="look(item)">
查看
</div>
<div class="lose" (click)="close(item)">
忽略
</div>
</div> </div>
</div> </ng-template>
</ng-template> </ng-template>
<!-- 修改密码 --> <!-- 修改密码 -->
@ -109,8 +127,8 @@
<nz-form-item> <nz-form-item>
<nz-form-control nzErrorTip=""> <nz-form-control nzErrorTip="">
<nz-input-group> <nz-input-group>
<input name="oldpassword" type="password" nz-input formControlName="oldpassword" <input name="oldpassword" type="password" nz-input formControlName="oldpassword" placeholder="请输入原密码"
placeholder="请输入原密码" autocomplete="off" /> autocomplete="off" />
</nz-input-group> </nz-input-group>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>

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

@ -310,7 +310,23 @@ export class HomeComponent implements OnInit {
} }
}) })
} }
//处置
updateState(item, type) {
let body = {
id: item.notification.entityId,
operation: type
}
this.http.put('/api/services/app/StationValidityLicenseNotificationRecord/UpdateState', body).subscribe(data => {
this.messageId.forEach((element) => {
if (element.id == item.notification.entityId) {
this.notificationService.remove(element.messageId)
}
})
this.message.create('success', '操作成功');
}, err => {
this.message.create('error', '操作失败');
})
}
ngOnDestroy() { ngOnDestroy() {
console.log('退出') console.log('退出')

Loading…
Cancel
Save