Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
digital_employee_prototype1
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
yujiejie
digital_employee_prototype1
Commits
7459757b
提交
7459757b
authored
8月 06, 2026
作者:
yujiejie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新建对话、技能中心、任务中心完成初版
上级
61fd8c2b
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
1032 行增加
和
0 行删除
+1032
-0
tasks.html
pages/tasks.html
+610
-0
styles.css
styles.css
+422
-0
没有找到文件。
pages/tasks.html
浏览文件 @
7459757b
<!DOCTYPE html>
<html
lang=
"zh-CN"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
任务中心 - 数字员工
</title>
<link
rel=
"stylesheet"
href=
"../styles.css"
>
</head>
<body>
<!-- ==================== 全局布局容器 ==================== -->
<div
class=
"app-container"
>
<!-- ==================== 左侧导航栏 ==================== -->
<aside
class=
"sidebar"
>
<!-- 顶部 Logo 区域 -->
<div
class=
"sidebar-header"
>
<a
href=
"../index.html"
class=
"logo"
>
<svg
class=
"icon logo-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
stroke-linecap=
"round"
stroke-linejoin=
"round"
>
<rect
x=
"2"
y=
"3"
width=
"20"
height=
"14"
rx=
"2"
ry=
"2"
/>
<line
x1=
"8"
y1=
"21"
x2=
"16"
y2=
"21"
/>
<line
x1=
"12"
y1=
"17"
x2=
"12"
y2=
"21"
/>
</svg>
<span
class=
"logo-text"
>
数字员工
</span>
</a>
</div>
<!-- 主导航菜单 -->
<nav
class=
"sidebar-nav"
>
<ul
class=
"nav-list"
>
<li
class=
"nav-item"
data-page=
"chat"
data-href=
"../index.html"
>
<svg
class=
"icon nav-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
stroke-linecap=
"round"
stroke-linejoin=
"round"
>
<path
d=
"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"
/>
</svg>
<span
class=
"nav-text"
>
新建对话
</span>
</li>
<li
class=
"nav-item"
data-page=
"skills"
data-href=
"skills.html"
>
<svg
class=
"icon nav-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
stroke-linecap=
"round"
stroke-linejoin=
"round"
>
<path
d=
"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"
/>
</svg>
<span
class=
"nav-text"
>
技能中心
</span>
</li>
<li
class=
"nav-item active"
data-page=
"tasks"
data-href=
"tasks.html"
>
<svg
class=
"icon nav-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
stroke-linecap=
"round"
stroke-linejoin=
"round"
>
<line
x1=
"8"
y1=
"6"
x2=
"21"
y2=
"6"
/>
<line
x1=
"8"
y1=
"12"
x2=
"21"
y2=
"12"
/>
<line
x1=
"8"
y1=
"18"
x2=
"21"
y2=
"18"
/>
<line
x1=
"3"
y1=
"6"
x2=
"3.01"
y2=
"6"
/>
<line
x1=
"3"
y1=
"12"
x2=
"3.01"
y2=
"12"
/>
<line
x1=
"3"
y1=
"18"
x2=
"3.01"
y2=
"18"
/>
</svg>
<span
class=
"nav-text"
>
任务中心
</span>
<span
class=
"nav-badge"
>
1
</span>
</li>
<li
class=
"nav-item"
data-page=
"schedule"
data-href=
"schedule.html"
>
<svg
class=
"icon nav-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
stroke-linecap=
"round"
stroke-linejoin=
"round"
>
<circle
cx=
"12"
cy=
"12"
r=
"10"
/>
<polyline
points=
"12 6 12 12 16 14"
/>
</svg>
<span
class=
"nav-text"
>
定时任务
</span>
</li>
<li
class=
"nav-item"
data-page=
"templates"
data-href=
"templates.html"
>
<svg
class=
"icon nav-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
stroke-linecap=
"round"
stroke-linejoin=
"round"
>
<path
d=
"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"
/>
<polyline
points=
"14 2 14 8 20 8"
/>
<line
x1=
"16"
y1=
"13"
x2=
"8"
y2=
"13"
/>
<line
x1=
"16"
y1=
"17"
x2=
"8"
y2=
"17"
/>
<polyline
points=
"10 9 9 9 8 9"
/>
</svg>
<span
class=
"nav-text"
>
模板中心
</span>
</li>
</ul>
</nav>
<!-- 底部辅助菜单 -->
<div
class=
"sidebar-footer"
>
<ul
class=
"nav-list secondary"
>
<li
class=
"nav-item"
data-page=
"settings"
data-href=
"settings.html"
>
<svg
class=
"icon nav-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
stroke-linecap=
"round"
stroke-linejoin=
"round"
>
<circle
cx=
"12"
cy=
"12"
r=
"3"
/>
<path
d=
"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"
/>
</svg>
<span
class=
"nav-text"
>
设置
</span>
</li>
</ul>
</div>
</aside>
<!-- ==================== 主内容区 ==================== -->
<main
class=
"main-content"
>
<div
class=
"page"
id=
"page-tasks"
>
<!-- 页面顶部说明 -->
<div
class=
"page-header"
>
<h1
class=
"page-title"
>
任务中心
</h1>
<p
class=
"page-description"
>
任务中心展示数字员工正在处理、已完成和需要确认的任务。如果任务失败,你可以在这里查看原因并重新执行。
</p>
</div>
<!-- 搜索和操作栏 -->
<div
class=
"page-toolbar"
>
<button
class=
"toolbar-btn"
id=
"btn-refresh"
>
<svg
class=
"icon btn-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
stroke-linecap=
"round"
stroke-linejoin=
"round"
>
<polyline
points=
"23 4 23 10 17 10"
/>
<polyline
points=
"1 20 1 14 7 14"
/>
<path
d=
"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"
/>
</svg>
<span
class=
"btn-text"
>
刷新
</span>
</button>
</div>
<!-- Tab 切换 -->
<div
class=
"tab-bar task-tab-bar"
>
<button
class=
"tab-item active"
data-status=
"all"
>
全部
</button>
<button
class=
"tab-item"
data-status=
"running"
>
进行中
</button>
<button
class=
"tab-item"
data-status=
"completed"
>
已完成
</button>
<button
class=
"tab-item"
data-status=
"confirm"
>
需要确认
</button>
<button
class=
"tab-item"
data-status=
"failed"
>
处理失败
</button>
</div>
<!-- 任务列表 -->
<div
class=
"task-list-container"
>
<table
class=
"task-table"
>
<thead>
<tr>
<th>
任务名称
</th>
<th>
任务类型
</th>
<th>
状态
</th>
<th>
发起时间
</th>
<th>
结果文件
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody
id=
"task-tbody"
>
<!-- 任务1:已完成 -->
<tr
class=
"task-row"
data-task=
"task-1"
data-status=
"completed"
>
<td>
<div
class=
"task-name-cell"
>
<svg
class=
"icon task-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<rect
x=
"3"
y=
"3"
width=
"18"
height=
"18"
rx=
"2"
ry=
"2"
/>
<line
x1=
"3"
y1=
"9"
x2=
"21"
y2=
"9"
/>
<line
x1=
"9"
y1=
"21"
x2=
"9"
y2=
"9"
/>
</svg>
汇总周报表格
</div>
</td>
<td><span
class=
"tag-category"
>
表格处理
</span></td>
<td><span
class=
"tag-status completed"
>
已完成
</span></td>
<td>
今天 09:30
</td>
<td>
<a
href=
"#"
class=
"file-link"
>
周报汇总表.xlsx
</a>
</td>
<td>
<button
class=
"btn-text btn-view"
data-action=
"view"
data-task=
"task-1"
>
查看
</button>
</td>
</tr>
<!-- 任务2:需要确认 -->
<tr
class=
"task-row"
data-task=
"task-2"
data-status=
"confirm"
>
<td>
<div
class=
"task-name-cell"
>
<svg
class=
"icon task-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<path
d=
"M22 11.08V12a10 10 0 1 1-5.93-9.14"
/>
<polyline
points=
"22 4 12 14.01 9 11.01"
/>
</svg>
整理会议纪要
</div>
</td>
<td><span
class=
"tag-category"
>
会议管理
</span></td>
<td><span
class=
"tag-status confirm"
>
需要确认
</span></td>
<td>
今天 10:05
</td>
<td>
-
</td>
<td>
<button
class=
"btn-text btn-confirm-action"
data-action=
"confirm"
data-task=
"task-2"
>
去确认
</button>
</td>
</tr>
<!-- 任务3:处理失败 -->
<tr
class=
"task-row"
data-task=
"task-3"
data-status=
"failed"
>
<td>
<div
class=
"task-name-cell"
>
<svg
class=
"icon task-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<circle
cx=
"11"
cy=
"11"
r=
"8"
/>
<line
x1=
"21"
y1=
"21"
x2=
"16.65"
y2=
"16.65"
/>
</svg>
查询政策资料
</div>
</td>
<td><span
class=
"tag-category"
>
资料查询
</span></td>
<td><span
class=
"tag-status failed"
>
处理失败
</span></td>
<td>
今天 10:20
</td>
<td>
-
</td>
<td>
<button
class=
"btn-text btn-retry"
data-action=
"retry"
data-task=
"task-3"
>
重试
</button>
</td>
</tr>
</tbody>
</table>
<!-- 空态 -->
<div
class=
"empty-state hidden"
id=
"empty-tasks"
>
<svg
class=
"icon empty-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"1.5"
>
<line
x1=
"8"
y1=
"6"
x2=
"21"
y2=
"6"
/>
<line
x1=
"8"
y1=
"12"
x2=
"21"
y2=
"12"
/>
<line
x1=
"8"
y1=
"18"
x2=
"21"
y2=
"18"
/>
<line
x1=
"3"
y1=
"6"
x2=
"3.01"
y2=
"6"
/>
<line
x1=
"3"
y1=
"12"
x2=
"3.01"
y2=
"12"
/>
<line
x1=
"3"
y1=
"18"
x2=
"3.01"
y2=
"18"
/>
</svg>
<p
class=
"empty-text"
>
当前没有进行中的任务。
</p>
<p
class=
"empty-hint"
>
发起任务后,可以在这里查看进度和结果。
</p>
<button
class=
"btn-primary"
id=
"btn-goto-chat"
>
去新建对话
</button>
</div>
</div>
</div>
</main>
</div>
<!-- ==================== 底部状态栏 ==================== -->
<footer
class=
"status-bar"
>
<div
class=
"status-item"
>
<span
class=
"status-indicator online"
></span>
<span
class=
"status-text"
>
服务状态:正常
</span>
</div>
<div
class=
"status-divider"
></div>
<div
class=
"status-item"
>
<span
class=
"status-text"
>
当前模型:政务助手
</span>
</div>
<div
class=
"status-divider"
></div>
<div
class=
"status-item clickable"
data-action=
"goto-skills"
>
<span
class=
"status-text"
>
已启用
<strong
id=
"skill-count"
>
3
</strong>
个技能
</span>
</div>
</footer>
<!-- ==================== 任务详情抽屉 ==================== -->
<div
class=
"drawer-overlay"
id=
"drawer-overlay"
></div>
<!-- 已完成状态抽屉 -->
<aside
class=
"drawer task-drawer"
id=
"drawer-completed"
>
<div
class=
"drawer-header"
>
<div
class=
"drawer-title"
>
<span
class=
"drawer-task-name"
>
汇总周报表格
</span>
<span
class=
"drawer-task-meta"
>
表格处理 · 已完成
</span>
</div>
<button
class=
"btn-close"
id=
"btn-close-completed"
>
<svg
class=
"icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<line
x1=
"18"
y1=
"6"
x2=
"6"
y2=
"18"
/>
<line
x1=
"6"
y1=
"6"
x2=
"18"
y2=
"18"
/>
</svg>
</button>
</div>
<div
class=
"drawer-content"
>
<!-- 任务基本信息 -->
<div
class=
"task-info-section"
>
<div
class=
"info-row"
>
<span
class=
"info-label"
>
发起时间
</span>
<span
class=
"info-value"
>
今天 09:30
</span>
</div>
<div
class=
"info-row"
>
<span
class=
"info-label"
>
完成时间
</span>
<span
class=
"info-value"
>
今天 09:35
</span>
</div>
</div>
<!-- 任务内容 -->
<div
class=
"drawer-section"
>
<h4
class=
"section-label"
>
任务内容
</h4>
<div
class=
"task-content-box"
>
请帮我汇总资料库里的周报表格,并生成一张总表。
</div>
</div>
<!-- 使用信息 -->
<div
class=
"drawer-section"
>
<h4
class=
"section-label"
>
使用信息
</h4>
<div
class=
"info-row"
>
<span
class=
"info-label"
>
使用资料库
</span>
<span
class=
"info-value"
>
D:\数字员工资料库
</span>
</div>
<div
class=
"info-row"
>
<span
class=
"info-label"
>
使用技能
</span>
<span
class=
"info-value"
>
表格汇总助手
</span>
</div>
</div>
<!-- 执行过程 -->
<div
class=
"drawer-section"
>
<h4
class=
"section-label"
>
执行过程
</h4>
<div
class=
"process-steps"
>
<div
class=
"process-step completed"
>
<svg
class=
"icon step-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<polyline
points=
"20 6 9 17 4 12"
/>
</svg>
<span>
已读取资料库文件
</span>
</div>
<div
class=
"process-step completed"
>
<svg
class=
"icon step-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<polyline
points=
"20 6 9 17 4 12"
/>
</svg>
<span>
已识别5份周报表格
</span>
</div>
<div
class=
"process-step completed"
>
<svg
class=
"icon step-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<polyline
points=
"20 6 9 17 4 12"
/>
</svg>
<span>
已合并数据
</span>
</div>
<div
class=
"process-step completed"
>
<svg
class=
"icon step-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<polyline
points=
"20 6 9 17 4 12"
/>
</svg>
<span>
已生成结果文件
</span>
</div>
</div>
</div>
<!-- 结果文件 -->
<div
class=
"drawer-section"
>
<h4
class=
"section-label"
>
结果文件
</h4>
<div
class=
"result-file-card"
>
<div
class=
"result-file-info"
>
<svg
class=
"icon result-file-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<path
d=
"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"
/>
<polyline
points=
"14 2 14 8 20 8"
/>
</svg>
<div>
<div
class=
"result-file-name"
>
周报汇总表.xlsx
</div>
<div
class=
"result-file-path"
>
保存位置:D:\数字员工资料库\结果文件
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"drawer-footer"
>
<button
class=
"btn-secondary"
id=
"btn-open-file"
>
<svg
class=
"icon btn-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<path
d=
"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"
/>
<polyline
points=
"15 3 21 3 21 9"
/>
<line
x1=
"10"
y1=
"14"
x2=
"21"
y2=
"3"
/>
</svg>
打开文件
</button>
<button
class=
"btn-secondary"
id=
"btn-open-location"
>
<svg
class=
"icon btn-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<path
d=
"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"
/>
</svg>
打开位置
</button>
<button
class=
"btn-secondary"
id=
"btn-retry-task"
>
<svg
class=
"icon btn-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<polyline
points=
"23 4 23 10 17 10"
/>
<path
d=
"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"
/>
</svg>
重新执行
</button>
<button
class=
"btn-primary"
id=
"btn-back-chat"
>
返回对话
</button>
</div>
</aside>
<!-- 需要确认状态抽屉 -->
<aside
class=
"drawer task-drawer"
id=
"drawer-confirm"
>
<div
class=
"drawer-header"
>
<div
class=
"drawer-title"
>
<span
class=
"drawer-task-name"
>
整理会议纪要
</span>
<span
class=
"drawer-task-meta"
>
会议管理 · 需要确认
</span>
</div>
<button
class=
"btn-close"
id=
"btn-close-confirm"
>
<svg
class=
"icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<line
x1=
"18"
y1=
"6"
x2=
"6"
y2=
"18"
/>
<line
x1=
"6"
y1=
"6"
x2=
"18"
y2=
"18"
/>
</svg>
</button>
</div>
<div
class=
"drawer-content"
>
<!-- 确认提示 -->
<div
class=
"confirm-alert"
>
<svg
class=
"icon alert-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<circle
cx=
"12"
cy=
"12"
r=
"10"
/>
<line
x1=
"12"
y1=
"8"
x2=
"12"
y2=
"12"
/>
<line
x1=
"12"
y1=
"16"
x2=
"12.01"
y2=
"16"
/>
</svg>
<p
class=
"confirm-message"
>
数字员工在"
<strong>
王组长周报
</strong>
"中未找到"
<strong>
项目完成情况
</strong>
"字段。
</p>
<p
class=
"confirm-hint"
>
请选择处理方式:
</p>
</div>
<!-- 确认选项 -->
<div
class=
"confirm-options"
>
<label
class=
"confirm-option"
>
<input
type=
"radio"
name=
"confirm-choice"
value=
"skip"
>
<span
class=
"radio-custom"
></span>
<span
class=
"option-text"
>
跳过该字段
</span>
</label>
<label
class=
"confirm-option"
>
<input
type=
"radio"
name=
"confirm-choice"
value=
"blank"
>
<span
class=
"radio-custom"
></span>
<span
class=
"option-text"
>
按空白处理
</span>
</label>
<label
class=
"confirm-option"
>
<input
type=
"radio"
name=
"confirm-choice"
value=
"fill"
>
<span
class=
"radio-custom"
></span>
<span
class=
"option-text"
>
我来补充说明
</span>
</label>
</div>
<!-- 补充说明(隐藏) -->
<div
class=
"confirm-supplement hidden"
id=
"supplement-area"
>
<textarea
class=
"form-textarea"
rows=
"3"
placeholder=
"请输入您的补充说明..."
></textarea>
</div>
</div>
<div
class=
"drawer-footer"
>
<button
class=
"btn-secondary"
id=
"btn-cancel-confirm"
>
取消
</button>
<button
class=
"btn-primary"
id=
"btn-confirm-ok"
>
确认
</button>
</div>
</aside>
<!-- 处理失败状态抽屉 -->
<aside
class=
"drawer task-drawer"
id=
"drawer-failed"
>
<div
class=
"drawer-header"
>
<div
class=
"drawer-title"
>
<span
class=
"drawer-task-name"
>
查询政策资料
</span>
<span
class=
"drawer-task-meta"
>
资料查询 · 处理失败
</span>
</div>
<button
class=
"btn-close"
id=
"btn-close-failed"
>
<svg
class=
"icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<line
x1=
"18"
y1=
"6"
x2=
"6"
y2=
"18"
/>
<line
x1=
"6"
y1=
"6"
x2=
"18"
y2=
"18"
/>
</svg>
</button>
</div>
<div
class=
"drawer-content"
>
<!-- 失败提示 -->
<div
class=
"failed-alert"
>
<svg
class=
"icon failed-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<circle
cx=
"12"
cy=
"12"
r=
"10"
/>
<line
x1=
"15"
y1=
"9"
x2=
"9"
y2=
"15"
/>
<line
x1=
"9"
y1=
"9"
x2=
"15"
y2=
"15"
/>
</svg>
<p
class=
"failed-title"
>
处理失败
</p>
<p
class=
"failed-reason"
>
无法读取该文件,文件可能已损坏。
</p>
<p
class=
"failed-hint"
>
请检查文件是否正常,或更换文件后重试。
</p>
</div>
</div>
<div
class=
"drawer-footer"
>
<button
class=
"btn-secondary"
id=
"btn-retry-failed"
>
<svg
class=
"icon btn-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<polyline
points=
"23 4 23 10 17 10"
/>
<path
d=
"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"
/>
</svg>
重试
</button>
<button
class=
"btn-secondary"
id=
"btn-view-help"
>
<svg
class=
"icon btn-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<circle
cx=
"12"
cy=
"12"
r=
"12"
/>
<path
d=
"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"
/>
<line
x1=
"12"
y1=
"17"
x2=
"12.01"
y2=
"17"
/>
</svg>
查看帮助
</button>
</div>
</aside>
<!-- ==================== JavaScript ==================== -->
<script>
// Tab 切换
document
.
querySelectorAll
(
'.task-tab-bar .tab-item'
).
forEach
(
tab
=>
{
tab
.
addEventListener
(
'click'
,
function
()
{
const
status
=
this
.
dataset
.
status
;
// 更新 Tab 高亮
document
.
querySelectorAll
(
'.task-tab-bar .tab-item'
).
forEach
(
t
=>
t
.
classList
.
remove
(
'active'
));
this
.
classList
.
add
(
'active'
);
// 筛选任务
const
rows
=
document
.
querySelectorAll
(
'.task-row'
);
let
visibleCount
=
0
;
rows
.
forEach
(
row
=>
{
const
rowStatus
=
row
.
dataset
.
status
;
if
(
status
===
'all'
||
rowStatus
===
status
)
{
row
.
classList
.
remove
(
'hidden'
);
visibleCount
++
;
}
else
{
row
.
classList
.
add
(
'hidden'
);
}
});
// 空态处理
document
.
getElementById
(
'empty-tasks'
).
classList
.
toggle
(
'hidden'
,
visibleCount
>
0
);
document
.
querySelector
(
'.task-table'
).
classList
.
toggle
(
'hidden'
,
visibleCount
===
0
);
});
});
// 查看任务详情
document
.
querySelectorAll
(
'[data-action="view"]'
).
forEach
(
btn
=>
{
btn
.
addEventListener
(
'click'
,
function
()
{
openDrawer
(
'completed'
);
});
});
// 去确认
document
.
querySelectorAll
(
'[data-action="confirm"]'
).
forEach
(
btn
=>
{
btn
.
addEventListener
(
'click'
,
function
()
{
openDrawer
(
'confirm'
);
});
});
// 重试
document
.
querySelectorAll
(
'[data-action="retry"]'
).
forEach
(
btn
=>
{
btn
.
addEventListener
(
'click'
,
function
()
{
openDrawer
(
'failed'
);
});
});
// 打开抽屉
function
openDrawer
(
type
)
{
document
.
getElementById
(
'drawer-overlay'
).
classList
.
add
(
'active'
);
document
.
getElementById
(
'drawer-'
+
type
).
classList
.
add
(
'open'
);
}
// 关闭抽屉
function
closeDrawer
()
{
document
.
getElementById
(
'drawer-overlay'
).
classList
.
remove
(
'active'
);
document
.
querySelectorAll
(
'.task-drawer'
).
forEach
(
d
=>
d
.
classList
.
remove
(
'open'
));
}
document
.
getElementById
(
'btn-close-completed'
).
addEventListener
(
'click'
,
closeDrawer
);
document
.
getElementById
(
'btn-close-confirm'
).
addEventListener
(
'click'
,
closeDrawer
);
document
.
getElementById
(
'btn-close-failed'
).
addEventListener
(
'click'
,
closeDrawer
);
document
.
getElementById
(
'drawer-overlay'
).
addEventListener
(
'click'
,
closeDrawer
);
// 确认选项切换
document
.
querySelectorAll
(
'input[name="confirm-choice"]'
).
forEach
(
radio
=>
{
radio
.
addEventListener
(
'change'
,
function
()
{
const
supplementArea
=
document
.
getElementById
(
'supplement-area'
);
if
(
this
.
value
===
'fill'
)
{
supplementArea
.
classList
.
remove
(
'hidden'
);
}
else
{
supplementArea
.
classList
.
add
(
'hidden'
);
}
});
});
// 确认操作
document
.
getElementById
(
'btn-confirm-ok'
).
addEventListener
(
'click'
,
function
()
{
const
selected
=
document
.
querySelector
(
'input[name="confirm-choice"]:checked'
);
if
(
!
selected
)
{
alert
(
'请先选择一种处理方式'
);
return
;
}
alert
(
'已确认,任务将继续执行'
);
closeDrawer
();
});
// 取消确认
document
.
getElementById
(
'btn-cancel-confirm'
).
addEventListener
(
'click'
,
closeDrawer
);
// 重试
document
.
getElementById
(
'btn-retry-failed'
).
addEventListener
(
'click'
,
function
()
{
alert
(
'任务已重新执行,请稍候...'
);
closeDrawer
();
});
// 重新执行(已完成状态)
document
.
getElementById
(
'btn-retry-task'
).
addEventListener
(
'click'
,
function
()
{
alert
(
'任务已重新执行,请稍候...'
);
closeDrawer
();
});
// 返回对话
document
.
getElementById
(
'btn-back-chat'
).
addEventListener
(
'click'
,
function
()
{
window
.
location
.
href
=
'../index.html'
;
});
// 打开文件
document
.
getElementById
(
'btn-open-file'
).
addEventListener
(
'click'
,
function
()
{
alert
(
'将打开文件'
);
});
// 打开位置
document
.
getElementById
(
'btn-open-location'
).
addEventListener
(
'click'
,
function
()
{
alert
(
'将打开文件所在位置'
);
});
// 查看帮助
document
.
getElementById
(
'btn-view-help'
).
addEventListener
(
'click'
,
function
()
{
alert
(
'帮助内容:
\
n
\
n1. 请检查文件是否损坏
\
n2. 尝试使用其他文件
\
n3. 确保文件格式受支持(Word、Excel、PDF、TXT)
\
n4. 如持续失败,请联系管理员'
);
});
// 去新建对话
document
.
getElementById
(
'btn-goto-chat'
).
addEventListener
(
'click'
,
function
()
{
window
.
location
.
href
=
'../index.html'
;
});
// 刷新按钮
document
.
getElementById
(
'btn-refresh'
).
addEventListener
(
'click'
,
function
()
{
alert
(
'刷新任务列表'
);
});
// 导航跳转
document
.
querySelectorAll
(
'.nav-item[data-href]'
).
forEach
(
item
=>
{
item
.
addEventListener
(
'click'
,
function
()
{
const
href
=
this
.
dataset
.
href
;
if
(
href
)
{
if
(
window
.
location
.
pathname
.
endsWith
(
href
))
return
;
window
.
location
.
href
=
href
;
}
});
});
</script>
</body>
</html>
styles.css
浏览文件 @
7459757b
...
...
@@ -1191,6 +1191,428 @@ h1, h2, h3, h4, h5, h6 {
color
:
var
(
--color-success
);
}
/* ================================================================
21. 任务中心页面样式
================================================================ */
/* 任务列表表格 */
.task-list-container
{
background-color
:
var
(
--color-bg-card
);
border
:
1px
solid
var
(
--color-border
);
border-radius
:
var
(
--border-radius-card
);
overflow
:
hidden
;
}
.task-table
{
width
:
100%
;
border-collapse
:
collapse
;
}
.task-table
th
,
.task-table
td
{
padding
:
14px
16px
;
text-align
:
left
;
border-bottom
:
1px
solid
var
(
--color-border-light
);
}
.task-table
th
{
font-size
:
var
(
--font-size-small
);
font-weight
:
500
;
color
:
var
(
--color-text-secondary
);
background-color
:
var
(
--color-bg-hover
);
}
.task-table
td
{
font-size
:
var
(
--font-size-body
);
color
:
var
(
--color-text-body
);
}
.task-table
tbody
tr
{
cursor
:
pointer
;
transition
:
background-color
0.15s
ease
;
}
.task-table
tbody
tr
:hover
{
background-color
:
var
(
--color-bg-hover
);
}
.task-table
tbody
tr
:last-child
td
{
border-bottom
:
none
;
}
.task-table
tbody
tr
.hidden
{
display
:
none
;
}
.task-name-cell
{
display
:
flex
;
align-items
:
center
;
gap
:
10px
;
font-weight
:
500
;
color
:
var
(
--color-text-primary
);
}
.task-name-cell
.task-icon
{
width
:
20px
;
height
:
20px
;
color
:
var
(
--color-primary
);
}
/* 文件链接 */
.file-link
{
color
:
var
(
--color-primary
);
text-decoration
:
none
;
font-weight
:
500
;
}
.file-link
:hover
{
text-decoration
:
underline
;
}
/* 状态标签颜色 */
.tag-status.completed
{
background-color
:
#DCFCE7
;
color
:
var
(
--color-success
);
}
.tag-status.running
{
background-color
:
var
(
--color-primary-light
);
color
:
var
(
--color-primary
);
}
.tag-status.confirm
{
background-color
:
#FEF3C7
;
color
:
#92400E
;
}
.tag-status.failed
{
background-color
:
#FEE2E2
;
color
:
var
(
--color-error
);
}
/* 操作按钮 */
.btn-view
,
.btn-confirm-action
,
.btn-retry
{
background
:
none
;
border
:
none
;
font-size
:
var
(
--font-size-body
);
font-family
:
inherit
;
cursor
:
pointer
;
padding
:
0
;
}
.btn-view
,
.btn-confirm-action
{
color
:
var
(
--color-primary
);
}
.btn-view
:hover
,
.btn-confirm-action
:hover
{
text-decoration
:
underline
;
}
.btn-retry
{
color
:
var
(
--color-error
);
}
.btn-retry
:hover
{
color
:
#B91C1C
;
}
/* 任务详情抽屉 */
.task-drawer
{
width
:
520px
;
}
.drawer-task-name
{
font-size
:
20px
;
font-weight
:
600
;
color
:
var
(
--color-text-primary
);
}
.drawer-task-meta
{
font-size
:
var
(
--font-size-small
);
color
:
var
(
--color-text-secondary
);
}
/* 任务信息区域 */
.task-info-section
{
padding
:
16px
;
background-color
:
var
(
--color-bg-hover
);
border-radius
:
var
(
--border-radius-btn
);
margin-bottom
:
20px
;
}
.info-row
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
padding
:
6px
0
;
}
.info-row
:not
(
:last-child
)
{
border-bottom
:
1px
solid
var
(
--color-border-light
);
}
.info-label
{
font-size
:
var
(
--font-size-body
);
color
:
var
(
--color-text-secondary
);
}
.info-value
{
font-size
:
var
(
--font-size-body
);
color
:
var
(
--color-text-primary
);
font-weight
:
500
;
}
/* 任务内容框 */
.task-content-box
{
padding
:
14px
16px
;
background-color
:
var
(
--color-bg-hover
);
border-radius
:
var
(
--border-radius-btn
);
font-size
:
var
(
--font-size-body
);
color
:
var
(
--color-text-body
);
line-height
:
1.6
;
}
/* 执行过程步骤 */
.process-steps
{
display
:
flex
;
flex-direction
:
column
;
gap
:
12px
;
}
.process-step
{
display
:
flex
;
align-items
:
center
;
gap
:
10px
;
font-size
:
var
(
--font-size-body
);
color
:
var
(
--color-text-body
);
}
.process-step
.step-icon
{
width
:
20px
;
height
:
20px
;
flex-shrink
:
0
;
}
.process-step.completed
.step-icon
{
color
:
var
(
--color-success
);
}
.process-step.running
{
color
:
var
(
--color-primary
);
}
.process-step.running
.step-icon
{
animation
:
pulse
1.5s
infinite
;
}
@keyframes
pulse
{
0
%,
100
%
{
opacity
:
1
;
}
50
%
{
opacity
:
0.5
;
}
}
/* 结果文件卡片 */
.result-file-card
{
padding
:
16px
;
background-color
:
var
(
--color-primary-light
);
border
:
1px
solid
var
(
--color-primary
);
border-radius
:
var
(
--border-radius-btn
);
}
.result-file-info
{
display
:
flex
;
align-items
:
flex-start
;
gap
:
12px
;
}
.result-file-icon
{
width
:
36px
;
height
:
36px
;
color
:
var
(
--color-primary
);
flex-shrink
:
0
;
}
.result-file-name
{
font-size
:
var
(
--font-size-body
);
font-weight
:
600
;
color
:
var
(
--color-text-primary
);
margin-bottom
:
4px
;
}
.result-file-path
{
font-size
:
var
(
--font-size-small
);
color
:
var
(
--color-text-secondary
);
}
/* 抽屉底部按钮 */
.task-drawer
.drawer-footer
{
display
:
flex
;
flex-wrap
:
wrap
;
gap
:
8px
;
}
.task-drawer
.btn-secondary
,
.task-drawer
.btn-primary
{
display
:
flex
;
align-items
:
center
;
gap
:
6px
;
padding
:
8px
14px
;
height
:
auto
;
font-size
:
var
(
--font-size-small
);
}
/* 需要确认抽屉 */
.confirm-alert
{
padding
:
20px
;
background-color
:
#FEF3C7
;
border
:
1px
solid
#F59E0B
;
border-radius
:
var
(
--border-radius-btn
);
text-align
:
center
;
margin-bottom
:
20px
;
}
.confirm-alert
.alert-icon
{
width
:
48px
;
height
:
48px
;
color
:
#F59E0B
;
margin-bottom
:
12px
;
}
.confirm-message
{
font-size
:
var
(
--font-size-body
);
color
:
var
(
--color-text-primary
);
margin-bottom
:
12px
;
}
.confirm-hint
{
font-size
:
var
(
--font-size-small
);
color
:
var
(
--color-text-secondary
);
}
.confirm-options
{
display
:
flex
;
flex-direction
:
column
;
gap
:
12px
;
margin-bottom
:
16px
;
}
.confirm-option
{
display
:
flex
;
align-items
:
center
;
gap
:
12px
;
padding
:
12px
16px
;
background-color
:
var
(
--color-bg-hover
);
border
:
1px
solid
var
(
--color-border
);
border-radius
:
var
(
--border-radius-btn
);
cursor
:
pointer
;
transition
:
all
0.2s
ease
;
}
.confirm-option
:hover
{
border-color
:
var
(
--color-primary
);
background-color
:
var
(
--color-primary-light
);
}
.confirm-option
input
[
type
=
"radio"
]
{
display
:
none
;
}
.radio-custom
{
width
:
20px
;
height
:
20px
;
border
:
2px
solid
var
(
--color-border
);
border-radius
:
50%
;
position
:
relative
;
flex-shrink
:
0
;
transition
:
all
0.2s
ease
;
}
.confirm-option
input
[
type
=
"radio"
]
:checked
+
.radio-custom
{
border-color
:
var
(
--color-primary
);
}
.confirm-option
input
[
type
=
"radio"
]
:checked
+
.radio-custom
::after
{
content
:
''
;
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
width
:
10px
;
height
:
10px
;
background-color
:
var
(
--color-primary
);
border-radius
:
50%
;
}
.option-text
{
font-size
:
var
(
--font-size-body
);
color
:
var
(
--color-text-body
);
}
.confirm-supplement
{
margin-top
:
12px
;
}
.confirm-supplement
.form-textarea
{
width
:
100%
;
padding
:
10px
12px
;
border
:
1px
solid
var
(
--color-border
);
border-radius
:
var
(
--border-radius-btn
);
font-size
:
var
(
--font-size-body
);
font-family
:
inherit
;
resize
:
vertical
;
}
.confirm-supplement
.form-textarea
:focus
{
outline
:
none
;
border-color
:
var
(
--color-primary
);
}
/* 处理失败抽屉 */
.failed-alert
{
padding
:
32px
20px
;
text-align
:
center
;
}
.failed-icon
{
width
:
64px
;
height
:
64px
;
color
:
var
(
--color-error
);
margin-bottom
:
16px
;
}
.failed-title
{
font-size
:
18px
;
font-weight
:
600
;
color
:
var
(
--color-error
);
margin-bottom
:
8px
;
}
.failed-reason
{
font-size
:
var
(
--font-size-body
);
color
:
var
(
--color-text-primary
);
margin-bottom
:
8px
;
}
.failed-hint
{
font-size
:
var
(
--font-size-small
);
color
:
var
(
--color-text-secondary
);
}
/* 导航小红点 */
.nav-badge
{
display
:
inline-flex
;
align-items
:
center
;
justify-content
:
center
;
min-width
:
8px
;
height
:
8px
;
background-color
:
var
(
--color-error
);
border-radius
:
50%
;
margin-left
:
auto
;
}
.pool-actions
{
display
:
flex
;
gap
:
12px
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论