project-bottom-card.component.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <div class="project-bottom-card">
  2. <!-- 加载状态 -->
  3. @if (loading) {
  4. <div class="card-skeleton">
  5. <div class="title-skeleton"></div>
  6. <div class="buttons-skeleton">
  7. <div class="button-skeleton"></div>
  8. <div class="button-skeleton"></div>
  9. </div>
  10. </div>
  11. } @else {
  12. <!-- 项目内容 -->
  13. <div class="card-content">
  14. <!-- 左侧:项目标题和状态 -->
  15. <div class="project-info">
  16. <div class="title-row">
  17. <h2 class="project-title">{{ getProjectTitle() }}</h2>
  18. <!-- 🆕 项目进度按钮 -->
  19. <button
  20. class="progress-button"
  21. (click)="onShowProgress()"
  22. [disabled]="loading"
  23. title="查看项目进度详情">
  24. <svg class="button-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
  25. <circle cx="12" cy="12" r="10"></circle>
  26. <path d="M12 6v6l4 2"></path>
  27. </svg>
  28. <span class="button-text">进度</span>
  29. </button>
  30. </div>
  31. <div class="project-meta">
  32. <span class="status-badge" [class]="getStatusClass()">
  33. {{ getProjectStatus() }}
  34. </span>
  35. @if (project?.get('deadline')) {
  36. <span class="deadline">
  37. 截止: {{ project!.get('deadline') | date:'MM-dd' }}
  38. </span>
  39. }
  40. </div>
  41. </div>
  42. <!-- 右侧:操作按钮 -->
  43. <div class="action-buttons">
  44. <button
  45. class="action-button files-button"
  46. (click)="onShowFiles()"
  47. [disabled]="loading">
  48. <div class="button-content">
  49. <svg class="button-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
  50. <path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path>
  51. <polyline points="14,2 14,8 20,8"></polyline>
  52. <line x1="16" y1="13" x2="8" y2="13"></line>
  53. <line x1="16" y1="17" x2="8" y2="17"></line>
  54. <polyline points="10,9 9,9 8,9"></polyline>
  55. </svg>
  56. <span class="button-text">文件</span>
  57. @if (fileCount > 0) {
  58. <span class="button-badge">{{ fileCount }}</span>
  59. }
  60. </div>
  61. </button>
  62. <button
  63. class="action-button members-button"
  64. (click)="onShowMembers()"
  65. [disabled]="loading">
  66. <div class="button-content">
  67. <svg class="button-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
  68. <path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path>
  69. <circle cx="9" cy="7" r="4"></circle>
  70. <path d="M23 21v-2a4 4 0 0 0-3-3.87"></path>
  71. <path d="M16 3.13a4 4 0 0 1 0 7.75"></path>
  72. </svg>
  73. <span class="button-text">成员</span>
  74. @if (memberCount > 0) {
  75. <span class="button-badge">{{ memberCount }}</span>
  76. }
  77. </div>
  78. </button>
  79. <button
  80. class="action-button issues-button"
  81. (click)="onShowIssues()"
  82. [disabled]="loading">
  83. <div class="button-content">
  84. <svg class="button-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
  85. <circle cx="12" cy="12" r="10"></circle>
  86. <line x1="12" y1="8" x2="12" y2="12"></line>
  87. <circle cx="12" cy="16" r="1"></circle>
  88. </svg>
  89. <span class="button-text">问题</span>
  90. @if (issueCount > 0) {
  91. <span class="button-badge">{{ issueCount }}</span>
  92. }
  93. </div>
  94. </button>
  95. </div>
  96. </div>
  97. }
  98. </div>
  99. <!-- 🆕 项目进度详情弹窗 -->
  100. <app-project-progress-modal
  101. [visible]="showProgressModal"
  102. [summary]="projectProgressSummary"
  103. [companyId]="cid"
  104. (close)="onCloseProgressModal()"
  105. (reportIssue)="onReportIssueFromModal($event)">
  106. </app-project-progress-modal>