Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
digital_employee_prototype1
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
yujiejie
digital_employee_prototype1
Commits
b4f2978b
提交
b4f2978b
authored
8月 06, 2026
作者:
yujiejie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
模板中心完成
上级
7459757b
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
2649 行增加
和
0 行删除
+2649
-0
schedule.html
pages/schedule.html
+938
-0
templates.html
pages/templates.html
+753
-0
styles.css
styles.css
+958
-0
没有找到文件。
pages/schedule.html
浏览文件 @
b4f2978b
<!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"
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 active"
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-schedule"
>
<!-- 页面顶部说明 -->
<div
class=
"page-header"
>
<h1
class=
"page-title"
>
定时任务
</h1>
<p
class=
"page-description"
>
定时任务可以让数字员工按照指定时间自动执行工作。例如:每周一上午 9 点自动汇总周报。
</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>
<button
class=
"toolbar-btn primary"
id=
"btn-new-schedule"
>
<svg
class=
"icon btn-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
stroke-linecap=
"round"
stroke-linejoin=
"round"
>
<line
x1=
"12"
y1=
"5"
x2=
"12"
y2=
"19"
/>
<line
x1=
"5"
y1=
"12"
x2=
"19"
y2=
"12"
/>
</svg>
<span
class=
"btn-text"
>
新建定时任务
</span>
</button>
</div>
<!-- 定时任务列表 -->
<div
class=
"schedule-list-container"
id=
"schedule-list-container"
>
<table
class=
"schedule-table"
>
<thead>
<tr>
<th>
任务名称
</th>
<th>
执行内容
</th>
<th>
重复规则
</th>
<th>
下次执行时间
</th>
<th>
最近执行结果
</th>
<th>
状态
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody
id=
"schedule-tbody"
>
<!-- 任务1 -->
<tr
class=
"schedule-row"
data-schedule=
"schedule-1"
>
<td>
<div
class=
"schedule-name-cell"
>
<svg
class=
"icon schedule-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<circle
cx=
"12"
cy=
"12"
r=
"10"
/>
<polyline
points=
"12 6 12 12 16 14"
/>
</svg>
每周一汇总周报
</div>
</td>
<td>
<span
class=
"schedule-content"
title=
"汇总资料库里的周报表格,并生成Excel总表。"
>
汇总资料库里的周报表格…
</span>
</td>
<td>
每周一 09:00
</td>
<td>
2026-08-10 09:00
</td>
<td><span
class=
"result-success"
>
成功
</span></td>
<td><span
class=
"tag-status active"
>
启用
</span></td>
<td>
<div
class=
"schedule-actions"
>
<button
class=
"btn-text btn-edit"
data-action=
"edit"
>
编辑
</button>
<button
class=
"btn-text btn-pause"
data-action=
"pause"
>
暂停
</button>
<button
class=
"btn-text btn-detail"
data-action=
"detail"
>
详情
</button>
</div>
</td>
</tr>
<!-- 任务2 -->
<tr
class=
"schedule-row"
data-schedule=
"schedule-2"
>
<td>
<div
class=
"schedule-name-cell"
>
<svg
class=
"icon schedule-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<circle
cx=
"12"
cy=
"12"
r=
"10"
/>
<polyline
points=
"12 6 12 12 16 14"
/>
</svg>
每日日志提醒
</div>
</td>
<td>
<span
class=
"schedule-content"
title=
"提醒提交工作日志"
>
提醒提交工作日志
</span>
</td>
<td>
每天 17:00
</td>
<td>
今天 17:00
</td>
<td><span
class=
"result-success"
>
成功
</span></td>
<td><span
class=
"tag-status active"
>
启用
</span></td>
<td>
<div
class=
"schedule-actions"
>
<button
class=
"btn-text btn-edit"
data-action=
"edit"
>
编辑
</button>
<button
class=
"btn-text btn-pause"
data-action=
"pause"
>
暂停
</button>
<button
class=
"btn-text btn-detail"
data-action=
"detail"
>
详情
</button>
</div>
</td>
</tr>
</tbody>
</table>
<!-- 无任务时显示 -->
<!-- <div class="empty-state" id="empty-schedule">
<svg class="icon empty-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
<circle cx="12" cy="12" r="10"/>
<polyline points="12 6 12 12 16 14"/>
</svg>
<p class="empty-text">还没有定时任务。</p>
<p class="empty-hint">你可以创建一个定时任务,让数字员工按时间自动完成重复性工作。例如:每周一上午 9 点自动汇总周报。</p>
<button class="btn-primary" id="btn-create-first">创建第一条定时任务</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>
3
</strong>
个技能
</span>
</div>
</footer>
<!-- ==================== 新建/编辑定时任务弹窗 ==================== -->
<div
class=
"modal-overlay hidden"
id=
"modal-overlay"
></div>
<div
class=
"modal hidden"
id=
"schedule-modal"
>
<div
class=
"modal-header"
>
<h3
class=
"modal-title"
id=
"modal-title"
>
新建定时任务
</h3>
<button
class=
"btn-close"
id=
"btn-close-modal"
>
<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=
"modal-content"
>
<!-- 任务名称 -->
<div
class=
"form-group"
>
<label
class=
"form-label"
>
任务名称
<span
class=
"required"
>
*
</span></label>
<input
type=
"text"
class=
"form-input"
id=
"schedule-name"
placeholder=
"例如:每周一汇总周报"
>
<span
class=
"form-error"
id=
"error-name"
></span>
</div>
<!-- 执行内容 -->
<div
class=
"form-group"
>
<div
class=
"form-label-row"
>
<label
class=
"form-label"
>
执行内容
<span
class=
"required"
>
*
</span></label>
<button
class=
"btn-link-small"
id=
"btn-select-template"
>
<svg
class=
"icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<rect
x=
"3"
y=
"3"
width=
"7"
height=
"7"
/>
<rect
x=
"14"
y=
"3"
width=
"7"
height=
"7"
/>
<rect
x=
"14"
y=
"14"
width=
"7"
height=
"7"
/>
<rect
x=
"3"
y=
"14"
width=
"7"
height=
"7"
/>
</svg>
从模板选择
</button>
</div>
<textarea
class=
"form-textarea"
id=
"schedule-content"
rows=
"3"
placeholder=
"例如:请汇总资料库里的周报表格,并生成Excel总表。"
></textarea>
<span
class=
"form-error"
id=
"error-content"
></span>
</div>
<!-- 资料范围 -->
<div
class=
"form-group"
>
<label
class=
"form-label"
>
资料范围
<span
class=
"optional"
>
(选填)
</span></label>
<div
class=
"input-with-hint"
>
<select
class=
"form-select"
id=
"schedule-library"
>
<option
value=
""
>
请选择资料库/文件夹
</option>
<option
value=
"default"
selected
>
默认资料库
</option>
<option
value=
"custom"
>
自定义文件夹...
</option>
</select>
<span
class=
"input-hint"
>
默认使用当前资料库
</span>
</div>
</div>
<!-- 使用技能 -->
<div
class=
"form-group"
>
<label
class=
"form-label"
>
使用技能
<span
class=
"optional"
>
(选填)
</span></label>
<div
class=
"input-with-hint"
>
<select
class=
"form-select"
id=
"schedule-skill"
>
<option
value=
""
>
请选择技能
</option>
<option
value=
"table-summary"
>
表格汇总助手
</option>
<option
value=
"document-write"
>
公文写作助手
</option>
<option
value=
"meeting-notes"
>
会议纪要助手
</option>
<option
value=
"policy-query"
>
政策资料查询
</option>
<option
value=
"reminder"
>
定时提醒助手
</option>
</select>
<span
class=
"input-hint"
>
从我的技能池中选择
</span>
</div>
</div>
<!-- 重复方式 -->
<div
class=
"form-group"
>
<label
class=
"form-label"
>
重复方式
<span
class=
"required"
>
*
</span></label>
<div
class=
"radio-group-inline"
>
<label
class=
"radio-item-inline"
>
<input
type=
"radio"
name=
"repeat-type"
value=
"daily"
>
<span
class=
"radio-label"
>
每天
</span>
</label>
<label
class=
"radio-item-inline"
>
<input
type=
"radio"
name=
"repeat-type"
value=
"weekly"
checked
>
<span
class=
"radio-label"
>
每周
</span>
</label>
<label
class=
"radio-item-inline"
>
<input
type=
"radio"
name=
"repeat-type"
value=
"monthly"
>
<span
class=
"radio-label"
>
每月
</span>
</label>
<label
class=
"radio-item-inline"
>
<input
type=
"radio"
name=
"repeat-type"
value=
"custom"
>
<span
class=
"radio-label"
>
自定义
</span>
</label>
</div>
</div>
<!-- 重复配置区域 -->
<div
class=
"repeat-config"
id=
"repeat-config"
>
<!-- 每天配置 -->
<div
class=
"repeat-config-item hidden"
id=
"config-daily"
>
<label
class=
"form-label"
>
执行时间
</label>
<input
type=
"time"
class=
"form-input time-input"
id=
"daily-time"
value=
"09:00"
>
</div>
<!-- 每周配置 -->
<div
class=
"repeat-config-item"
id=
"config-weekly"
>
<label
class=
"form-label"
>
选择星期
</label>
<div
class=
"weekday-select"
>
<label
class=
"weekday-item"
>
<input
type=
"checkbox"
name=
"weekday"
value=
"1"
>
<span
class=
"weekday-label"
>
周一
</span>
</label>
<label
class=
"weekday-item"
>
<input
type=
"checkbox"
name=
"weekday"
value=
"2"
>
<span
class=
"weekday-label"
>
周二
</span>
</label>
<label
class=
"weekday-item"
>
<input
type=
"checkbox"
name=
"weekday"
value=
"3"
>
<span
class=
"weekday-label"
>
周三
</span>
</label>
<label
class=
"weekday-item"
>
<input
type=
"checkbox"
name=
"weekday"
value=
"4"
>
<span
class=
"weekday-label"
>
周四
</span>
</label>
<label
class=
"weekday-item"
>
<input
type=
"checkbox"
name=
"weekday"
value=
"5"
>
<span
class=
"weekday-label"
>
周五
</span>
</label>
<label
class=
"weekday-item"
>
<input
type=
"checkbox"
name=
"weekday"
value=
"6"
>
<span
class=
"weekday-label"
>
周六
</span>
</label>
<label
class=
"weekday-item"
>
<input
type=
"checkbox"
name=
"weekday"
value=
"0"
>
<span
class=
"weekday-label"
>
周日
</span>
</label>
</div>
<label
class=
"form-label"
>
执行时间
</label>
<input
type=
"time"
class=
"form-input time-input"
id=
"weekly-time"
value=
"09:00"
>
</div>
<!-- 每月配置 -->
<div
class=
"repeat-config-item hidden"
id=
"config-monthly"
>
<label
class=
"form-label"
>
选择日期
</label>
<select
class=
"form-select month-day-select"
id=
"monthly-day"
>
<option
value=
"1"
>
1日
</option>
<option
value=
"2"
>
2日
</option>
<option
value=
"3"
>
3日
</option>
<option
value=
"4"
>
4日
</option>
<option
value=
"5"
>
5日
</option>
<option
value=
"6"
>
6日
</option>
<option
value=
"7"
>
7日
</option>
<option
value=
"8"
>
8日
</option>
<option
value=
"9"
>
9日
</option>
<option
value=
"10"
>
10日
</option>
<option
value=
"11"
>
11日
</option>
<option
value=
"12"
>
12日
</option>
<option
value=
"13"
>
13日
</option>
<option
value=
"14"
>
14日
</option>
<option
value=
"15"
>
15日
</option>
<option
value=
"16"
>
16日
</option>
<option
value=
"17"
>
17日
</option>
<option
value=
"18"
>
18日
</option>
<option
value=
"19"
>
19日
</option>
<option
value=
"20"
>
20日
</option>
<option
value=
"21"
>
21日
</option>
<option
value=
"22"
>
22日
</option>
<option
value=
"23"
>
23日
</option>
<option
value=
"24"
>
24日
</option>
<option
value=
"25"
>
25日
</option>
<option
value=
"26"
>
26日
</option>
<option
value=
"27"
>
27日
</option>
<option
value=
"28"
>
28日
</option>
<option
value=
"29"
>
29日
</option>
<option
value=
"30"
>
30日
</option>
<option
value=
"31"
>
31日
</option>
</select>
<label
class=
"form-label"
>
执行时间
</label>
<input
type=
"time"
class=
"form-input time-input"
id=
"monthly-time"
value=
"09:00"
>
</div>
<!-- 自定义配置 -->
<div
class=
"repeat-config-item hidden"
id=
"config-custom"
>
<label
class=
"form-label"
>
选择日期和时间
</label>
<div
class=
"datetime-select"
>
<input
type=
"date"
class=
"form-input date-input"
id=
"custom-date"
>
<input
type=
"time"
class=
"form-input time-input"
id=
"custom-time"
value=
"09:00"
>
</div>
</div>
</div>
<!-- 回显文案 -->
<div
class=
"repeat-summary"
id=
"repeat-summary"
>
<svg
class=
"icon summary-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<circle
cx=
"12"
cy=
"12"
r=
"10"
/>
<polyline
points=
"12 6 12 12 16 14"
/>
</svg>
<span
class=
"summary-text"
id=
"summary-text"
>
每周 周一 09:00 执行
</span>
</div>
<!-- 结果保存位置 -->
<div
class=
"form-group"
>
<label
class=
"form-label"
>
结果保存位置
</label>
<div
class=
"result-location"
>
<svg
class=
"icon location-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>
<span>
结果文件统一保存在资料库
</span>
</div>
</div>
<!-- 启用状态 -->
<div
class=
"form-group"
>
<label
class=
"form-label"
>
启用状态
</label>
<label
class=
"switch"
>
<input
type=
"checkbox"
id=
"schedule-enabled"
checked
>
<span
class=
"switch-slider"
></span>
</label>
<span
class=
"switch-label"
id=
"switch-label"
>
已启用
</span>
</div>
</div>
<div
class=
"modal-footer"
>
<button
class=
"btn-secondary"
id=
"btn-cancel-modal"
>
取消
</button>
<button
class=
"btn-primary"
id=
"btn-save-schedule"
>
保存
</button>
</div>
</div>
<!-- ==================== 详情抽屉 ==================== -->
<div
class=
"drawer-overlay"
id=
"drawer-overlay"
></div>
<aside
class=
"drawer schedule-drawer"
id=
"schedule-drawer"
>
<div
class=
"drawer-header"
>
<div
class=
"drawer-title"
>
<span
class=
"drawer-schedule-name"
id=
"drawer-name"
>
每周一汇总周报
</span>
<span
class=
"drawer-schedule-status"
>
<span
class=
"tag-status active"
id=
"drawer-status"
>
启用
</span>
</span>
</div>
<button
class=
"btn-close"
id=
"btn-close-drawer"
>
<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=
"drawer-section"
>
<h4
class=
"section-label"
>
执行内容
</h4>
<div
class=
"schedule-detail-content"
id=
"detail-content"
>
汇总资料库里的周报表格,并生成Excel总表。
</div>
</div>
<!-- 资料范围 -->
<div
class=
"drawer-section"
>
<h4
class=
"section-label"
>
资料范围
</h4>
<div
class=
"detail-row"
>
<span
class=
"detail-value"
>
默认资料库
</span>
</div>
</div>
<!-- 使用技能 -->
<div
class=
"drawer-section"
>
<h4
class=
"section-label"
>
使用技能
</h4>
<div
class=
"detail-row"
>
<span
class=
"detail-value"
>
表格汇总助手
</span>
</div>
</div>
<!-- 重复规则 -->
<div
class=
"drawer-section"
>
<h4
class=
"section-label"
>
重复规则
</h4>
<div
class=
"detail-row"
>
<span
class=
"detail-value"
id=
"detail-repeat"
>
每周一 09:00
</span>
</div>
</div>
<!-- 下次执行 -->
<div
class=
"drawer-section"
>
<h4
class=
"section-label"
>
下次执行
</h4>
<div
class=
"detail-row"
>
<span
class=
"detail-value"
id=
"detail-next"
>
2026-08-10 09:00
</span>
</div>
</div>
<!-- 最近执行记录 -->
<div
class=
"drawer-section"
>
<h4
class=
"section-label"
>
最近执行记录
</h4>
<div
class=
"execution-history"
>
<!-- 记录1 -->
<div
class=
"execution-item"
>
<div
class=
"execution-info"
>
<svg
class=
"icon execution-icon success"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<polyline
points=
"20 6 9 17 4 12"
/>
</svg>
<span
class=
"execution-time"
>
2026-08-03 09:00
</span>
<span
class=
"execution-result success"
>
成功
</span>
</div>
<button
class=
"btn-link btn-view-result"
>
查看结果
</button>
</div>
<!-- 记录2 -->
<div
class=
"execution-item"
>
<div
class=
"execution-info"
>
<svg
class=
"icon execution-icon success"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<polyline
points=
"20 6 9 17 4 12"
/>
</svg>
<span
class=
"execution-time"
>
2026-07-27 09:00
</span>
<span
class=
"execution-result success"
>
成功
</span>
</div>
<button
class=
"btn-link btn-view-result"
>
查看结果
</button>
</div>
<!-- 记录3 -->
<div
class=
"execution-item failed"
>
<div
class=
"execution-info"
>
<svg
class=
"icon execution-icon failed"
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>
<span
class=
"execution-time"
>
2026-07-20 09:00
</span>
<span
class=
"execution-result failed"
>
失败
</span>
</div>
<div
class=
"failed-actions"
>
<button
class=
"btn-link btn-view-reason"
>
查看原因
</button>
<button
class=
"btn-link btn-retry-record"
>
重试
</button>
</div>
</div>
</div>
</div>
</div>
<div
class=
"drawer-footer"
>
<button
class=
"btn-secondary"
id=
"btn-edit-schedule"
>
<svg
class=
"icon btn-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<path
d=
"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"
/>
<path
d=
"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"
/>
</svg>
编辑
</button>
<button
class=
"btn-secondary"
id=
"btn-pause-schedule"
>
<svg
class=
"icon btn-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<rect
x=
"6"
y=
"4"
width=
"4"
height=
"16"
/>
<rect
x=
"14"
y=
"4"
width=
"4"
height=
"16"
/>
</svg>
暂停
</button>
<button
class=
"btn-secondary"
id=
"btn-run-now"
>
<svg
class=
"icon btn-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<polygon
points=
"5 3 19 12 5 21 5 3"
/>
</svg>
立即执行一次
</button>
<button
class=
"btn-danger"
id=
"btn-delete-schedule"
>
<svg
class=
"icon btn-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<polyline
points=
"3 6 5 6 21 6"
/>
<path
d=
"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"
/>
</svg>
删除
</button>
</div>
</aside>
<!-- ==================== 删除确认弹窗 ==================== -->
<div
class=
"confirm-dialog-overlay hidden"
id=
"confirm-overlay"
></div>
<div
class=
"confirm-dialog hidden"
id=
"confirm-dialog"
>
<div
class=
"confirm-dialog-content"
>
<svg
class=
"icon confirm-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-title"
>
确定删除定时任务?
</p>
<p
class=
"confirm-message"
id=
"confirm-message"
>
删除后,该任务将不再自动执行。确定删除「每周一汇总周报」吗?
</p>
</div>
<div
class=
"confirm-dialog-footer"
>
<button
class=
"btn-secondary"
id=
"btn-cancel-delete"
>
取消
</button>
<button
class=
"btn-danger"
id=
"btn-confirm-delete"
>
删除
</button>
</div>
</div>
<!-- ==================== JavaScript ==================== -->
<script>
// 星期中文映射
const
weekdayNames
=
[
'周日'
,
'周一'
,
'周二'
,
'周三'
,
'周四'
,
'周五'
,
'周六'
];
const
weekdayShortNames
=
[
'周日'
,
'周一'
,
'周二'
,
'周三'
,
'周四'
,
'周五'
,
'周六'
];
// 当前编辑的任务ID
let
currentScheduleId
=
null
;
let
isEditMode
=
false
;
// 新建定时任务按钮
document
.
getElementById
(
'btn-new-schedule'
).
addEventListener
(
'click'
,
function
()
{
isEditMode
=
false
;
currentScheduleId
=
null
;
document
.
getElementById
(
'modal-title'
).
textContent
=
'新建定时任务'
;
resetForm
();
openModal
();
});
// 重置表单
function
resetForm
()
{
document
.
getElementById
(
'schedule-name'
).
value
=
''
;
document
.
getElementById
(
'schedule-content'
).
value
=
''
;
document
.
getElementById
(
'schedule-library'
).
value
=
'default'
;
document
.
getElementById
(
'schedule-skill'
).
value
=
''
;
document
.
getElementById
(
'schedule-enabled'
).
checked
=
true
;
document
.
getElementById
(
'switch-label'
).
textContent
=
'已启用'
;
document
.
querySelectorAll
(
'input[name="repeat-type"]'
)[
1
].
checked
=
true
;
// 默认选中每周
document
.
querySelectorAll
(
'input[name="weekday"]'
)[
0
].
checked
=
true
;
// 默认选中周一
document
.
getElementById
(
'weekly-time'
).
value
=
'09:00'
;
document
.
querySelectorAll
(
'.form-error'
).
forEach
(
e
=>
e
.
textContent
=
''
);
updateRepeatSummary
();
}
// 打开弹窗
function
openModal
()
{
document
.
getElementById
(
'modal-overlay'
).
classList
.
remove
(
'hidden'
);
document
.
getElementById
(
'schedule-modal'
).
classList
.
remove
(
'hidden'
);
}
// 关闭弹窗
function
closeModal
()
{
document
.
getElementById
(
'modal-overlay'
).
classList
.
add
(
'hidden'
);
document
.
getElementById
(
'schedule-modal'
).
classList
.
add
(
'hidden'
);
}
document
.
getElementById
(
'btn-close-modal'
).
addEventListener
(
'click'
,
closeModal
);
document
.
getElementById
(
'btn-cancel-modal'
).
addEventListener
(
'click'
,
closeModal
);
document
.
getElementById
(
'modal-overlay'
).
addEventListener
(
'click'
,
closeModal
);
// 重复方式切换
document
.
querySelectorAll
(
'input[name="repeat-type"]'
).
forEach
(
radio
=>
{
radio
.
addEventListener
(
'change'
,
function
()
{
const
type
=
this
.
value
;
document
.
querySelectorAll
(
'.repeat-config-item'
).
forEach
(
item
=>
{
item
.
classList
.
add
(
'hidden'
);
});
document
.
getElementById
(
'config-'
+
type
).
classList
.
remove
(
'hidden'
);
updateRepeatSummary
();
});
});
// 星期选择变化
document
.
querySelectorAll
(
'input[name="weekday"]'
).
forEach
(
checkbox
=>
{
checkbox
.
addEventListener
(
'change'
,
updateRepeatSummary
);
});
// 时间选择变化
document
.
querySelectorAll
(
'input[type="time"]'
).
forEach
(
input
=>
{
input
.
addEventListener
(
'change'
,
updateRepeatSummary
);
});
// 日期选择变化
document
.
getElementById
(
'custom-date'
).
addEventListener
(
'change'
,
updateRepeatSummary
);
// 月份日期选择变化
document
.
getElementById
(
'monthly-day'
).
addEventListener
(
'change'
,
updateRepeatSummary
);
// 更新重复规则回显
function
updateRepeatSummary
()
{
const
type
=
document
.
querySelector
(
'input[name="repeat-type"]:checked'
).
value
;
let
summary
=
''
;
switch
(
type
)
{
case
'daily'
:
const
dailyTime
=
document
.
getElementById
(
'daily-time'
).
value
;
summary
=
`每天
${
dailyTime
}
执行`
;
break
;
case
'weekly'
:
const
weeklyTime
=
document
.
getElementById
(
'weekly-time'
).
value
;
const
selectedDays
=
[];
document
.
querySelectorAll
(
'input[name="weekday"]:checked'
).
forEach
(
cb
=>
{
selectedDays
.
push
(
weekdayShortNames
[
parseInt
(
cb
.
value
)]);
});
const
daysText
=
selectedDays
.
length
>
0
?
selectedDays
.
join
(
'、'
)
:
'未选择'
;
summary
=
`每周
${
daysText
}
${
weeklyTime
}
执行`
;
break
;
case
'monthly'
:
const
monthlyTime
=
document
.
getElementById
(
'monthly-time'
).
value
;
const
day
=
document
.
getElementById
(
'monthly-day'
).
value
;
summary
=
`每月
${
day
}
${
monthlyTime
}
执行`
;
break
;
case
'custom'
:
const
customDate
=
document
.
getElementById
(
'custom-date'
).
value
;
const
customTime
=
document
.
getElementById
(
'custom-time'
).
value
;
if
(
customDate
)
{
summary
=
`
${
customDate
}
${
customTime
}
执行`
;
}
else
{
summary
=
'请选择日期和时间'
;
}
break
;
}
document
.
getElementById
(
'summary-text'
).
textContent
=
summary
;
}
// 启用状态开关
document
.
getElementById
(
'schedule-enabled'
).
addEventListener
(
'change'
,
function
()
{
document
.
getElementById
(
'switch-label'
).
textContent
=
this
.
checked
?
'已启用'
:
'已暂停'
;
});
// 保存定时任务
document
.
getElementById
(
'btn-save-schedule'
).
addEventListener
(
'click'
,
function
()
{
let
hasError
=
false
;
const
name
=
document
.
getElementById
(
'schedule-name'
).
value
.
trim
();
const
content
=
document
.
getElementById
(
'schedule-content'
).
value
.
trim
();
document
.
querySelectorAll
(
'.form-error'
).
forEach
(
e
=>
e
.
textContent
=
''
);
if
(
!
name
)
{
document
.
getElementById
(
'error-name'
).
textContent
=
'请填写任务名称。'
;
hasError
=
true
;
}
if
(
!
content
)
{
document
.
getElementById
(
'error-content'
).
textContent
=
'请填写执行内容,数字员工将按此内容执行工作。'
;
hasError
=
true
;
}
if
(
hasError
)
return
;
// 保存成功
alert
(
isEditMode
?
'定时任务已更新!'
:
'定时任务已创建!'
);
closeModal
();
});
// 从模板选择
document
.
getElementById
(
'btn-select-template'
).
addEventListener
(
'click'
,
function
()
{
const
templates
=
[
'请汇总资料库里的周报表格,并生成Excel总表。'
,
'请帮我整理本周的会议纪要,提取要点和待办事项。'
,
'请帮我撰写本周的工作总结,包括主要工作、存在问题和下周计划。'
,
'请查询最近出台的与小微企业相关的扶持政策,并总结要点。'
];
const
choice
=
prompt
(
'请选择模板(输入数字):
\
n'
+
templates
.
map
((
t
,
i
)
=>
`
${
i
+
1
}
.
${
t
.
substring
(
0
,
30
)}
...`
).
join
(
'
\
n'
));
if
(
choice
&&
parseInt
(
choice
)
>=
1
&&
parseInt
(
choice
)
<=
templates
.
length
)
{
document
.
getElementById
(
'schedule-content'
).
value
=
templates
[
parseInt
(
choice
)
-
1
];
}
});
// 编辑定时任务
document
.
querySelectorAll
(
'.btn-edit'
).
forEach
(
btn
=>
{
btn
.
addEventListener
(
'click'
,
function
(
e
)
{
e
.
stopPropagation
();
const
row
=
this
.
closest
(
'.schedule-row'
);
const
name
=
row
.
querySelector
(
'.schedule-name-cell'
).
textContent
.
trim
();
isEditMode
=
true
;
document
.
getElementById
(
'modal-title'
).
textContent
=
'编辑定时任务'
;
document
.
getElementById
(
'schedule-name'
).
value
=
name
;
openModal
();
});
});
// 暂停定时任务
document
.
querySelectorAll
(
'.btn-pause'
).
forEach
(
btn
=>
{
btn
.
addEventListener
(
'click'
,
function
(
e
)
{
e
.
stopPropagation
();
const
row
=
this
.
closest
(
'.schedule-row'
);
const
statusBadge
=
row
.
querySelector
(
'.tag-status'
);
const
pauseBtn
=
this
;
if
(
statusBadge
.
classList
.
contains
(
'active'
))
{
// 暂停
statusBadge
.
classList
.
remove
(
'active'
);
statusBadge
.
classList
.
add
(
'paused'
);
statusBadge
.
textContent
=
'暂停'
;
pauseBtn
.
textContent
=
'启用'
;
}
else
{
// 启用
statusBadge
.
classList
.
add
(
'active'
);
statusBadge
.
classList
.
remove
(
'paused'
);
statusBadge
.
textContent
=
'启用'
;
pauseBtn
.
textContent
=
'暂停'
;
}
});
});
// 查看详情
document
.
querySelectorAll
(
'.btn-detail'
).
forEach
(
btn
=>
{
btn
.
addEventListener
(
'click'
,
function
(
e
)
{
e
.
stopPropagation
();
openDrawer
();
});
});
// 打开详情抽屉
function
openDrawer
()
{
document
.
getElementById
(
'drawer-overlay'
).
classList
.
add
(
'active'
);
document
.
getElementById
(
'schedule-drawer'
).
classList
.
add
(
'open'
);
}
// 关闭详情抽屉
function
closeDrawer
()
{
document
.
getElementById
(
'drawer-overlay'
).
classList
.
remove
(
'active'
);
document
.
getElementById
(
'schedule-drawer'
).
classList
.
remove
(
'open'
);
}
document
.
getElementById
(
'btn-close-drawer'
).
addEventListener
(
'click'
,
closeDrawer
);
document
.
getElementById
(
'drawer-overlay'
).
addEventListener
(
'click'
,
closeDrawer
);
// 编辑按钮
document
.
getElementById
(
'btn-edit-schedule'
).
addEventListener
(
'click'
,
function
()
{
closeDrawer
();
isEditMode
=
true
;
document
.
getElementById
(
'modal-title'
).
textContent
=
'编辑定时任务'
;
document
.
getElementById
(
'schedule-name'
).
value
=
'每周一汇总周报'
;
openModal
();
});
// 暂停按钮
document
.
getElementById
(
'btn-pause-schedule'
).
addEventListener
(
'click'
,
function
()
{
const
statusBadge
=
document
.
getElementById
(
'drawer-status'
);
if
(
statusBadge
.
classList
.
contains
(
'active'
))
{
statusBadge
.
classList
.
remove
(
'active'
);
statusBadge
.
classList
.
add
(
'paused'
);
statusBadge
.
textContent
=
'暂停'
;
this
.
innerHTML
=
`
<svg class="icon btn-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<polygon points="5 3 19 12 5 21 5 3"/>
</svg>
启用
`
;
alert
(
'定时任务已暂停'
);
}
else
{
statusBadge
.
classList
.
add
(
'active'
);
statusBadge
.
classList
.
remove
(
'paused'
);
statusBadge
.
textContent
=
'启用'
;
this
.
innerHTML
=
`
<svg class="icon btn-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="6" y="4" width="4" height="16"/>
<rect x="14" y="4" width="4" height="16"/>
</svg>
暂停
`
;
alert
(
'定时任务已启用'
);
}
});
// 立即执行
document
.
getElementById
(
'btn-run-now'
).
addEventListener
(
'click'
,
function
()
{
alert
(
'任务已开始执行,请稍候在任务中心查看结果'
);
closeDrawer
();
});
// 删除按钮
document
.
getElementById
(
'btn-delete-schedule'
).
addEventListener
(
'click'
,
function
()
{
const
name
=
document
.
getElementById
(
'drawer-name'
).
textContent
;
document
.
getElementById
(
'confirm-message'
).
textContent
=
`删除后,该任务将不再自动执行。确定删除「
${
name
}
」吗?`
;
openConfirmDialog
();
});
// 打开确认弹窗
function
openConfirmDialog
()
{
document
.
getElementById
(
'confirm-overlay'
).
classList
.
remove
(
'hidden'
);
document
.
getElementById
(
'confirm-dialog'
).
classList
.
remove
(
'hidden'
);
}
// 关闭确认弹窗
function
closeConfirmDialog
()
{
document
.
getElementById
(
'confirm-overlay'
).
classList
.
add
(
'hidden'
);
document
.
getElementById
(
'confirm-dialog'
).
classList
.
add
(
'hidden'
);
}
document
.
getElementById
(
'btn-cancel-delete'
).
addEventListener
(
'click'
,
closeConfirmDialog
);
document
.
getElementById
(
'confirm-overlay'
).
addEventListener
(
'click'
,
closeConfirmDialog
);
// 确认删除
document
.
getElementById
(
'btn-confirm-delete'
).
addEventListener
(
'click'
,
function
()
{
closeConfirmDialog
();
closeDrawer
();
alert
(
'定时任务已删除'
);
});
// 查看结果
document
.
querySelectorAll
(
'.btn-view-result'
).
forEach
(
btn
=>
{
btn
.
addEventListener
(
'click'
,
function
(
e
)
{
e
.
stopPropagation
();
alert
(
'将打开结果文件'
);
});
});
// 查看原因
document
.
querySelectorAll
(
'.btn-view-reason'
).
forEach
(
btn
=>
{
btn
.
addEventListener
(
'click'
,
function
(
e
)
{
e
.
stopPropagation
();
alert
(
'本次定时任务执行失败,可能原因是资料库文件缺失或服务暂时不可用。'
);
});
});
// 重试记录
document
.
querySelectorAll
(
'.btn-retry-record'
).
forEach
(
btn
=>
{
btn
.
addEventListener
(
'click'
,
function
(
e
)
{
e
.
stopPropagation
();
alert
(
'任务已重新执行,请稍候'
);
});
});
// 刷新按钮
document
.
getElementById
(
'btn-refresh'
).
addEventListener
(
'click'
,
function
()
{
alert
(
'刷新定时任务列表'
);
});
// 创建第一条定时任务
// document.getElementById('btn-create-first').addEventListener('click', function() {
// openModal();
// });
// 导航跳转
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
;
}
});
});
// 初始化
updateRepeatSummary
();
</script>
</body>
</html>
pages/templates.html
浏览文件 @
b4f2978b
<!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"
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 active"
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-templates"
>
<!-- 页面顶部说明 -->
<div
class=
"page-header"
>
<h1
class=
"page-title"
>
模板中心
</h1>
<p
class=
"page-description"
>
模板中心提供常用办公任务示例。你可以选择模板,修改关键信息后发送给数字员工。
</p>
</div>
<!-- 搜索框 -->
<div
class=
"search-bar"
>
<svg
class=
"icon search-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
stroke-linecap=
"round"
stroke-linejoin=
"round"
>
<circle
cx=
"11"
cy=
"11"
r=
"8"
/>
<line
x1=
"21"
y1=
"21"
x2=
"16.65"
y2=
"16.65"
/>
</svg>
<input
type=
"text"
class=
"search-input"
id=
"search-input"
placeholder=
"搜索模板"
>
</div>
<!-- 分类筛选 -->
<div
class=
"category-filter"
>
<button
class=
"category-item active"
data-category=
"all"
>
全部
</button>
<button
class=
"category-item"
data-category=
"document"
>
公文写作
</button>
<button
class=
"category-item"
data-category=
"meeting"
>
会议纪要
</button>
<button
class=
"category-item"
data-category=
"table"
>
表格汇总
</button>
<button
class=
"category-item"
data-category=
"policy"
>
资料查询
</button>
<button
class=
"category-item"
data-category=
"reminder"
>
行政提醒
</button>
<button
class=
"category-item"
data-category=
"hr"
>
人事辅助
</button>
<button
class=
"category-item"
data-category=
"file"
>
文件处理
</button>
<button
class=
"category-item"
data-category=
"my"
>
我的模板
</button>
</div>
<!-- 模板卡片网格 -->
<div
class=
"template-grid"
id=
"template-grid"
>
<!-- 模板1:工作总结 -->
<div
class=
"template-card"
data-template=
"t1"
data-category=
"document"
>
<div
class=
"template-card-icon"
>
<svg
class=
"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"
/>
<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>
</div>
<h3
class=
"template-name"
>
工作总结模板
</h3>
<p
class=
"template-desc"
>
生成工作总结初稿
</p>
<div
class=
"template-scene"
>
<span
class=
"scene-label"
>
适用场景:
</span>
<span
class=
"scene-text"
>
本周工作总结、部门月报、个人总结
</span>
</div>
<div
class=
"template-tags"
>
<span
class=
"tag-source"
>
系统推荐
</span>
<span
class=
"tag-category"
>
公文写作
</span>
</div>
<div
class=
"template-actions"
>
<button
class=
"btn-preview"
data-action=
"preview"
data-template=
"t1"
>
<svg
class=
"icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<path
d=
"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"
/>
<circle
cx=
"12"
cy=
"12"
r=
"3"
/>
</svg>
预览模板
</button>
<button
class=
"btn-use-template"
data-action=
"use"
data-template=
"t1"
>
<svg
class=
"icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<polyline
points=
"9 18 15 12 9 6"
/>
</svg>
使用模板
</button>
</div>
</div>
<!-- 模板2:通知撰写 -->
<div
class=
"template-card"
data-template=
"t2"
data-category=
"document"
>
<div
class=
"template-card-icon"
>
<svg
class=
"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"
/>
<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>
</div>
<h3
class=
"template-name"
>
通知撰写模板
</h3>
<p
class=
"template-desc"
>
生成通知、通报初稿
</p>
<div
class=
"template-scene"
>
<span
class=
"scene-label"
>
适用场景:
</span>
<span
class=
"scene-text"
>
会议通知、活动通知、情况通报
</span>
</div>
<div
class=
"template-tags"
>
<span
class=
"tag-source"
>
系统推荐
</span>
<span
class=
"tag-category"
>
公文写作
</span>
</div>
<div
class=
"template-actions"
>
<button
class=
"btn-preview"
data-action=
"preview"
data-template=
"t2"
>
<svg
class=
"icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<path
d=
"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"
/>
<circle
cx=
"12"
cy=
"12"
r=
"3"
/>
</svg>
预览模板
</button>
<button
class=
"btn-use-template"
data-action=
"use"
data-template=
"t2"
>
<svg
class=
"icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<polyline
points=
"9 18 15 12 9 6"
/>
</svg>
使用模板
</button>
</div>
</div>
<!-- 模板3:会议纪要 -->
<div
class=
"template-card"
data-template=
"t3"
data-category=
"meeting"
>
<div
class=
"template-card-icon"
>
<svg
class=
"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>
<h3
class=
"template-name"
>
会议纪要模板
</h3>
<p
class=
"template-desc"
>
整理会议要点和待办
</p>
<div
class=
"template-scene"
>
<span
class=
"scene-label"
>
适用场景:
</span>
<span
class=
"scene-text"
>
工作会议、座谈会、评审会议
</span>
</div>
<div
class=
"template-tags"
>
<span
class=
"tag-source"
>
系统推荐
</span>
<span
class=
"tag-category"
>
会议纪要
</span>
</div>
<div
class=
"template-actions"
>
<button
class=
"btn-preview"
data-action=
"preview"
data-template=
"t3"
>
<svg
class=
"icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<path
d=
"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"
/>
<circle
cx=
"12"
cy=
"12"
r=
"3"
/>
</svg>
预览模板
</button>
<button
class=
"btn-use-template"
data-action=
"use"
data-template=
"t3"
>
<svg
class=
"icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<polyline
points=
"9 18 15 12 9 6"
/>
</svg>
使用模板
</button>
</div>
</div>
<!-- 模板4:表格汇总 -->
<div
class=
"template-card"
data-template=
"t4"
data-category=
"table"
>
<div
class=
"template-card-icon"
>
<svg
class=
"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>
<h3
class=
"template-name"
>
表格汇总模板
</h3>
<p
class=
"template-desc"
>
多份表格合并成总表
</p>
<div
class=
"template-scene"
>
<span
class=
"scene-label"
>
适用场景:
</span>
<span
class=
"scene-text"
>
周报汇总、台账统计、多部门表格合并
</span>
</div>
<div
class=
"template-tags"
>
<span
class=
"tag-source"
>
系统推荐
</span>
<span
class=
"tag-category"
>
表格汇总
</span>
</div>
<div
class=
"template-actions"
>
<button
class=
"btn-preview"
data-action=
"preview"
data-template=
"t4"
>
<svg
class=
"icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<path
d=
"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"
/>
<circle
cx=
"12"
cy=
"12"
r=
"3"
/>
</svg>
预览模板
</button>
<button
class=
"btn-use-template"
data-action=
"use"
data-template=
"t4"
>
<svg
class=
"icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<polyline
points=
"9 18 15 12 9 6"
/>
</svg>
使用模板
</button>
</div>
</div>
<!-- 模板5:政策资料查询 -->
<div
class=
"template-card"
data-template=
"t5"
data-category=
"policy"
>
<div
class=
"template-card-icon"
>
<svg
class=
"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>
<h3
class=
"template-name"
>
政策资料查询模板
</h3>
<p
class=
"template-desc"
>
总结公开政策要点
</p>
<div
class=
"template-scene"
>
<span
class=
"scene-label"
>
适用场景:
</span>
<span
class=
"scene-text"
>
最新政策查询、政策对比、政策解读
</span>
</div>
<div
class=
"template-tags"
>
<span
class=
"tag-source"
>
系统推荐
</span>
<span
class=
"tag-category"
>
资料查询
</span>
</div>
<div
class=
"template-actions"
>
<button
class=
"btn-preview"
data-action=
"preview"
data-template=
"t5"
>
<svg
class=
"icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<path
d=
"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"
/>
<circle
cx=
"12"
cy=
"12"
r=
"3"
/>
</svg>
预览模板
</button>
<button
class=
"btn-use-template"
data-action=
"use"
data-template=
"t5"
>
<svg
class=
"icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<polyline
points=
"9 18 15 12 9 6"
/>
</svg>
使用模板
</button>
</div>
</div>
<!-- 模板6:材料提交提醒 -->
<div
class=
"template-card"
data-template=
"t6"
data-category=
"reminder"
>
<div
class=
"template-card-icon"
>
<svg
class=
"icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<path
d=
"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"
/>
<path
d=
"M13.73 21a2 2 0 0 1-3.46 0"
/>
</svg>
</div>
<h3
class=
"template-name"
>
材料提交提醒模板
</h3>
<p
class=
"template-desc"
>
创建周期性提交提醒
</p>
<div
class=
"template-scene"
>
<span
class=
"scene-label"
>
适用场景:
</span>
<span
class=
"scene-text"
>
月度报表提交、季度总结提交
</span>
</div>
<div
class=
"template-tags"
>
<span
class=
"tag-source admin"
>
管理员添加
</span>
<span
class=
"tag-category"
>
行政提醒
</span>
</div>
<div
class=
"template-actions"
>
<button
class=
"btn-preview"
data-action=
"preview"
data-template=
"t6"
>
<svg
class=
"icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<path
d=
"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"
/>
<circle
cx=
"12"
cy=
"12"
r=
"3"
/>
</svg>
预览模板
</button>
<button
class=
"btn-use-template"
data-action=
"use"
data-template=
"t6"
>
<svg
class=
"icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<polyline
points=
"9 18 15 12 9 6"
/>
</svg>
使用模板
</button>
</div>
</div>
<!-- 模板7:简历汇总 -->
<div
class=
"template-card"
data-template=
"t7"
data-category=
"hr"
>
<div
class=
"template-card-icon"
>
<svg
class=
"icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<path
d=
"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"
/>
<circle
cx=
"12"
cy=
"7"
r=
"4"
/>
</svg>
</div>
<h3
class=
"template-name"
>
简历汇总模板
</h3>
<p
class=
"template-desc"
>
提取候选人关键信息
</p>
<div
class=
"template-scene"
>
<span
class=
"scene-label"
>
适用场景:
</span>
<span
class=
"scene-text"
>
招聘筛选、简历对比、面试准备
</span>
</div>
<div
class=
"template-tags"
>
<span
class=
"tag-source admin"
>
管理员添加
</span>
<span
class=
"tag-category"
>
人事辅助
</span>
</div>
<div
class=
"template-actions"
>
<button
class=
"btn-preview"
data-action=
"preview"
data-template=
"t7"
>
<svg
class=
"icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<path
d=
"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"
/>
<circle
cx=
"12"
cy=
"12"
r=
"3"
/>
</svg>
预览模板
</button>
<button
class=
"btn-use-template"
data-action=
"use"
data-template=
"t7"
>
<svg
class=
"icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<polyline
points=
"9 18 15 12 9 6"
/>
</svg>
使用模板
</button>
</div>
</div>
<!-- 模板8:文件摘要 -->
<div
class=
"template-card"
data-template=
"t8"
data-category=
"file"
>
<div
class=
"template-card-icon"
>
<svg
class=
"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>
<h3
class=
"template-name"
>
文件摘要模板
</h3>
<p
class=
"template-desc"
>
提取多份文件要点
</p>
<div
class=
"template-scene"
>
<span
class=
"scene-label"
>
适用场景:
</span>
<span
class=
"scene-text"
>
长文阅读、材料研读、文件对比
</span>
</div>
<div
class=
"template-tags"
>
<span
class=
"tag-source"
>
系统推荐
</span>
<span
class=
"tag-category"
>
文件处理
</span>
</div>
<div
class=
"template-actions"
>
<button
class=
"btn-preview"
data-action=
"preview"
data-template=
"t8"
>
<svg
class=
"icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<path
d=
"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"
/>
<circle
cx=
"12"
cy=
"12"
r=
"3"
/>
</svg>
预览模板
</button>
<button
class=
"btn-use-template"
data-action=
"use"
data-template=
"t8"
>
<svg
class=
"icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<polyline
points=
"9 18 15 12 9 6"
/>
</svg>
使用模板
</button>
</div>
</div>
<!-- 模板9:综合科周报模板(我的模板) -->
<!-- 我的模板分类下显示,对话中结果内容可通过"存为模板"保存后出现在这里。 -->
<div
class=
"template-card hidden"
data-template=
"t9"
data-category=
"my"
>
<div
class=
"template-card-icon"
>
<svg
class=
"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>
<h3
class=
"template-name"
>
综合科周报模板
</h3>
<p
class=
"template-desc"
>
综合科周报自动生成
</p>
<div
class=
"template-scene"
>
<span
class=
"scene-label"
>
适用场景:
</span>
<span
class=
"scene-text"
>
综合科日常工作汇报
</span>
</div>
<div
class=
"template-tags"
>
<span
class=
"tag-source user"
>
用户自建
</span>
<span
class=
"tag-category"
>
公文写作
</span>
</div>
<div
class=
"template-actions"
>
<button
class=
"btn-preview"
data-action=
"preview"
data-template=
"t9"
>
<svg
class=
"icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<path
d=
"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"
/>
<circle
cx=
"12"
cy=
"12"
r=
"3"
/>
</svg>
预览模板
</button>
<button
class=
"btn-use-template"
data-action=
"use"
data-template=
"t9"
>
<svg
class=
"icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<polyline
points=
"9 18 15 12 9 6"
/>
</svg>
使用模板
</button>
</div>
</div>
</div>
<!-- 搜索无结果空态 -->
<div
class=
"empty-state hidden"
id=
"empty-template"
>
<svg
class=
"icon empty-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"1.5"
>
<circle
cx=
"11"
cy=
"11"
r=
"8"
/>
<line
x1=
"21"
y1=
"21"
x2=
"16.65"
y2=
"16.65"
/>
</svg>
<p
class=
"empty-text"
>
没有找到相关模板。
</p>
<p
class=
"empty-hint"
>
你可以更换关键词,或直接在"新建对话"中输入任务。
</p>
</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>
3
</strong>
个技能
</span>
</div>
</footer>
<!-- ==================== 模板详情抽屉 ==================== -->
<div
class=
"drawer-overlay"
id=
"drawer-overlay"
></div>
<aside
class=
"drawer template-drawer"
id=
"template-drawer"
>
<div
class=
"drawer-header"
>
<div
class=
"drawer-title"
>
<span
class=
"drawer-template-name"
id=
"drawer-name"
>
工作总结模板
</span>
<span
class=
"drawer-template-meta"
id=
"drawer-meta"
>
公文写作 · 系统推荐
</span>
</div>
<button
class=
"btn-close"
id=
"btn-close-drawer"
>
<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=
"drawer-section"
>
<h4
class=
"section-label"
>
适用场景
</h4>
<p
class=
"drawer-text"
id=
"drawer-scene"
>
本周工作总结、部门月报、个人总结
</p>
</div>
<!-- 模板内容 -->
<div
class=
"drawer-section"
>
<h4
class=
"section-label"
>
模板内容
</h4>
<div
class=
"template-content-box"
id=
"drawer-content"
>
请帮我写一份工作总结,内容包括:
<br>
1.本周主要工作;
<br>
2.工作进展;
<br>
3.存在问题;
<br>
4.下周计划。
</div>
</div>
<!-- 相关信息(变量) -->
<div
class=
"drawer-section"
>
<h4
class=
"section-label"
>
相关信息(可填写项)
</h4>
<div
class=
"variable-list"
>
<span
class=
"variable-tag"
>
部门
<span
class=
"variable-name"
>
{部门}
</span></span>
<span
class=
"variable-tag"
>
时间范围
<span
class=
"variable-name"
>
{时间范围}
</span></span>
<span
class=
"variable-tag"
>
主要工作
<span
class=
"variable-name"
>
{主要工作}
</span></span>
</div>
</div>
<!-- 使用说明 -->
<div
class=
"drawer-section"
>
<div
class=
"usage-tip"
>
<svg
class=
"icon tip-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<circle
cx=
"12"
cy=
"12"
r=
"10"
/>
<line
x1=
"12"
y1=
"16"
x2=
"12"
y2=
"12"
/>
<line
x1=
"12"
y1=
"8"
x2=
"12.01"
y2=
"8"
/>
</svg>
<p>
点击"使用模板"后,请在对话中补充你的实际信息。
</p>
</div>
</div>
</div>
<div
class=
"drawer-footer"
>
<button
class=
"btn-secondary"
id=
"btn-copy-template"
>
<svg
class=
"icon btn-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<rect
x=
"9"
y=
"9"
width=
"13"
height=
"13"
rx=
"2"
ry=
"2"
/>
<path
d=
"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"
/>
</svg>
复制内容
</button>
<button
class=
"btn-primary"
id=
"btn-use-now"
>
<svg
class=
"icon btn-icon"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
>
<polyline
points=
"9 18 15 12 9 6"
/>
</svg>
使用模板
</button>
</div>
</aside>
<!-- ==================== JavaScript ==================== -->
<script>
// 模板数据
const
templatesData
=
{
't1'
:
{
name
:
'工作总结模板'
,
meta
:
'公文写作 · 系统推荐'
,
scene
:
'本周工作总结、部门月报、个人总结'
,
content
:
'请帮我写一份工作总结,内容包括:<br>1.本周主要工作;<br>2.工作进展;<br>3.存在问题;<br>4.下周计划。'
,
variables
:
[
'部门'
,
'时间范围'
,
'主要工作'
]
},
't2'
:
{
name
:
'通知撰写模板'
,
meta
:
'公文写作 · 系统推荐'
,
scene
:
'会议通知、活动通知、情况通报'
,
content
:
'请帮我撰写一份通知,包含以下信息:<br>1.通知标题;<br>2.通知对象;<br>3.主要事项;<br>4.时间地点要求。'
,
variables
:
[
'通知类型'
,
'通知对象'
,
'时间'
,
'地点'
]
},
't3'
:
{
name
:
'会议纪要模板'
,
meta
:
'会议纪要 · 系统推荐'
,
scene
:
'工作会议、座谈会、评审会议'
,
content
:
'请帮我整理会议纪要,包括:<br>1.会议主题;<br>2.参会人员;<br>3.讨论事项;<br>4.会议决议;<br>5.待办任务。'
,
variables
:
[
'会议名称'
,
'会议时间'
,
'参会人员'
]
},
't4'
:
{
name
:
'表格汇总模板'
,
meta
:
'表格汇总 · 系统推荐'
,
scene
:
'周报汇总、台账统计、多部门表格合并'
,
content
:
'请帮我汇总资料库里的表格文件,并生成一张总表。要求:<br>1.保留原始字段;<br>2.按指定字段排序;<br>3.统计汇总数据。'
,
variables
:
[
'资料库'
,
'汇总字段'
,
'排序方式'
]
},
't5'
:
{
name
:
'政策资料查询模板'
,
meta
:
'资料查询 · 系统推荐'
,
scene
:
'最新政策查询、政策对比、政策解读'
,
content
:
'请帮我查询相关公开政策资料,并总结要点:<br>1.政策名称;<br>2.发布时间;<br>3.核心内容;<br>4.适用范围。'
,
variables
:
[
'政策主题'
,
'时间范围'
,
'适用地区'
]
},
't6'
:
{
name
:
'材料提交提醒模板'
,
meta
:
'行政提醒 · 管理员添加'
,
scene
:
'月度报表提交、季度总结提交'
,
content
:
'请帮我创建一个定时提醒:<br>1.提醒事项:材料提交;<br>2.提醒时间:每月末;<br>3.提醒方式:消息通知。'
,
variables
:
[
'提醒事项'
,
'提醒周期'
,
'提醒方式'
]
},
't7'
:
{
name
:
'简历汇总模板'
,
meta
:
'人事辅助 · 管理员添加'
,
scene
:
'招聘筛选、简历对比、面试准备'
,
content
:
'请帮我汇总候选人简历信息:<br>1.基本信息;<br>2.教育背景;<br>3.工作经历;<br>4.技能特长。'
,
variables
:
[
'岗位名称'
,
'筛选条件'
]
},
't8'
:
{
name
:
'文件摘要模板'
,
meta
:
'文件处理 · 系统推荐'
,
scene
:
'长文阅读、材料研读、文件对比'
,
content
:
'请帮我提取文件要点:<br>1.核心观点;<br>2.关键数据;<br>3.重要结论;<br>4.行动建议。'
,
variables
:
[
'文件类型'
,
'摘要长度'
]
},
't9'
:
{
name
:
'综合科周报模板'
,
meta
:
'公文写作 · 用户自建'
,
scene
:
'综合科日常工作汇报'
,
content
:
'请帮我整理综合科本周工作,包括:<br>1.公文处理情况;<br>2.会议组织情况;<br>3.协调事项进展;<br>4.下周工作计划。'
,
variables
:
[
'部门'
,
'时间范围'
]
}
};
// 当前筛选分类
let
currentCategory
=
'all'
;
// 分类筛选
document
.
querySelectorAll
(
'.category-item'
).
forEach
(
btn
=>
{
btn
.
addEventListener
(
'click'
,
function
()
{
currentCategory
=
this
.
dataset
.
category
;
document
.
querySelectorAll
(
'.category-item'
).
forEach
(
b
=>
b
.
classList
.
remove
(
'active'
));
this
.
classList
.
add
(
'active'
);
filterTemplates
();
});
});
// 搜索过滤
document
.
getElementById
(
'search-input'
).
addEventListener
(
'input'
,
filterTemplates
);
function
filterTemplates
()
{
const
keyword
=
document
.
getElementById
(
'search-input'
).
value
.
trim
().
toLowerCase
();
const
cards
=
document
.
querySelectorAll
(
'.template-card'
);
let
visibleCount
=
0
;
cards
.
forEach
(
card
=>
{
const
name
=
card
.
querySelector
(
'.template-name'
).
textContent
.
toLowerCase
();
const
desc
=
card
.
querySelector
(
'.template-desc'
).
textContent
.
toLowerCase
();
const
category
=
card
.
dataset
.
category
;
const
matchCategory
=
currentCategory
===
'all'
||
category
===
currentCategory
;
const
matchKeyword
=
!
keyword
||
name
.
includes
(
keyword
)
||
desc
.
includes
(
keyword
);
if
(
matchCategory
&&
matchKeyword
)
{
card
.
classList
.
remove
(
'hidden'
);
visibleCount
++
;
}
else
{
card
.
classList
.
add
(
'hidden'
);
}
});
document
.
getElementById
(
'empty-template'
).
classList
.
toggle
(
'hidden'
,
visibleCount
>
0
);
document
.
getElementById
(
'template-grid'
).
classList
.
toggle
(
'hidden'
,
visibleCount
===
0
);
}
// 预览模板
document
.
querySelectorAll
(
'[data-action="preview"]'
).
forEach
(
btn
=>
{
btn
.
addEventListener
(
'click'
,
function
(
e
)
{
e
.
stopPropagation
();
const
templateId
=
this
.
dataset
.
template
;
openTemplateDrawer
(
templateId
);
});
});
// 使用模板
document
.
querySelectorAll
(
'[data-action="use"]'
).
forEach
(
btn
=>
{
btn
.
addEventListener
(
'click'
,
function
(
e
)
{
e
.
stopPropagation
();
const
templateId
=
this
.
dataset
.
template
;
useTemplate
(
templateId
);
});
});
// 打开模板详情抽屉
function
openTemplateDrawer
(
templateId
)
{
const
data
=
templatesData
[
templateId
];
if
(
!
data
)
return
;
document
.
getElementById
(
'drawer-name'
).
textContent
=
data
.
name
;
document
.
getElementById
(
'drawer-meta'
).
textContent
=
data
.
meta
;
document
.
getElementById
(
'drawer-scene'
).
textContent
=
data
.
scene
;
document
.
getElementById
(
'drawer-content'
).
innerHTML
=
data
.
content
;
// 更新变量标签
const
variableList
=
document
.
querySelector
(
'.variable-list'
);
variableList
.
innerHTML
=
data
.
variables
.
map
(
v
=>
`<span class="variable-tag">
${
v
}
<span class="variable-name">{
${
v
}
}</span></span>`
).
join
(
''
);
document
.
getElementById
(
'drawer-overlay'
).
classList
.
add
(
'active'
);
document
.
getElementById
(
'template-drawer'
).
classList
.
add
(
'open'
);
}
// 关闭抽屉
function
closeDrawer
()
{
document
.
getElementById
(
'drawer-overlay'
).
classList
.
remove
(
'active'
);
document
.
getElementById
(
'template-drawer'
).
classList
.
remove
(
'open'
);
}
document
.
getElementById
(
'btn-close-drawer'
).
addEventListener
(
'click'
,
closeDrawer
);
document
.
getElementById
(
'drawer-overlay'
).
addEventListener
(
'click'
,
closeDrawer
);
// 使用模板(抽屉中的"使用模板"按钮)
document
.
getElementById
(
'btn-use-now'
).
addEventListener
(
'click'
,
function
()
{
const
templateName
=
document
.
getElementById
(
'drawer-name'
).
textContent
;
useTemplateByName
(
templateName
);
});
// 复制内容
document
.
getElementById
(
'btn-copy-template'
).
addEventListener
(
'click'
,
function
()
{
const
content
=
document
.
getElementById
(
'drawer-content'
).
textContent
.
trim
();
if
(
navigator
.
clipboard
)
{
navigator
.
clipboard
.
writeText
(
content
).
then
(()
=>
{
alert
(
'模板内容已复制到剪贴板'
);
}).
catch
(()
=>
{
alert
(
'复制失败,请手动复制'
);
});
}
else
{
alert
(
'当前浏览器不支持自动复制,请手动复制'
);
}
});
// 使用模板跳转函数
// 实际产品中,点击后模板内容自动填入对话输入框,用户修改变量后发送。
function
useTemplate
(
templateId
)
{
const
data
=
templatesData
[
templateId
];
if
(
data
)
{
useTemplateByName
(
data
.
name
);
}
}
function
useTemplateByName
(
name
)
{
// 跳转回新建对话页,模板内容由对话页面根据名称加载
window
.
location
.
href
=
'../index.html?template='
+
encodeURIComponent
(
name
);
}
// 导航跳转
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
;
}
});
});
// 初始化筛选
filterTemplates
();
</script>
</body>
</html>
styles.css
浏览文件 @
b4f2978b
...
...
@@ -1613,6 +1613,964 @@ h1, h2, h3, h4, h5, h6 {
margin-left
:
auto
;
}
/* ================================================================
22. 定时任务页面样式
================================================================ */
/* 定时任务列表 */
.schedule-list-container
{
background-color
:
var
(
--color-bg-card
);
border
:
1px
solid
var
(
--color-border
);
border-radius
:
var
(
--border-radius-card
);
overflow
:
hidden
;
}
.schedule-table
{
width
:
100%
;
border-collapse
:
collapse
;
}
.schedule-table
th
,
.schedule-table
td
{
padding
:
14px
16px
;
text-align
:
left
;
border-bottom
:
1px
solid
var
(
--color-border-light
);
}
.schedule-table
th
{
font-size
:
var
(
--font-size-small
);
font-weight
:
500
;
color
:
var
(
--color-text-secondary
);
background-color
:
var
(
--color-bg-hover
);
}
.schedule-table
td
{
font-size
:
var
(
--font-size-body
);
color
:
var
(
--color-text-body
);
}
.schedule-table
tbody
tr
{
cursor
:
pointer
;
transition
:
background-color
0.15s
ease
;
}
.schedule-table
tbody
tr
:hover
{
background-color
:
var
(
--color-bg-hover
);
}
.schedule-table
tbody
tr
:last-child
td
{
border-bottom
:
none
;
}
.schedule-name-cell
{
display
:
flex
;
align-items
:
center
;
gap
:
10px
;
font-weight
:
500
;
color
:
var
(
--color-text-primary
);
}
.schedule-name-cell
.schedule-icon
{
width
:
20px
;
height
:
20px
;
color
:
var
(
--color-primary
);
}
.schedule-content
{
display
:
block
;
max-width
:
200px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
color
:
var
(
--color-text-secondary
);
font-size
:
var
(
--font-size-small
);
}
.schedule-actions
{
display
:
flex
;
gap
:
12px
;
}
.schedule-actions
.btn-text
{
background
:
none
;
border
:
none
;
font-size
:
var
(
--font-size-body
);
font-family
:
inherit
;
cursor
:
pointer
;
padding
:
0
;
color
:
var
(
--color-primary
);
}
.schedule-actions
.btn-text
:hover
{
text-decoration
:
underline
;
}
.schedule-actions
.btn-text.btn-pause
{
color
:
var
(
--color-text-secondary
);
}
/* 状态标签 */
.tag-status.paused
{
background-color
:
var
(
--color-bg-hover
);
color
:
var
(
--color-text-secondary
);
}
/* 执行结果 */
.result-success
{
color
:
var
(
--color-success
);
font-weight
:
500
;
}
.result-failed
{
color
:
var
(
--color-error
);
font-weight
:
500
;
}
/* ================================================================
23. 定时任务弹窗样式
================================================================ */
.modal-overlay
{
position
:
fixed
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
background-color
:
rgba
(
0
,
0
,
0
,
0.5
);
z-index
:
1000
;
}
.modal
{
position
:
fixed
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
width
:
560px
;
max-height
:
90vh
;
background-color
:
var
(
--color-bg-card
);
border-radius
:
var
(
--border-radius-card
);
box-shadow
:
0
20px
60px
rgba
(
0
,
0
,
0
,
0.2
);
z-index
:
1001
;
display
:
flex
;
flex-direction
:
column
;
}
.modal-header
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
padding
:
20px
24px
;
border-bottom
:
1px
solid
var
(
--color-border-light
);
}
.modal-title
{
font-size
:
18px
;
font-weight
:
600
;
color
:
var
(
--color-text-primary
);
margin
:
0
;
}
.modal-content
{
flex
:
1
;
padding
:
24px
;
overflow-y
:
auto
;
}
.modal-footer
{
display
:
flex
;
justify-content
:
flex-end
;
gap
:
12px
;
padding
:
16px
24px
;
border-top
:
1px
solid
var
(
--color-border-light
);
}
.form-label-row
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
margin-bottom
:
6px
;
}
.btn-link-small
{
display
:
flex
;
align-items
:
center
;
gap
:
4px
;
background
:
none
;
border
:
none
;
font-size
:
var
(
--font-size-small
);
font-family
:
inherit
;
color
:
var
(
--color-primary
);
cursor
:
pointer
;
padding
:
0
;
}
.btn-link-small
:hover
{
text-decoration
:
underline
;
}
.btn-link-small
.icon
{
width
:
14px
;
height
:
14px
;
}
.form-select
{
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
;
color
:
var
(
--color-text-primary
);
background-color
:
var
(
--color-bg-card
);
cursor
:
pointer
;
}
.form-select
:focus
{
outline
:
none
;
border-color
:
var
(
--color-primary
);
}
.input-with-hint
{
display
:
flex
;
flex-direction
:
column
;
gap
:
4px
;
}
.input-hint
{
font-size
:
var
(
--font-size-tiny
);
color
:
var
(
--color-text-secondary
);
}
/* 单选按钮组 */
.radio-group-inline
{
display
:
flex
;
gap
:
16px
;
}
.radio-item-inline
{
display
:
flex
;
align-items
:
center
;
cursor
:
pointer
;
}
.radio-item-inline
input
[
type
=
"radio"
]
{
display
:
none
;
}
.radio-item-inline
.radio-label
{
padding
:
8px
16px
;
border
:
1px
solid
var
(
--color-border
);
border-radius
:
20px
;
font-size
:
var
(
--font-size-body
);
color
:
var
(
--color-text-body
);
background-color
:
transparent
;
transition
:
all
0.2s
ease
;
}
.radio-item-inline
input
[
type
=
"radio"
]
:checked
+
.radio-label
{
background-color
:
var
(
--color-primary-light
);
border-color
:
var
(
--color-primary
);
color
:
var
(
--color-primary
);
}
.radio-item-inline
:hover
.radio-label
{
border-color
:
var
(
--color-primary
);
}
/* 重复配置 */
.repeat-config
{
padding
:
16px
;
background-color
:
var
(
--color-bg-hover
);
border-radius
:
var
(
--border-radius-btn
);
margin-bottom
:
16px
;
}
.repeat-config-item
{
display
:
flex
;
flex-direction
:
column
;
gap
:
12px
;
}
.weekday-select
{
display
:
flex
;
gap
:
8px
;
flex-wrap
:
wrap
;
}
.weekday-item
{
display
:
flex
;
align-items
:
center
;
cursor
:
pointer
;
}
.weekday-item
input
[
type
=
"checkbox"
]
{
display
:
none
;
}
.weekday-label
{
padding
:
6px
12px
;
border
:
1px
solid
var
(
--color-border
);
border-radius
:
16px
;
font-size
:
var
(
--font-size-small
);
color
:
var
(
--color-text-body
);
background-color
:
var
(
--color-bg-card
);
transition
:
all
0.2s
ease
;
}
.weekday-item
input
[
type
=
"checkbox"
]
:checked
+
.weekday-label
{
background-color
:
var
(
--color-primary-light
);
border-color
:
var
(
--color-primary
);
color
:
var
(
--color-primary
);
}
.datetime-select
{
display
:
flex
;
gap
:
12px
;
}
.date-input
{
flex
:
1
;
}
.time-input
{
width
:
120px
;
}
.month-day-select
{
width
:
100px
;
}
/* 回显文案 */
.repeat-summary
{
display
:
flex
;
align-items
:
center
;
gap
:
8px
;
padding
:
12px
16px
;
background-color
:
var
(
--color-primary-light
);
border
:
1px
solid
var
(
--color-primary
);
border-radius
:
var
(
--border-radius-btn
);
margin-bottom
:
16px
;
}
.repeat-summary
.summary-icon
{
width
:
18px
;
height
:
18px
;
color
:
var
(
--color-primary
);
flex-shrink
:
0
;
}
.repeat-summary
.summary-text
{
font-size
:
var
(
--font-size-body
);
font-weight
:
500
;
color
:
var
(
--color-primary
);
}
/* 结果保存位置 */
.result-location
{
display
:
flex
;
align-items
:
center
;
gap
:
8px
;
padding
:
12px
16px
;
background-color
:
var
(
--color-bg-hover
);
border-radius
:
var
(
--border-radius-btn
);
font-size
:
var
(
--font-size-body
);
color
:
var
(
--color-text-secondary
);
}
.result-location
.location-icon
{
width
:
18px
;
height
:
18px
;
color
:
var
(
--color-icon
);
}
/* 开关 */
.switch
{
position
:
relative
;
display
:
inline-block
;
width
:
48px
;
height
:
26px
;
}
.switch
input
{
opacity
:
0
;
width
:
0
;
height
:
0
;
}
.switch-slider
{
position
:
absolute
;
cursor
:
pointer
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
background-color
:
var
(
--color-border
);
transition
:
0.3s
;
border-radius
:
26px
;
}
.switch-slider
:before
{
position
:
absolute
;
content
:
""
;
height
:
20px
;
width
:
20px
;
left
:
3px
;
bottom
:
3px
;
background-color
:
white
;
transition
:
0.3s
;
border-radius
:
50%
;
}
.switch
input
:checked
+
.switch-slider
{
background-color
:
var
(
--color-primary
);
}
.switch
input
:checked
+
.switch-slider
:before
{
transform
:
translateX
(
22px
);
}
.switch-label
{
margin-left
:
12px
;
font-size
:
var
(
--font-size-body
);
color
:
var
(
--color-text-secondary
);
}
/* ================================================================
24. 定时任务详情抽屉
================================================================ */
.schedule-drawer
{
width
:
520px
;
}
.drawer-schedule-name
{
font-size
:
20px
;
font-weight
:
600
;
color
:
var
(
--color-text-primary
);
}
.drawer-schedule-status
{
margin-left
:
12px
;
}
.schedule-detail-content
{
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
;
}
.detail-row
{
padding
:
6px
0
;
}
.detail-value
{
font-size
:
var
(
--font-size-body
);
color
:
var
(
--color-text-primary
);
}
/* 执行记录 */
.execution-history
{
display
:
flex
;
flex-direction
:
column
;
gap
:
12px
;
}
.execution-item
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
padding
:
12px
14px
;
background-color
:
var
(
--color-bg-hover
);
border-radius
:
var
(
--border-radius-btn
);
}
.execution-info
{
display
:
flex
;
align-items
:
center
;
gap
:
10px
;
}
.execution-icon
{
width
:
18px
;
height
:
18px
;
flex-shrink
:
0
;
}
.execution-icon.success
{
color
:
var
(
--color-success
);
}
.execution-icon.failed
{
color
:
var
(
--color-error
);
}
.execution-time
{
font-size
:
var
(
--font-size-body
);
color
:
var
(
--color-text-body
);
}
.execution-result
{
font-size
:
var
(
--font-size-small
);
font-weight
:
500
;
}
.execution-result.success
{
color
:
var
(
--color-success
);
}
.execution-result.failed
{
color
:
var
(
--color-error
);
}
.failed-actions
{
display
:
flex
;
gap
:
12px
;
}
.btn-view-result
,
.btn-view-reason
,
.btn-retry-record
{
background
:
none
;
border
:
none
;
font-size
:
var
(
--font-size-small
);
font-family
:
inherit
;
color
:
var
(
--color-primary
);
cursor
:
pointer
;
padding
:
0
;
}
.btn-view-result
:hover
,
.btn-view-reason
:hover
,
.btn-retry-record
:hover
{
text-decoration
:
underline
;
}
/* 抽屉底部按钮 */
.schedule-drawer
.drawer-footer
{
display
:
flex
;
flex-wrap
:
wrap
;
gap
:
8px
;
}
.schedule-drawer
.btn-secondary
,
.schedule-drawer
.btn-primary
,
.schedule-drawer
.btn-danger
{
display
:
flex
;
align-items
:
center
;
gap
:
6px
;
padding
:
8px
14px
;
height
:
auto
;
font-size
:
var
(
--font-size-small
);
}
/* ================================================================
25. 删除确认弹窗
================================================================ */
.confirm-dialog-overlay
{
position
:
fixed
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
background-color
:
rgba
(
0
,
0
,
0
,
0.5
);
z-index
:
1100
;
}
.confirm-dialog
{
position
:
fixed
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
width
:
400px
;
background-color
:
var
(
--color-bg-card
);
border-radius
:
var
(
--border-radius-card
);
box-shadow
:
0
20px
60px
rgba
(
0
,
0
,
0
,
0.2
);
z-index
:
1101
;
overflow
:
hidden
;
}
.confirm-dialog-content
{
padding
:
32px
24px
;
text-align
:
center
;
}
.confirm-icon
{
width
:
48px
;
height
:
48px
;
color
:
var
(
--color-warning
);
margin-bottom
:
16px
;
}
.confirm-title
{
font-size
:
18px
;
font-weight
:
600
;
color
:
var
(
--color-text-primary
);
margin
:
0
0
8px
0
;
}
.confirm-message
{
font-size
:
var
(
--font-size-body
);
color
:
var
(
--color-text-secondary
);
margin
:
0
;
line-height
:
1.6
;
}
.confirm-dialog-footer
{
display
:
flex
;
gap
:
12px
;
padding
:
16px
24px
;
border-top
:
1px
solid
var
(
--color-border-light
);
}
.confirm-dialog-footer
.btn-secondary
,
.confirm-dialog-footer
.btn-danger
{
flex
:
1
;
justify-content
:
center
;
}
/* 危险按钮 */
.btn-danger
{
background-color
:
var
(
--color-error
);
border-color
:
var
(
--color-error
);
color
:
#FFFFFF
;
}
.btn-danger
:hover
{
background-color
:
#B91C1C
;
border-color
:
#B91C1C
;
}
.btn-danger
.icon
{
color
:
#FFFFFF
;
}
/* ================================================================
26. 模板中心页面样式
================================================================ */
/* 搜索框 */
.search-bar
{
position
:
relative
;
width
:
100%
;
max-width
:
400px
;
margin-bottom
:
20px
;
}
.search-icon
{
position
:
absolute
;
left
:
14px
;
top
:
50%
;
transform
:
translateY
(
-50%
);
width
:
18px
;
height
:
18px
;
color
:
var
(
--color-icon
);
}
.search-input
{
width
:
100%
;
padding
:
10px
14px
10px
42px
;
border
:
1px
solid
var
(
--color-border
);
border-radius
:
var
(
--border-radius-btn
);
font-size
:
var
(
--font-size-body
);
font-family
:
inherit
;
color
:
var
(
--color-text-primary
);
background-color
:
var
(
--color-bg-card
);
transition
:
border-color
0.2s
ease
;
}
.search-input
:focus
{
outline
:
none
;
border-color
:
var
(
--color-primary
);
}
/* 分类筛选 */
.category-filter
{
display
:
flex
;
flex-wrap
:
wrap
;
gap
:
8px
;
margin-bottom
:
24px
;
}
.category-item
{
padding
:
8px
16px
;
border
:
1px
solid
var
(
--color-border
);
border-radius
:
20px
;
background-color
:
var
(
--color-bg-card
);
font-size
:
var
(
--font-size-body
);
font-family
:
inherit
;
color
:
var
(
--color-text-body
);
cursor
:
pointer
;
transition
:
all
0.2s
ease
;
}
.category-item
:hover
{
border-color
:
var
(
--color-primary
);
color
:
var
(
--color-primary
);
}
.category-item.active
{
background-color
:
var
(
--color-primary
);
border-color
:
var
(
--color-primary
);
color
:
#FFFFFF
;
}
/* 模板卡片网格 */
.template-grid
{
display
:
grid
;
grid-template-columns
:
repeat
(
3
,
1
fr
);
gap
:
16px
;
}
.template-card
{
background-color
:
var
(
--color-bg-card
);
border
:
1px
solid
var
(
--color-border
);
border-radius
:
12px
;
padding
:
20px
;
transition
:
all
0.2s
ease
;
display
:
flex
;
flex-direction
:
column
;
}
.template-card
:hover
{
border-color
:
var
(
--color-primary
);
box-shadow
:
0
4px
12px
rgba
(
29
,
78
,
216
,
0.08
);
transform
:
translateY
(
-2px
);
}
.template-card.hidden
{
display
:
none
;
}
.template-card-icon
{
width
:
40px
;
height
:
40px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
background-color
:
var
(
--color-primary-light
);
border-radius
:
8px
;
margin-bottom
:
12px
;
}
.template-card-icon
.icon
{
width
:
22px
;
height
:
22px
;
color
:
var
(
--color-primary
);
}
.template-name
{
font-size
:
16px
;
font-weight
:
600
;
color
:
var
(
--color-text-primary
);
margin
:
0
0
6px
0
;
}
.template-desc
{
font-size
:
var
(
--font-size-body
);
color
:
var
(
--color-text-secondary
);
margin
:
0
0
12px
0
;
line-height
:
1.5
;
}
.template-scene
{
padding
:
10px
12px
;
background-color
:
var
(
--color-bg-hover
);
border-radius
:
6px
;
margin-bottom
:
12px
;
}
.scene-label
{
font-size
:
var
(
--font-size-tiny
);
color
:
var
(
--color-text-secondary
);
display
:
block
;
margin-bottom
:
2px
;
}
.scene-text
{
font-size
:
var
(
--font-size-small
);
color
:
var
(
--color-text-body
);
line-height
:
1.5
;
}
.template-tags
{
display
:
flex
;
gap
:
6px
;
margin-bottom
:
16px
;
flex-wrap
:
wrap
;
}
.tag-source
{
display
:
inline-block
;
padding
:
2px
8px
;
background-color
:
#EFF6FF
;
color
:
var
(
--color-primary
);
border-radius
:
4px
;
font-size
:
var
(
--font-size-tiny
);
}
.tag-source.admin
{
background-color
:
#FEF3C7
;
color
:
#92400E
;
}
.tag-source.user
{
background-color
:
#DCFCE7
;
color
:
var
(
--color-success
);
}
.template-actions
{
display
:
flex
;
gap
:
8px
;
margin-top
:
auto
;
}
.btn-preview
,
.btn-use-template
{
flex
:
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
gap
:
4px
;
padding
:
8px
12px
;
border-radius
:
var
(
--border-radius-btn
);
font-size
:
var
(
--font-size-small
);
font-family
:
inherit
;
cursor
:
pointer
;
transition
:
all
0.2s
ease
;
}
.btn-preview
{
background-color
:
var
(
--color-bg-card
);
border
:
1px
solid
var
(
--color-border
);
color
:
var
(
--color-text-body
);
}
.btn-preview
:hover
{
border-color
:
var
(
--color-primary
);
color
:
var
(
--color-primary
);
}
.btn-use-template
{
background-color
:
var
(
--color-primary
);
border
:
1px
solid
var
(
--color-primary
);
color
:
#FFFFFF
;
}
.btn-use-template
:hover
{
background-color
:
var
(
--color-primary-hover
);
border-color
:
var
(
--color-primary-hover
);
}
.btn-preview
.icon
,
.btn-use-template
.icon
{
width
:
14px
;
height
:
14px
;
}
.btn-use-template
.icon
{
color
:
#FFFFFF
;
}
/* ================================================================
27. 模板详情抽屉
================================================================ */
.template-drawer
{
width
:
520px
;
}
.drawer-template-name
{
font-size
:
20px
;
font-weight
:
600
;
color
:
var
(
--color-text-primary
);
}
.drawer-template-meta
{
font-size
:
var
(
--font-size-small
);
color
:
var
(
--color-text-secondary
);
}
.drawer-text
{
font-size
:
var
(
--font-size-body
);
color
:
var
(
--color-text-body
);
line-height
:
1.6
;
margin
:
0
;
}
.template-content-box
{
padding
:
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.8
;
}
/* 变量标签 */
.variable-list
{
display
:
flex
;
flex-wrap
:
wrap
;
gap
:
8px
;
}
.variable-tag
{
display
:
inline-flex
;
align-items
:
center
;
gap
:
4px
;
padding
:
6px
12px
;
background-color
:
var
(
--color-primary-light
);
border-radius
:
6px
;
font-size
:
var
(
--font-size-small
);
color
:
var
(
--color-text-body
);
}
.variable-name
{
color
:
var
(
--color-primary
);
font-weight
:
500
;
}
/* 使用说明 */
.usage-tip
{
display
:
flex
;
gap
:
12px
;
padding
:
14px
16px
;
background-color
:
#FEF3C7
;
border
:
1px
solid
#FCD34D
;
border-radius
:
var
(
--border-radius-btn
);
}
.usage-tip
.tip-icon
{
width
:
20px
;
height
:
20px
;
color
:
#92400E
;
flex-shrink
:
0
;
}
.usage-tip
p
{
font-size
:
var
(
--font-size-small
);
color
:
#92400E
;
margin
:
0
;
line-height
:
1.6
;
}
/* 模板抽屉底部按钮 */
.template-drawer
.drawer-footer
{
display
:
flex
;
gap
:
12px
;
}
.template-drawer
.btn-secondary
,
.template-drawer
.btn-primary
{
flex
:
1
;
justify-content
:
center
;
display
:
flex
;
align-items
:
center
;
gap
:
6px
;
padding
:
10px
16px
;
height
:
auto
;
font-size
:
var
(
--font-size-body
);
}
.pool-actions
{
display
:
flex
;
gap
:
12px
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论