288 lines
17 KiB
HTML
288 lines
17 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>现代化工作流配置面板</title>
|
|
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
|
|
|
|
<!-- 引入 Inter 字体,提升数字和英文的质感 -->
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
|
|
|
|
<style>
|
|
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
|
|
|
|
/* 隐藏原生的 summary 箭头 */
|
|
details > summary { list-style: none; }
|
|
details > summary::-webkit-details-marker { display: none; }
|
|
|
|
/* 自定义滚动条 */
|
|
::-webkit-scrollbar { width: 5px; height: 5px; }
|
|
::-webkit-scrollbar-thumb { background-color: #d1d5db; border-radius: 10px; }
|
|
::-webkit-scrollbar-track { background-color: transparent; }
|
|
|
|
/* 页面切换动画 */
|
|
.fade-enter-active, .fade-leave-active { transition: opacity 0.2s ease; }
|
|
.fade-enter-from, .fade-leave-to { opacity: 0; }
|
|
</style>
|
|
</head>
|
|
<body class="bg-[#f9fafb] text-gray-900 antialiased overflow-hidden">
|
|
|
|
<div id="app" class="flex h-screen w-screen">
|
|
|
|
<!-- ================= 侧边栏:极简深色/浅色导航 ================= -->
|
|
<aside class="w-64 bg-white border-r border-gray-200 flex flex-col hidden md:flex">
|
|
<!-- Logo & Workspace -->
|
|
<div class="h-16 flex items-center px-6 border-b border-gray-100">
|
|
<div class="w-6 h-6 bg-indigo-600 rounded-md flex items-center justify-center text-white font-bold text-xs mr-3">37</div>
|
|
<span class="font-semibold text-sm text-gray-800">自动化工作台</span>
|
|
</div>
|
|
|
|
<!-- 导航菜单 -->
|
|
<div class="flex-1 overflow-y-auto py-4 px-3 space-y-1">
|
|
<div class="text-xs font-semibold text-gray-400 px-3 py-2 uppercase tracking-wider">工作区</div>
|
|
<a href="#" class="flex items-center px-3 py-2 text-sm font-medium text-gray-700 bg-gray-100 rounded-md">
|
|
<svg class="w-4 h-4 mr-3 text-gray-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg>
|
|
场景库
|
|
</a>
|
|
<a href="#" class="flex items-center px-3 py-2 text-sm font-medium text-gray-600 hover:bg-gray-50 rounded-md transition-colors">
|
|
<svg class="w-4 h-4 mr-3 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
|
执行计划
|
|
</a>
|
|
|
|
<div class="text-xs font-semibold text-gray-400 px-3 py-2 mt-6 uppercase tracking-wider">最近使用</div>
|
|
<!-- 当前活跃任务 -->
|
|
<a href="#" class="flex items-center justify-between px-3 py-2 text-sm font-medium text-indigo-600 bg-indigo-50/50 rounded-md border border-indigo-100">
|
|
<div class="flex items-center">
|
|
<div class="w-1.5 h-1.5 bg-indigo-600 rounded-full mr-2.5"></div>
|
|
续签电子签
|
|
</div>
|
|
<span class="text-[10px] bg-white px-1.5 py-0.5 rounded border border-indigo-100">v1.0.23</span>
|
|
</a>
|
|
<a href="#" class="flex items-center px-3 py-2 text-sm font-medium text-gray-600 hover:bg-gray-50 rounded-md transition-colors">
|
|
<div class="w-1.5 h-1.5 bg-gray-300 rounded-full mr-2.5"></div>
|
|
EHR系统请假流程
|
|
</a>
|
|
</div>
|
|
|
|
<!-- 底部用户 -->
|
|
<div class="p-4 border-t border-gray-100 flex items-center gap-3">
|
|
<div class="w-8 h-8 rounded-full bg-gradient-to-tr from-indigo-500 to-purple-500 text-white flex items-center justify-center text-xs font-bold shadow-sm">人</div>
|
|
<div class="flex-1">
|
|
<p class="text-sm font-medium text-gray-700">人资专用号</p>
|
|
<p class="text-xs text-gray-400">授权剩余 7 天</p>
|
|
</div>
|
|
</div>
|
|
</aside>
|
|
|
|
<!-- ================= 主内容区 ================= -->
|
|
<main class="flex-1 flex flex-col h-full bg-white relative">
|
|
|
|
<!-- 顶部 Header:极简,无边框 -->
|
|
<header class="h-16 flex items-center justify-between px-8 shrink-0">
|
|
<div class="flex items-center gap-3">
|
|
<h1 class="text-lg font-semibold text-gray-900">续签电子签</h1>
|
|
<!-- 状态徽章 -->
|
|
<span class="inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-emerald-50 text-emerald-700 text-xs font-medium border border-emerald-200/50">
|
|
<span class="w-1.5 h-1.5 rounded-full bg-emerald-500"></span>
|
|
已保存
|
|
</span>
|
|
<!-- 联调状态 -->
|
|
<span class="inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-amber-50 text-amber-700 text-xs font-medium border border-amber-200/50">
|
|
HR系统未登录
|
|
</span>
|
|
</div>
|
|
|
|
<div class="flex items-center gap-3">
|
|
<details class="relative group">
|
|
<summary class="cursor-pointer text-sm text-gray-500 hover:text-gray-900 flex items-center gap-1 transition-colors">
|
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
|
流程说明
|
|
</summary>
|
|
<!-- 悬浮气泡,不再占据页面空间 -->
|
|
<div class="absolute right-0 top-8 w-80 p-4 bg-gray-900 text-gray-300 text-xs leading-relaxed rounded-xl shadow-xl z-50">
|
|
驱动来自钉钉AI表格。全流程包含:回填否续签 + 推送续签 + 签署核验。如果 HR 未登录,部分回写动作将被拦截。
|
|
</div>
|
|
</details>
|
|
|
|
<button class="text-sm font-medium text-gray-500 hover:text-gray-900 px-3 py-1.5 rounded-md hover:bg-gray-100 transition-colors">回退 v1.0.22</button>
|
|
</div>
|
|
</header>
|
|
|
|
<!-- 配置区(可滚动) -->
|
|
<div class="flex-1 overflow-y-auto px-8 pb-32">
|
|
|
|
<div class="max-w-3xl">
|
|
<!-- 选项卡 (极简下划线风格) -->
|
|
<div class="flex items-center gap-6 border-b border-gray-100 mb-8 mt-2">
|
|
<button class="pb-3 text-sm font-medium text-gray-900 border-b-2 border-gray-900">插件界面</button>
|
|
<button class="pb-3 text-sm font-medium text-gray-400 hover:text-gray-700 transition-colors">运行日志</button>
|
|
<button class="pb-3 text-sm font-medium text-gray-400 hover:text-gray-700 transition-colors">历史运行</button>
|
|
</div>
|
|
|
|
<!-- 步骤 1:路径选择 -->
|
|
<div class="flex gap-6 mb-10 relative">
|
|
<!-- 左侧时间线连线 -->
|
|
<div class="absolute left-[15px] top-10 bottom-[-40px] w-px bg-gray-200"></div>
|
|
|
|
<div class="w-8 h-8 rounded-full bg-gray-900 text-white flex items-center justify-center text-xs font-bold shrink-0 mt-0.5 z-10 ring-4 ring-white">
|
|
1
|
|
</div>
|
|
|
|
<div class="flex-1">
|
|
<h2 class="text-base font-semibold text-gray-900 mb-1">选择执行路径</h2>
|
|
<p class="text-sm text-gray-500 mb-4">决定本次自动化任务执行的深度和范围。</p>
|
|
|
|
<!-- 卡片式单选器 -->
|
|
<div class="grid grid-cols-1 md:grid-cols-3 gap-3 mb-4">
|
|
<label v-for="item in steps" :key="item.id"
|
|
:class="['relative flex flex-col p-4 cursor-pointer rounded-xl border-2 transition-all duration-200', stepType === item.id ? 'border-indigo-600 bg-indigo-50/30' : 'border-gray-200 hover:border-gray-300 bg-white']">
|
|
<input type="radio" :value="item.id" v-model="stepType" class="sr-only">
|
|
<span class="text-sm font-semibold mb-1" :class="stepType === item.id ? 'text-indigo-700' : 'text-gray-900'">{{ item.title }}</span>
|
|
<span class="text-xs text-gray-500 leading-relaxed">{{ item.desc }}</span>
|
|
|
|
<!-- 选中图标 -->
|
|
<div v-if="stepType === item.id" class="absolute top-3 right-3 text-indigo-600">
|
|
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"></path></svg>
|
|
</div>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 步骤 2:参数设置 -->
|
|
<div class="flex gap-6 relative">
|
|
<!-- 左侧时间线连线 -->
|
|
<div class="absolute left-[15px] top-10 bottom-0 w-px bg-gray-200"></div>
|
|
|
|
<div class="w-8 h-8 rounded-full bg-white border-2 border-gray-300 text-gray-500 flex items-center justify-center text-xs font-bold shrink-0 mt-0.5 z-10 ring-4 ring-white">
|
|
2
|
|
</div>
|
|
|
|
<div class="flex-1">
|
|
<h2 class="text-base font-semibold text-gray-900 mb-1">配置执行参数</h2>
|
|
<p class="text-sm text-gray-500 mb-6">设置运行时的环境变量与通知方式。</p>
|
|
|
|
<!-- 列表式表单 -->
|
|
<div class="bg-gray-50 rounded-2xl p-2 border border-gray-100">
|
|
|
|
<!-- 设置项 1 -->
|
|
<div class="flex items-center justify-between p-4 bg-white rounded-xl mb-1 shadow-sm">
|
|
<div>
|
|
<h3 class="text-sm font-medium text-gray-900">试算模式</h3>
|
|
<p class="text-xs text-gray-500 mt-0.5">开启后只检查不写入,用于手动验证流程是否通畅。</p>
|
|
</div>
|
|
<!-- 现代 Switch -->
|
|
<button @click="testMode = !testMode" :class="[testMode ? 'bg-indigo-600' : 'bg-gray-200', 'relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none']">
|
|
<span :class="[testMode ? 'translate-x-5' : 'translate-x-0', 'pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out']"></span>
|
|
</button>
|
|
</div>
|
|
|
|
<!-- 设置项 2 -->
|
|
<div class="flex items-center justify-between p-4 bg-white rounded-xl mb-1 shadow-sm">
|
|
<div>
|
|
<h3 class="text-sm font-medium text-gray-900">钉钉群通知</h3>
|
|
<p class="text-xs text-gray-500 mt-0.5">执行完成或失败后,将结果推送到指定群聊。</p>
|
|
</div>
|
|
<button @click="notifyMode = !notifyMode" :class="[notifyMode ? 'bg-indigo-600' : 'bg-gray-200', 'relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none']">
|
|
<span :class="[notifyMode ? 'translate-x-5' : 'translate-x-0', 'pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out']"></span>
|
|
</button>
|
|
</div>
|
|
|
|
<!-- 设置项 3 (联动显示) -->
|
|
<transition name="fade">
|
|
<div v-if="notifyMode" class="flex items-center justify-between p-4 bg-white rounded-xl shadow-sm">
|
|
<div>
|
|
<h3 class="text-sm font-medium text-gray-900">通知对象</h3>
|
|
<p class="text-xs text-gray-500 mt-0.5">选择接收执行结果的钉钉群。</p>
|
|
</div>
|
|
<!-- 现代化下拉框 -->
|
|
<div class="relative">
|
|
<select class="appearance-none bg-gray-50 border border-gray-200 text-gray-700 text-sm rounded-lg focus:ring-indigo-500 focus:border-indigo-500 block w-40 p-2.5 pr-8 cursor-pointer hover:bg-gray-100 transition-colors">
|
|
<option>测试群</option>
|
|
<option>HR 业务群</option>
|
|
</select>
|
|
<div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-400">
|
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</transition>
|
|
|
|
</div>
|
|
|
|
<!-- 底部折叠备注区 -->
|
|
<div class="mt-4">
|
|
<details class="group bg-gray-50 rounded-xl border border-gray-100 overflow-hidden">
|
|
<summary class="flex items-center justify-between p-4 cursor-pointer hover:bg-gray-100 transition-colors">
|
|
<span class="text-sm font-medium text-gray-700">运行备注 (选填)</span>
|
|
<svg class="w-4 h-4 text-gray-400 transition-transform group-open:rotate-180" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg>
|
|
</summary>
|
|
<div class="p-4 pt-0">
|
|
<textarea rows="2" placeholder="给本次配置写点备注..." class="w-full bg-white border border-gray-200 rounded-lg p-3 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500/20 focus:border-indigo-500 transition-all resize-none"></textarea>
|
|
</div>
|
|
</details>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<!-- ================= 底部悬浮控制台 ================= -->
|
|
<!-- 使用毛玻璃和阴影,永远吸附在视口底部 -->
|
|
<div class="absolute bottom-0 left-0 right-0 p-6 bg-gradient-to-t from-white via-white/90 to-transparent pointer-events-none">
|
|
<div class="max-w-3xl bg-white/80 backdrop-blur-xl border border-gray-200/60 shadow-[0_8px_30px_rgb(0,0,0,0.06)] rounded-2xl p-3 flex items-center justify-between pointer-events-auto">
|
|
|
|
<!-- 左侧:历史状态 -->
|
|
<div class="flex items-center gap-3 pl-2">
|
|
<div class="flex items-center gap-1.5 text-xs text-gray-500">
|
|
<div class="w-1.5 h-1.5 bg-emerald-500 rounded-full"></div>
|
|
自动保存于 12:19
|
|
</div>
|
|
<button class="text-xs text-gray-500 hover:text-gray-900 transition-colors">恢复默认</button>
|
|
</div>
|
|
|
|
<!-- 右侧:核心操作 -->
|
|
<div class="flex items-center gap-2">
|
|
<button class="px-4 py-2 text-sm font-medium text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-xl transition-colors">保存草稿</button>
|
|
<button class="px-5 py-2.5 bg-indigo-600 hover:bg-indigo-700 text-white text-sm font-medium rounded-xl shadow-sm shadow-indigo-600/20 transition-all active:scale-95 flex items-center gap-2">
|
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"></path><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
|
一键执行
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</main>
|
|
</div>
|
|
|
|
<script>
|
|
const { createApp, ref } = Vue;
|
|
|
|
createApp({
|
|
setup() {
|
|
const testMode = ref(true);
|
|
const notifyMode = ref(true);
|
|
const stepType = ref('full');
|
|
|
|
const steps = [
|
|
{ id: 'full', title: '① 全流程', desc: '回填否续签 + 推送续签 + 签署核验,默认选择。' },
|
|
{ id: 'push', title: '② 仅推送', desc: '只做回填、手机校验及 HR 系统提交推送。' },
|
|
{ id: 'verify', title: '③ 仅核验', desc: '只检查已推送的电子签是否已完成签署。' }
|
|
];
|
|
|
|
return {
|
|
testMode,
|
|
notifyMode,
|
|
stepType,
|
|
steps
|
|
}
|
|
}
|
|
}).mount('#app');
|
|
</script>
|
|
</body>
|
|
</html> |