| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- /** 演示账号与 prototype/data.js 的可见角色卡片对应,不代表后端账号或授权。 */
- export type DemoRole = "admin" | "regAdmin" | "teamLead" | "ops" | "worker" | "enterprise" | "sub" | "partner" | "operator";
- export type DemoIdentityGroup = "operations" | "maintenance" | "customer" | "reconciliation";
- export type DemoIdentity = {
- id: string;
- name: string;
- role: DemoRole;
- group: DemoIdentityGroup;
- title: string;
- login: string;
- phone?: string;
- scope: string;
- primary?: boolean;
- operationsTeamId?: string;
- maintenanceTeamId?: string;
- memberId?: string;
- customerNo?: string;
- partnerId?: string;
- operatorId?: string;
- };
- export const demoIdentityGroups: { id: DemoIdentityGroup; label: string }[] = [
- { id: "operations", label: "运营管理" },
- { id: "maintenance", label: "运维执行" },
- { id: "customer", label: "客户账号" },
- { id: "reconciliation", label: "对账查看" },
- ];
- export const demoIdentities: readonly DemoIdentity[] = [
- { id: "admin-lin", name: "林管", role: "admin", group: "operations", title: "总运营团队主账号", login: "林管", phone: "13900000001", primary: true, operationsTeamId: "ro-0", scope: "全部区域,管理组织、客户、团队与对账。" },
- { id: "regional-zhou", name: "周运营", role: "regAdmin", group: "operations", title: "华东运营 · 团队主账号", login: "zhouyun@example", phone: "13900000101", primary: true, operationsTeamId: "ro-1", scope: "团队负责区域及下级区域;全局配置只读。" },
- { id: "regional-xu", name: "许芸", role: "regAdmin", group: "operations", title: "华东运营 · 客户建档子账号", login: "xuyun@example", operationsTeamId: "ro-1", scope: "与团队主账号相同的数据范围,隐藏组织与区域菜单。" },
- { id: "maintenance-wu", name: "吴队", role: "teamLead", group: "maintenance", title: "华东运维 · 团队主账号", login: "wudui@example", phone: "13900000103", primary: true, maintenanceTeamId: "mt-0", scope: "查看本团队全部工单,按团队承接类型分派工单。" },
- { id: "maintenance-zhou", name: "周宁", role: "ops", group: "maintenance", title: "华东运维 · 开停回填", login: "zhouning@example", phone: "13900000104", maintenanceTeamId: "mt-0", memberId: "mtm-0", scope: "只查看分派给本人的工单并回填。" },
- { id: "construction-sun", name: "孙队", role: "teamLead", group: "maintenance", title: "沪东开户组 · 团队主账号", login: "sundui@example", phone: "13900000105", primary: true, maintenanceTeamId: "mt-1", scope: "查看本团队全部开户工单,按分派方式分派。" },
- { id: "construction-zhao", name: "赵工", role: "worker", group: "maintenance", title: "沪东开户组 · 施工人员", login: "zhaogong@example", phone: "13900000106", maintenanceTeamId: "mt-1", memberId: "mtm-3", scope: "只查看分派给本人的开户工单,处理并回填。" },
- { id: "customer-chenglan", name: "澄澜科技有限公司", role: "enterprise", group: "customer", title: "客户主账号", login: "clkj", phone: "13900000200", customerNo: "KL-2026-0001", scope: "查看本公司订阅、分账号及工单;原型账号已激活。" },
- { id: "customer-lingang", name: "临港跨境贸易", role: "enterprise", group: "customer", title: "客户主账号", login: "lgkjmy", customerNo: "KL-2026-0008", scope: "客户激活演示入口;原型账号尚未激活。" },
- { id: "customer-chen", name: "陈阿福", role: "enterprise", group: "customer", title: "客户主账号 · 个体工商户", login: "caf", phone: "13900000212", customerNo: "KL-2026-0012", scope: "激活码过期场景;原型需重新导出激活码。" },
- { id: "customer-zhang", name: "张敏", role: "sub", group: "customer", title: "澄澜科技 · 下属分账号", login: "clkj-1", customerNo: "KL-2026-0001", scope: "查看本公司套餐,只跟踪本人提交的工单。" },
- { id: "partner-zou", name: "邹合", role: "partner", group: "reconciliation", title: "华东渠道 · 合伙人", login: "zouhe@example", phone: "13900000107", partnerId: "pt-0", scope: "只读查看名下绑定客户、合同与本方对账数据。" },
- { id: "operator-unicom", name: "联通对账", role: "operator", group: "reconciliation", title: "联通 · 对账查看账号", login: "unicom-dz@example", phone: "13900000109", operatorId: "op-0", scope: "只读查看运营商为联通的客户、合同与本方账单。" },
- ];
- export function findDemoIdentity(account: string | null) {
- return demoIdentities.find((identity) => identity.name === account || identity.login === account) ?? null;
- }
|