feat: 新增银行卡检查插件及相关依赖与配置文件

This commit is contained in:
2026-10-29 14:21:30 +08:00
parent 0a32518060
commit c77a26cd99
494 changed files with 66923 additions and 2714 deletions
+351
View File
@@ -0,0 +1,351 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>37du 自动化工作台 - 场景库</title>
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<script src="https://cdn.tailwindcss.com"></script>
<style>
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #d1d5db; }
</style>
</head>
<body class="bg-[#f5f6f8] text-gray-800 h-screen overflow-hidden text-sm">
<div id="app" class="flex h-full w-full p-2 gap-2">
<!-- ================= 左侧导航栏 (保持原样) ================= -->
<aside class="w-[220px] bg-white rounded-xl flex flex-col shadow-sm border border-gray-100 overflow-y-auto flex-shrink-0">
<div class="p-4 flex items-center gap-2 border-b border-gray-50">
<div class="w-6 h-6 bg-blue-600 rounded flex items-center justify-center text-white text-xs font-bold">37</div>
<span class="font-bold text-gray-700">37du 自动化工作台</span>
</div>
<div class="p-3 space-y-1">
<a href="#" class="flex items-center justify-between px-3 py-2 text-gray-600 hover:bg-gray-50 rounded-lg">
<div class="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="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"></path></svg>
<span>总览</span>
</div>
<span class="text-xs text-gray-400">12</span>
</a>
<a href="#" class="flex items-center justify-between px-3 py-2 bg-blue-50 text-blue-600 rounded-lg">
<div class="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="M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"></path></svg>
<span>场景库</span>
</div>
<span class="text-xs bg-blue-100 text-blue-600 px-2 py-0.5 rounded-full">18</span>
</a>
<a href="#" class="flex items-center justify-between px-3 py-2 text-gray-600 hover:bg-gray-50 rounded-lg">
<div class="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="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg>
<span>计划</span>
</div>
<span class="text-xs text-gray-400">7</span>
</a>
<a href="#" class="flex items-center justify-between px-3 py-2 text-gray-600 hover:bg-gray-50 rounded-lg">
<div class="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="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"></path></svg>
<span>平台账号</span>
</div>
<span class="text-xs bg-green-100 text-green-600 px-2 py-0.5 rounded-full">2/3</span>
</a>
</div>
<div class="px-3 pb-2 mt-2">
<div class="relative">
<svg class="w-3.5 h-3.5 absolute left-2.5 top-2.5 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>
<input type="text" placeholder="搜索场景" class="w-full bg-gray-50 border border-gray-100 rounded-md py-1.5 pl-8 pr-3 text-xs focus:outline-none focus:ring-1 focus:ring-blue-500">
</div>
</div>
<div class="p-3 mt-1 flex-1">
<div class="text-xs text-gray-400 mb-2 px-1">最近使用</div>
<ul class="space-y-0.5">
<li v-for="item in recentUses" :key="item.name" class="flex items-center justify-between px-2 py-2 hover:bg-gray-50 rounded-md cursor-pointer group">
<div class="flex items-center gap-2 truncate">
<span class="w-1.5 h-1.5 rounded-full shrink-0" :class="item.color"></span>
<span class="text-gray-700 text-xs truncate">{{ item.name }}</span>
</div>
<span class="text-gray-400 text-[10px] shrink-0">{{ item.time }}</span>
</li>
</ul>
</div>
<div class="p-3 border-t border-gray-100">
<div class="flex items-center justify-between bg-gray-50 rounded-lg p-2">
<div class="flex items-center gap-2">
<div class="w-6 h-6 bg-blue-100 rounded-full flex items-center justify-center text-blue-600 text-xs font-bold">李</div>
<div>
<div class="text-xs font-medium text-gray-700">李骁柠</div>
<div class="text-[10px] text-gray-400">本机操作员</div>
</div>
</div>
<button class="text-[10px] text-gray-500 hover:text-gray-700">退出</button>
</div>
</div>
</aside>
<!-- ================= 中间主内容区 ================= -->
<main class="flex-1 flex flex-col min-w-0 bg-white rounded-xl shadow-sm border border-gray-100 overflow-hidden">
<!-- 头部与工具栏 -->
<header class="px-6 pt-6 pb-2 flex-shrink-0">
<div class="flex justify-between items-end mb-5">
<div>
<div class="flex items-center gap-2 text-xs text-gray-400 mb-2">
<span>工作台</span>
<span class="text-gray-300">/</span>
<span>场景库</span>
</div>
<h1 class="text-2xl font-bold text-gray-800 mb-1">场景库</h1>
<p class="text-xs text-gray-500">提供开箱即用的自动化场景模板,快速接入您的业务流</p>
</div>
<div class="flex gap-2 mb-1">
<button class="px-4 py-1.5 bg-white border border-gray-200 text-gray-600 rounded-lg hover:bg-gray-50 text-xs font-medium shadow-sm flex items-center gap-1">
<svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"></path></svg>
导入场景
</button>
<button class="px-4 py-1.5 bg-blue-600 text-white rounded-lg hover:bg-blue-700 text-xs font-medium shadow-sm flex items-center gap-1">
<svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path></svg>
新建场景
</button>
</div>
</div>
<!-- 工具栏 (Tab & 搜索) -->
<div class="flex justify-between items-center">
<div class="flex gap-2">
<button v-for="tab in categories" :key="tab" @click="activeCategory = tab; currentPage = 1"
class="px-4 py-1.5 text-xs font-medium rounded-full transition-all border"
:class="activeCategory === tab ? 'bg-blue-50 border-blue-100 text-blue-600 shadow-sm' : 'border-transparent text-gray-500 hover:text-gray-800 hover:bg-gray-50'">
{{ tab }}
</button>
</div>
<div class="relative w-64">
<svg class="w-4 h-4 absolute left-3 top-2.5 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>
<input type="text" placeholder="在场景库中搜索..." class="w-full bg-gray-50 border border-gray-100 rounded-lg py-1.5 pl-9 pr-4 text-xs focus:outline-none focus:ring-2 focus:ring-blue-100 focus:bg-white transition-all">
</div>
</div>
</header>
<!-- 场景卡片网格区域 -->
<div class="flex-1 overflow-y-auto px-6 pt-4 pb-2 flex flex-col">
<div class="grid grid-cols-3 gap-4 pb-4">
<!-- 注意这里遍历的是 paginatedScenes -->
<div v-for="scene in paginatedScenes" :key="scene.id"
class="bg-white rounded-xl p-5 shadow-sm border border-gray-100 hover:shadow-md hover:border-blue-100 transition-all group flex flex-col cursor-pointer relative overflow-hidden h-[210px]">
<div class="flex justify-between items-start mb-3">
<div class="w-10 h-10 rounded-lg flex items-center justify-center shrink-0" :class="scene.iconBg">
<svg class="w-5 h-5" :class="scene.iconColor" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" :d="scene.iconPath"></path>
</svg>
</div>
<span class="text-[10px] px-2 py-0.5 rounded-full border"
:class="scene.isOfficial ? 'bg-orange-50 text-orange-600 border-orange-100' : 'bg-gray-50 text-gray-500 border-gray-200'">
{{ scene.isOfficial ? '官方模板' : '自定义' }}
</span>
</div>
<h3 class="text-sm font-bold text-gray-800 mb-1 group-hover:text-blue-600 transition-colors">{{ scene.title }}</h3>
<p class="text-xs text-gray-500 line-clamp-2 leading-relaxed mb-4 flex-1">{{ scene.desc }}</p>
<div class="flex gap-2 mb-4">
<span v-for="tag in scene.tags" :key="tag" class="text-[10px] bg-gray-50 text-gray-500 border border-gray-100 px-2 py-0.5 rounded">
{{ tag }}
</span>
</div>
<div class="flex items-center justify-between pt-3 border-t border-gray-50 mt-auto">
<div class="flex items-center gap-1.5 text-[11px] text-gray-400">
<svg class="w-3.5 h-3.5" 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>
{{ scene.lastRun }}
</div>
<button class="text-xs text-blue-600 font-medium opacity-0 group-hover:opacity-100 transition-opacity flex items-center gap-1 hover:text-blue-700">
配置运行
<svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path></svg>
</button>
</div>
</div>
</div>
<!-- 新增:底部分页器 -->
<div class="mt-auto pt-4 border-t border-gray-100 flex items-center justify-between">
<div class="text-xs text-gray-500">
共 <span class="font-medium text-gray-800">{{ filteredScenes.length }}</span> 个场景
</div>
<div class="flex items-center gap-1">
<!-- 上一页 -->
<button @click="prevPage" :disabled="currentPage === 1"
class="px-3 py-1 text-xs border border-gray-200 rounded-md bg-white text-gray-600 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors">
上一页
</button>
<!-- 页码 -->
<button v-for="page in totalPages" :key="page" @click="currentPage = page"
class="w-7 h-7 flex items-center justify-center text-xs rounded-md border transition-colors"
:class="currentPage === page ? 'bg-blue-600 border-blue-600 text-white shadow-sm' : 'bg-white border-gray-200 text-gray-600 hover:bg-gray-50'">
{{ page }}
</button>
<!-- 下一页 -->
<button @click="nextPage" :disabled="currentPage === totalPages"
class="px-3 py-1 text-xs border border-gray-200 rounded-md bg-white text-gray-600 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors">
下一页
</button>
</div>
</div>
</div>
</main>
<!-- ================= 右侧活动面板 (保持原样) ================= -->
<aside class="w-[280px] bg-white rounded-xl shadow-sm border border-gray-100 flex flex-col flex-shrink-0 overflow-y-auto hidden lg:flex">
<div class="p-4">
<div class="flex justify-between items-center mb-4">
<h2 class="font-bold text-gray-800 text-sm">活动</h2>
<span class="text-[10px] text-red-500 bg-red-50 px-2 py-0.5 rounded border border-red-100 flex items-center gap-1">
<span class="w-1.5 h-1.5 rounded-full bg-red-500 animate-pulse"></span> 2 进行中
</span>
</div>
<div class="bg-blue-50/50 border border-blue-100 rounded-lg p-3 mb-6">
<div class="flex justify-between text-xs mb-2">
<span class="font-medium text-gray-700 flex items-center gap-1">
<span class="w-1.5 h-1.5 rounded-full bg-blue-500"></span> 考勤数据采集
</span>
<span class="text-blue-600 font-mono">68%</span>
</div>
<div class="w-full bg-gray-200/60 rounded-full h-1.5 mb-2 overflow-hidden">
<div class="bg-blue-500 h-1.5 rounded-full transition-all duration-500" style="width: 68%"></div>
</div>
<p class="text-[10px] text-gray-500">抽取第 3/12 页 · 已采 246 条</p>
</div>
<div class="mb-6">
<div class="text-[11px] text-gray-400 mb-3">最近运行</div>
<ul class="space-y-3">
<li class="flex items-center justify-between text-xs">
<div class="flex items-center gap-2">
<span class="w-1.5 h-1.5 rounded-full bg-green-500"></span>
<span class="text-gray-700">考勤数据采集</span>
</div>
<span class="text-gray-400 text-[10px]">14:32 成功</span>
</li>
<li class="flex items-center justify-between text-xs">
<div class="flex items-center gap-2">
<span class="w-1.5 h-1.5 rounded-full bg-green-500"></span>
<span class="text-gray-700">销售订单同步</span>
</div>
<span class="text-gray-400 text-[10px]">11:08 成功</span>
</li>
<li class="flex items-center justify-between text-xs">
<div class="flex items-center gap-2">
<span class="w-1.5 h-1.5 rounded-full bg-orange-400"></span>
<span class="text-gray-700">OA流程自动化</span>
</div>
<span class="text-gray-400 text-[10px]">09:45 跳过</span>
</li>
</ul>
</div>
<div>
<div class="flex justify-between text-[11px] text-gray-400 mb-3">
<span>平台账号</span>
<span class="text-green-600">2 / 3</span>
</div>
<ul class="space-y-2">
<li class="flex items-center justify-between bg-gray-50 p-2 rounded-md border border-gray-100">
<div class="flex items-center gap-2">
<span class="w-1.5 h-1.5 rounded-full bg-blue-500"></span>
<span class="text-xs text-gray-700">HR 人力资源</span>
</div>
<span class="text-[10px] text-gray-500">已登录</span>
</li>
<li class="flex items-center justify-between bg-gray-50 p-2 rounded-md border border-gray-100">
<div class="flex items-center gap-2">
<span class="w-1.5 h-1.5 rounded-full bg-orange-400"></span>
<span class="text-xs text-gray-700">OA办公</span>
</div>
<span class="text-[10px] text-orange-500">待登录</span>
</li>
</ul>
</div>
</div>
</aside>
</div>
<script>
const { createApp, ref, computed } = Vue;
createApp({
setup() {
const recentUses = ref([
{ name: '考勤数据采集', time: '12m', color: 'bg-blue-500' },
{ name: 'OA流程自动化', time: '1h', color: 'bg-orange-400' },
{ name: '钉钉通知推送', time: '3h', color: 'bg-purple-500' },
]);
const categories = ref(['全部场景', '数据采集', '系统同步', '消息通知', '财务法务']);
const activeCategory = ref('全部场景');
// 补充了更多数据以展示分页效果
const scenes = ref([
{ id: 1, title: '考勤数据采集', desc: '自动抓取 HR 系统内的员工考勤、请假、加班等数据,并结构化存储为 Excel 或直接入库。', tags: ['HR系统', '数据清洗'], isOfficial: true, lastRun: '今天 14:32', iconBg: 'bg-blue-50', iconColor: 'text-blue-600', iconPath: 'M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z', category: '数据采集' },
{ id: 2, title: '销售订单同步', desc: '将电商平台或 CRM 系统中的新订单,定时同步至公司内部 ERP 系统,避免人工录入错漏。', tags: ['CRM', 'ERP', 'API'], isOfficial: true, lastRun: '今天 11:08', iconBg: 'bg-green-50', iconColor: 'text-green-600', iconPath: 'M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4', category: '系统同步' },
{ id: 3, title: '仓库库存盘点', desc: '定时从 WMS 仓库管理系统抓取实时库存量,并生成对比报表发送给相关采购负责人。', tags: ['WMS', '报表'], isOfficial: true, lastRun: '昨天 18:20', iconBg: 'bg-indigo-50', iconColor: 'text-indigo-600', iconPath: 'M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4', category: '数据采集' },
{ id: 4, title: '钉钉通知推送', desc: '当特定业务系统发生状态变更时,自动触发钉钉群机器人通知。', tags: ['钉钉', 'Webhook'], isOfficial: true, lastRun: '周一 09:00', iconBg: 'bg-purple-50', iconColor: 'text-purple-600', iconPath: 'M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9', category: '消息通知' },
{ id: 5, title: 'OA流程自动化', desc: '模拟人工操作,自动登录 OA 系统发起常规审批流程,提高办公效率。', tags: ['OA', 'RPA'], isOfficial: false, lastRun: '今天 09:45', iconBg: 'bg-orange-50', iconColor: 'text-orange-600', iconPath: 'M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z', category: '系统同步' },
{ id: 6, title: '财务对账单导出', desc: '每月初自动登录财务系统,导出上月明细账并发送至财务主管邮箱。', tags: ['财务', '邮件'], isOfficial: true, lastRun: '10-01 08:00', iconBg: 'bg-cyan-50', iconColor: 'text-cyan-600', iconPath: 'M9 17v-2m3 2v-4m3 4v-6m2 10H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z', category: '财务法务' },
// 以下是补充的数据,用于展示翻页
{ id: 7, title: '企微消息群发', desc: '向企业微信指定群组或部门成员发送图文通知。', tags: ['企业微信', '通知'], isOfficial: true, lastRun: '昨天 15:00', iconBg: 'bg-blue-50', iconColor: 'text-blue-600', iconPath: 'M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z', category: '消息通知' },
{ id: 8, title: '竞品价格监控', desc: '每天定时抓取竞品网站商品价格,发现降价自动生成报告。', tags: ['爬虫', '竞品'], isOfficial: false, lastRun: '昨天 20:00', iconBg: 'bg-red-50', iconColor: 'text-red-600', iconPath: 'M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z', category: '数据采集' },
{ id: 9, title: '发票真伪查验', desc: '上传发票图片或录入代码,自动调用税务接口核验真伪。', tags: ['税务', 'OCR'], isOfficial: true, lastRun: '10-20 10:00', iconBg: 'bg-teal-50', iconColor: 'text-teal-600', iconPath: 'M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z', category: '财务法务' },
]);
// --- 分页逻辑开始 ---
const currentPage = ref(1);
const pageSize = 6; // 每页显示6个
// 1. 先根据分类过滤
const filteredScenes = computed(() => {
if (activeCategory.value === '全部场景') return scenes.value;
return scenes.value.filter(s => s.category === activeCategory.value);
});
// 2. 计算总页数
const totalPages = computed(() => {
return Math.ceil(filteredScenes.value.length / pageSize) || 1;
});
// 3. 截取当前页要展示的数据
const paginatedScenes = computed(() => {
const start = (currentPage.value - 1) * pageSize;
const end = start + pageSize;
return filteredScenes.value.slice(start, end);
});
// 4. 翻页方法
const prevPage = () => {
if (currentPage.value > 1) currentPage.value--;
};
const nextPage = () => {
if (currentPage.value < totalPages.value) currentPage.value++;
};
// --- 分页逻辑结束 ---
return {
recentUses,
categories,
activeCategory,
filteredScenes, // 用于显示总数
paginatedScenes, // 用于渲染网格
currentPage,
totalPages,
prevPage,
nextPage
};
}
}).mount('#app');
</script>
</body>
</html>