123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- 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,
- },
- };
|