ux: 全部页面添加操作说明 PageGuide
为以下17个缺少操作说明的页面添加 PageGuide 组件: - OrgChart: 组织架构管理 - SupportDashboard: 客服工作台 - Money: 薪酬管理 - AIAssistant: AI 智能助手 - Settings: 系统设置 - Calendar: 人事日历 - Templates: 模板管理 - AuditLog: 审计日志 - Notifications: 通知中心 - MedicalPeriodCalculator: 医疗期计算器 - HealthCheck: 用工健康检查 - AnnualValueReport: 年度价值报表 - CompanyFiles: 公司文件管理 - LeaveApproval: 请假审批 - TrainingRecords: 培训记录 - PerformanceRecords: 绩效记录 - DisciplinaryRecords: 违纪记录 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { useState, lazy, Suspense } from 'react'
|
||||
import { Bot, FileSearch, Scale, Sparkles, BookOpen, TrendingUp, Loader2 } from 'lucide-react'
|
||||
import PageGuide from '../components/ui/PageGuide'
|
||||
|
||||
const ChatTab = lazy(() => import('./ai-assistant/ChatTab').then(m => ({ default: m.ChatTab })))
|
||||
const PredictTab = lazy(() => import('./ai-assistant/PredictTab').then(m => ({ default: m.PredictTab })))
|
||||
@@ -24,6 +25,7 @@ export default function AIAssistant() {
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<PageGuide>AI 智能助手,提供用工风险预测、案例分析、合规建议等智能服务。支持自然语言提问,系统自动匹配相关法规和案例。关联:风险预测数据来自花名册和合同信息。</PageGuide>
|
||||
<div className="flex items-center gap-2">
|
||||
<Bot className="h-5 w-5 text-primary" />
|
||||
<div>
|
||||
|
||||
@@ -7,6 +7,7 @@ import Card from '../components/ui/Card'
|
||||
import Button from '../components/ui/Button'
|
||||
import EmptyState from '../components/ui/EmptyState'
|
||||
import Pagination from '../components/ui/Pagination'
|
||||
import PageGuide from '../components/ui/PageGuide'
|
||||
|
||||
const ACTION_LABELS: Record<string, string> = {
|
||||
CREATE: '创建',
|
||||
@@ -147,6 +148,7 @@ export default function AuditLog() {
|
||||
|
||||
return (
|
||||
<div className="space-y-3">
|
||||
<PageGuide>审计日志,记录系统中所有关键操作,包括员工档案变更、合同签订、薪酬调整、权限变更等。支持按操作类型、时间范围、操作人筛选查看,用于合规追溯。</PageGuide>
|
||||
<div className="flex items-center gap-2">
|
||||
<ScrollText className="h-5 w-5 text-primary" />
|
||||
<h1 className="text-base font-semibold">系统操作日志</h1>
|
||||
|
||||
@@ -7,6 +7,7 @@ import { dashboardApi, calendarApi } from '../lib/api-services'
|
||||
import Card from '../components/ui/Card'
|
||||
import Button from '../components/ui/Button'
|
||||
import { Input, Label } from '../components/ui/Input'
|
||||
import PageGuide from '../components/ui/PageGuide'
|
||||
|
||||
const EVENT_TYPE_COLORS: Record<string, string> = {
|
||||
CONTRACT_EXPIRY: 'bg-red-100 text-red-700 border-red-200',
|
||||
@@ -190,6 +191,7 @@ export default function Calendar() {
|
||||
|
||||
return (
|
||||
<div className="space-y-3">
|
||||
<PageGuide>人事日历,集中展示入职、合同到期、试用期到期、 birthdays 等关键人事事件。支持按月/周视图查看,提前预警重要节点。关联:数据自动来自花名册和合同信息。</PageGuide>
|
||||
{/* 顶部工具栏 */}
|
||||
<div className="flex items-center justify-between flex-wrap gap-2">
|
||||
<div className="flex items-center gap-2">
|
||||
|
||||
@@ -7,6 +7,7 @@ import Card from '../components/ui/Card'
|
||||
import Button from '../components/ui/Button'
|
||||
import { Input, Label, Select } from '../components/ui/Input'
|
||||
import EmptyState from '../components/ui/EmptyState'
|
||||
import PageGuide from '../components/ui/PageGuide'
|
||||
|
||||
const FILE_TYPES = [
|
||||
{ value: 'BUSINESS_LICENSE', label: '营业执照' },
|
||||
@@ -82,6 +83,7 @@ export default function CompanyFiles() {
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<PageGuide>公司文件管理,集中存储和管理公司制度、合同模板、政策文件等。支持分类管理、在线预览、权限控制。关联:员工可在员工端查看已授权的公司文件。</PageGuide>
|
||||
<div className="flex items-center gap-2">
|
||||
<Building2 className="h-5 w-5 text-primary" />
|
||||
<h1 className="text-lg font-semibold">公司备用文件</h1>
|
||||
|
||||
@@ -10,6 +10,7 @@ import Button from '../components/ui/Button'
|
||||
import { Input, Label, Select } from '../components/ui/Input'
|
||||
import EmptyState from '../components/ui/EmptyState'
|
||||
import Pagination from '../components/ui/Pagination'
|
||||
import PageGuide from '../components/ui/PageGuide'
|
||||
|
||||
const LEAVE_TYPE_MAP: Record<string, string> = {
|
||||
SICK: '病假',
|
||||
@@ -75,6 +76,7 @@ export default function LeaveApproval() {
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<PageGuide>请假审批,处理员工请假申请,支持事假、病假、年假、婚假等类型。流程:员工提交申请 → 主管审批 → HR 备案 → 同步考勤。关联:审批通过后自动更新考勤记录。</PageGuide>
|
||||
<div className="flex items-center gap-2">
|
||||
<CalendarClock className="w-5 h-5 text-primary" />
|
||||
<div>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { useState, lazy, Suspense } from 'react'
|
||||
import { useSearchParams } from 'react-router-dom'
|
||||
import { Layers, Wallet, LayoutTemplate, Clock, Receipt, Loader2 } from 'lucide-react'
|
||||
import PageGuide from '../components/ui/PageGuide'
|
||||
|
||||
const BatchManager = lazy(() => import('./money/BatchTab').then(m => ({ default: m.BatchManager })))
|
||||
const TemplateManager = lazy(() => import('./money/TemplateTab').then(m => ({ default: m.TemplateManager })))
|
||||
@@ -23,6 +24,7 @@ export default function Money() {
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<PageGuide>薪酬管理,支持工资条发放、批量算薪、加班费计算和工资模板配置。流程:①配置模板 → ②导入考勤数据 → ③批量算薪 → ④生成工资条。关联:工资数据来自花名册薪酬信息,考勤数据来自考勤管理。</PageGuide>
|
||||
<div className="flex items-center gap-2">
|
||||
<Wallet className="w-5 h-5 text-primary" />
|
||||
<div>
|
||||
|
||||
@@ -8,6 +8,7 @@ import Card from '../components/ui/Card'
|
||||
import Button from '../components/ui/Button'
|
||||
import EmptyState from '../components/ui/EmptyState'
|
||||
import Pagination from '../components/ui/Pagination'
|
||||
import PageGuide from '../components/ui/PageGuide'
|
||||
|
||||
const TYPE_LABELS: Record<string, string> = {
|
||||
CONTRACT_EXPIRY: '合同到期',
|
||||
@@ -62,6 +63,7 @@ export default function Notifications() {
|
||||
|
||||
return (
|
||||
<div className="space-y-3">
|
||||
<PageGuide>通知中心,集中管理系统通知消息,包括合同到期提醒、试用期到期、审批通知等。支持已读/未读管理、通知偏好设置。</PageGuide>
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<div className="flex items-center gap-2">
|
||||
|
||||
@@ -10,6 +10,7 @@ import Card from '../components/ui/Card'
|
||||
import Button from '../components/ui/Button'
|
||||
import { Input, Label, Select } from '../components/ui/Input'
|
||||
import Modal from '../components/ui/Modal'
|
||||
import PageGuide from '../components/ui/PageGuide'
|
||||
import api from '../lib/api'
|
||||
|
||||
export default function OrgChart() {
|
||||
@@ -100,6 +101,7 @@ export default function OrgChart() {
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<PageGuide>组织架构管理,支持部门树形结构管理和岗位字典维护。可新增、编辑、删除部门和岗位,设置上下级关系和职级。关联:调动员工时使用此处维护的部门和职务。</PageGuide>
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<h1 className="text-xl font-semibold text-gray-900">组织架构</h1>
|
||||
|
||||
@@ -10,6 +10,7 @@ import Button from '../components/ui/Button'
|
||||
import { Input, Label, Select } from '../components/ui/Input'
|
||||
import Modal from '../components/ui/Modal'
|
||||
import { useConfirm } from '../hooks/useConfirm'
|
||||
import PageGuide from '../components/ui/PageGuide'
|
||||
|
||||
|
||||
export default function Settings() {
|
||||
@@ -48,6 +49,7 @@ export default function Settings() {
|
||||
|
||||
return (
|
||||
<div className="space-y-3">
|
||||
<PageGuide>系统设置,管理组织信息、用户权限、审批流程、系统参数等。支持多角色配置、审批节点设置、通知模板管理。</PageGuide>
|
||||
<div className="flex items-center gap-2">
|
||||
<Building2 className="h-5 w-5 text-primary" />
|
||||
<div>
|
||||
|
||||
@@ -13,6 +13,7 @@ import Modal from '../components/ui/Modal'
|
||||
import EmptyState from '../components/ui/EmptyState'
|
||||
import Pagination from '../components/ui/Pagination'
|
||||
import { useConfirm } from '../hooks/useConfirm'
|
||||
import PageGuide from '../components/ui/PageGuide'
|
||||
|
||||
const CATEGORY_LABELS: Record<string, string> = {
|
||||
CONTRACT: '合同',
|
||||
@@ -78,6 +79,7 @@ export default function Templates() {
|
||||
|
||||
return (
|
||||
<div className="space-y-3">
|
||||
<PageGuide>模板管理,维护各类法律文书模板,包括劳动合同、离职证明、收入证明等。支持新增、编辑、预览模板,模板变量自动填充员工信息。关联:开具证明和签订合同时使用此处模板。</PageGuide>
|
||||
<div className="flex items-center gap-2">
|
||||
<FileText className="h-5 w-5 text-primary" />
|
||||
<h1 className="text-base font-semibold">用工文本模板库</h1>
|
||||
|
||||
@@ -8,6 +8,7 @@ import api from '../../lib/api'
|
||||
import { usePageSize } from '../../hooks/usePageSize'
|
||||
import { Input, Label, Select } from '../../components/ui/Input'
|
||||
import Button from '../../components/ui/Button'
|
||||
import PageGuide from '../../components/ui/PageGuide'
|
||||
|
||||
const TYPE_LABELS: Record<string, string> = { LATE: '迟到', ABSENT: '旷工', INSUBORDINATION: '不服从管理', MISCONDUCT: '违纪', VIOLATE_POLICY: '违反规章制度', OTHER: '其他' }
|
||||
const SEVERITY_LABELS: Record<string, string> = { WARNING: '警告', SERIOUS: '严重', SEVERE: '极其严重' }
|
||||
@@ -73,6 +74,7 @@ export default function DisciplinaryRecords() {
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<PageGuide>违纪记录管理,记录员工违纪行为和处理结果,包括警告、记过、解除等。支持新增记录、上传证据材料、查询历史。关联:违纪记录关联员工档案,严重违纪可触发解聘流程。</PageGuide>
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<h1 className="text-base font-semibold">违纪记录</h1>
|
||||
|
||||
@@ -8,6 +8,7 @@ import api from '../../lib/api'
|
||||
import { usePageSize } from '../../hooks/usePageSize'
|
||||
import { Input, Label, Select } from '../../components/ui/Input'
|
||||
import Button from '../../components/ui/Button'
|
||||
import PageGuide from '../../components/ui/PageGuide'
|
||||
|
||||
const RESULT_LABELS: Record<string, string> = { EXCELLENT: '优秀', QUALIFIED: '合格', NEED_IMPROVE: '需改进', UNQUALIFIED: '不胜任' }
|
||||
const RESULT_COLORS: Record<string, string> = { EXCELLENT: 'bg-green-50 text-green-700', QUALIFIED: 'bg-blue-50 text-blue-700', NEED_IMPROVE: 'bg-amber-50 text-amber-700', UNQUALIFIED: 'bg-red-50 text-red-700' }
|
||||
@@ -72,6 +73,7 @@ export default function PerformanceRecords() {
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<PageGuide>绩效记录管理,记录员工绩效考核结果,支持季度、年度考核。流程:设定目标 → 周期评估 → 结果归档。关联:绩效数据关联员工档案,影响薪酬调整和晋升。</PageGuide>
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<h1 className="text-base font-semibold">绩效考核</h1>
|
||||
|
||||
@@ -9,6 +9,7 @@ import { usePageSize } from '../../hooks/usePageSize'
|
||||
import { Input, Label, Select } from '../../components/ui/Input'
|
||||
import Button from '../../components/ui/Button'
|
||||
import Modal from '../../components/ui/Modal'
|
||||
import PageGuide from '../../components/ui/PageGuide'
|
||||
|
||||
const ACK_LABELS: Record<string, string> = { PENDING: '待签收', SIGNED: '已签收', REFUSED: '拒绝签收' }
|
||||
const ACK_COLORS: Record<string, string> = { PENDING: 'bg-amber-50 text-amber-700', SIGNED: 'bg-green-50 text-green-700', REFUSED: 'bg-red-50 text-red-700' }
|
||||
@@ -100,6 +101,7 @@ export default function TrainingRecords() {
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<PageGuide>培训记录管理,记录员工参加的各类培训,包括入职培训、岗位培训、安全培训等。支持新增记录、上传证书、查询历史。关联:培训数据关联员工档案,可在花名册查看。</PageGuide>
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<h1 className="text-base font-semibold">培训记录</h1>
|
||||
|
||||
@@ -9,6 +9,7 @@ import Card from '../../components/ui/Card'
|
||||
import Button from '../../components/ui/Button'
|
||||
import { Input, Label, Select } from '../../components/ui/Input'
|
||||
import Modal from '../../components/ui/Modal'
|
||||
import PageGuide from '../../components/ui/PageGuide'
|
||||
import api from '../../lib/api'
|
||||
|
||||
export default function SupportDashboard() {
|
||||
@@ -59,6 +60,7 @@ export default function SupportDashboard() {
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<PageGuide>客服工作台,集中处理员工咨询和工单。支持查看工单列表、处理进度跟踪、回复消息。关联:工单可关联员工档案,处理结果同步到花名册。</PageGuide>
|
||||
<div>
|
||||
<h1 className="text-xl font-semibold text-gray-900">客服工作台</h1>
|
||||
<p className="text-sm text-gray-500 mt-1">工单管理、客户会话、租户数据穿透</p>
|
||||
|
||||
@@ -11,6 +11,7 @@ import { BarChart, Bar, XAxis, YAxis, Tooltip, ResponsiveContainer, Cell } from
|
||||
import { dashboardApi } from '../../lib/api-services'
|
||||
import Card from '../../components/ui/Card'
|
||||
import Button from '../../components/ui/Button'
|
||||
import PageGuide from '../../components/ui/PageGuide'
|
||||
|
||||
function fmtMoney(n: number): string {
|
||||
if (n >= 10000) return `¥${(n / 10000).toFixed(1)}万`
|
||||
@@ -84,6 +85,7 @@ export default function AnnualValueReport() {
|
||||
|
||||
return (
|
||||
<div className="space-y-3">
|
||||
<PageGuide>年度价值报表,汇总年度人力成本、社保支出、薪酬分布等关键财务数据。支持按部门、岗位维度分析,导出年度报告。关联:数据来自花名册和薪酬模块。</PageGuide>
|
||||
{/* 标题栏 */}
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
|
||||
@@ -11,6 +11,7 @@ import { RadialBarChart, RadialBar, PolarAngleAxis, ResponsiveContainer } from '
|
||||
import { dashboardApi } from '../../lib/api-services'
|
||||
import Card from '../../components/ui/Card'
|
||||
import Button from '../../components/ui/Button'
|
||||
import PageGuide from '../../components/ui/PageGuide'
|
||||
|
||||
/**
|
||||
* 用工体检诊断页面
|
||||
@@ -62,6 +63,7 @@ export default function HealthCheck() {
|
||||
|
||||
return (
|
||||
<div className="space-y-3">
|
||||
<PageGuide>用工健康检查,评估当前用工合规状况,包括合同签订率、社保覆盖率、试用期合规等关键指标。支持生成检查报告和整改建议。</PageGuide>
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<div className="flex items-center gap-2">
|
||||
|
||||
@@ -10,6 +10,7 @@ import { Calculator, HeartPulse, Info } from 'lucide-react'
|
||||
import Card from '../../components/ui/Card'
|
||||
import Button from '../../components/ui/Button'
|
||||
import { settingsApi } from '../../lib/api-services'
|
||||
import PageGuide from '../../components/ui/PageGuide'
|
||||
|
||||
interface PolicyRule {
|
||||
maxYears: number
|
||||
@@ -108,6 +109,7 @@ export default function MedicalPeriodCalculator() {
|
||||
|
||||
return (
|
||||
<div className="space-y-3">
|
||||
<PageGuide>医疗期计算器,根据员工工龄和病情计算法定医疗期。输入入职日期、诊断日期等,自动计算医疗期起止时间和对应工资标准。关联:解聘合规检查时参考医疗期信息。</PageGuide>
|
||||
<div className="flex items-center gap-2">
|
||||
<HeartPulse className="h-5 w-5 text-primary" />
|
||||
<h1 className="text-base font-semibold">医疗期计算器</h1>
|
||||
|
||||
Reference in New Issue
Block a user