573 lines
15 KiB
HTML
573 lines
15 KiB
HTML
<!doctype html>
|
||
<html lang="zh">
|
||
<head>
|
||
<meta charset="UTF-8" />
|
||
<title>任务执行弹窗 - 方案样例</title>
|
||
<style>
|
||
* {
|
||
margin: 0;
|
||
padding: 0;
|
||
box-sizing: border-box;
|
||
}
|
||
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;
|
||
}
|
||
|
||
.dialog {
|
||
width: 96vw;
|
||
max-width: 1600px;
|
||
height: 94vh;
|
||
background: #fff;
|
||
border-radius: 12px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
overflow: hidden;
|
||
box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
|
||
}
|
||
|
||
/* 顶部标题栏 */
|
||
.dialog-header {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
padding: 12px 20px;
|
||
border-bottom: 1px solid #e5e7eb;
|
||
background: #fff;
|
||
}
|
||
.dialog-header h2 {
|
||
font-size: 16px;
|
||
font-weight: 600;
|
||
color: #1e293b;
|
||
}
|
||
.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;
|
||
}
|
||
|
||
/* 任务信息一行 */
|
||
.task-info-bar {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 20px;
|
||
padding: 8px 20px;
|
||
background: #f0fdf4;
|
||
border-bottom: 1px solid #d1fae5;
|
||
font-size: 13px;
|
||
color: #475569;
|
||
}
|
||
.task-info-bar b {
|
||
color: #1e293b;
|
||
}
|
||
.status-tag {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
padding: 2px 10px;
|
||
border-radius: 4px;
|
||
font-size: 12px;
|
||
font-weight: 500;
|
||
}
|
||
.status-tag.running {
|
||
background: #ecfdf5;
|
||
color: #059669;
|
||
border: 1px solid #a7f3d0;
|
||
}
|
||
.task-info-actions {
|
||
margin-left: auto;
|
||
display: flex;
|
||
gap: 8px;
|
||
}
|
||
.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;
|
||
}
|
||
.btn-sm.primary {
|
||
background: #10b981;
|
||
color: #fff;
|
||
border-color: #10b981;
|
||
}
|
||
.btn-sm.success {
|
||
background: #059669;
|
||
color: #fff;
|
||
border-color: #059669;
|
||
}
|
||
|
||
/* 主体三栏 */
|
||
.main-body {
|
||
flex: 1;
|
||
display: flex;
|
||
gap: 0;
|
||
overflow: hidden;
|
||
}
|
||
|
||
/* 左侧步骤列表 */
|
||
.step-list-panel {
|
||
width: 320px;
|
||
flex-shrink: 0;
|
||
border-right: 1px solid #e5e7eb;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
.step-list-header {
|
||
padding: 12px 16px;
|
||
border-bottom: 1px solid #e5e7eb;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
}
|
||
.step-list-header h3 {
|
||
font-size: 14px;
|
||
font-weight: 600;
|
||
color: #1e293b;
|
||
}
|
||
.progress-badge {
|
||
font-size: 12px;
|
||
color: #6b7280;
|
||
background: #f3f4f6;
|
||
padding: 2px 8px;
|
||
border-radius: 10px;
|
||
}
|
||
.step-list-body {
|
||
flex: 1;
|
||
overflow-y: auto;
|
||
padding: 8px;
|
||
}
|
||
|
||
/* 虚拟步骤(输入/输出) */
|
||
.virtual-step {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
padding: 10px 12px;
|
||
margin-bottom: 4px;
|
||
border-radius: 8px;
|
||
cursor: pointer;
|
||
transition: all 0.15s;
|
||
border: 2px solid #bfdbfe;
|
||
background: #eff6ff;
|
||
}
|
||
.virtual-step:hover {
|
||
border-color: #93c5fd;
|
||
background: #dbeafe;
|
||
}
|
||
.virtual-step.active {
|
||
border-color: #3b82f6;
|
||
background: #dbeafe;
|
||
}
|
||
.virtual-step-icon {
|
||
width: 28px;
|
||
height: 28px;
|
||
border-radius: 6px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
font-size: 14px;
|
||
flex-shrink: 0;
|
||
}
|
||
.virtual-step-icon.input {
|
||
background: #dbeafe;
|
||
}
|
||
.virtual-step-icon.output {
|
||
background: #fef3c7;
|
||
}
|
||
.virtual-step-info {
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
.virtual-step-name {
|
||
font-size: 13px;
|
||
font-weight: 500;
|
||
color: #1e293b;
|
||
}
|
||
.virtual-step-tag {
|
||
font-size: 11px;
|
||
padding: 1px 6px;
|
||
border-radius: 3px;
|
||
}
|
||
.virtual-step-tag.empty {
|
||
background: #fef2f2;
|
||
color: #dc2626;
|
||
}
|
||
.virtual-step-tag.filled {
|
||
background: #ecfdf5;
|
||
color: #059669;
|
||
}
|
||
|
||
/* 分割线 */
|
||
.step-divider {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
margin: 8px 0;
|
||
padding: 0 12px;
|
||
color: #9ca3af;
|
||
font-size: 11px;
|
||
}
|
||
.step-divider::before,
|
||
.step-divider::after {
|
||
content: '';
|
||
flex: 1;
|
||
height: 1px;
|
||
background: #e5e7eb;
|
||
}
|
||
|
||
/* 真实步骤 */
|
||
.step-card {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
padding: 10px 12px;
|
||
margin-bottom: 4px;
|
||
border-radius: 8px;
|
||
cursor: pointer;
|
||
transition: all 0.15s;
|
||
border: 2px solid #e5e7eb;
|
||
background: #fff;
|
||
}
|
||
.step-card:hover {
|
||
border-color: #6ee7b7;
|
||
}
|
||
.step-card.active {
|
||
border-color: #10b981;
|
||
background: #ecfdf5;
|
||
}
|
||
.step-card.done {
|
||
opacity: 0.65;
|
||
border-color: #d1fae5;
|
||
background: #f0fdf4;
|
||
}
|
||
.step-seq {
|
||
width: 24px;
|
||
height: 24px;
|
||
border-radius: 50%;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
font-size: 12px;
|
||
font-weight: 600;
|
||
flex-shrink: 0;
|
||
}
|
||
.step-seq.pending {
|
||
background: #f3f4f6;
|
||
color: #6b7280;
|
||
}
|
||
.step-seq.running {
|
||
background: #10b981;
|
||
color: #fff;
|
||
}
|
||
.step-seq.done {
|
||
background: #d1fae5;
|
||
color: #059669;
|
||
}
|
||
.step-info {
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
.step-name {
|
||
font-size: 13px;
|
||
font-weight: 500;
|
||
color: #1e293b;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
.step-desc {
|
||
font-size: 11px;
|
||
color: #9ca3af;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
.step-status {
|
||
font-size: 11px;
|
||
padding: 1px 6px;
|
||
border-radius: 3px;
|
||
flex-shrink: 0;
|
||
}
|
||
.step-status.done {
|
||
background: #d1fae5;
|
||
color: #059669;
|
||
}
|
||
.step-status.running {
|
||
background: #ecfdf5;
|
||
color: #10b981;
|
||
}
|
||
.step-status.pending {
|
||
background: #f3f4f6;
|
||
color: #6b7280;
|
||
}
|
||
|
||
/* 右侧详情面板 */
|
||
.detail-panel {
|
||
flex: 1;
|
||
display: flex;
|
||
flex-direction: column;
|
||
overflow: hidden;
|
||
}
|
||
.detail-header {
|
||
padding: 12px 20px;
|
||
border-bottom: 1px solid #e5e7eb;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
}
|
||
.detail-header h3 {
|
||
font-size: 14px;
|
||
font-weight: 600;
|
||
color: #1e293b;
|
||
}
|
||
.detail-body {
|
||
flex: 1;
|
||
overflow-y: auto;
|
||
padding: 20px;
|
||
}
|
||
|
||
/* 详情 - 表格 */
|
||
.mock-table {
|
||
width: 100%;
|
||
border-collapse: collapse;
|
||
font-size: 13px;
|
||
}
|
||
.mock-table th {
|
||
background: #f9fafb;
|
||
padding: 8px 12px;
|
||
text-align: center;
|
||
font-weight: 500;
|
||
color: #6b7280;
|
||
border: 1px solid #e5e7eb;
|
||
}
|
||
.mock-table td {
|
||
padding: 8px 12px;
|
||
text-align: center;
|
||
border: 1px solid #e5e7eb;
|
||
color: #1e293b;
|
||
}
|
||
.mock-table .input-cell {
|
||
background: #fffbeb;
|
||
border: 1px dashed #fbbf24;
|
||
min-width: 80px;
|
||
height: 32px;
|
||
}
|
||
|
||
/* 详情 - 基本信息 */
|
||
.info-grid {
|
||
display: grid;
|
||
grid-template-columns: 1fr 1fr;
|
||
gap: 12px 24px;
|
||
margin-bottom: 16px;
|
||
}
|
||
.info-item {
|
||
display: flex;
|
||
gap: 8px;
|
||
font-size: 13px;
|
||
}
|
||
.info-label {
|
||
color: #6b7280;
|
||
flex-shrink: 0;
|
||
}
|
||
.info-value {
|
||
color: #1e293b;
|
||
font-weight: 500;
|
||
}
|
||
|
||
/* 工艺库折叠按钮 */
|
||
.library-toggle {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
gap: 6px;
|
||
width: 28px;
|
||
flex-shrink: 0;
|
||
background: #f9fafb;
|
||
border-right: 1px solid #e5e7eb;
|
||
cursor: pointer;
|
||
transition: background 0.15s;
|
||
font-size: 12px;
|
||
color: #6b7280;
|
||
writing-mode: vertical-lr;
|
||
}
|
||
.library-toggle:hover {
|
||
background: #ecfdf5;
|
||
color: #10b981;
|
||
}
|
||
|
||
/* 底部操作栏 */
|
||
.detail-footer {
|
||
padding: 10px 20px;
|
||
border-top: 1px solid #e5e7eb;
|
||
display: flex;
|
||
justify-content: flex-end;
|
||
gap: 8px;
|
||
}
|
||
|
||
/* 提示标注 */
|
||
.annotation {
|
||
position: absolute;
|
||
font-size: 11px;
|
||
color: #6366f1;
|
||
background: #eef2ff;
|
||
border: 1px dashed #a5b4fc;
|
||
padding: 2px 8px;
|
||
border-radius: 4px;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
/* 方案标注 */
|
||
.mode-label {
|
||
position: fixed;
|
||
top: 12px;
|
||
left: 50%;
|
||
transform: translateX(-50%);
|
||
background: #312e81;
|
||
color: #c7d2fe;
|
||
padding: 6px 20px;
|
||
border-radius: 8px;
|
||
font-size: 13px;
|
||
z-index: 10;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="mode-label">💡 方案:虚拟步骤 — 任务输入/输出作为确认节点嵌入步骤列表</div>
|
||
|
||
<div class="dialog">
|
||
<!-- 标题栏 -->
|
||
<div class="dialog-header">
|
||
<h2>任务执行 — 细胞培养-2026-001</h2>
|
||
<button class="dialog-close">✕</button>
|
||
</div>
|
||
|
||
<!-- 任务信息一行 -->
|
||
<div class="task-info-bar">
|
||
<span>任务号:<b>SK20260522001</b></span>
|
||
<span>工单号:GD20260522003</span>
|
||
<span>任务名称:细胞培养</span>
|
||
<span class="status-tag running">● 进行中</span>
|
||
<div class="task-info-actions">
|
||
<button class="btn-sm success">✔ 完成任务</button>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 主体 -->
|
||
<div class="main-body">
|
||
<!-- 可折叠工艺库把手 -->
|
||
<div class="library-toggle" title="展开工艺库">工 艺 库 ›</div>
|
||
|
||
<!-- 步骤列表 -->
|
||
<div class="step-list-panel">
|
||
<div class="step-list-header">
|
||
<h3>工序步骤</h3>
|
||
<span class="progress-badge">进度 2/5</span>
|
||
</div>
|
||
<div class="step-list-body">
|
||
<!-- ✅ 虚拟步骤:任务输入 -->
|
||
<div class="virtual-step" style="background: #dbeafe; border-color: #3b82f6">
|
||
<div class="virtual-step-icon input">📥</div>
|
||
<div class="virtual-step-info">
|
||
<div class="virtual-step-name">任务输入</div>
|
||
</div>
|
||
<span class="virtual-step-tag filled">已填写 3 项</span>
|
||
</div>
|
||
|
||
<!-- ✅ 虚拟步骤:任务输出 -->
|
||
<div class="virtual-step" style="border-style: dashed">
|
||
<div class="virtual-step-icon output">📤</div>
|
||
<div class="virtual-step-info">
|
||
<div class="virtual-step-name">任务输出</div>
|
||
</div>
|
||
<span class="virtual-step-tag empty">⚠ 未填写</span>
|
||
</div>
|
||
|
||
<!-- 分割线 -->
|
||
<div class="step-divider">工艺步骤</div>
|
||
|
||
<!-- 已完成步骤 -->
|
||
<div class="step-card done">
|
||
<div class="step-seq done">✓</div>
|
||
<div class="step-info">
|
||
<div class="step-name">样本接收</div>
|
||
</div>
|
||
<span class="step-status done">已完成</span>
|
||
</div>
|
||
|
||
<!-- 进行中步骤(高亮) -->
|
||
<div class="step-card active">
|
||
<div class="step-seq running">2</div>
|
||
<div class="step-info">
|
||
<div class="step-name">细胞分离</div>
|
||
<div class="step-desc">从样本中分离目标细胞</div>
|
||
</div>
|
||
<span class="step-status running">▶ 进行中</span>
|
||
</div>
|
||
|
||
<!-- 待执行步骤 -->
|
||
<div class="step-card">
|
||
<div class="step-seq pending">3</div>
|
||
<div class="step-info">
|
||
<div class="step-name">细胞培养</div>
|
||
</div>
|
||
<span class="step-status pending">待执行</span>
|
||
</div>
|
||
|
||
<div class="step-card">
|
||
<div class="step-seq pending">4</div>
|
||
<div class="step-info">
|
||
<div class="step-name">质量检测</div>
|
||
</div>
|
||
<span class="step-status pending">待执行</span>
|
||
</div>
|
||
|
||
<div class="step-card">
|
||
<div class="step-seq pending">5</div>
|
||
<div class="step-info">
|
||
<div class="step-name">冻存封装</div>
|
||
</div>
|
||
<span class="step-status pending">待执行</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 右侧详情面板 - 展示"任务输出"被选中的状态 -->
|
||
<div class="detail-panel">
|
||
<div class="detail-header">
|
||
<h3>📤 任务输出</h3>
|
||
<div style="display: flex; gap: 8px">
|
||
<button class="btn-sm primary">+ 添加输出</button>
|
||
<button class="btn-sm primary">✔ 保存输出</button>
|
||
</div>
|
||
</div>
|
||
<div class="detail-body">
|
||
<div style="text-align: center; padding: 40px 0; color: #9ca3af">
|
||
<div style="font-size: 36px; margin-bottom: 12px">📋</div>
|
||
<p style="font-size: 14px; margin-bottom: 4px">暂无输出项</p>
|
||
<p style="font-size: 12px">点击上方"添加输出"按钮添加任务输出记录</p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</body>
|
||
</html>
|