import { defineMock } from "../base";

export default defineMock([
  {
    url: "sideTree/options",
    method: ["GET"],
    body: {
      code: "00000",
      data: [
        {
          value: 1,
          label: "外球面球轴承",
          children: [
            {
              value: 11,
              label: "UCPH205",
            },
            {
              value: 12,
              label: "UCPH206",
            },
          ],
        },
        {
          value: 2,
          label: "滚子轴承",
          children: [
            {
              value: 21,
              label: "KLM11749-LM11710",
            },
            {
              value: 22,
              label: "KL44643-L44610",
            },
          ],
        },
        {
          value: 3,
          label: "角接触球轴承",
          children: [
            {
              value: 31,
              label: "23805",
            },
            {
              value: 32,
              label: "234422",
            },
          ],
        },
      ],
      msg: "一切ok",
    },
  },
]);

// 部门映射表数据
const sideTreeMap: Record<string, any> = {
  1: {
    id: 1,
    name: "外球面球轴承",
    parentId: 0,
    status: 1,
    sort: 1,
  },
  11: {
    id: 11,
    name: "UCPH205",
    parentId: 1,
    status: 1,
    sort: 1,
  },
  12: {
    id: 12,
    name: "UCPH206",
    parentId: 1,
    status: 1,
    sort: 2,
  },
  2: {
    id: 2,
    name: "滚子轴承",
    parentId: 0,
    status: 1,
    sort: 2,
  },
  21: {
    id: 21,
    name: "KLM11749-LM11710",
    parentId: 2,
    status: 1,
    sort: 1,
  },
  22: {
    id: 22,
    name: "KL44643-L44610",
    parentId: 2,
    status: 1,
    sort: 2,
  },
  3: {
    id: 3,
    name: "角接触球轴承",
    parentId: 0,
    status: 1,
    sort: 3,
  },
  31: {
    id: 31,
    name: "23805",
    parentId: 3,
    status: 1,
    sort: 1,
  },
  32: {
    id: 32,
    name: "234422",
    parentId: 3,
    status: 1,
    sort: 2,
  },
};
