mockup-execution-dialog.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. <!DOCTYPE html>
  2. <html lang="zh">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>任务执行弹窗 - 方案样例</title>
  6. <style>
  7. * { margin: 0; padding: 0; box-sizing: border-box; }
  8. body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif; background: #1e293b; display: flex; align-items: center; justify-content: center; min-height: 100vh; }
  9. .dialog {
  10. width: 96vw; max-width: 1600px;
  11. height: 94vh;
  12. background: #fff;
  13. border-radius: 12px;
  14. display: flex; flex-direction: column;
  15. overflow: hidden;
  16. box-shadow: 0 25px 50px rgba(0,0,0,0.3);
  17. }
  18. /* 顶部标题栏 */
  19. .dialog-header {
  20. display: flex; align-items: center; justify-content: space-between;
  21. padding: 12px 20px;
  22. border-bottom: 1px solid #e5e7eb;
  23. background: #fff;
  24. }
  25. .dialog-header h2 { font-size: 16px; font-weight: 600; color: #1e293b; }
  26. .dialog-close { width: 32px; height: 32px; border-radius: 6px; border: none; background: #f1f5f9; cursor: pointer; font-size: 16px; color: #64748b; display: flex; align-items: center; justify-content: center; }
  27. /* 任务信息一行 */
  28. .task-info-bar {
  29. display: flex; align-items: center; gap: 20px;
  30. padding: 8px 20px;
  31. background: #f0fdf4;
  32. border-bottom: 1px solid #d1fae5;
  33. font-size: 13px; color: #475569;
  34. }
  35. .task-info-bar b { color: #1e293b; }
  36. .status-tag {
  37. display: inline-flex; align-items: center;
  38. padding: 2px 10px; border-radius: 4px;
  39. font-size: 12px; font-weight: 500;
  40. }
  41. .status-tag.running { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
  42. .task-info-actions { margin-left: auto; display: flex; gap: 8px; }
  43. .btn-sm { padding: 4px 14px; border-radius: 6px; border: 1px solid #d1d5db; background: #fff; font-size: 12px; cursor: pointer; display: flex; align-items: center; gap: 4px; }
  44. .btn-sm.primary { background: #10b981; color: #fff; border-color: #10b981; }
  45. .btn-sm.success { background: #059669; color: #fff; border-color: #059669; }
  46. /* 主体三栏 */
  47. .main-body {
  48. flex: 1; display: flex; gap: 0;
  49. overflow: hidden;
  50. }
  51. /* 左侧步骤列表 */
  52. .step-list-panel {
  53. width: 320px; flex-shrink: 0;
  54. border-right: 1px solid #e5e7eb;
  55. display: flex; flex-direction: column;
  56. }
  57. .step-list-header {
  58. padding: 12px 16px;
  59. border-bottom: 1px solid #e5e7eb;
  60. display: flex; align-items: center; justify-content: space-between;
  61. }
  62. .step-list-header h3 { font-size: 14px; font-weight: 600; color: #1e293b; }
  63. .progress-badge { font-size: 12px; color: #6b7280; background: #f3f4f6; padding: 2px 8px; border-radius: 10px; }
  64. .step-list-body { flex: 1; overflow-y: auto; padding: 8px; }
  65. /* 虚拟步骤(输入/输出) */
  66. .virtual-step {
  67. display: flex; align-items: center; gap: 10px;
  68. padding: 10px 12px;
  69. margin-bottom: 4px;
  70. border-radius: 8px;
  71. cursor: pointer;
  72. transition: all 0.15s;
  73. border: 2px solid #bfdbfe;
  74. background: #eff6ff;
  75. }
  76. .virtual-step:hover { border-color: #93c5fd; background: #dbeafe; }
  77. .virtual-step.active { border-color: #3b82f6; background: #dbeafe; }
  78. .virtual-step-icon {
  79. width: 28px; height: 28px; border-radius: 6px;
  80. display: flex; align-items: center; justify-content: center;
  81. font-size: 14px; flex-shrink: 0;
  82. }
  83. .virtual-step-icon.input { background: #dbeafe; }
  84. .virtual-step-icon.output { background: #fef3c7; }
  85. .virtual-step-info { flex: 1; min-width: 0; }
  86. .virtual-step-name { font-size: 13px; font-weight: 500; color: #1e293b; }
  87. .virtual-step-tag {
  88. font-size: 11px; padding: 1px 6px; border-radius: 3px;
  89. }
  90. .virtual-step-tag.empty { background: #fef2f2; color: #dc2626; }
  91. .virtual-step-tag.filled { background: #ecfdf5; color: #059669; }
  92. /* 分割线 */
  93. .step-divider {
  94. display: flex; align-items: center; gap: 8px;
  95. margin: 8px 0; padding: 0 12px;
  96. color: #9ca3af; font-size: 11px;
  97. }
  98. .step-divider::before, .step-divider::after {
  99. content: ''; flex: 1; height: 1px; background: #e5e7eb;
  100. }
  101. /* 真实步骤 */
  102. .step-card {
  103. display: flex; align-items: center; gap: 8px;
  104. padding: 10px 12px;
  105. margin-bottom: 4px;
  106. border-radius: 8px;
  107. cursor: pointer;
  108. transition: all 0.15s;
  109. border: 2px solid #e5e7eb;
  110. background: #fff;
  111. }
  112. .step-card:hover { border-color: #6ee7b7; }
  113. .step-card.active { border-color: #10b981; background: #ecfdf5; }
  114. .step-card.done { opacity: 0.65; border-color: #d1fae5; background: #f0fdf4; }
  115. .step-seq {
  116. width: 24px; height: 24px; border-radius: 50%;
  117. display: flex; align-items: center; justify-content: center;
  118. font-size: 12px; font-weight: 600; flex-shrink: 0;
  119. }
  120. .step-seq.pending { background: #f3f4f6; color: #6b7280; }
  121. .step-seq.running { background: #10b981; color: #fff; }
  122. .step-seq.done { background: #d1fae5; color: #059669; }
  123. .step-info { flex: 1; min-width: 0; }
  124. .step-name { font-size: 13px; font-weight: 500; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  125. .step-desc { font-size: 11px; color: #9ca3af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  126. .step-status {
  127. font-size: 11px; padding: 1px 6px; border-radius: 3px; flex-shrink: 0;
  128. }
  129. .step-status.done { background: #d1fae5; color: #059669; }
  130. .step-status.running { background: #ecfdf5; color: #10b981; }
  131. .step-status.pending { background: #f3f4f6; color: #6b7280; }
  132. /* 右侧详情面板 */
  133. .detail-panel {
  134. flex: 1; display: flex; flex-direction: column;
  135. overflow: hidden;
  136. }
  137. .detail-header {
  138. padding: 12px 20px;
  139. border-bottom: 1px solid #e5e7eb;
  140. display: flex; align-items: center; justify-content: space-between;
  141. }
  142. .detail-header h3 { font-size: 14px; font-weight: 600; color: #1e293b; }
  143. .detail-body { flex: 1; overflow-y: auto; padding: 20px; }
  144. /* 详情 - 表格 */
  145. .mock-table { width: 100%; border-collapse: collapse; font-size: 13px; }
  146. .mock-table th { background: #f9fafb; padding: 8px 12px; text-align: center; font-weight: 500; color: #6b7280; border: 1px solid #e5e7eb; }
  147. .mock-table td { padding: 8px 12px; text-align: center; border: 1px solid #e5e7eb; color: #1e293b; }
  148. .mock-table .input-cell { background: #fffbeb; border: 1px dashed #fbbf24; min-width: 80px; height: 32px; }
  149. /* 详情 - 基本信息 */
  150. .info-grid {
  151. display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px;
  152. margin-bottom: 16px;
  153. }
  154. .info-item { display: flex; gap: 8px; font-size: 13px; }
  155. .info-label { color: #6b7280; flex-shrink: 0; }
  156. .info-value { color: #1e293b; font-weight: 500; }
  157. /* 工艺库折叠按钮 */
  158. .library-toggle {
  159. display: flex; align-items: center; justify-content: center; gap: 6px;
  160. width: 28px; flex-shrink: 0;
  161. background: #f9fafb; border-right: 1px solid #e5e7eb;
  162. cursor: pointer; transition: background 0.15s;
  163. font-size: 12px; color: #6b7280;
  164. writing-mode: vertical-lr;
  165. }
  166. .library-toggle:hover { background: #ecfdf5; color: #10b981; }
  167. /* 底部操作栏 */
  168. .detail-footer {
  169. padding: 10px 20px;
  170. border-top: 1px solid #e5e7eb;
  171. display: flex; justify-content: flex-end; gap: 8px;
  172. }
  173. /* 提示标注 */
  174. .annotation {
  175. position: absolute;
  176. font-size: 11px; color: #6366f1;
  177. background: #eef2ff; border: 1px dashed #a5b4fc;
  178. padding: 2px 8px; border-radius: 4px;
  179. white-space: nowrap;
  180. }
  181. /* 方案标注 */
  182. .mode-label {
  183. position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  184. background: #312e81; color: #c7d2fe; padding: 6px 20px; border-radius: 8px;
  185. font-size: 13px; z-index: 10;
  186. }
  187. </style>
  188. </head>
  189. <body>
  190. <div class="mode-label">💡 方案:虚拟步骤 — 任务输入/输出作为确认节点嵌入步骤列表</div>
  191. <div class="dialog">
  192. <!-- 标题栏 -->
  193. <div class="dialog-header">
  194. <h2>任务执行 — 细胞培养-2026-001</h2>
  195. <button class="dialog-close">✕</button>
  196. </div>
  197. <!-- 任务信息一行 -->
  198. <div class="task-info-bar">
  199. <span>任务号:<b>SK20260522001</b></span>
  200. <span>工单号:GD20260522003</span>
  201. <span>任务名称:细胞培养</span>
  202. <span class="status-tag running">● 进行中</span>
  203. <div class="task-info-actions">
  204. <button class="btn-sm success">✔ 完成任务</button>
  205. </div>
  206. </div>
  207. <!-- 主体 -->
  208. <div class="main-body">
  209. <!-- 可折叠工艺库把手 -->
  210. <div class="library-toggle" title="展开工艺库">工 艺 库 ›</div>
  211. <!-- 步骤列表 -->
  212. <div class="step-list-panel">
  213. <div class="step-list-header">
  214. <h3>工序步骤</h3>
  215. <span class="progress-badge">进度 2/5</span>
  216. </div>
  217. <div class="step-list-body">
  218. <!-- ✅ 虚拟步骤:任务输入 -->
  219. <div class="virtual-step" style="background:#dbeafe; border-color:#3b82f6;">
  220. <div class="virtual-step-icon input">📥</div>
  221. <div class="virtual-step-info">
  222. <div class="virtual-step-name">任务输入</div>
  223. </div>
  224. <span class="virtual-step-tag filled">已填写 3 项</span>
  225. </div>
  226. <!-- ✅ 虚拟步骤:任务输出 -->
  227. <div class="virtual-step" style="border-style: dashed;">
  228. <div class="virtual-step-icon output">📤</div>
  229. <div class="virtual-step-info">
  230. <div class="virtual-step-name">任务输出</div>
  231. </div>
  232. <span class="virtual-step-tag empty">⚠ 未填写</span>
  233. </div>
  234. <!-- 分割线 -->
  235. <div class="step-divider">工艺步骤</div>
  236. <!-- 已完成步骤 -->
  237. <div class="step-card done">
  238. <div class="step-seq done">✓</div>
  239. <div class="step-info">
  240. <div class="step-name">样本接收</div>
  241. </div>
  242. <span class="step-status done">已完成</span>
  243. </div>
  244. <!-- 进行中步骤(高亮) -->
  245. <div class="step-card active">
  246. <div class="step-seq running">2</div>
  247. <div class="step-info">
  248. <div class="step-name">细胞分离</div>
  249. <div class="step-desc">从样本中分离目标细胞</div>
  250. </div>
  251. <span class="step-status running">▶ 进行中</span>
  252. </div>
  253. <!-- 待执行步骤 -->
  254. <div class="step-card">
  255. <div class="step-seq pending">3</div>
  256. <div class="step-info">
  257. <div class="step-name">细胞培养</div>
  258. </div>
  259. <span class="step-status pending">待执行</span>
  260. </div>
  261. <div class="step-card">
  262. <div class="step-seq pending">4</div>
  263. <div class="step-info">
  264. <div class="step-name">质量检测</div>
  265. </div>
  266. <span class="step-status pending">待执行</span>
  267. </div>
  268. <div class="step-card">
  269. <div class="step-seq pending">5</div>
  270. <div class="step-info">
  271. <div class="step-name">冻存封装</div>
  272. </div>
  273. <span class="step-status pending">待执行</span>
  274. </div>
  275. </div>
  276. </div>
  277. <!-- 右侧详情面板 - 展示"任务输出"被选中的状态 -->
  278. <div class="detail-panel">
  279. <div class="detail-header">
  280. <h3>📤 任务输出</h3>
  281. <div style="display:flex; gap:8px;">
  282. <button class="btn-sm primary">+ 添加输出</button>
  283. <button class="btn-sm primary">✔ 保存输出</button>
  284. </div>
  285. </div>
  286. <div class="detail-body">
  287. <div style="text-align:center; padding: 40px 0; color:#9ca3af;">
  288. <div style="font-size:36px; margin-bottom:12px;">📋</div>
  289. <p style="font-size:14px; margin-bottom:4px;">暂无输出项</p>
  290. <p style="font-size:12px;">点击上方"添加输出"按钮添加任务输出记录</p>
  291. </div>
  292. </div>
  293. </div>
  294. </div>
  295. </div>
  296. </body>
  297. </html>