Files

317 lines
20 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<title>角色权限管理 - AI指摘管理系统</title>
<script src="https://modao.cc/agent-py/static/source/js/tailwindcss.js"></script>
<script src="https://modao.cc/agent-py/static/source/js/iconify-icon.min.js"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
body {
font-family: 'Inter', sans-serif;
}
.sidebar-active {
background-color: rgba(26, 115, 232, 0.1);
color: #1a73e8;
border-right: 4px solid #1a73e8;
}
.role-active {
background-color: #f0f7ff;
border-color: #1a73e8;
color: #1a73e8;
}
</style>
</head>
<body class="bg-gray-50 text-gray-800 flex overflow-hidden h-screen">
<!-- Sidebar -->
<aside class="w-64 bg-white border-r border-gray-200 flex flex-col flex-none">
<div class="p-6 flex items-center gap-3">
<div class="w-10 h-10 bg-blue-600 rounded-xl flex items-center justify-center shadow-lg shadow-blue-200">
<iconify-icon class="text-white text-2xl" icon="lucide:shield-check"></iconify-icon>
</div>
<div>
<h1 class="font-bold text-lg leading-none text-gray-900">IMS</h1>
<p class="text-[10px] text-gray-400 mt-1 uppercase tracking-widest font-semibold">AI Assistant</p>
</div>
</div>
<nav class="flex-1 mt-4 px-3 space-y-1 overflow-y-auto">
<a class="flex items-center gap-3 px-4 py-3 rounded-lg text-gray-600 hover:bg-gray-50 transition-all group"
href="dashboard.html">
<iconify-icon class="text-xl" icon="lucide:layout-dashboard"></iconify-icon>
<span class="font-medium text-sm">工作台</span>
</a>
<a class="flex items-center gap-3 px-4 py-3 rounded-lg text-gray-600 hover:bg-gray-50 transition-all group"
href="issues.html">
<iconify-icon class="text-xl" icon="lucide:list-todo"></iconify-icon>
<span class="font-medium text-sm">指摘列表</span>
</a>
<a class="flex items-center gap-3 px-4 py-3 rounded-lg text-gray-600 hover:bg-gray-50 transition-all group"
href="batch-input.html">
<iconify-icon class="text-xl" icon="lucide:file-up"></iconify-icon>
<span class="font-medium text-sm">批量录入</span>
</a>
<div class="pt-4 pb-2 px-4 text-[10px] font-bold text-gray-400 uppercase tracking-widest">AI 智能分析</div>
<a class="flex items-center gap-3 px-4 py-3 rounded-lg text-gray-600 hover:bg-gray-50 transition-all group" href="ai-analysis.html">
<iconify-icon class="text-xl" icon="lucide:brain-circuit"></iconify-icon>
<span class="font-medium text-sm">AI分析记录</span>
</a>
<a class="flex items-center gap-3 px-4 py-3 rounded-lg text-gray-600 hover:bg-gray-50 transition-all group"
href="knowledge-base.html">
<iconify-icon class="text-xl" icon="lucide:database"></iconify-icon>
<span class="font-medium text-sm">知识库管理</span>
</a>
<div class="pt-4 pb-2 px-4 text-[10px] font-bold text-gray-400 uppercase tracking-widest">系统设置</div>
<a class="flex items-center gap-3 px-4 py-3 rounded-lg text-gray-600 hover:bg-gray-50 transition-all group"
href="users.html">
<iconify-icon class="text-xl" icon="lucide:users"></iconify-icon>
<span class="font-medium text-sm">用户管理</span>
</a>
<a class="flex items-center gap-3 px-4 py-3 rounded-lg sidebar-active transition-all group"
href="roles.html">
<iconify-icon class="text-xl" icon="lucide:key-round"></iconify-icon>
<span class="font-medium text-sm">角色权限</span>
</a>
<a class="flex items-center gap-3 px-4 py-3 rounded-lg text-gray-600 hover:bg-gray-50 transition-all group"
href="agent-management.html">
<iconify-icon class="text-xl" icon="lucide:bot"></iconify-icon>
<span class="font-medium text-sm">Agent管理</span>
</a>
</nav>
</aside>
<!-- Main Content -->
<main class="flex-1 flex flex-col min-w-0 overflow-hidden">
<header class="h-16 bg-white border-b border-gray-200 flex items-center justify-between px-8 flex-none">
<h2 class="text-lg font-semibold text-gray-800">角色权限配置</h2>
<button
class="bg-gray-900 text-white px-4 py-2 rounded-lg text-sm font-semibold hover:bg-black transition-all">保存配置</button>
</header>
<div class="flex-1 overflow-hidden flex">
<!-- Left Role List -->
<div class="w-72 bg-white border-r border-gray-100 flex flex-col overflow-y-auto">
<div class="p-6 border-b border-gray-50">
<button
class="w-full py-2 border border-dashed border-gray-300 rounded-lg text-xs font-bold text-gray-400 hover:border-blue-500 hover:text-blue-500 transition-all">+
新增角色</button>
</div>
<div class="p-3 space-y-1">
<div class="p-4 rounded-xl border border-transparent role-active cursor-pointer">
<div class="flex items-center justify-between mb-1">
<span class="text-sm font-bold leading-none">超级管理员</span>
<iconify-icon class="text-xs" icon="lucide:crown"></iconify-icon>
</div>
<p class="text-[10px] opacity-70">拥有系统所有操作权限</p>
</div>
<div class="p-4 rounded-xl border border-transparent hover:bg-gray-50 cursor-pointer text-gray-700">
<div class="flex items-center justify-between mb-1">
<span class="text-sm font-bold leading-none">部门管理员</span>
</div>
<p class="text-[10px] text-gray-400">管理本部门指摘与用户</p>
</div>
<div class="p-4 rounded-xl border border-transparent hover:bg-gray-50 cursor-pointer text-gray-700">
<div class="flex items-center justify-between mb-1">
<span class="text-sm font-bold leading-none">指摘录入员</span>
</div>
<p class="text-[10px] text-gray-400">负责指摘的录入与初期分析</p>
</div>
<div class="p-4 rounded-xl border border-transparent hover:bg-gray-50 cursor-pointer text-gray-700">
<div class="flex items-center justify-between mb-1">
<span class="text-sm font-bold leading-none">整改担当</span>
</div>
<p class="text-[10px] text-gray-400">负责指摘的修复与反馈</p>
</div>
<div class="p-4 rounded-xl border border-transparent hover:bg-gray-50 cursor-pointer text-gray-700">
<div class="flex items-center justify-between mb-1">
<span class="text-sm font-bold leading-none">验证人员</span>
</div>
<p class="text-[10px] text-gray-400">负责确认修复结果并关闭指摘</p>
</div>
</div>
</div>
<!-- Right Permission Matrix -->
<div class="flex-1 bg-gray-50 overflow-y-auto p-8 space-y-8">
<!-- Data Permission -->
<div class="bg-white p-6 rounded-2xl border border-gray-100 shadow-sm">
<div class="flex items-center gap-2 mb-6">
<iconify-icon class="text-blue-600 text-xl" icon="lucide:database"></iconify-icon>
<h4 class="font-bold text-gray-800">数据权限范围</h4>
</div>
<div class="max-w-xs">
<select
class="w-full bg-gray-50 border border-gray-200 rounded-lg px-4 py-2.5 text-sm focus:ring-2 focus:ring-blue-500 outline-none">
<option>全系统数据</option>
<option>所属部门数据</option>
<option>仅本人相关数据</option>
</select>
</div>
</div>
<!-- Function Permission -->
<div class="bg-white p-6 rounded-2xl border border-gray-100 shadow-sm">
<div class="flex items-center justify-between mb-6">
<div class="flex items-center gap-2">
<iconify-icon class="text-blue-600 text-xl" icon="lucide:layout"></iconify-icon>
<h4 class="font-bold text-gray-800">页面与功能权限</h4>
</div>
<div class="flex gap-4">
<label
class="flex items-center gap-2 text-xs font-bold text-gray-400 cursor-pointer hover:text-blue-600 transition-colors">
<input checked="" class="w-4 h-4 rounded text-blue-600" type="checkbox" /> 全选
</label>
</div>
</div>
<div class="grid grid-cols-2 lg:grid-cols-3 gap-8">
<div class="space-y-4">
<h5
class="text-xs font-bold text-gray-400 uppercase tracking-widest pb-2 border-b border-gray-50">
基础功能</h5>
<div class="space-y-3">
<label class="flex items-center gap-3 text-sm text-gray-700 cursor-pointer group">
<input checked=""
class="w-4 h-4 rounded-md border-gray-300 text-blue-600 focus:ring-blue-500 transition-all"
type="checkbox" />
<span class="group-hover:text-blue-600">工作台 (Dashboard)</span>
</label>
<label class="flex items-center gap-3 text-sm text-gray-700 cursor-pointer group">
<input checked=""
class="w-4 h-4 rounded-md border-gray-300 text-blue-600 focus:ring-blue-500 transition-all"
type="checkbox" />
<span class="group-hover:text-blue-600">指摘列表查询</span>
</label>
<label class="flex items-center gap-3 text-sm text-gray-700 cursor-pointer group">
<input checked=""
class="w-4 h-4 rounded-md border-gray-300 text-blue-600 focus:ring-blue-500 transition-all"
type="checkbox" />
<span class="group-hover:text-blue-600">指摘详情查看</span>
</label>
<label class="flex items-center gap-3 text-sm text-gray-700 cursor-pointer group">
<input checked=""
class="w-4 h-4 rounded-md border-gray-300 text-blue-600 focus:ring-blue-500 transition-all"
type="checkbox" />
<span class="group-hover:text-blue-600">批量录入导入</span>
</label>
</div>
</div>
<div class="space-y-4">
<h5
class="text-xs font-bold text-gray-400 uppercase tracking-widest pb-2 border-b border-gray-50">
AI 智能分析</h5>
<div class="space-y-3">
<label class="flex items-center gap-3 text-sm text-gray-700 cursor-pointer group">
<input checked=""
class="w-4 h-4 rounded-md border-gray-300 text-blue-600 focus:ring-blue-500 transition-all"
type="checkbox" />
<span class="group-hover:text-blue-600">AI分析记录查看</span>
</label>
<label class="flex items-center gap-3 text-sm text-gray-700 cursor-pointer group">
<input checked=""
class="w-4 h-4 rounded-md border-gray-300 text-blue-600 focus:ring-blue-500 transition-all"
type="checkbox" />
<span class="group-hover:text-blue-600">知识库维护与审计</span>
</label>
<label class="flex items-center gap-3 text-sm text-gray-700 cursor-pointer group">
<input checked=""
class="w-4 h-4 rounded-md border-gray-300 text-blue-600 focus:ring-blue-500 transition-all"
type="checkbox" />
<span class="group-hover:text-blue-600">Agent 操作详情记录</span>
</label>
</div>
</div>
<div class="space-y-4">
<h5
class="text-xs font-bold text-gray-400 uppercase tracking-widest pb-2 border-b border-gray-50">
系统设置</h5>
<div class="space-y-3">
<label class="flex items-center gap-3 text-sm text-gray-700 cursor-pointer group">
<input checked=""
class="w-4 h-4 rounded-md border-gray-300 text-blue-600 focus:ring-blue-500 transition-all"
type="checkbox" />
<span class="group-hover:text-blue-600">用户与角色管理</span>
</label>
<label class="flex items-center gap-3 text-sm text-gray-700 cursor-pointer group">
<input checked=""
class="w-4 h-4 rounded-md border-gray-300 text-blue-600 focus:ring-blue-500 transition-all"
type="checkbox" />
<span class="group-hover:text-blue-600">全局 Agent 开关控制</span>
</label>
<label class="flex items-center gap-3 text-sm text-gray-700 cursor-pointer group">
<input checked=""
class="w-4 h-4 rounded-md border-gray-300 text-blue-600 focus:ring-blue-500 transition-all"
type="checkbox" />
<span class="group-hover:text-blue-600">系统审计日志</span>
</label>
</div>
</div>
</div>
</div>
<!-- Agent Tool Permission -->
<div class="bg-blue-600 p-6 rounded-2xl shadow-lg shadow-blue-100 text-white overflow-hidden relative">
<iconify-icon class="absolute -right-6 -bottom-6 text-9xl text-white/10 rotate-12"
icon="lucide:bot"></iconify-icon>
<div class="flex items-center gap-2 mb-6">
<iconify-icon class="text-xl" icon="lucide:wrench"></iconify-icon>
<h4 class="font-bold text-lg">Agent 工具调用权限 (核心)</h4>
</div>
<p class="text-xs text-blue-100 mb-6 max-w-2xl leading-relaxed">配置此角色在与 AI Agent 交互时,允许 Agent
自动执行的原子工具。敏感操作建议开启“人机协同审批”。</p>
<div class="grid grid-cols-2 lg:grid-cols-4 gap-4">
<label
class="flex items-center gap-3 p-3 bg-white/10 rounded-xl border border-white/20 hover:bg-white/20 cursor-pointer transition-all">
<input checked="" class="w-4 h-4 rounded border-transparent text-blue-900"
type="checkbox" />
<span class="text-xs font-bold">assign_issue</span>
</label>
<label
class="flex items-center gap-3 p-3 bg-white/10 rounded-xl border border-white/20 hover:bg-white/20 cursor-pointer transition-all">
<input checked="" class="w-4 h-4 rounded border-transparent text-blue-900"
type="checkbox" />
<span class="text-xs font-bold">send_reminder</span>
</label>
<label
class="flex items-center gap-3 p-3 bg-white/10 rounded-xl border border-white/20 hover:bg-white/20 cursor-pointer transition-all">
<input checked="" class="w-4 h-4 rounded border-transparent text-blue-900"
type="checkbox" />
<span class="text-xs font-bold">close_issue</span>
</label>
<label
class="flex items-center gap-3 p-3 bg-white/10 rounded-xl border border-white/20 hover:bg-white/20 cursor-pointer transition-all">
<input checked="" class="w-4 h-4 rounded border-transparent text-blue-900"
type="checkbox" />
<span class="text-xs font-bold">search_knowledge</span>
</label>
<label
class="flex items-center gap-3 p-3 bg-white/10 rounded-xl border border-white/20 hover:bg-white/20 cursor-pointer transition-all">
<input class="w-4 h-4 rounded border-transparent text-blue-900" type="checkbox" />
<span class="text-xs font-bold">delete_issue</span>
</label>
<label
class="flex items-center gap-3 p-3 bg-white/10 rounded-xl border border-white/20 hover:bg-white/20 cursor-pointer transition-all">
<input checked="" class="w-4 h-4 rounded border-transparent text-blue-900"
type="checkbox" />
<span class="text-xs font-bold">request_human_approval</span>
</label>
<label
class="flex items-center gap-3 p-3 bg-white/10 rounded-xl border border-white/20 hover:bg-white/20 cursor-pointer transition-all">
<input checked="" class="w-4 h-4 rounded border-transparent text-blue-900"
type="checkbox" />
<span class="text-xs font-bold">create_comment</span>
</label>
<label
class="flex items-center gap-3 p-3 bg-white/10 rounded-xl border border-white/20 hover:bg-white/20 cursor-pointer transition-all">
<input checked="" class="w-4 h-4 rounded border-transparent text-blue-900"
type="checkbox" />
<span class="text-xs font-bold">update_metadata</span>
</label>
</div>
</div>
</div>
</div>
</main>
</body>
</html>