|
@@ -61,7 +61,7 @@
|
|
|
<!-- 项目统计卡片 -->
|
|
|
<div class="stats-cards">
|
|
|
<div class="stat-card">
|
|
|
- <div class="stat-value">{{ projects().length }}</div>
|
|
|
+ <div class="stat-value">{{ totalProjectsCount }}</div>
|
|
|
<div class="stat-label">总项目数</div>
|
|
|
</div>
|
|
|
<div class="stat-card">
|
|
@@ -74,11 +74,7 @@
|
|
|
</div>
|
|
|
<div class="stat-card">
|
|
|
<div class="stat-value">{{ pendingProjectsCount }}</div>
|
|
|
- <div class="stat-label">待开始</div>
|
|
|
- </div>
|
|
|
- <div class="stat-card">
|
|
|
- <div class="stat-value">{{ formatCurrency(totalProjectsBudget) }}</div>
|
|
|
- <div class="stat-label">总预算</div>
|
|
|
+ <div class="stat-label">待分配</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@@ -86,13 +82,13 @@
|
|
|
<div class="project-table-container">
|
|
|
<table mat-table [dataSource]="paginatedProjects" class="project-table">
|
|
|
<!-- 项目名称列 -->
|
|
|
- <ng-container matColumnDef="name">
|
|
|
+ <ng-container matColumnDef="title">
|
|
|
<th mat-header-cell *matHeaderCellDef class="table-header"
|
|
|
- (click)="onSort('name')">
|
|
|
+ (click)="onSort('title')">
|
|
|
<div class="header-content">
|
|
|
<span>项目名称</span>
|
|
|
<div class="sort-icon">
|
|
|
- <svg *ngIf="sortColumn === 'name'" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
|
+ <svg *ngIf="sortColumn === 'title'" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
|
<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon>
|
|
|
</svg>
|
|
|
</div>
|
|
@@ -100,7 +96,7 @@
|
|
|
</th>
|
|
|
<td mat-cell *matCellDef="let project" class="table-cell">
|
|
|
<div class="project-name">
|
|
|
- <a [routerLink]="['/admin/project-detail', project.id]">{{ project.name }}</a>
|
|
|
+ <a [routerLink]="['/admin/project-detail', project.id]">{{ project.title }}</a>
|
|
|
</div>
|
|
|
</td>
|
|
|
</ng-container>
|
|
@@ -123,21 +119,21 @@
|
|
|
</td>
|
|
|
</ng-container>
|
|
|
|
|
|
- <!-- 设计师列 -->
|
|
|
- <ng-container matColumnDef="designer">
|
|
|
+ <!-- 负责人列 -->
|
|
|
+ <ng-container matColumnDef="assignee">
|
|
|
<th mat-header-cell *matHeaderCellDef class="table-header"
|
|
|
- (click)="onSort('designer')">
|
|
|
+ (click)="onSort('assignee')">
|
|
|
<div class="header-content">
|
|
|
- <span>设计师</span>
|
|
|
+ <span>负责人</span>
|
|
|
<div class="sort-icon">
|
|
|
- <svg *ngIf="sortColumn === 'designer'" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
|
+ <svg *ngIf="sortColumn === 'assignee'" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
|
<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon>
|
|
|
</svg>
|
|
|
</div>
|
|
|
</div>
|
|
|
</th>
|
|
|
<td mat-cell *matCellDef="let project" class="table-cell">
|
|
|
- {{ project.designer }}
|
|
|
+ {{ project.assignee }}
|
|
|
</td>
|
|
|
</ng-container>
|
|
|
|
|
@@ -161,78 +157,33 @@
|
|
|
</td>
|
|
|
</ng-container>
|
|
|
|
|
|
- <!-- 进度列 -->
|
|
|
- <ng-container matColumnDef="progress">
|
|
|
- <th mat-header-cell *matHeaderCellDef class="table-header"
|
|
|
- (click)="onSort('progress')">
|
|
|
- <div class="header-content">
|
|
|
- <span>进度</span>
|
|
|
- <div class="sort-icon">
|
|
|
- <svg *ngIf="sortColumn === 'progress'" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
|
- <polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon>
|
|
|
- </svg>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </th>
|
|
|
- <td mat-cell *matCellDef="let project" class="table-cell">
|
|
|
- <div class="progress-container">
|
|
|
- <div class="progress-bar" [style.width]="project.progress + '%'" [style.backgroundColor]="statusColors[project.status]"></div>
|
|
|
- <span class="progress-text">{{ project.progress }}%</span>
|
|
|
- </div>
|
|
|
- </td>
|
|
|
- </ng-container>
|
|
|
-
|
|
|
- <!-- 预算列 -->
|
|
|
- <ng-container matColumnDef="budget">
|
|
|
- <th mat-header-cell *matHeaderCellDef class="table-header"
|
|
|
- (click)="onSort('budget')">
|
|
|
- <div class="header-content">
|
|
|
- <span>预算</span>
|
|
|
- <div class="sort-icon">
|
|
|
- <svg *ngIf="sortColumn === 'budget'" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
|
- <polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon>
|
|
|
- </svg>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </th>
|
|
|
- <td mat-cell *matCellDef="let project" class="table-cell">
|
|
|
- {{ formatCurrency(project.budget) }}
|
|
|
- </td>
|
|
|
- </ng-container>
|
|
|
-
|
|
|
- <!-- 开始日期列 -->
|
|
|
- <ng-container matColumnDef="startDate">
|
|
|
- <th mat-header-cell *matHeaderCellDef class="table-header"
|
|
|
- (click)="onSort('startDate')">
|
|
|
+ <!-- 当前阶段列 -->
|
|
|
+ <ng-container matColumnDef="currentStage">
|
|
|
+ <th mat-header-cell *matHeaderCellDef class="table-header">
|
|
|
<div class="header-content">
|
|
|
- <span>开始日期</span>
|
|
|
- <div class="sort-icon">
|
|
|
- <svg *ngIf="sortColumn === 'startDate'" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
|
- <polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon>
|
|
|
- </svg>
|
|
|
- </div>
|
|
|
+ <span>当前阶段</span>
|
|
|
</div>
|
|
|
</th>
|
|
|
<td mat-cell *matCellDef="let project" class="table-cell">
|
|
|
- {{ project.startDate }}
|
|
|
+ {{ project.currentStage || '-' }}
|
|
|
</td>
|
|
|
</ng-container>
|
|
|
|
|
|
- <!-- 结束日期列 -->
|
|
|
- <ng-container matColumnDef="endDate">
|
|
|
+ <!-- 更新时间列 -->
|
|
|
+ <ng-container matColumnDef="updatedAt">
|
|
|
<th mat-header-cell *matHeaderCellDef class="table-header"
|
|
|
- (click)="onSort('endDate')">
|
|
|
+ (click)="onSort('updatedAt')">
|
|
|
<div class="header-content">
|
|
|
- <span>结束日期</span>
|
|
|
+ <span>更新时间</span>
|
|
|
<div class="sort-icon">
|
|
|
- <svg *ngIf="sortColumn === 'endDate'" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
|
+ <svg *ngIf="sortColumn === 'updatedAt'" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
|
<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon>
|
|
|
</svg>
|
|
|
</div>
|
|
|
</div>
|
|
|
</th>
|
|
|
<td mat-cell *matCellDef="let project" class="table-cell">
|
|
|
- {{ project.endDate }}
|
|
|
+ {{ project.updatedAt ? (project.updatedAt | date:'yyyy-MM-dd HH:mm') : '-' }}
|
|
|
</td>
|
|
|
</ng-container>
|
|
|
|
|
@@ -269,8 +220,8 @@
|
|
|
</td>
|
|
|
</ng-container>
|
|
|
|
|
|
- <tr mat-header-row *matHeaderRowDef="['name', 'customer', 'designer', 'status', 'progress', 'budget', 'startDate', 'endDate', 'actions']"></tr>
|
|
|
- <tr mat-row *matRowDef="let row; columns: ['name', 'customer', 'designer', 'status', 'progress', 'budget', 'startDate', 'endDate', 'actions']"></tr>
|
|
|
+ <tr mat-header-row *matHeaderRowDef="['title', 'customer', 'assignee', 'status', 'currentStage', 'updatedAt', 'actions']"></tr>
|
|
|
+ <tr mat-row *matRowDef="let row; columns: ['title', 'customer', 'assignee', 'status', 'currentStage', 'updatedAt', 'actions']"></tr>
|
|
|
</table>
|
|
|
|
|
|
<!-- 无数据状态 -->
|