import type { BackendMenuVO } from '@/utils/menuConverter'; // Users - simplified inline type (not importing from api to avoid circular) export interface MockSystemUser { id: number; username: string; nickname: string; deptId: number; postIds: string[]; email: string; mobile: string; sex: number; avatar: string; loginIp: string; status: number; remark: string; createTime: string; } export interface MockSystemRole { id: number; name: string; code: string; sort: number; status: number; type: number; dataScope: number; dataScopeDeptIds: number[]; createTime: string; } export interface MockDept { id: number; name: string; parentId: number; status: number; sort: number; leaderUserId: number; phone: string; email: string; createTime: string; } export interface MockPost { id: number; name: string; code: string; sort: number; status: number; createTime: string; } export interface MockDictType { id: number; name: string; type: string; status: number; remark: string; createTime: string; } export interface MockDictData { id: number; sort: number; label: string; value: string; dictType: string; status: number; colorType: string; cssClass: string; remark: string; createTime: string; } export interface MockMenu { id: number; name: string; permission: string; type: number; sort: number; parentId: number; path: string; icon: string; component: string; status: number; visible: boolean; keepAlive: boolean; createTime: string; } export interface MockCodeRule { id: number; ruleCode: string; ruleName: string; scope: string; formatPattern: string; description: string; status: number; lifecycleStatus: number; revision: number; createTime: string; } // Users export const mockSystemUsers: MockSystemUser[] = [ { id: 1, username: 'admin', nickname: '管理员', deptId: 100, postIds: ['1'], email: 'admin@example.com', mobile: '13800000001', sex: 1, avatar: '', loginIp: '127.0.0.1', status: 0, remark: '系统管理员', createTime: '2025-01-01 00:00:00' }, { id: 2, username: 'user', nickname: '普通用户', deptId: 101, postIds: ['2'], email: 'user@example.com', mobile: '13800000002', sex: 2, avatar: '', loginIp: '127.0.0.1', status: 0, remark: '普通用户', createTime: '2025-01-15 10:00:00' }, { id: 3, username: 'zhangsan', nickname: '张三', deptId: 102, postIds: ['2'], email: 'zhangsan@example.com', mobile: '13800000003', sex: 1, avatar: '', loginIp: '192.168.1.10', status: 0, remark: '', createTime: '2025-02-01 09:00:00' }, { id: 4, username: 'lisi', nickname: '李四', deptId: 102, postIds: ['2'], email: 'lisi@example.com', mobile: '13800000004', sex: 1, avatar: '', loginIp: '192.168.1.11', status: 1, remark: '', createTime: '2025-02-15 14:00:00' }, { id: 5, username: 'wangwu', nickname: '王五', deptId: 103, postIds: ['3'], email: 'wangwu@example.com', mobile: '13800000005', sex: 1, avatar: '', loginIp: '192.168.1.12', status: 0, remark: '', createTime: '2025-03-01 08:30:00' }, ]; export const mockPasswords: Record = { admin: 'admin123', user: 'user123', zhangsan: '123456', lisi: '123456', wangwu: '123456', }; // Roles export const mockSystemRoles: MockSystemRole[] = [ { id: 1, name: '超级管理员', code: 'super_admin', sort: 1, status: 0, type: 1, dataScope: 1, dataScopeDeptIds: [], createTime: '2025-01-01 00:00:00' }, { id: 2, name: '普通角色', code: 'common', sort: 2, status: 0, type: 2, dataScope: 2, dataScopeDeptIds: [100, 101], createTime: '2025-01-01 00:00:00' }, { id: 3, name: '测试角色', code: 'test', sort: 3, status: 0, type: 2, dataScope: 5, dataScopeDeptIds: [], createTime: '2025-03-01 10:00:00' }, ]; // Departments (tree) export const mockDepts: MockDept[] = [ { id: 100, name: '华丰科技', parentId: 0, status: 0, sort: 0, leaderUserId: 1, phone: '15888888888', email: 'hf@example.com', createTime: '2025-01-01 00:00:00' }, { id: 101, name: '深圳总公司', parentId: 100, status: 0, sort: 1, leaderUserId: 1, phone: '15888888888', email: 'sz@example.com', createTime: '2025-01-01 00:00:00' }, { id: 102, name: '研发部门', parentId: 101, status: 0, sort: 1, leaderUserId: 3, phone: '15888888889', email: 'rd@example.com', createTime: '2025-01-01 00:00:00' }, { id: 103, name: '市场部门', parentId: 101, status: 0, sort: 2, leaderUserId: 5, phone: '15888888890', email: 'mkt@example.com', createTime: '2025-01-01 00:00:00' }, { id: 104, name: '测试部门', parentId: 101, status: 0, sort: 3, leaderUserId: 2, phone: '15888888891', email: 'qa@example.com', createTime: '2025-01-01 00:00:00' }, { id: 105, name: '上海分公司', parentId: 100, status: 0, sort: 2, leaderUserId: 1, phone: '15888888892', email: 'sh@example.com', createTime: '2025-02-01 00:00:00' }, { id: 106, name: '运营部门', parentId: 105, status: 0, sort: 1, leaderUserId: 2, phone: '15888888893', email: 'ops@example.com', createTime: '2025-02-01 00:00:00' }, ]; // Posts export const mockPosts: MockPost[] = [ { id: 1, name: '项目经理', code: 'pm', sort: 1, status: 0, createTime: '2025-01-01 00:00:00' }, { id: 2, name: '开发工程师', code: 'dev', sort: 2, status: 0, createTime: '2025-01-01 00:00:00' }, { id: 3, name: '测试工程师', code: 'qa', sort: 3, status: 0, createTime: '2025-01-01 00:00:00' }, { id: 4, name: '产品经理', code: 'product', sort: 4, status: 0, createTime: '2025-01-01 00:00:00' }, ]; // Dict Types export const mockDictTypes: MockDictType[] = [ { id: 1, name: '用户性别', type: 'system_user_sex', status: 0, remark: '用户性别列表', createTime: '2025-01-01 00:00:00' }, { id: 2, name: '通用状态', type: 'common_status', status: 0, remark: '通用状态列表', createTime: '2025-01-01 00:00:00' }, { id: 3, name: '系统开关', type: 'system_normal_disable', status: 0, remark: '系统开关列表', createTime: '2025-01-01 00:00:00' }, { id: 4, name: '菜单类型', type: 'system_menu_type', status: 0, remark: '菜单类型列表', createTime: '2025-01-01 00:00:00' }, { id: 5, name: '数据范围', type: 'system_data_scope', status: 0, remark: '数据范围列表', createTime: '2025-01-01 00:00:00' }, ]; // Dict Data export const mockDictDatas: MockDictData[] = [ { id: 1, sort: 1, label: '男', value: '1', dictType: 'system_user_sex', status: 0, colorType: 'primary', cssClass: '', remark: '', createTime: '2025-01-01 00:00:00' }, { id: 2, sort: 2, label: '女', value: '2', dictType: 'system_user_sex', status: 0, colorType: 'danger', cssClass: '', remark: '', createTime: '2025-01-01 00:00:00' }, { id: 3, sort: 1, label: '开启', value: '0', dictType: 'common_status', status: 0, colorType: 'success', cssClass: '', remark: '', createTime: '2025-01-01 00:00:00' }, { id: 4, sort: 2, label: '关闭', value: '1', dictType: 'common_status', status: 0, colorType: 'error', cssClass: '', remark: '', createTime: '2025-01-01 00:00:00' }, { id: 5, sort: 1, label: '正常', value: '0', dictType: 'system_normal_disable', status: 0, colorType: 'success', cssClass: '', remark: '', createTime: '2025-01-01 00:00:00' }, { id: 6, sort: 2, label: '停用', value: '1', dictType: 'system_normal_disable', status: 0, colorType: 'error', cssClass: '', remark: '', createTime: '2025-01-01 00:00:00' }, { id: 7, sort: 1, label: '目录', value: '1', dictType: 'system_menu_type', status: 0, colorType: '', cssClass: '', remark: '', createTime: '2025-01-01 00:00:00' }, { id: 8, sort: 2, label: '菜单', value: '2', dictType: 'system_menu_type', status: 0, colorType: '', cssClass: '', remark: '', createTime: '2025-01-01 00:00:00' }, { id: 9, sort: 3, label: '按钮', value: '3', dictType: 'system_menu_type', status: 0, colorType: '', cssClass: '', remark: '', createTime: '2025-01-01 00:00:00' }, { id: 10, sort: 1, label: '全部数据权限', value: '1', dictType: 'system_data_scope', status: 0, colorType: '', cssClass: '', remark: '', createTime: '2025-01-01 00:00:00' }, { id: 11, sort: 2, label: '指定部门权限', value: '2', dictType: 'system_data_scope', status: 0, colorType: '', cssClass: '', remark: '', createTime: '2025-01-01 00:00:00' }, { id: 12, sort: 3, label: '本部门数据权限', value: '3', dictType: 'system_data_scope', status: 0, colorType: '', cssClass: '', remark: '', createTime: '2025-01-01 00:00:00' }, { id: 13, sort: 4, label: '本部门及以下数据权限', value: '4', dictType: 'system_data_scope', status: 0, colorType: '', cssClass: '', remark: '', createTime: '2025-01-01 00:00:00' }, { id: 14, sort: 5, label: '仅本人数据权限', value: '5', dictType: 'system_data_scope', status: 0, colorType: '', cssClass: '', remark: '', createTime: '2025-01-01 00:00:00' }, ]; // Menus (for the menu management page) export const mockMenus: MockMenu[] = [ { id: 1, name: '系统管理', permission: '', type: 1, sort: 1, parentId: 0, path: 'system', icon: 'BlockOutlined', component: '', status: 0, visible: true, keepAlive: true, createTime: '2025-01-01 00:00:00' }, { id: 100, name: '用户管理', permission: 'system:user:list', type: 2, sort: 1, parentId: 1, path: 'user', icon: 'BlockOutlined', component: 'system/user/index', status: 0, visible: true, keepAlive: true, createTime: '2025-01-01 00:00:00' }, { id: 101, name: '角色管理', permission: 'system:role:list', type: 2, sort: 2, parentId: 1, path: 'role', icon: 'BlockOutlined', component: 'system/role/index', status: 0, visible: true, keepAlive: true, createTime: '2025-01-01 00:00:00' }, { id: 102, name: '菜单管理', permission: 'system:menu:list', type: 2, sort: 3, parentId: 1, path: 'menu', icon: 'BlockOutlined', component: 'system/menu/index', status: 0, visible: true, keepAlive: true, createTime: '2025-01-01 00:00:00' }, { id: 103, name: '部门管理', permission: 'system:dept:list', type: 2, sort: 4, parentId: 1, path: 'dept', icon: 'BlockOutlined', component: 'system/dept/index', status: 0, visible: true, keepAlive: true, createTime: '2025-01-01 00:00:00' }, { id: 104, name: '字典管理', permission: 'system:dict:list', type: 2, sort: 5, parentId: 1, path: 'dict', icon: 'BlockOutlined', component: 'system/dict/index', status: 0, visible: true, keepAlive: true, createTime: '2025-01-01 00:00:00' }, { id: 1001, name: '用户查询', permission: 'system:user:query', type: 3, sort: 1, parentId: 100, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2025-01-01 00:00:00' }, { id: 1002, name: '用户新增', permission: 'system:user:create', type: 3, sort: 2, parentId: 100, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2025-01-01 00:00:00' }, { id: 1003, name: '用户修改', permission: 'system:user:update', type: 3, sort: 3, parentId: 100, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2025-01-01 00:00:00' }, { id: 1004, name: '用户删除', permission: 'system:user:delete', type: 3, sort: 4, parentId: 100, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2025-01-01 00:00:00' }, { id: 2, name: '主数据管理', permission: '', type: 1, sort: 2, parentId: 0, path: 'mdm', icon: 'BlockOutlined', component: '', status: 0, visible: true, keepAlive: true, createTime: '2025-01-01 00:00:00' }, { id: 280, name: '编码体系', permission: '', type: 1, sort: 2, parentId: 2, path: 'coding-system', icon: 'BlockOutlined', component: '', status: 0, visible: true, keepAlive: true, createTime: '2025-06-05 00:00:00' }, // MDM 编码体系子菜单 { id: 2800, name: '编码规则', permission: 'mdm:coding-system:code-rule:list', type: 2, sort: 1, parentId: 280, path: 'code-rule', icon: 'BlockOutlined', component: 'mdm/coding-system/code-rule/index', status: 0, visible: true, keepAlive: true, createTime: '2025-06-05 00:00:00' }, { id: 2810, name: '编码生成日志', permission: 'mdm:coding-system:log:list', type: 2, sort: 2, parentId: 280, path: 'code-log', icon: 'BlockOutlined', component: 'mdm/coding-system/code-log/index', status: 0, visible: true, keepAlive: true, createTime: '2025-06-05 00:00:00' }, { id: 2820, name: '编码对照', permission: 'mdm:coding-system:mapping:list', type: 2, sort: 3, parentId: 280, path: 'code-mapping', icon: 'BlockOutlined', component: 'mdm/coding-system/code-mapping/index', status: 0, visible: true, keepAlive: true, createTime: '2025-06-05 00:00:00' }, { id: 2830, name: '审批管理', permission: 'mdm:coding-system:approval:list', type: 2, sort: 4, parentId: 280, path: 'approval', icon: 'BlockOutlined', component: 'mdm/coding-system/approval/index', status: 0, visible: true, keepAlive: true, createTime: '2025-06-05 00:00:00' }, { id: 2840, name: '同步管理', permission: 'mdm:coding-system:sync:list', type: 2, sort: 5, parentId: 280, path: 'sync', icon: 'BlockOutlined', component: 'mdm/coding-system/sync/index', status: 0, visible: true, keepAlive: true, createTime: '2025-06-05 00:00:00' }, { id: 2850, name: '变量字典', permission: 'mdm:coding-system:variable:list', type: 2, sort: 6, parentId: 280, path: 'variable-dict', icon: 'BlockOutlined', component: 'mdm/coding-system/variable-dict/index', status: 0, visible: true, keepAlive: true, createTime: '2025-06-05 00:00:00' }, { id: 2860, name: '状态流转', permission: 'mdm:coding-system:state-flow:list', type: 2, sort: 7, parentId: 280, path: 'state-flow', icon: 'BlockOutlined', component: 'mdm/coding-system/state-flow/index', status: 0, visible: true, keepAlive: true, createTime: '2025-06-05 00:00:00' }, // MDM 编码体系按钮权限 { id: 2801, name: '编码规则查询', permission: 'mdm:coding-system:code-rule:query', type: 3, sort: 1, parentId: 2800, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2025-06-05 00:00:00' }, { id: 2802, name: '编码规则新增', permission: 'mdm:coding-system:code-rule:create', type: 3, sort: 2, parentId: 2800, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2025-06-05 00:00:00' }, { id: 2803, name: '编码规则修改', permission: 'mdm:coding-system:code-rule:update', type: 3, sort: 3, parentId: 2800, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2025-06-05 00:00:00' }, { id: 2804, name: '编码规则删除', permission: 'mdm:coding-system:code-rule:delete', type: 3, sort: 4, parentId: 2800, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2025-06-05 00:00:00' }, { id: 2805, name: '编码对照新增', permission: 'mdm:coding-system:mapping:create', type: 3, sort: 1, parentId: 2820, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2025-06-05 00:00:00' }, { id: 2806, name: '编码对照删除', permission: 'mdm:coding-system:mapping:delete', type: 3, sort: 2, parentId: 2820, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2025-06-05 00:00:00' }, // APS 裁剪优化 { id: 3, name: 'APS 裁剪优化', permission: '', type: 1, sort: 3, parentId: 0, path: 'aps', icon: 'BlockOutlined', component: '', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, { id: 300, name: '母卷管理', permission: 'aps:coil:list', type: 2, sort: 1, parentId: 3, path: 'coil', icon: 'BlockOutlined', component: 'aps/coil/index', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, { id: 301, name: '订单管理', permission: 'aps:order:list', type: 2, sort: 2, parentId: 3, path: 'order', icon: 'BlockOutlined', component: 'aps/order/index', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, { id: 302, name: '工艺参数', permission: 'aps:param:list', type: 2, sort: 3, parentId: 3, path: 'param', icon: 'BlockOutlined', component: 'aps/param/index', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, { id: 303, name: '方案生成', permission: 'aps:task:list', type: 2, sort: 4, parentId: 3, path: 'optimization', icon: 'BlockOutlined', component: 'aps/optimization/index', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, { id: 304, name: '优化任务', permission: 'aps:task:list', type: 2, sort: 5, parentId: 3, path: 'task', icon: 'BlockOutlined', component: 'aps/task/index', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, { id: 305, name: '裁剪方案', permission: 'aps:plan:list', type: 2, sort: 6, parentId: 3, path: 'plan', icon: 'BlockOutlined', component: 'aps/plan/index', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, // APS 按钮权限 { id: 3001, name: '母卷查询', permission: 'aps:coil:query', type: 3, sort: 1, parentId: 300, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, { id: 3002, name: '母卷新增', permission: 'aps:coil:create', type: 3, sort: 2, parentId: 300, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, { id: 3003, name: '母卷修改', permission: 'aps:coil:update', type: 3, sort: 3, parentId: 300, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, { id: 3004, name: '母卷删除', permission: 'aps:coil:delete', type: 3, sort: 4, parentId: 300, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, { id: 3005, name: '母卷导入', permission: 'aps:coil:import', type: 3, sort: 5, parentId: 300, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, { id: 3006, name: '母卷导出', permission: 'aps:coil:export', type: 3, sort: 6, parentId: 300, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, { id: 3011, name: '订单查询', permission: 'aps:order:query', type: 3, sort: 1, parentId: 301, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, { id: 3012, name: '订单新增', permission: 'aps:order:create', type: 3, sort: 2, parentId: 301, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, { id: 3013, name: '订单修改', permission: 'aps:order:update', type: 3, sort: 3, parentId: 301, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, { id: 3014, name: '订单删除', permission: 'aps:order:delete', type: 3, sort: 4, parentId: 301, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, { id: 3015, name: '订单导入', permission: 'aps:order:import', type: 3, sort: 5, parentId: 301, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, { id: 3016, name: '订单导出', permission: 'aps:order:export', type: 3, sort: 6, parentId: 301, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, { id: 3021, name: '参数修改', permission: 'aps:param:update', type: 3, sort: 1, parentId: 302, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, { id: 3031, name: '任务提交', permission: 'aps:task:create', type: 3, sort: 1, parentId: 303, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, { id: 3032, name: '任务取消', permission: 'aps:task:cancel', type: 3, sort: 2, parentId: 304, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, { id: 3033, name: '任务续算', permission: 'aps:task:resume', type: 3, sort: 3, parentId: 304, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, { id: 3034, name: '任务删除', permission: 'aps:task:delete', type: 3, sort: 4, parentId: 304, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, { id: 3041, name: '方案查询', permission: 'aps:plan:query', type: 3, sort: 1, parentId: 305, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, { id: 3042, name: '方案确认', permission: 'aps:plan:confirm', type: 3, sort: 2, parentId: 305, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, { id: 3043, name: '方案导出', permission: 'aps:plan:export', type: 3, sort: 3, parentId: 305, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, { id: 3044, name: '方案删除', permission: 'aps:plan:delete', type: 3, sort: 4, parentId: 305, path: '', icon: '', component: '', status: 0, visible: true, keepAlive: true, createTime: '2026-06-01 00:00:00' }, ]; // Backend menus (for auth/permission-info endpoint) export const mockAdminBackendMenus: BackendMenuVO[] = [ { id: 1, parentId: 0, name: '系统管理', path: 'system', component: null, componentName: null, icon: 'BlockOutlined', visible: true, keepAlive: true, children: [ { id: 100, parentId: 1, name: '用户管理', path: 'user', component: 'system/user/index', componentName: 'SystemUser', icon: 'BlockOutlined', visible: true, keepAlive: true, children: null }, { id: 101, parentId: 1, name: '角色管理', path: 'role', component: 'system/role/index', componentName: 'SystemRole', icon: 'BlockOutlined', visible: true, keepAlive: true, children: null }, { id: 102, parentId: 1, name: '菜单管理', path: 'menu', component: 'system/menu/index', componentName: 'SystemMenu', icon: 'BlockOutlined', visible: true, keepAlive: true, children: null }, { id: 103, parentId: 1, name: '部门管理', path: 'dept', component: 'system/dept/index', componentName: 'SystemDept', icon: 'BlockOutlined', visible: true, keepAlive: true, children: null }, { id: 104, parentId: 1, name: '字典管理', path: 'dict', component: 'system/dict/index', componentName: 'SystemDict', icon: 'BlockOutlined', visible: true, keepAlive: true, children: null }, ], }, { id: 2, parentId: 0, name: '主数据管理', path: 'mdm', component: null, componentName: null, icon: 'BlockOutlined', visible: true, keepAlive: true, children: [ { id: 280, parentId: 2, name: '编码体系', path: 'coding-system', component: null, componentName: null, icon: 'BlockOutlined', visible: true, keepAlive: true, children: [ { id: 2800, parentId: 280, name: '编码规则', path: 'code-rule', component: 'mdm/coding-system/code-rule/index', componentName: 'MdmCodingSystemCodeRule', icon: 'BlockOutlined', visible: true, keepAlive: true, children: null }, { id: 2810, parentId: 280, name: '编码生成日志', path: 'code-log', component: 'mdm/coding-system/code-log/index', componentName: 'MdmCodingSystemCodeLog', icon: 'BlockOutlined', visible: true, keepAlive: true, children: null }, { id: 2820, parentId: 280, name: '编码对照', path: 'code-mapping', component: 'mdm/coding-system/code-mapping/index', componentName: 'MdmCodingSystemCodeMapping', icon: 'BlockOutlined', visible: true, keepAlive: true, children: null }, { id: 2830, parentId: 280, name: '审批管理', path: 'approval', component: 'mdm/coding-system/approval/index', componentName: 'MdmCodingSystemApproval', icon: 'BlockOutlined', visible: true, keepAlive: true, children: null }, { id: 2840, parentId: 280, name: '同步管理', path: 'sync', component: 'mdm/coding-system/sync/index', componentName: 'MdmCodingSystemSync', icon: 'BlockOutlined', visible: true, keepAlive: true, children: null }, { id: 2850, parentId: 280, name: '变量字典', path: 'variable-dict', component: 'mdm/coding-system/variable-dict/index', componentName: 'MdmCodingSystemVariableDict', icon: 'BlockOutlined', visible: true, keepAlive: true, children: null }, { id: 2860, parentId: 280, name: '状态流转', path: 'state-flow', component: 'mdm/coding-system/state-flow/index', componentName: 'MdmCodingSystemStateFlow', icon: 'BlockOutlined', visible: true, keepAlive: true, children: null }, ], }, ], }, { id: 3, parentId: 0, name: 'APS 裁剪优化', path: 'aps', component: null, componentName: null, icon: 'BlockOutlined', visible: true, keepAlive: true, children: [ { id: 300, parentId: 3, name: '母卷管理', path: 'coil', component: 'aps/coil/index', componentName: 'ApsCoil', icon: 'BlockOutlined', visible: true, keepAlive: true, children: null }, { id: 301, parentId: 3, name: '订单管理', path: 'order', component: 'aps/order/index', componentName: 'ApsOrder', icon: 'BlockOutlined', visible: true, keepAlive: true, children: null }, { id: 302, parentId: 3, name: '工艺参数', path: 'param', component: 'aps/param/index', componentName: 'ApsParam', icon: 'BlockOutlined', visible: true, keepAlive: true, children: null }, { id: 303, parentId: 3, name: '方案生成', path: 'optimization', component: 'aps/optimization/index', componentName: 'ApsOptimization', icon: 'BlockOutlined', visible: true, keepAlive: true, children: null }, { id: 304, parentId: 3, name: '优化任务', path: 'task', component: 'aps/task/index', componentName: 'ApsTask', icon: 'BlockOutlined', visible: true, keepAlive: true, children: null }, { id: 305, parentId: 3, name: '裁剪方案', path: 'plan', component: 'aps/plan/index', componentName: 'ApsPlan', icon: 'BlockOutlined', visible: true, keepAlive: true, children: null }, ], }, ]; // User role menus (limited - only user and role) export const mockUserBackendMenus: BackendMenuVO[] = [ { id: 1, parentId: 0, name: '系统管理', path: 'system', component: null, componentName: null, icon: 'BlockOutlined', visible: true, keepAlive: true, children: [ { id: 100, parentId: 1, name: '用户管理', path: 'user', component: 'system/user/index', componentName: 'SystemUser', icon: 'BlockOutlined', visible: true, keepAlive: true, children: null }, { id: 101, parentId: 1, name: '角色管理', path: 'role', component: 'system/role/index', componentName: 'SystemRole', icon: 'BlockOutlined', visible: true, keepAlive: true, children: null }, ], }, ]; export const mockAdminPermissions = ['*:*:*']; export const mockUserPermissions = ['system:user:query', 'system:user:list', 'system:role:query', 'system:role:list']; // Code Rules export const mockCodeRules: MockCodeRule[] = [ { id: 1, ruleCode: 'CR-PO', ruleName: '采购订单编码', scope: '采购模块', formatPattern: 'PO-{yyyyMMdd}-{0000}', description: '采购订单自动生成编码', status: 0, lifecycleStatus: 1, revision: 1, createTime: '2025-01-01 00:00:00' }, { id: 2, ruleCode: 'CR-SO', ruleName: '销售订单编码', scope: '销售模块', formatPattern: 'SO-{yyyyMMdd}-{0000}', description: '销售订单自动生成编码', status: 0, lifecycleStatus: 1, revision: 2, createTime: '2025-01-15 00:00:00' }, { id: 3, ruleCode: 'CR-MAT', ruleName: '物料编码', scope: '主数据', formatPattern: 'MAT-{00000}', description: '物料主数据编码', status: 0, lifecycleStatus: 0, revision: 1, createTime: '2025-02-01 00:00:00' }, { id: 4, ruleCode: 'CR-WO', ruleName: '工单编码', scope: '生产模块', formatPattern: 'WO-{yyyyMM}-{0000}', description: '生产工单编码规则', status: 1, lifecycleStatus: 2, revision: 1, createTime: '2025-03-01 00:00:00' }, ]; // ── 编码体系 Mock ── export interface MockCodingRule { id: number; ruleCode: string; ruleName: string; scope: string; pattern: string; prefix: string; separator: string; length: number; resetCycle: string; maxSeq: number; curSeq: number; status: number; lifecycleStatus: number; description: string; createdBy: string; createTime: string; updateTime: string; } export const mockCodingRules: MockCodingRule[] = [ { id: 1, ruleCode: 'RULE-MAT-001', ruleName: '铝加工物料统一编码规则', scope: '物料', pattern: '{PREFIX}-{合金牌号}-{状态代号}-{厚度}x{宽度}-{用途}', prefix: 'MAT', separator: '-', length: 30, resetCycle: '按年', maxSeq: 999999, curSeq: 42, status: 0, lifecycleStatus: 2, description: '合金牌号+状态代号+规格+用途的物料编码规则', createdBy: '张三', createTime: '2026-04-01 12:00:00', updateTime: '2026-05-30 09:00:00' }, { id: 2, ruleCode: 'RULE-EQP-001', ruleName: '设备统一编码规则', scope: '设备', pattern: '{PREFIX}-{车间}-{长度:3}', prefix: 'EQP', separator: '-', length: 20, resetCycle: '永不', maxSeq: 9999, curSeq: 128, status: 0, lifecycleStatus: 2, description: '车间类型缩写+序号的设备编码规则', createdBy: '张三', createTime: '2026-04-05 10:00:00', updateTime: '2026-05-28 14:00:00' }, { id: 3, ruleCode: 'RULE-CUST-001', ruleName: '客户统一编码规则', scope: '客户', pattern: '{PREFIX}-{YYYY}-{长度:4}', prefix: 'CUST', separator: '-', length: 20, resetCycle: '按年', maxSeq: 9999, curSeq: 156, status: 0, lifecycleStatus: 2, description: '年份+序号的客户编码规则', createdBy: '李四', createTime: '2026-04-10 08:30:00', updateTime: '2026-05-25 16:00:00' }, { id: 4, ruleCode: 'RULE-BOM-001', ruleName: 'BOM编码规则', scope: 'BOM', pattern: '{PREFIX}-{合金牌号}-{长度:3}', prefix: 'BOM', separator: '-', length: 20, resetCycle: '永不', maxSeq: 999, curSeq: 15, status: 1, lifecycleStatus: 2, description: '合金牌号+序号的BOM编码规则', createdBy: '张三', createTime: '2026-04-12 14:00:00', updateTime: '2026-05-20 10:00:00' }, { id: 5, ruleCode: 'RULE-RT-001', ruleName: '工艺路径编码规则', scope: '工艺', pattern: '{PREFIX}-{工艺类型}-{长度:3}', prefix: 'RT', separator: '-', length: 20, resetCycle: '永不', maxSeq: 999, curSeq: 8, status: 0, lifecycleStatus: 2, description: '工艺类型+序号的路径编码规则', createdBy: '王五', createTime: '2026-04-15 09:00:00', updateTime: '2026-05-18 11:00:00' }, { id: 6, ruleCode: 'RULE-ALLOY-001', ruleName: '合金编码规则', scope: '合金主数据', pattern: 'HF{合金系数字}{长度:5}', prefix: 'HF', separator: '', length: 10, resetCycle: '永不', maxSeq: 99999, curSeq: 23, status: 0, lifecycleStatus: 2, description: 'HF+合金系数字+流水号的合金编码规则', createdBy: '张三', createTime: '2026-04-18 16:00:00', updateTime: '2026-05-15 09:30:00' }, { id: 7, ruleCode: 'RULE-WH-001', ruleName: '仓库编码规则', scope: '仓库', pattern: '{PREFIX}-{Region}-{长度:3}', prefix: 'WH', separator: '-', length: 15, resetCycle: '永不', maxSeq: 999, curSeq: 0, status: 0, lifecycleStatus: 1, description: '仓库/库位编码规则(待审批中)', createdBy: '李四', createTime: '2026-05-20 08:00:00', updateTime: '2026-05-28 15:00:00' }, { id: 8, ruleCode: 'RULE-Q-001', ruleName: '质量编码规则(已注销)', scope: '质量', pattern: '{PREFIX}-{检验类型}-{长度:3}', prefix: 'Q', separator: '-', length: 15, resetCycle: '永不', maxSeq: 999, curSeq: 45, status: 2, lifecycleStatus: 3, description: '旧版质量编码规则,已注销', createdBy: '张三', createTime: '2026-03-01 10:00:00', updateTime: '2026-05-22 14:00:00' }, { id: 9, ruleCode: 'RULE-PF-001', ruleName: '产品族编码规则', scope: '产品族', pattern: 'PF-{业务码}', prefix: 'PF', separator: '-', length: 12, resetCycle: '永不', maxSeq: 999, curSeq: 5, status: 0, lifecycleStatus: 0, description: '产品族编码规则(草稿,待提交审批)', createdBy: '张三', createTime: '2026-05-25 11:00:00', updateTime: '2026-05-30 08:00:00' }, { id: 10, ruleCode: 'RULE-SMP-001', ruleName: '样品编码规则', scope: '样品', pattern: '{PREFIX}-{YYYY}-{长度:4}', prefix: 'SMP', separator: '-', length: 20, resetCycle: '按年', maxSeq: 9999, curSeq: 78, status: 0, lifecycleStatus: 2, description: '年份+序号的样品编码规则', createdBy: '李四', createTime: '2026-04-20 13:00:00', updateTime: '2026-05-29 10:00:00' }, { id: 11, ruleCode: 'RULE-ORG-001', ruleName: '组织编码规则', scope: '组织', pattern: '{PREFIX}-{基地}-{长度:3}', prefix: 'ORG', separator: '-', length: 18, resetCycle: '永不', maxSeq: 999, curSeq: 12, status: 0, lifecycleStatus: 2, description: '集团/公司/基地/车间/工段组织编码', createdBy: '王五', createTime: '2026-04-22 10:00:00', updateTime: '2026-05-27 08:00:00' }, { id: 12, ruleCode: 'RULE-TL-001', ruleName: '工模具编码规则', scope: '工模具', pattern: '{PREFIX}-{类型}-{长度:3}', prefix: 'TL', separator: '-', length: 18, resetCycle: '永不', maxSeq: 999, curSeq: 34, status: 1, lifecycleStatus: 2, description: '工模具编码规则(变更审批中,运行时冻结)', createdBy: '张三', createTime: '2026-04-25 09:30:00', updateTime: '2026-05-26 11:00:00' }, { id: 13, ruleCode: 'RULE-STD-001', ruleName: '标准编码规则', scope: '标准', pattern: '{标准机构}/{标准号}-{年份}', prefix: '', separator: '', length: 25, resetCycle: '永不', maxSeq: 9999, curSeq: 67, status: 0, lifecycleStatus: 2, description: 'GB/ASTM/EN/JIS等标准编码规则', createdBy: '李四', createTime: '2026-04-28 15:00:00', updateTime: '2026-05-24 09:00:00' }, { id: 14, ruleCode: 'RULE-INS-001', ruleName: '计量器具编码规则', scope: '计量器具', pattern: '{PREFIX}-{类型}-{长度:3}', prefix: 'INS', separator: '-', length: 18, resetCycle: '永不', maxSeq: 999, curSeq: 56, status: 0, lifecycleStatus: 2, description: '计量器具编码规则', createdBy: '王五', createTime: '2026-05-01 08:00:00', updateTime: '2026-05-23 16:00:00' }, { id: 15, ruleCode: 'RULE-CTCT-001', ruleName: '客户技术规格编码规则', scope: '客户技术规格', pattern: 'CTCT-{客户代码:截取3}-{产品类:截取3}-{合金编码}-{状态}-{YYYY}-{长度:4}', prefix: 'CTCT', separator: '-', length: 40, resetCycle: '按年', maxSeq: 9999, curSeq: 18, status: 0, lifecycleStatus: 2, description: '客户产品技术规格编码规则', createdBy: '张三', createTime: '2026-05-05 10:00:00', updateTime: '2026-05-22 14:00:00' }, ]; export interface MockCodeLog { id: number; code: string; scope: string; trigger: string; caller: string; ruleCode: string; time: string; seq: number; } export const mockCodeLogs: MockCodeLog[] = [ { id: 1, code: 'MAT-3003-H14-0.4x1200-T', scope: '物料', trigger: '业务模块', caller: '物料管理模块', ruleCode: 'RULE-MAT-001', time: '2026-05-30 14:32:15', seq: 42 }, { id: 2, code: 'MAT-5052-H32-1.0x1500-P', scope: '物料', trigger: '手动', caller: '张三(数据管理员)', ruleCode: 'RULE-MAT-001', time: '2026-05-30 11:20:08', seq: 41 }, { id: 3, code: 'HF806', scope: '合金主数据', trigger: '事件驱动', caller: '合金主数据模块(P01-13)', ruleCode: 'RULE-ALLOY-001', time: '2026-05-30 10:15:33', seq: 23 }, { id: 4, code: 'CUST-2026-0156', scope: '客户', trigger: '事件驱动', caller: '客户管理模块(P01-03)', ruleCode: 'RULE-CUST-001', time: '2026-05-30 09:45:22', seq: 156 }, { id: 5, code: 'EQP-HR-128', scope: '设备', trigger: '业务模块', caller: '设备管理模块(P01-05)', ruleCode: 'RULE-EQP-001', time: '2026-05-29 16:30:11', seq: 128 }, { id: 6, code: 'MAT-8011-O-0.2x800-F', scope: '物料', trigger: '手动', caller: '李四(编码申请人)', ruleCode: 'RULE-MAT-001', time: '2026-05-29 14:22:45', seq: 40 }, { id: 7, code: 'SMP-2026-0078', scope: '样品', trigger: '业务模块', caller: '样品管理模块(P01-11)', ruleCode: 'RULE-SMP-001', time: '2026-05-29 11:10:09', seq: 78 }, { id: 8, code: 'BOM-3003-015', scope: 'BOM', trigger: '业务模块', caller: 'BOM管理模块(P01-06)', ruleCode: 'RULE-BOM-001', time: '2026-05-28 15:40:55', seq: 15 }, { id: 9, code: 'RT-HF-008', scope: '工艺', trigger: '事件驱动', caller: '工艺管理模块', ruleCode: 'RULE-RT-001', time: '2026-05-28 10:05:33', seq: 8 }, { id: 10, code: 'MAT-1050-H18-0.5x1000-P', scope: '物料', trigger: '手动', caller: '王五(编码申请人)', ruleCode: 'RULE-MAT-001', time: '2026-05-27 16:28:10', seq: 39 }, { id: 11, code: 'ORG-BASE-012', scope: '组织', trigger: '业务模块', caller: '组织管理模块(P01-02)', ruleCode: 'RULE-ORG-001', time: '2026-05-27 11:15:40', seq: 12 }, { id: 12, code: 'PF-HT', scope: '产品族', trigger: '事件驱动', caller: '产品规格模块(P01-04)', ruleCode: 'RULE-PF-001', time: '2026-05-26 14:50:22', seq: 5 }, { id: 13, code: 'TL-ROLL-034', scope: '工模具', trigger: '业务模块', caller: '设备管理模块(P01-05)', ruleCode: 'RULE-TL-001', time: '2026-05-26 09:30:15', seq: 34 }, { id: 14, code: 'MAT-6061-T6-2.0x2000-S', scope: '物料', trigger: '手动', caller: '张三(数据管理员)', ruleCode: 'RULE-MAT-001', time: '2026-05-25 15:45:00', seq: 38 }, { id: 15, code: 'CTCT-VAL-FIN-HF8061-H14-2026-0018', scope: '客户技术规格', trigger: '事件驱动', caller: '客户管理模块(P01-03)', ruleCode: 'RULE-CTCT-001', time: '2026-05-25 10:20:30', seq: 18 }, ]; export interface MockCodeMapping { id: number; oldCode: string; newCode: string; entityType: string; effectDate: string; expireDate: string; reason: string; status: number; transition: string; } export const mockCodeMappings: MockCodeMapping[] = [ { id: 1, oldCode: 'OLD-AL-3003-001', newCode: 'MAT-3003-H14-0.4x1200-T', entityType: '物料', effectDate: '2026-04-15', expireDate: '2026-07-15', reason: '编码体系升级迁移', status: 0, transition: '进行中' }, { id: 2, oldCode: 'OLD-AL-5052-002', newCode: 'MAT-5052-H32-1.0x1500-P', entityType: '物料', effectDate: '2026-04-15', expireDate: '2026-07-15', reason: '编码体系升级迁移', status: 0, transition: '进行中' }, { id: 3, oldCode: 'OLD-AL-8011-003', newCode: 'MAT-8011-O-0.2x800-F', entityType: '物料', effectDate: '2026-04-15', expireDate: '2026-07-15', reason: '编码体系升级迁移', status: 0, transition: '进行中' }, { id: 4, oldCode: 'OLD-EQ-001', newCode: 'EQP-HR-128', entityType: '设备', effectDate: '2026-04-20', expireDate: '2026-10-20', reason: '设备编码规范化', status: 0, transition: '进行中' }, { id: 5, oldCode: 'OLD-EQ-002', newCode: 'EQP-CR-056', entityType: '设备', effectDate: '2026-04-20', expireDate: '2026-10-20', reason: '设备编码规范化', status: 0, transition: '进行中' }, { id: 6, oldCode: 'OLD-CUST-GZ-003', newCode: 'CUST-2026-0156', entityType: '客户', effectDate: '2026-03-01', expireDate: '2026-05-01', reason: '客户编码升级', status: 1, transition: '已结束' }, { id: 7, oldCode: 'OLD-CUST-SZ-004', newCode: 'CUST-2026-0089', entityType: '客户', effectDate: '2026-03-01', expireDate: '2026-05-01', reason: '客户编码升级', status: 1, transition: '已结束' }, { id: 8, oldCode: 'OLD-BOM-3003-001', newCode: 'BOM-3003-015', entityType: 'BOM', effectDate: '2026-04-10', expireDate: '2026-08-10', reason: 'BOM编码规范化', status: 0, transition: '进行中' }, { id: 9, oldCode: 'OLD-BOM-5052-002', newCode: 'BOM-5052-008', entityType: 'BOM', effectDate: '2026-04-10', expireDate: '2026-08-10', reason: 'BOM编码规范化', status: 0, transition: '进行中' }, { id: 10, oldCode: 'OLD-Q-INSP-001', newCode: 'Q-INSP-045', entityType: '质量', effectDate: '2026-03-15', expireDate: '2026-04-15', reason: '质量编码规范化', status: 1, transition: '已结束' }, { id: 11, oldCode: 'OLD-WH-GZ-001', newCode: 'WH-GZ-001', entityType: '仓库', effectDate: '2026-04-01', expireDate: '2026-07-01', reason: '仓库编码规范化', status: 0, transition: '进行中' }, { id: 12, oldCode: 'OLD-SMP-001', newCode: 'SMP-2026-0078', entityType: '样品', effectDate: '2026-04-20', expireDate: '2026-10-20', reason: '样品编码规范化', status: 0, transition: '进行中' }, ]; export interface MockApproval { id: number; type: string; applicant: string; ruleCode: string; ruleName: string; submitTime: string; status: string; approver: string; approveTime: string; comment: string; } export const mockApprovals: MockApproval[] = [ { id: 1, type: '准入', applicant: '张三', ruleCode: 'RULE-WH-001', ruleName: '仓库编码规则', submitTime: '2026-05-28 10:30', status: '待审批', approver: '-', approveTime: '-', comment: '-' }, { id: 2, type: '变更', applicant: '张三', ruleCode: 'RULE-MAT-001', ruleName: '铝加工物料统一编码规则', submitTime: '2026-05-27 14:20', status: '待审批', approver: '-', approveTime: '-', comment: '-' }, { id: 3, type: '准入', applicant: '李四', ruleCode: 'RULE-PF-001', ruleName: '产品族编码规则', submitTime: '2026-05-25 09:15', status: '待审批', approver: '-', approveTime: '-', comment: '-' }, { id: 4, type: '注销', applicant: '张三', ruleCode: 'RULE-Q-001', ruleName: '质量编码规则', submitTime: '2026-05-20 11:00', status: '已通过', approver: '王经理', approveTime: '2026-05-22 15:30', comment: '同意注销,已确认无业务引用' }, { id: 5, type: '准入', applicant: '张三', ruleCode: 'RULE-MAT-001', ruleName: '铝加工物料统一编码规则', submitTime: '2026-04-01 09:00', status: '已通过', approver: '王经理', approveTime: '2026-04-03 10:00', comment: '编码规则设计规范,同意启用' }, { id: 6, type: '变更', applicant: '李四', ruleCode: 'RULE-EQP-001', ruleName: '设备统一编码规则', submitTime: '2026-05-15 16:40', status: '已通过', approver: '王经理', approveTime: '2026-05-17 09:20', comment: '同意变更' }, { id: 7, type: '准入', applicant: '王五', ruleCode: 'RULE-RT-001', ruleName: '工艺路径编码规则', submitTime: '2026-04-14 11:30', status: '已通过', approver: '赵总监', approveTime: '2026-04-15 14:00', comment: '同意' }, { id: 8, type: '注销', applicant: '张三', ruleCode: 'RULE-OLD-001', ruleName: '旧版物料编码规则', submitTime: '2026-03-20 10:00', status: '已拒绝', approver: '王经理', approveTime: '2026-03-22 11:00', comment: '存在未结订单引用,暂不可注销' }, { id: 9, type: '变更', applicant: '李四', ruleCode: 'RULE-CUST-001', ruleName: '客户统一编码规则', submitTime: '2026-05-10 09:00', status: '已拒绝', approver: '赵总监', approveTime: '2026-05-12 16:00', comment: '影响范围过大,建议分阶段实施' }, { id: 10, type: '准入', applicant: '张三', ruleCode: 'RULE-ALLOY-001', ruleName: '合金编码规则', submitTime: '2026-04-17 14:20', status: '已通过', approver: '王经理', approveTime: '2026-04-18 10:00', comment: '同意启用' }, { id: 11, type: '变更', applicant: '王五', ruleCode: 'RULE-TL-001', ruleName: '工模具编码规则', submitTime: '2026-05-24 11:10', status: '待审批', approver: '-', approveTime: '-', comment: '-' }, { id: 12, type: '注销', applicant: '李四', ruleCode: 'RULE-SC-001', ruleName: '废料编码规则(旧版)', submitTime: '2026-05-22 15:30', status: '已通过', approver: '王经理', approveTime: '2026-05-24 09:00', comment: '已确认无引用,同意注销' }, ]; export interface MockSyncRecord { id: number; ruleCode: string; ruleName: string; system: string; status: string; time: string; trigger: string; retryCount: number; reason: string; } export const mockSyncRecords: MockSyncRecord[] = [ { id: 1, ruleCode: 'RULE-MAT-001', ruleName: '铝加工物料统一编码规则', system: 'SAP', status: '成功', time: '2026-05-30 14:35', trigger: '自动', retryCount: 0, reason: '-' }, { id: 2, ruleCode: 'RULE-MAT-001', ruleName: '铝加工物料统一编码规则', system: 'SRM', status: '成功', time: '2026-05-30 14:36', trigger: '自动', retryCount: 0, reason: '-' }, { id: 3, ruleCode: 'RULE-EQP-001', ruleName: '设备统一编码规则', system: 'SAP', status: '成功', time: '2026-05-29 10:20', trigger: '自动', retryCount: 0, reason: '-' }, { id: 4, ruleCode: 'RULE-EQP-001', ruleName: '设备统一编码规则', system: 'SRM', status: '成功', time: '2026-05-29 10:22', trigger: '自动', retryCount: 0, reason: '-' }, { id: 5, ruleCode: 'RULE-CUST-001', ruleName: '客户统一编码规则', system: 'SAP', status: '失败', time: '2026-05-28 16:45', trigger: '自动', retryCount: 3, reason: 'SAP连接超时(已重试3次)' }, { id: 6, ruleCode: 'RULE-ALLOY-001', ruleName: '合金编码规则', system: 'SAP', status: '进行中', time: '2026-05-30 15:00', trigger: '手动', retryCount: 0, reason: '-' }, { id: 7, ruleCode: 'RULE-RT-001', ruleName: '工艺路径编码规则', system: 'SRM', status: '待同步', time: '-', trigger: '-', retryCount: 0, reason: '-' }, { id: 8, ruleCode: 'RULE-BOM-001', ruleName: 'BOM编码规则', system: 'SAP', status: '失败', time: '2026-05-27 11:30', trigger: '自动', retryCount: 3, reason: 'SAP接口返回格式错误' }, { id: 9, ruleCode: 'RULE-SMP-001', ruleName: '样品编码规则', system: 'SAP', status: '成功', time: '2026-05-25 09:15', trigger: '自动', retryCount: 0, reason: '-' }, { id: 10, ruleCode: 'RULE-ORG-001', ruleName: '组织编码规则', system: 'SAP', status: '成功', time: '2026-05-24 14:00', trigger: '自动', retryCount: 1, reason: '-' }, { id: 11, ruleCode: 'RULE-PF-001', ruleName: '产品族编码规则', system: 'SAP', status: '待同步', time: '-', trigger: '-', retryCount: 0, reason: '规则尚未审批通过' }, { id: 12, ruleCode: 'RULE-ALLOY-001', ruleName: '合金编码规则', system: 'SRM', status: '成功', time: '2026-05-20 16:30', trigger: '手动', retryCount: 0, reason: '-' }, ]; export interface MockVariableDict { id: number; key: string; name: string; desc: string; scope: string; example: string; status: number; } export const mockVariableDicts: MockVariableDict[] = [ { id: 1, key: '{PREFIX}', name: '前缀', desc: '编码固定前缀,如 MAT、EQP', scope: '通用', example: 'MAT', status: 0 }, { id: 2, key: '{YYYY}', name: '年份(4位)', desc: '四位年份', scope: '通用', example: '2026', status: 0 }, { id: 3, key: '{YY}', name: '年份(2位)', desc: '两位年份', scope: '通用', example: '26', status: 0 }, { id: 4, key: '{MM}', name: '月份', desc: '两位月份', scope: '通用', example: '04', status: 0 }, { id: 5, key: '{DD}', name: '日期', desc: '两位日期', scope: '通用', example: '15', status: 0 }, { id: 6, key: '{长度:N}', name: 'N位序列号', desc: '固定N位,不足左补零', scope: '通用', example: '000001', status: 0 }, { id: 7, key: '{合金牌号}', name: '合金牌号', desc: '铝合金牌号,如3003/5052/8011', scope: '物料/合金', example: '3003', status: 0 }, { id: 8, key: '{状态代号}', name: '状态代号', desc: '材料状态代号,如H14/H32/O', scope: '物料', example: 'H14', status: 0 }, { id: 9, key: '{厚度}', name: '厚度(mm)', desc: '材料厚度', scope: '物料', example: '0.4', status: 0 }, { id: 10, key: '{宽度}', name: '宽度(mm)', desc: '材料宽度', scope: '物料', example: '1200', status: 0 }, { id: 11, key: '{用途}', name: '用途标识', desc: '用途标识,如T(管料)/P(板材)/F(箔材)', scope: '物料', example: 'T', status: 0 }, { id: 12, key: '{基地}', name: '基地编码', desc: '生产基地编码', scope: '设备/组织', example: 'BASE-001', status: 0 }, { id: 13, key: '{车间}', name: '车间编码', desc: '车间编码或类型缩写', scope: '设备', example: 'HR', status: 0 }, { id: 14, key: '{Region}', name: '区域', desc: '地理区域编码', scope: '客户', example: 'GZ', status: 0 }, { id: 15, key: '{合金系数字}', name: '合金系数字', desc: '合金系列编号', scope: '合金主数据', example: '806', status: 0 }, { id: 16, key: '{业务码}', name: '业务码', desc: '产品族业务标识码', scope: '产品族', example: 'HT', status: 0 }, ]; export interface MockSeqPool { id: number; ruleCode: string; cycleStart: string; curSeq: number; maxSeq: number; resetCycle: string; lastCode: string; status: string; } export const mockSeqPools: MockSeqPool[] = [ { id: 1, ruleCode: 'RULE-MAT-001', cycleStart: '2026-01-01', curSeq: 42, maxSeq: 999999, resetCycle: '按年', lastCode: 'MAT-3003-H14-0.4x1200-T', status: '启用' }, { id: 2, ruleCode: 'RULE-MAT-001', cycleStart: '2025-01-01', curSeq: 186, maxSeq: 999999, resetCycle: '按年', lastCode: 'MAT-5052-H32-1.0x1500-P', status: '已归档' }, { id: 3, ruleCode: 'RULE-MAT-001', cycleStart: '2024-01-01', curSeq: 1203, maxSeq: 999999, resetCycle: '按年', lastCode: 'MAT-8011-O-0.2x800-F', status: '已归档' }, { id: 4, ruleCode: 'RULE-EQP-001', cycleStart: '2026-01-01', curSeq: 128, maxSeq: 9999, resetCycle: '永不', lastCode: 'EQP-HR-128', status: '启用' }, { id: 5, ruleCode: 'RULE-CUST-001', cycleStart: '2026-01-01', curSeq: 156, maxSeq: 9999, resetCycle: '按年', lastCode: 'CUST-2026-0156', status: '启用' }, { id: 6, ruleCode: 'RULE-CUST-001', cycleStart: '2025-01-01', curSeq: 234, maxSeq: 9999, resetCycle: '按年', lastCode: 'CUST-2025-0234', status: '已归档' }, { id: 7, ruleCode: 'RULE-BOM-001', cycleStart: '2026-01-01', curSeq: 15, maxSeq: 999, resetCycle: '永不', lastCode: 'BOM-3003-015', status: '冻结' }, { id: 8, ruleCode: 'RULE-ALLOY-001', cycleStart: '2026-01-01', curSeq: 23, maxSeq: 99999, resetCycle: '永不', lastCode: 'HF806', status: '启用' }, { id: 9, ruleCode: 'RULE-SMP-001', cycleStart: '2026-01-01', curSeq: 78, maxSeq: 9999, resetCycle: '按年', lastCode: 'SMP-2026-0078', status: '启用' }, { id: 10, ruleCode: 'RULE-ORG-001', cycleStart: '2026-01-01', curSeq: 12, maxSeq: 999, resetCycle: '永不', lastCode: 'ORG-BASE-012', status: '启用' }, ];