todo-section-variants.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>待办事项优化方案对比</title>
  7. <script src="https://cdn.tailwindcss.com"></script>
  8. <script src="https://unpkg.com/lucide@latest"></script>
  9. <style>
  10. body { background-color: #f3f4f6; padding: 20px; font-family: system-ui, -apple-system, sans-serif; color: #1f2937; }
  11. /* 方案切换器 */
  12. .variant-switcher {
  13. display: flex;
  14. justify-content: center;
  15. gap: 16px;
  16. margin-bottom: 24px;
  17. }
  18. .variant-btn {
  19. padding: 8px 20px;
  20. background: white;
  21. border: 1px solid #e5e7eb;
  22. border-radius: 20px;
  23. font-size: 14px;
  24. font-weight: 500;
  25. color: #4b5563;
  26. cursor: pointer;
  27. transition: all 0.2s;
  28. box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  29. }
  30. .variant-btn:hover { background: #f9fafb; }
  31. .variant-btn.active { background: #3b82f6; color: white; border-color: #3b82f6; box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3); }
  32. /* 布局容器 */
  33. .main-grid {
  34. display: grid;
  35. grid-template-columns: 320px 1fr; /* 左侧缩小,右侧空间更大 */
  36. gap: 24px;
  37. max-width: 1400px;
  38. margin: 0 auto;
  39. align-items: start;
  40. height: 85vh;
  41. }
  42. /* 面板通用样式 */
  43. .panel {
  44. background: white;
  45. border-radius: 12px;
  46. box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  47. overflow: hidden;
  48. border: 1px solid #e5e7eb;
  49. display: flex;
  50. flex-direction: column;
  51. height: 100%;
  52. }
  53. .panel-header { padding: 12px 16px; display: flex; align-items: center; gap: 8px; flex-shrink: 0; border-bottom: 1px solid #f3f4f6; }
  54. .header-title { font-weight: 600; font-size: 15px; }
  55. .panel-body { padding: 12px; background: #f9fafb; overflow-y: auto; flex: 1; }
  56. /* 左栏:待办问题 */
  57. .issue-card {
  58. background: white; padding: 12px; border-radius: 8px; margin-bottom: 10px;
  59. border-left: 3px solid #a78bfa; box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  60. }
  61. .issue-title { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
  62. .issue-sub { font-size: 11px; color: #6b7280; }
  63. /* 右栏变体容器 */
  64. .variant-container { height: 100%; display: none; flex-direction: column; }
  65. .variant-container.active { display: flex; }
  66. /* ================= 方案 A: 经典 Tab 增强版 ================= */
  67. .tab-header { display: flex; gap: 8px; padding: 10px 16px; background: white; border-bottom: 1px solid #f3f4f6; overflow-x: auto; }
  68. .tab-pill {
  69. padding: 4px 12px; border-radius: 16px; font-size: 12px; cursor: pointer; background: #f3f4f6; color: #64748b; transition: all 0.2s; display: flex; align-items: center; gap: 6px;
  70. }
  71. .tab-pill.active { background: #fff7ed; color: #ea580c; font-weight: 600; ring: 1px solid #fdba74; }
  72. .card-a {
  73. background: white; padding: 14px; border-radius: 8px; margin-bottom: 10px; border: 1px solid #e5e7eb;
  74. display: flex; justify-content: space-between; align-items: center;
  75. }
  76. .tag-phase { font-size: 10px; padding: 2px 6px; border-radius: 4px; background: #f1f5f9; color: #475569; margin-left: 6px; }
  77. .tag-phase.mod { background: #eff6ff; color: #2563eb; } /* 建模 */
  78. .tag-phase.render { background: #fefce8; color: #ca8a04; } /* 渲染 */
  79. /* ================= 方案 B: 垂直平铺流 (无Tab) ================= */
  80. .section-title {
  81. font-size: 12px; font-weight: 700; color: #9ca3af; margin: 16px 0 8px 4px;
  82. text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; gap: 6px;
  83. }
  84. .section-title:first-child { margin-top: 4px; }
  85. .card-b {
  86. background: white; padding: 12px 16px; border-radius: 8px; margin-bottom: 8px;
  87. border-left: 4px solid transparent; box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  88. }
  89. .card-b.urgent { border-left-color: #ef4444; }
  90. .card-b.warning { border-left-color: #f59e0b; }
  91. .card-b.normal { border-left-color: #3b82f6; }
  92. /* ================= 方案 C: 紧凑矩阵 (适合多条目) ================= */
  93. .grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; padding: 12px; }
  94. .card-c {
  95. background: white; padding: 12px; border-radius: 8px; border: 1px solid #e5e7eb;
  96. display: flex; flex-direction: column; gap: 8px;
  97. }
  98. .card-c-header { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #6b7280; }
  99. .card-c-title { font-weight: 600; font-size: 13px; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  100. .progress-mini { height: 4px; background: #f3f4f6; border-radius: 2px; overflow: hidden; margin-top: 4px; }
  101. .progress-bar { height: 100%; background: #3b82f6; width: 70%; }
  102. </style>
  103. </head>
  104. <body>
  105. <div class="variant-switcher">
  106. <button class="variant-btn active" onclick="showVariant('A')">方案 A: 经典Tab增强 (清晰分类)</button>
  107. <button class="variant-btn" onclick="showVariant('B')">方案 B: 垂直平铺流 (全局概览)</button>
  108. <button class="variant-btn" onclick="showVariant('C')">方案 C: 紧凑矩阵版 (高密度)</button>
  109. </div>
  110. <div class="main-grid">
  111. <!-- 左栏:待办问题 (固定不变) -->
  112. <div class="panel" style="border-top: 4px solid #8b5cf6;">
  113. <div class="panel-header bg-purple-50">
  114. <span class="header-title text-purple-900"><i data-lucide="list-todo" width="16"></i> 待办问题 (3)</span>
  115. </div>
  116. <div class="panel-body">
  117. <div class="issue-card">
  118. <div class="issue-title">需求变更确认</div>
  119. <div class="issue-sub">项目: 龙湖天街-A座 · 昨天</div>
  120. </div>
  121. <div class="issue-card" style="border-left-color: #ef4444;">
  122. <div class="issue-title text-red-600">施工图尺寸异常</div>
  123. <div class="issue-sub">项目: 万科城市 · 2小时前</div>
  124. </div>
  125. </div>
  126. </div>
  127. <!-- 右栏:紧急事件 (变体区域) -->
  128. <div class="panel" style="border-top: 4px solid #f97316;">
  129. <!-- 方案 A: 经典 Tab 增强 -->
  130. <div id="variant-A" class="variant-container active">
  131. <div class="panel-header bg-orange-50 justify-between">
  132. <span class="header-title text-orange-900"><i data-lucide="alert-triangle" width="16"></i> 紧急事件监控</span>
  133. <span class="text-xs text-orange-700 bg-orange-100 px-2 py-1 rounded">12 项异常</span>
  134. </div>
  135. <!-- 一级 Tab -->
  136. <div class="tab-header">
  137. <div class="tab-pill">全部 (12)</div>
  138. <div class="tab-pill">🔥 客户 (1)</div>
  139. <div class="tab-pill active">📑 阶段逾期 (5)</div>
  140. <div class="tab-pill">🕒 交付/小图 (6)</div>
  141. </div>
  142. <!-- 二级筛选 (仅在阶段逾期显示) -->
  143. <div class="flex gap-2 px-4 py-2 bg-orange-50/50 border-b border-orange-100 text-xs overflow-x-auto">
  144. <span class="font-bold text-orange-800 flex-shrink-0 self-center mr-1">筛选:</span>
  145. <span class="px-2 py-1 rounded bg-white border border-orange-200 text-orange-600 cursor-pointer">全部</span>
  146. <span class="px-2 py-1 rounded bg-blue-50 text-blue-600 cursor-pointer">建模 (2)</span>
  147. <span class="px-2 py-1 rounded bg-yellow-50 text-yellow-600 cursor-pointer">渲染 (1)</span>
  148. </div>
  149. <div class="panel-body">
  150. <!-- 卡片 A1 -->
  151. <div class="card-a">
  152. <div>
  153. <div class="flex items-center gap-2 mb-1">
  154. <span class="font-bold text-sm">万科城市花园</span>
  155. <span class="tag-phase mod">建模</span>
  156. </div>
  157. <div class="text-xs text-slate-500">负责人: 李婷 · 逾期 2 天</div>
  158. </div>
  159. <button class="text-xs bg-white border border-slate-200 px-3 py-1 rounded hover:bg-slate-50">催办</button>
  160. </div>
  161. <!-- 卡片 A2 -->
  162. <div class="card-a">
  163. <div>
  164. <div class="flex items-center gap-2 mb-1">
  165. <span class="font-bold text-sm">天鹅湖花园</span>
  166. <span class="tag-phase render">渲染</span>
  167. </div>
  168. <div class="text-xs text-slate-500">负责人: 张伟 · <span class="text-orange-500 font-medium">今天截止</span></div>
  169. </div>
  170. <button class="text-xs bg-green-50 text-green-600 border border-green-100 px-3 py-1 rounded">标记完成</button>
  171. </div>
  172. </div>
  173. </div>
  174. <!-- 方案 B: 垂直平铺流 -->
  175. <div id="variant-B" class="variant-container">
  176. <div class="panel-header bg-white border-b justify-between sticky top-0 z-10">
  177. <span class="header-title text-slate-800">全局概览</span>
  178. <div class="flex gap-2">
  179. <span class="text-xs px-2 py-1 bg-red-100 text-red-600 rounded">1 急</span>
  180. <span class="text-xs px-2 py-1 bg-orange-100 text-orange-600 rounded">5 警</span>
  181. </div>
  182. </div>
  183. <div class="panel-body">
  184. <!-- 区块 1: 客户/决策 (置顶) -->
  185. <div class="section-title text-red-500"><i data-lucide="siren" width="14"></i> 立即处理</div>
  186. <div class="card-b urgent flex justify-between items-center">
  187. <div>
  188. <div class="font-bold text-sm text-slate-800">锦江上院-13号 <span class="text-xs font-normal text-red-500 ml-1">投诉</span></div>
  189. <div class="text-xs text-slate-500 mt-1">客户反馈进度慢,已 2 小时</div>
  190. </div>
  191. <button class="p-2 bg-red-50 rounded-full text-red-600 hover:bg-red-100"><i data-lucide="message-circle" width="16"></i></button>
  192. </div>
  193. <!-- 区块 2: 阶段逾期 -->
  194. <div class="section-title text-orange-500 mt-4"><i data-lucide="layers" width="14"></i> 阶段进度滞后</div>
  195. <div class="card-b warning">
  196. <div class="flex justify-between">
  197. <span class="font-bold text-sm">万科城市花园</span>
  198. <span class="text-xs bg-blue-50 text-blue-600 px-1.5 py-0.5 rounded">建模</span>
  199. </div>
  200. <div class="text-xs text-slate-500 mt-1 flex justify-between items-center">
  201. <span>李婷 · 逾期2天</span>
  202. <span class="text-orange-500 cursor-pointer">催办 ></span>
  203. </div>
  204. </div>
  205. <div class="card-b warning">
  206. <div class="flex justify-between">
  207. <span class="font-bold text-sm">麓湖生态城</span>
  208. <span class="text-xs bg-purple-50 text-purple-600 px-1.5 py-0.5 rounded">后期</span>
  209. </div>
  210. <div class="text-xs text-slate-500 mt-1">王刚 · 逾期1天</div>
  211. </div>
  212. <!-- 区块 3: 交付截止 -->
  213. <div class="section-title text-slate-500 mt-4"><i data-lucide="clock" width="14"></i> 交付/小图</div>
  214. <div class="card-b normal">
  215. <div class="font-bold text-sm">保利中心 <span class="text-xs font-normal text-slate-400 ml-2">小图截止</span></div>
  216. <div class="text-xs text-slate-500 mt-1">今天 18:00</div>
  217. </div>
  218. </div>
  219. </div>
  220. <!-- 方案 C: 紧凑矩阵版 -->
  221. <div id="variant-C" class="variant-container">
  222. <div class="panel-header bg-white border-b">
  223. <div class="flex items-center gap-4 text-sm w-full">
  224. <span class="font-bold text-slate-800 border-b-2 border-slate-800 pb-3 -mb-3.5">所有 (12)</span>
  225. <span class="text-slate-500 cursor-pointer pb-3 -mb-3">建模 (2)</span>
  226. <span class="text-slate-500 cursor-pointer pb-3 -mb-3">渲染 (1)</span>
  227. <span class="text-slate-500 cursor-pointer pb-3 -mb-3">软装 (1)</span>
  228. </div>
  229. </div>
  230. <div class="panel-body" style="padding: 0;">
  231. <div class="grid-container">
  232. <!-- 矩阵卡片 -->
  233. <div class="card-c border-l-4 border-l-red-500">
  234. <div class="card-c-header">
  235. <span class="text-red-500 font-bold text-xs">客户投诉</span>
  236. <span>2h前</span>
  237. </div>
  238. <div class="card-c-title">锦江上院-13号</div>
  239. <div class="text-xs text-slate-500">需立即安抚跟进</div>
  240. <button class="w-full mt-1 bg-red-50 text-red-600 text-xs py-1 rounded">处理</button>
  241. </div>
  242. <div class="card-c border-l-4 border-l-orange-500">
  243. <div class="card-c-header">
  244. <span class="text-orange-500 font-bold text-xs">决策</span>
  245. <span>已出图3天</span>
  246. </div>
  247. <div class="card-c-title">龙湖天街-B座</div>
  248. <div class="flex gap-1 mt-1">
  249. <button class="flex-1 bg-green-50 text-green-600 text-[10px] py-1 rounded">已反馈</button>
  250. <button class="flex-1 bg-slate-50 text-slate-500 text-[10px] py-1 rounded">未回复</button>
  251. </div>
  252. </div>
  253. <div class="card-c">
  254. <div class="card-c-header">
  255. <span class="text-blue-600 bg-blue-50 px-1.5 rounded text-[10px]">建模逾期</span>
  256. <span class="text-red-500">-2天</span>
  257. </div>
  258. <div class="card-c-title">万科城市花园</div>
  259. <div class="text-xs text-slate-500">李婷</div>
  260. <div class="progress-mini"><div class="progress-bar bg-blue-500" style="width: 30%"></div></div>
  261. </div>
  262. <div class="card-c">
  263. <div class="card-c-header">
  264. <span class="text-purple-600 bg-purple-50 px-1.5 rounded text-[10px]">后期逾期</span>
  265. <span class="text-red-500">-1天</span>
  266. </div>
  267. <div class="card-c-title">麓湖生态城</div>
  268. <div class="text-xs text-slate-500">王刚</div>
  269. <div class="progress-mini"><div class="progress-bar bg-purple-500" style="width: 80%"></div></div>
  270. </div>
  271. <div class="card-c">
  272. <div class="card-c-header">
  273. <span class="text-yellow-600 bg-yellow-50 px-1.5 rounded text-[10px]">渲染截止</span>
  274. <span class="text-orange-500">今天</span>
  275. </div>
  276. <div class="card-c-title">天鹅湖花园</div>
  277. <div class="text-xs text-slate-500">张伟</div>
  278. <div class="progress-mini"><div class="progress-bar bg-yellow-500" style="width: 60%"></div></div>
  279. </div>
  280. </div>
  281. </div>
  282. </div>
  283. </div>
  284. </div>
  285. <script>
  286. lucide.createIcons();
  287. function showVariant(id) {
  288. // 隐藏所有变体
  289. document.querySelectorAll('.variant-container').forEach(el => el.classList.remove('active'));
  290. // 显示选中的变体
  291. document.getElementById('variant-' + id).classList.add('active');
  292. // 更新按钮状态
  293. document.querySelectorAll('.variant-btn').forEach(el => el.classList.remove('active'));
  294. event.currentTarget.classList.add('active');
  295. }
  296. </script>
  297. </body>
  298. </html>