view.component.ts 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import { Component, OnInit } from '@angular/core';
  2. import { NzModalRef, NzMessageService, NzDrawerRef } from 'ng-zorro-antd';
  3. import { _HttpClient } from '@delon/theme';
  4. import { ProWorkMilestoneService } from 'app/services/project-work/pro-work-milestone.service';
  5. import { ProWorkMilestone } from 'app/entity/project-work/pro-work-milestone';
  6. import { environment } from '@env/environment';
  7. import { getFileListById } from '@shared/utils/file-show';
  8. @Component({
  9. selector: 'app-project-work-implementation-milestone-confirm-view',
  10. templateUrl: './view.component.html',
  11. styles: [
  12. `
  13. .base {
  14. position: absolute;
  15. bottom: 0px;
  16. width: 100%;
  17. border-top: 1px solid rgb(232, 232, 232);
  18. padding: 6px 16px;
  19. text-align: right;
  20. left: 0px;
  21. background: #fff;
  22. z-index: 99;
  23. }
  24. `,
  25. ],
  26. })
  27. export class ProjectWorkImplementationMilestoneConfirmViewComponent implements OnInit {
  28. constructor(
  29. private proWorkMilestoneService:ProWorkMilestoneService,
  30. private drawerRef:NzDrawerRef
  31. ) { }
  32. ngOnInit(): void {
  33. this.getById();
  34. }
  35. isLoadingSave=false;
  36. proWorkMilestone: ProWorkMilestone = {
  37. }; //对象
  38. id = '';
  39. fileList = [];
  40. /**
  41. * 根据id查询数据
  42. */
  43. getById() {
  44. this.isLoadingSave=true;
  45. this.proWorkMilestoneService.queryById(this.id).then(response => {
  46. if (response.success) {
  47. //表数据
  48. this.proWorkMilestone = response.result;
  49. //文件信息
  50. this.fileList=response.result.fileList;
  51. //获取文件格式
  52. getFileListById(this.fileList);
  53. }
  54. this.isLoadingSave=false;
  55. });
  56. }
  57. close() {
  58. this.drawerRef.close();
  59. }
  60. }