|
|
@@ -63,8 +63,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <!-- 异常项目 - 已隐藏 -->
|
|
|
- <!-- <div class="stat-card" (click)="handleExceptionProjectsClick()" title="点击查看异常项目详情">
|
|
|
+ <!-- 异常项目 -->
|
|
|
+ <div class="stat-card" (click)="handleExceptionProjectsClick()" title="点击查看异常项目详情">
|
|
|
<div class="stat-icon danger">
|
|
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor">
|
|
|
<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path>
|
|
|
@@ -76,10 +76,10 @@
|
|
|
<div class="stat-value">{{ stats.exceptionProjects() }}</div>
|
|
|
<div class="stat-label">异常项目</div>
|
|
|
</div>
|
|
|
- </div> -->
|
|
|
+ </div>
|
|
|
|
|
|
- <!-- 售后服务 - 已隐藏 -->
|
|
|
- <!-- <div class="stat-card" (click)="handleAfterSalesClick()" title="点击查看售后服务详情">
|
|
|
+ <!-- 售后服务 -->
|
|
|
+ <div class="stat-card" (click)="handleAfterSalesClick()" title="点击查看售后服务详情">
|
|
|
<div class="stat-icon success">
|
|
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor">
|
|
|
<path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"></path>
|
|
|
@@ -89,7 +89,7 @@
|
|
|
<div class="stat-value">{{ stats.afterSalesCount() }}</div>
|
|
|
<div class="stat-label">售后服务</div>
|
|
|
</div>
|
|
|
- </div> -->
|
|
|
+ </div>
|
|
|
|
|
|
</div>
|
|
|
</section>
|
|
|
@@ -249,30 +249,25 @@
|
|
|
</div>
|
|
|
</section>
|
|
|
|
|
|
-<!-- 🆕 待办任务双栏布局(待办问题 + 紧急事件) -->
|
|
|
-<section class="urgent-tasks-section">
|
|
|
- <div class="section-header">
|
|
|
- <h2>待办事项</h2>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 🆕 双栏容器 -->
|
|
|
- <div class="todo-dual-columns">
|
|
|
- <!-- ========== 左栏:紧急事件 ========== -->
|
|
|
- <div class="todo-column todo-column-urgent">
|
|
|
- <div class="column-header">
|
|
|
- <h3>
|
|
|
- <svg viewBox="0 0 24 24" width="18" height="18" fill="currentColor">
|
|
|
- <path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"/>
|
|
|
- </svg>
|
|
|
- 紧急事件
|
|
|
- @if (urgentEventsList().length > 0) {
|
|
|
- <span class="task-count urgent">({{ urgentEventsList().length }})</span>
|
|
|
- }
|
|
|
- </h3>
|
|
|
- <span class="column-subtitle">自动计算的截止事件</span>
|
|
|
+<!-- 紧急事件和待办任务流 -->
|
|
|
+<div class="content-grid">
|
|
|
+ <!-- 紧急事件列表(⭐ 使用可复用组件) -->
|
|
|
+ <section class="urgent-tasks-section">
|
|
|
+ <div class="section-header">
|
|
|
+ <h3>紧急事件</h3>
|
|
|
+ <div style="display: flex; gap: 12px; align-items: center;">
|
|
|
+ <button
|
|
|
+ class="btn-primary"
|
|
|
+ (click)="showTaskForm()"
|
|
|
+ style="font-size: 14px; padding: 6px 16px;"
|
|
|
+ >
|
|
|
+ 添加紧急事项
|
|
|
+ </button>
|
|
|
+ <a href="/customer-service/project-list" class="view-all-link">查看全部</a>
|
|
|
</div>
|
|
|
-
|
|
|
- <!-- 加载状态 -->
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="tasks-list">
|
|
|
@if (loadingUrgentEvents()) {
|
|
|
<div class="loading-state">
|
|
|
<svg class="spinner" viewBox="0 0 50 50">
|
|
|
@@ -281,8 +276,6 @@
|
|
|
<p>计算紧急事件中...</p>
|
|
|
</div>
|
|
|
}
|
|
|
-
|
|
|
- <!-- 空状态 -->
|
|
|
@if (!loadingUrgentEvents() && urgentEventsList().length === 0) {
|
|
|
<div class="empty-state">
|
|
|
<svg viewBox="0 0 24 24" width="64" height="64" fill="#d1d5db">
|
|
|
@@ -292,18 +285,12 @@
|
|
|
<p class="hint">所有项目时间节点正常 ✅</p>
|
|
|
</div>
|
|
|
}
|
|
|
-
|
|
|
- <!-- 紧急事件列表 -->
|
|
|
@if (!loadingUrgentEvents() && urgentEventsList().length > 0) {
|
|
|
<div class="todo-list-compact urgent-list">
|
|
|
@for (event of urgentEventsList(); track event.id) {
|
|
|
<div class="todo-item-compact urgent-item" [attr.data-urgency]="event.urgencyLevel">
|
|
|
- <!-- 左侧紧急程度色条 -->
|
|
|
<div class="urgency-indicator" [attr.data-urgency]="event.urgencyLevel"></div>
|
|
|
-
|
|
|
- <!-- 事件内容 -->
|
|
|
<div class="task-content">
|
|
|
- <!-- 标题行 -->
|
|
|
<div class="task-header">
|
|
|
<span class="task-title">{{ event.title }}</span>
|
|
|
<div class="task-badges">
|
|
|
@@ -319,13 +306,7 @@
|
|
|
</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
- <!-- 描述 -->
|
|
|
- <div class="task-description">
|
|
|
- {{ event.description }}
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 项目信息行 -->
|
|
|
+ <div class="task-description">{{ event.description }}</div>
|
|
|
<div class="task-meta">
|
|
|
<span class="project-info">
|
|
|
<svg viewBox="0 0 24 24" width="12" height="12" fill="currentColor">
|
|
|
@@ -342,25 +323,16 @@
|
|
|
</span>
|
|
|
}
|
|
|
</div>
|
|
|
-
|
|
|
- <!-- 底部信息行 -->
|
|
|
<div class="task-footer">
|
|
|
<span class="deadline-info" [class.overdue]="event.overdueDays && event.overdueDays > 0">
|
|
|
<svg viewBox="0 0 24 24" width="12" height="12" fill="currentColor">
|
|
|
<path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"/>
|
|
|
</svg>
|
|
|
截止: {{ event.deadline | date:'MM-dd HH:mm' }}
|
|
|
- @if (event.overdueDays && event.overdueDays > 0) {
|
|
|
- <span class="overdue-label">(逾期{{ event.overdueDays }}天)</span>
|
|
|
- }
|
|
|
- @else if (event.overdueDays && event.overdueDays < 0) {
|
|
|
- <span class="upcoming-label">(还剩{{ -event.overdueDays }}天)</span>
|
|
|
- }
|
|
|
- @else {
|
|
|
- <span class="today-label">(今天)</span>
|
|
|
- }
|
|
|
+ @if (event.overdueDays && event.overdueDays > 0) { <span class="overdue-label">(逾期{{ event.overdueDays }}天)</span> }
|
|
|
+ @else if (event.overdueDays && event.overdueDays < 0) { <span class="upcoming-label">(还剩{{ -event.overdueDays }}天)</span> }
|
|
|
+ @else { <span class="today-label">(今天)</span> }
|
|
|
</span>
|
|
|
-
|
|
|
@if (event.completionRate !== undefined) {
|
|
|
<span class="completion-info">
|
|
|
<svg viewBox="0 0 24 24" width="12" height="12" fill="currentColor">
|
|
|
@@ -371,158 +343,15 @@
|
|
|
}
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
- <!-- 右侧操作按钮 -->
|
|
|
- <div class="task-actions">
|
|
|
- <button
|
|
|
- class="btn-action btn-view"
|
|
|
- (click)="onUrgentEventViewProject(event.projectId)"
|
|
|
- title="查看项目">
|
|
|
- <svg viewBox="0 0 24 24" width="14" height="14" fill="currentColor">
|
|
|
- <path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/>
|
|
|
- </svg>
|
|
|
- 查看项目
|
|
|
- </button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- }
|
|
|
- </div>
|
|
|
- }
|
|
|
- </div>
|
|
|
- <!-- ========== 左栏结束 ========== -->
|
|
|
-
|
|
|
- <!-- ========== 右栏:待办任务 ========== -->
|
|
|
- <div class="todo-column todo-column-issues">
|
|
|
- <div class="column-header">
|
|
|
- <h3>
|
|
|
- <svg viewBox="0 0 24 24" width="18" height="18" fill="currentColor">
|
|
|
- <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/>
|
|
|
- </svg>
|
|
|
- 待办任务
|
|
|
- @if (todoTasksFromIssues().length > 0) {
|
|
|
- <span class="task-count">({{ todoTasksFromIssues().length }})</span>
|
|
|
- }
|
|
|
- </h3>
|
|
|
- <span class="column-subtitle">来自项目问题板块</span>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 加载状态 -->
|
|
|
- @if (loadingTodoTasks()) {
|
|
|
- <div class="loading-state">
|
|
|
- <svg class="spinner" viewBox="0 0 50 50">
|
|
|
- <circle cx="25" cy="25" r="20" fill="none" stroke-width="4"></circle>
|
|
|
- </svg>
|
|
|
- <p>加载待办任务中...</p>
|
|
|
- </div>
|
|
|
- }
|
|
|
-
|
|
|
- <!-- 错误状态 -->
|
|
|
- @if (!loadingTodoTasks() && todoTaskError()) {
|
|
|
- <div class="error-state">
|
|
|
- <svg viewBox="0 0 24 24" width="48" height="48" fill="#ef4444">
|
|
|
- <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/>
|
|
|
- </svg>
|
|
|
- <p>{{ todoTaskError() }}</p>
|
|
|
- <button class="btn-retry" (click)="refreshTodoTasks()">重试</button>
|
|
|
- </div>
|
|
|
- }
|
|
|
-
|
|
|
- <!-- 空状态 -->
|
|
|
- @if (!loadingTodoTasks() && !todoTaskError() && todoTasksFromIssues().length === 0) {
|
|
|
- <div class="empty-state">
|
|
|
- <svg viewBox="0 0 24 24" width="64" height="64" fill="#d1d5db">
|
|
|
- <path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm2 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"/>
|
|
|
- </svg>
|
|
|
- <p>暂无待办任务</p>
|
|
|
- <p class="hint">所有项目问题都已处理完毕 🎉</p>
|
|
|
- </div>
|
|
|
- }
|
|
|
-
|
|
|
- <!-- 待办任务列表 -->
|
|
|
- @if (!loadingTodoTasks() && !todoTaskError() && todoTasksFromIssues().length > 0) {
|
|
|
- <div class="todo-list-compact">
|
|
|
- @for (task of todoTasksFromIssues(); track task.id) {
|
|
|
- <div class="todo-item-compact" [attr.data-priority]="task.priority">
|
|
|
- <!-- 左侧优先级色条 -->
|
|
|
- <div class="priority-indicator" [attr.data-priority]="task.priority"></div>
|
|
|
-
|
|
|
- <!-- 任务内容 -->
|
|
|
- <div class="task-content">
|
|
|
- <!-- 标题行 -->
|
|
|
- <div class="task-header">
|
|
|
- <span class="task-title">{{ task.title }}</span>
|
|
|
- <div class="task-badges">
|
|
|
- <span class="badge badge-priority" [attr.data-priority]="task.priority">
|
|
|
- {{ getPriorityConfig(task.priority).label }}
|
|
|
- </span>
|
|
|
- <span class="badge badge-type">{{ getIssueTypeLabel(task.type) }}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 项目信息行 -->
|
|
|
- <div class="task-meta">
|
|
|
- <span class="project-info">
|
|
|
- <svg viewBox="0 0 24 24" width="12" height="12" fill="currentColor">
|
|
|
- <path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
|
|
|
- </svg>
|
|
|
- 项目: {{ task.projectName }}
|
|
|
- @if (task.relatedSpace) {
|
|
|
- | {{ task.relatedSpace }}
|
|
|
- }
|
|
|
- @if (task.relatedStage) {
|
|
|
- | {{ task.relatedStage }}
|
|
|
- }
|
|
|
- </span>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 底部信息行 -->
|
|
|
- <div class="task-footer">
|
|
|
- <span class="time-info" [title]="formatExactTime(task.createdAt)">
|
|
|
- <svg viewBox="0 0 24 24" width="12" height="12" fill="currentColor">
|
|
|
- <path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"/>
|
|
|
- </svg>
|
|
|
- 创建于 {{ formatRelativeTime(task.createdAt) }}
|
|
|
- </span>
|
|
|
-
|
|
|
- <span class="assignee-info">
|
|
|
- <svg viewBox="0 0 24 24" width="12" height="12" fill="currentColor">
|
|
|
- <path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/>
|
|
|
- </svg>
|
|
|
- 指派给: {{ task.assigneeName }}
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 右侧操作按钮 -->
|
|
|
<div class="task-actions">
|
|
|
- <button
|
|
|
- class="btn-action btn-view"
|
|
|
- (click)="navigateToIssue(task)"
|
|
|
- title="查看详情">
|
|
|
- <svg viewBox="0 0 24 24" width="14" height="14" fill="currentColor">
|
|
|
- <path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/>
|
|
|
- </svg>
|
|
|
- 查看详情
|
|
|
- </button>
|
|
|
- <button
|
|
|
- class="btn-action btn-mark-read"
|
|
|
- (click)="onTodoTaskMarkAsRead(task)"
|
|
|
- title="标记已读">
|
|
|
- <svg viewBox="0 0 24 24" width="14" height="14" fill="currentColor">
|
|
|
- <path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"/>
|
|
|
- </svg>
|
|
|
- 标记已读
|
|
|
- </button>
|
|
|
+ <button class="btn-action btn-view" (click)="onUrgentEventViewProject(event.projectId)">查看项目</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
}
|
|
|
</div>
|
|
|
}
|
|
|
</div>
|
|
|
- <!-- ========== 右栏结束 ========== -->
|
|
|
- </div>
|
|
|
- <!-- ========== 双栏容器结束 ========== -->
|
|
|
-</section>
|
|
|
+ </section>
|
|
|
|
|
|
<!-- iOS风格的添加紧急事项面板 -->
|
|
|
@if (isTaskFormVisible()) {
|
|
|
@@ -751,10 +580,139 @@
|
|
|
</div>
|
|
|
}
|
|
|
|
|
|
- <!-- 待办任务流(复用组长端设计) - 已隐藏 -->
|
|
|
- <!-- <section class="project-updates-section todo-section-customer-service">
|
|
|
- ... 已隐藏的待办任务流代码 ...
|
|
|
- </section> -->
|
|
|
+ <!-- 待办任务流(复用组长端设计) -->
|
|
|
+ <section class="project-updates-section todo-section-customer-service">
|
|
|
+ <div class="section-header">
|
|
|
+ <h2>
|
|
|
+ 待办任务
|
|
|
+ @if (todoTasksFromIssues().length > 0) {
|
|
|
+ <span class="task-count">({{ todoTasksFromIssues().length }})</span>
|
|
|
+ }
|
|
|
+ </h2>
|
|
|
+ <button
|
|
|
+ class="btn-refresh"
|
|
|
+ (click)="onRefreshTodoTasks()"
|
|
|
+ [disabled]="loadingTodoTasks()"
|
|
|
+ title="刷新待办任务">
|
|
|
+ <svg viewBox="0 0 24 24" width="16" height="16" [class.rotating]="loadingTodoTasks()">
|
|
|
+ <path fill="currentColor" d="M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"/>
|
|
|
+ </svg>
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 加载状态 -->
|
|
|
+ @if (loadingTodoTasks()) {
|
|
|
+ <div class="loading-state">
|
|
|
+ <svg class="spinner" viewBox="0 0 50 50">
|
|
|
+ <circle cx="25" cy="25" r="20" fill="none" stroke-width="4"></circle>
|
|
|
+ </svg>
|
|
|
+ <p>加载待办任务中...</p>
|
|
|
+ </div>
|
|
|
+ }
|
|
|
+
|
|
|
+ <!-- 错误状态 -->
|
|
|
+ @if (!loadingTodoTasks() && todoTaskError()) {
|
|
|
+ <div class="error-state">
|
|
|
+ <svg viewBox="0 0 24 24" width="48" height="48" fill="#ef4444">
|
|
|
+ <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/>
|
|
|
+ </svg>
|
|
|
+ <p>{{ todoTaskError() }}</p>
|
|
|
+ <button class="btn-retry" (click)="onRefreshTodoTasks()">重试</button>
|
|
|
+ </div>
|
|
|
+ }
|
|
|
+
|
|
|
+ <!-- 空状态 -->
|
|
|
+ @if (!loadingTodoTasks() && !todoTaskError() && todoTasksFromIssues().length === 0) {
|
|
|
+ <div class="empty-state">
|
|
|
+ <svg viewBox="0 0 24 24" width="64" height="64" fill="#d1d5db">
|
|
|
+ <path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm2 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"/>
|
|
|
+ </svg>
|
|
|
+ <p>暂无待办任务</p>
|
|
|
+ <p class="hint">所有项目问题都已处理完毕 🎉</p>
|
|
|
+ </div>
|
|
|
+ }
|
|
|
+
|
|
|
+ <!-- 待办任务列表 -->
|
|
|
+ @if (!loadingTodoTasks() && !todoTaskError() && todoTasksFromIssues().length > 0) {
|
|
|
+ <div class="todo-list-compact">
|
|
|
+ @for (task of todoTasksFromIssues(); track task.id) {
|
|
|
+ <div class="todo-item-compact" [attr.data-priority]="task.priority">
|
|
|
+ <!-- 左侧优先级色条 -->
|
|
|
+ <div class="priority-indicator" [attr.data-priority]="task.priority"></div>
|
|
|
+
|
|
|
+ <!-- 任务内容 -->
|
|
|
+ <div class="task-content">
|
|
|
+ <!-- 标题行 -->
|
|
|
+ <div class="task-header">
|
|
|
+ <span class="task-title">{{ task.title }}</span>
|
|
|
+ <div class="task-badges">
|
|
|
+ <span class="badge badge-priority" [attr.data-priority]="task.priority">
|
|
|
+ {{ getPriorityConfig(task.priority).label }}
|
|
|
+ </span>
|
|
|
+ <span class="badge badge-type">{{ getIssueTypeLabel(task.type) }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 项目信息行 -->
|
|
|
+ <div class="task-meta">
|
|
|
+ <span class="project-info">
|
|
|
+ <svg viewBox="0 0 24 24" width="12" height="12" fill="currentColor">
|
|
|
+ <path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
|
|
|
+ </svg>
|
|
|
+ 项目: {{ task.projectName }}
|
|
|
+ @if (task.relatedSpace) {
|
|
|
+ | {{ task.relatedSpace }}
|
|
|
+ }
|
|
|
+ @if (task.relatedStage) {
|
|
|
+ | {{ task.relatedStage }}
|
|
|
+ }
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 底部信息行 -->
|
|
|
+ <div class="task-footer">
|
|
|
+ <span class="time-info" [title]="formatExactTime(task.createdAt)">
|
|
|
+ <svg viewBox="0 0 24 24" width="12" height="12" fill="currentColor">
|
|
|
+ <path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"/>
|
|
|
+ </svg>
|
|
|
+ 创建于 {{ formatRelativeTime(task.createdAt) }}
|
|
|
+ </span>
|
|
|
+
|
|
|
+ <span class="assignee-info">
|
|
|
+ <svg viewBox="0 0 24 24" width="12" height="12" fill="currentColor">
|
|
|
+ <path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/>
|
|
|
+ </svg>
|
|
|
+ 指派给: {{ task.assigneeName }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 右侧操作按钮(⭐ 使用新的事件处理方法) -->
|
|
|
+ <div class="task-actions">
|
|
|
+ <button
|
|
|
+ class="btn-action btn-view"
|
|
|
+ (click)="onTodoTaskViewDetails(task)"
|
|
|
+ title="查看详情">
|
|
|
+ <svg viewBox="0 0 24 24" width="14" height="14" fill="currentColor">
|
|
|
+ <path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/>
|
|
|
+ </svg>
|
|
|
+ 查看详情
|
|
|
+ </button>
|
|
|
+ <button
|
|
|
+ class="btn-action btn-mark-read"
|
|
|
+ (click)="onTodoTaskMarkAsRead(task)"
|
|
|
+ title="标记已读">
|
|
|
+ <svg viewBox="0 0 24 24" width="14" height="14" fill="currentColor">
|
|
|
+ <path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"/>
|
|
|
+ </svg>
|
|
|
+ 标记已读
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ }
|
|
|
+ </div>
|
|
|
+ }
|
|
|
+ </section>
|
|
|
|
|
|
<!-- 回到顶部按钮 -->
|
|
|
<button class="back-to-top" (click)="scrollToTop()" [class.visible]="showBackToTop()">
|