export const roles = [
  { id: "supervisor", name: "服务监督主管" },
  { id: "officer", name: "服务监督人员" },
  { id: "customer-manager", name: "客服部主管" },
  { id: "team-leader", name: "客服部班长" },
  { id: "operation", name: "智能运营团队" },
  { id: "duty-manager", name: "总值班经理" },
  { id: "business-director", name: "业务部主任" },
];

const mockStages = [
  "待分配派工", "事件调查", "待审核", "回访结果填报", "首联分派", "多部门并行事件初查",
  "待审核", "待回访分配", "调查报告编写", "成果物输出", "已办结", "待业务部主任审核",
  "首联与多部门并行初查", "调查结果填报", "回访结果填报", "调查报告编写", "成果物输出", "待分配派工",
];

export const workOrders = Array.from({ length: 18 }, (_, index) => ({
  id: `wo-${index + 1}`,
  no: `2026-08-06-${String(index + 1).padStart(3, "0")}`,
  status: mockStages[index] === "已办结" ? "已结束" : /待|分派/.test(mockStages[index]) ? "待分派" : "处理中",
  stage: mockStages[index],
  source: "12398 电话",
  calledAt: "2026-08-06",
  transferredAt: "2026-08-06",
  customerName: index % 2 ? "张某某" : "某某有限公司",
  phone: index % 2 ? "137****1111" : "138****8888",
  address: "XX市XX区XX路88号",
  region: "XX省XX市",
  province: "天津",
  eventType: "投诉事项",
  transferCategory: "投诉事项",
  problemCategory: "安全隐患",
  responsibilityType: [5, 6, 8, 11, 15].includes(index) ? "协查" : "主责",
  firstContactCompleted: ![0, 4, 12, 17].includes(index),
  preliminaryRequired: index % 2 === 0 ? 2 : 3,
  preliminaryCompletedCount: [0, 1, 5, 12, 13, 17].includes(index) ? index % 2 : (index % 2 === 0 ? 2 : 3),
  preliminarySubmittedBy: [],
  preliminaryCompleted: ![0, 1, 5, 12, 13, 17].includes(index),
}));

export const serviceRecords = Array.from({ length: 5 }, (_, index) => ({
  id: index + 1,
  no: "2026-08-06-001",
  content: "客户反映近期电压不稳，设备频繁重启。",
  type: "投诉事项",
  acceptedAt: "2026-08-06",
  company: "国网天津市电力公司",
  duration: "06:24",
  transcript: "客户反映近期电压不稳，设备频繁重启，要求尽快处理。",
}));

export const importBatches = Array.from({ length: 5 }, (_, index) => ({
  id: index + 1,
  importedAt: `2026-08-0${index + 2} 12:00`,
  batchNo: `2026080${index + 2}-B01`,
  count: 157 - index * 8,
  importedBy: index % 2 ? "李工" : "张工",
}));

export const taskSummary = {
  supervisor: [
    ["任务总数", 103],
    ["待分配派工", 22],
    ["已分派完成", 63],
    ["待审核", 47],
  ],
  officer: [
    ["任务总数", 103],
    ["调查结果填报", 34],
    ["调查报告编写", 12],
    ["回访结果填报", 56],
    ["成果物输出", 60],
    ["已完成", 69],
  ],
  "customer-manager": [
    ["任务总数", 103],
    ["首联分派", 69],
    ["回访分派", 69],
  ],
  "team-leader": [["待首联", 103], ["已完成", 69]],
  operation: [["待调查", 83], ["已完成", 69]],
  "duty-manager": [["待调查", 83], ["已完成", 69]],
  "business-director": [["待审核", 83], ["已完成", 69]],
};

export const dictionary = {
  departments: ["客服一部", "客服二部", "客服三部", "客服五部", "业务部", "运营部"],
  firstContactDepartments: ["客服一部", "客服二部", "客服三部", "客服五部"],
  supervisors: ["监督员A（张某）", "监督员B（李某）", "监督员C（王某）"],
  teamMembers: ["客服一班 / 王小明", "客服二班 / 李小红", "客服三班 / 赵强"],
};
