From f9451b104bcc468ecbc53e1571855abccef0cb85 Mon Sep 17 00:00:00 2001 From: duxingchen Date: Mon, 10 Aug 2026 17:37:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=A7=BB=E5=8A=A8=E7=AB=AF=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E4=BA=BA=E5=90=8D=E6=98=A0=E5=B0=84=20+=20=E5=8D=8F?= =?UTF-8?q?=E5=90=8C=E7=95=99=E8=A8=80=E6=9D=BF=20UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - detail.vue: 留言板聊天室 UI + 乐观更新 + loadUsers 填充全局字典 - WorkspaceArea.vue: 任务列表/上游/下游负责人全部走 formatUserName - TreeCanvas.vue: 节点负责人 + 嵌套协助提示走 formatUserName - TaskSwipeCards.vue: 卡片负责人走 formatUserName - 留言板头像取中文名末字(formatUserAvatar) --- .../pages/scan/components/TaskSwipeCards.vue | 26 ++-- .../src/pages/scan/components/TreeCanvas.vue | 146 ++++++++++++------ .../pages/scan/components/WorkspaceArea.vue | 39 ++--- track-uniapp/src/pages/scan/detail.vue | 56 ++++++- 4 files changed, 184 insertions(+), 83 deletions(-) diff --git a/track-uniapp/src/pages/scan/components/TaskSwipeCards.vue b/track-uniapp/src/pages/scan/components/TaskSwipeCards.vue index 78990c4..efc79d9 100644 --- a/track-uniapp/src/pages/scan/components/TaskSwipeCards.vue +++ b/track-uniapp/src/pages/scan/components/TaskSwipeCards.vue @@ -44,7 +44,7 @@ 👤 负责人 - {{ card.assignee_id || '未分配' }} + {{ formatUserName(card.assignee_id) || '未分配' }} @@ -94,6 +94,7 @@ @@ -329,6 +362,23 @@ export default { .btn-add-branch { width: 100%; height: 40px; border: 2px dashed #93c5fd; border-radius: 10px; background: #eff6ff; color: #2563eb; font-size: 14px; font-weight: 700; line-height: 40px; margin: 4px 0; } .btn-add-branch::after { border: none; } .field-label { font-size: 14px; font-weight: 600; color: #374151; margin-top: 10px; margin-bottom: 4px; } + +/* 💬 协同留言板 */ +.message-board { margin: 16px; background: #ffffff; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); display: flex; flex-direction: column; height: 400px; } +.mb-title { font-size: 14px; font-weight: bold; padding: 12px 16px; border-bottom: 1px solid #f3f4f6; color: #374151; flex-shrink: 0; } +.mb-scroll-area { flex: 1; padding: 12px; overflow-y: auto; } +.mb-item { display: flex; margin-bottom: 16px; } +.mb-avatar { width: 36px; height: 36px; border-radius: 18px; background: #3b82f6; color: #fff; font-weight: bold; display: flex; align-items: center; justify-content: center; margin-right: 12px; flex-shrink: 0; font-size: 14px; } +.mb-content-wrapper { flex: 1; min-width: 0; } +.mb-header-info { margin-bottom: 4px; display: flex; align-items: baseline; } +.mb-name { font-size: 12px; color: #6b7280; margin-right: 8px; font-weight: 600; } +.mb-time { font-size: 10px; color: #9ca3af; } +.mb-bubble { background: #f3f4f6; padding: 8px 12px; border-radius: 0 12px 12px 12px; font-size: 14px; color: #1f2937; word-break: break-all; line-height: 1.5; } +.mb-input-bar { display: flex; padding: 10px 16px; border-top: 1px solid #e5e7eb; align-items: center; background: #f9fafb; border-radius: 0 0 12px 12px; flex-shrink: 0; } +.mb-input { flex: 1; background: #ffffff; border: 1px solid #d1d5db; padding: 6px 12px; border-radius: 16px; font-size: 14px; height: 36px; } +.mb-send-btn { margin-left: 12px; background: #3b82f6; color: #fff; padding: 6px 16px; border-radius: 16px; font-size: 14px; font-weight: 600; transition: all 0.2s; } +.btn-disabled { background: #9ca3af; opacity: 0.5; } +.mb-bottom-anchor { height: 1px; } .required { color: #ef4444; } .picker-box { width: 100%; height: 42px; border: 1px solid #e5e7eb; border-radius: 10px; padding: 0 12px; font-size: 14px; color: #1f2937; line-height: 42px; box-sizing: border-box; background: #fff; } .img-grid { display: flex; flex-wrap: wrap; margin: 8px -5px; }