import { Request, Response } from 'express';
export default {
  // 支持值为 Object 和 Array
  'POST /api/map/queryMapInfo': (req: Request, res: Response) => {
    res.send({
      result: 'success',
      data: {
        height: 800,
        width: 1200,
        spaceList: [
          {
            left: 0,
            top: 0,
            width: 500,
            height: 400,
            Tdb: 27,
            RH: 27,
            CO2: 27,
            PM2d5: 27,
            HCHO: 27,
            localName: '第一办公区',
            roomFuncType: 'work',
            lamp: 'all',
            curtain: 'all',
            airConditioner: 'all',
            device: [
              { type: 'lamp', status: 'all' },
              { type: 'curtain', status: 'all' },
            ],
          },
          {
            left: 500,
            top: 0,
            width: 500,
            height: 400,
            Tdb: 27,
            RH: 27,
            CO2: 27,
            PM2d5: 27,
            HCHO: 27,
            localName: '收发室',
            roomFuncType: 'letter',
            airConditioner: 'all',
            curtain: 'all',
            lamp: 'all',
            device: [{ type: 'lamp', status: 'all' }],
          },
          {
            left: 1000,
            top: 0,
            width: 500,
            height: 400,
            Tdb: 27,
            RH: 27,
            CO2: 27,
            PM2d5: 27,
            HCHO: 27,
            localName: '天廊',
            roomFuncType: 'walk',
            lamp: 'all',
            airConditioner: 'all',
            curtain: 'all',
            device: [
              { type: 'lamp', status: 'part' },
              { type: 'airConditioner', status: 'close' },
              { type: 'curtain', status: 'close' },
            ],
          },
          {
            left: 0,
            top: 400,
            width: 500,
            height: 400,
            Tdb: 27,
            RH: 27,
            CO2: 27,
            PM2d5: 27,
            HCHO: 27,
            localName: '第二办公区',
            roomFuncType: 'work',
            lamp: 'all',
            airConditioner: 'all',
            curtain: 'all',
            device: [
              { type: 'lamp', status: 'close' },
              { type: 'airConditioner', status: 'close' },
              { type: 'curtain', status: 'close' },
            ],
          },
          {
            left: 500,
            top: 400,
            width: 500,
            height: 400,
            Tdb: 27,
            RH: 27,
            CO2: 27,
            PM2d5: 27,
            HCHO: 27,
            localName: '收发室',
            roomFuncType: 'letter',
            lamp: 'all',
            curtain: 'all',
            device: [
              { type: 'lamp', status: 'part' },
              { type: 'airConditioner', status: 'part' },
              { type: 'curtain', status: 'part' },
            ],
          },
          {
            left: 1000,
            top: 400,
            width: 500,
            height: 400,
            Tdb: 27,
            RH: 27,
            CO2: 27,
            PM2d5: 27,
            HCHO: 27,
            localName: '走廊',
            roomFuncType: 'walk',
            device: [],
            lamp: 'all',
            airConditioner: 'all',
            curtain: 'all',
          },
          {
            left: 1500,
            top: 0,
            width: 500,
            height: 400,
            Tdb: 27,
            RH: 27,
            CO2: 27,
            PM2d5: 27,
            HCHO: 27,
            localName: '董事办公室',
            roomFuncType: 'office',
            lamp: 'all',
            airConditioner: 'all',
            curtain: 'all',
            device: [{ type: 'curtain', status: 'all' }],
          },
          {
            left: 2000,
            top: 0,
            width: 500,
            height: 400,
            Tdb: 27,
            RH: 27,
            CO2: 27,
            PM2d5: 27,
            HCHO: 27,
            localName: '休息区',
            roomFuncType: 'rest',
            lamp: 'all',
            airConditioner: 'all',
            curtain: 'all',
            device: [
              { type: 'lamp', status: 'all' },
              { type: 'airConditioner', status: 'all' },
              { type: 'curtain', status: 'all' },
            ],
          },
          {
            left: 2500,
            top: 0,
            width: 500,
            height: 400,
            Tdb: 27,
            RH: 27,
            CO2: 27,
            PM2d5: 27,
            HCHO: 27,
            localName: '会议室',
            roomFuncType: 'meeting',

            curtain: 'all',
            device: [
              { type: 'lamp', status: 'all' },
              { type: 'airConditioner', status: 'close' },
              { type: 'curtain', status: 'part' },
            ],
          },
          {
            left: 1500,
            top: 400,
            width: 500,
            height: 400,
            Tdb: 27,
            RH: 27,
            CO2: 27,
            PM2d5: 27,
            HCHO: 27,
            localName: '第三办公区',
            roomFuncType: 'work',
            lamp: 'all',
            airConditioner: 'all',
            device: [
              { type: 'lamp', status: 'all' },
              { type: 'airConditioner', status: 'part' },
              { type: 'curtain', status: 'close' },
            ],
          },
          {
            left: 2000,
            top: 400,
            width: 500,
            height: 400,
            Tdb: 27,
            RH: 27,
            CO2: 27,
            PM2d5: 27,
            HCHO: 27,
            localName: '收发室',
            roomFuncType: 'letter',
            lamp: 'all',
            curtain: 'all',
            device: [
              { type: 'lamp', status: 'close' },
              { type: 'airConditioner', status: 'close' },
              { type: 'curtain', status: 'part' },
            ],
          },
        ],
      },
    });
  },
  //   data: [
  //     {
  //       left: 0,
  //       top: 0,
  //       width: 500,
  //       height: 400,
  //       Tdb: 17,
  //       RH: 26,
  //       CO2: 2800,
  //       PM2d5: 28,
  //       HCHO: 0.01,
  //       localName: '董事办公室',
  //       roomFuncType: 'office',
  //       lamp: 'all', //灯的不同状态会显示 不同的颜色
  //       airConditioner: 'part',
  //       curtain: 'part',
  //       //device 到时候需要生成
  //       //当前设备的状态status :all全部开启 part部分开启 close全都关闭
  //       //还有设备类型type :包括air lamp curtain
  //       device: [
  //         { type: 'lamp', status: 'close' },
  //         { type: 'airConditioner', status: 'part' },
  //         { type: 'curtain', status: 'all' },
  //       ],
  //       timeList: ['08:00-16:00', '08:00-16:00'],
  //       //   normalRun
  //       //   overtimeWork
  //       //   overtimeBook
  //       runTimeStatus: 'normalRun',
  //     },
  //     {
  //       left: 500,
  //       top: 0,
  //       width: 500,
  //       height: 400,
  //       Tdb: 25,
  //       RH: 65,
  //       CO2: 1008,
  //       PM2d5: 38,
  //       HCHO: 0.03,
  //       localName: '休息区',
  //       roomFuncType: 'rest',
  //       lamp: 'part',
  //       airConditioner: 'close',
  //       curtain: 'close',
  //       device: [
  //         { type: 'lamp', status: 'close' },
  //         { type: 'airConditioner', status: 'close' },
  //       ],
  //       runTimeStatus: 'overtimeWork',
  //     },
  //     {
  //       left: 1000,
  //       top: 0,
  //       width: 500,
  //       height: 400,
  //       Tdb: 20,
  //       RH: 53,
  //       CO2: 1808,
  //       PM2d5: 88,
  //       HCHO: 0.06,
  //       localName: '会议室',
  //       roomFuncType: 'meeting',
  //       lamp: 'close',
  //       device: [
  //         { type: 'lamp', status: 'all' },
  //         { type: 'airConditioner', status: 'part' },
  //         { type: 'curtain', status: 'part' },
  //       ],
  //       runTimeStatus: 'overtimeBook',
  //     },
  //     {
  //       left: 0,
  //       top: 400,
  //       width: 500,
  //       height: 400,
  //       Tdb: 27,
  //       RH: 37,
  //       CO2: 28,
  //       PM2d5: 68,
  //       HCHO: 0.1,
  //       localName: '第一办公区',
  //       roomFuncType: 'work',
  //       lamp: 'all',
  //       curtain: 'all',
  //       device: [
  //         { type: 'lamp', status: 'all' },

  //         { type: 'curtain', status: 'all' },
  //       ],
  //     },
  //     {
  //       left: 500,
  //       top: 400,
  //       width: 500,
  //       height: 400,
  //       Tdb: 30,
  //       RH: 26,
  //       CO2: 28,
  //       PM2d5: 28,
  //       HCHO: 0.17,
  //       localName: '收发室',
  //       roomFuncType: 'letter',
  //       airConditioner: 'close',
  //       curtain: 'part',
  //       device: [{ type: 'lamp', status: 'all' }],
  //     },
  //     {
  //       left: 1000,
  //       top: 400,
  //       width: 500,
  //       height: 400,
  //       Tdb: 12,
  //       RH: 26,
  //       CO2: 28,
  //       PM2d5: 28,
  //       HCHO: 39,
  //       localName: '走廊',
  //       roomFuncType: 'walk',
  //       lamp: 'close',
  //       airConditioner: 'part',
  //       curtain: 'close',
  //       device: [
  //         { type: 'lamp', status: 'part' },
  //         { type: 'airConditioner', status: 'close' },
  //         { type: 'curtain', status: 'close' },
  //       ],
  //     },
  //     {
  //       left: 0,
  //       top: 800,
  //       width: 500,
  //       height: 400,
  //       Tdb: 25,
  //       RH: 26,
  //       CO2: 28,
  //       PM2d5: 28,
  //       HCHO: 39,
  //       localName: '第一办公区',
  //       roomFuncType: 'work',
  //       lamp: 'close',
  //       airConditioner: 'all',
  //       curtain: 'part',
  //       device: [
  //         { type: 'lamp', status: 'close' },
  //         { type: 'airConditioner', status: 'close' },
  //         { type: 'curtain', status: 'close' },
  //       ],
  //     },
  //     {
  //       left: 500,
  //       top: 800,
  //       width: 500,
  //       height: 400,
  //       Tdb: 25,
  //       RH: 26,
  //       CO2: 2000,
  //       PM2d5: 28,
  //       HCHO: 39,
  //       localName: '收发室',
  //       roomFuncType: 'letter',
  //       lamp: 'all',

  //       curtain: 'all',
  //       device: [
  //         { type: 'lamp', status: 'part' },
  //         { type: 'airConditioner', status: 'part' },
  //         { type: 'curtain', status: 'part' },
  //       ],
  //     },
  //     {
  //       left: 1000,
  //       top: 800,
  //       width: 500,
  //       height: 400,
  //       Tdb: 25,
  //       RH: 26,
  //       CO2: 28,
  //       PM2d5: 28,
  //       HCHO: 39,
  //       localName: '走廊',
  //       roomFuncType: 'walk',
  //       device: [],
  //       lamp: 'all',
  //       airConditioner: 'all',
  //       curtain: 'all',
  //     },
  //     {
  //       left: 1500,
  //       top: 0,
  //       width: 500,
  //       height: 400,
  //       Tdb: 25,
  //       RH: 26,
  //       CO2: 28,
  //       PM2d5: 28,
  //       HCHO: 39,
  //       localName: '董事办公室',
  //       roomFuncType: 'office',
  //       lamp: 'close',
  //       airConditioner: 'part',
  //       curtain: 'close',
  //       device: [{ type: 'curtain', status: 'all' }],
  //     },
  //     {
  //       left: 2000,
  //       top: 0,
  //       width: 500,
  //       height: 400,
  //       Tdb: 25,
  //       RH: 26,
  //       CO2: 28,
  //       PM2d5: 28,
  //       HCHO: 39,
  //       localName: '休息区',
  //       roomFuncType: 'rest',
  //       lamp: 'part',
  //       airConditioner: 'part',
  //       curtain: 'part',
  //       device: [
  //         { type: 'lamp', status: 'all' },
  //         { type: 'airConditioner', status: 'all' },
  //         { type: 'curtain', status: 'all' },
  //       ],
  //     },
  //     {
  //       left: 2500,
  //       top: 0,
  //       width: 500,
  //       height: 400,
  //       Tdb: 25,
  //       RH: 26,
  //       CO2: 2000,
  //       PM2d5: 28,
  //       HCHO: 39,
  //       localName: '会议室',
  //       roomFuncType: 'meeting',

  //       curtain: 'all',
  //       device: [
  //         { type: 'lamp', status: 'all' },
  //         { type: 'airConditioner', status: 'close' },
  //         { type: 'curtain', status: 'part' },
  //       ],
  //     },
  //     {
  //       left: 1500,
  //       top: 400,
  //       width: 500,
  //       height: 400,
  //       Tdb: 25,
  //       RH: 26,
  //       CO2: 28,
  //       PM2d5: 28,
  //       HCHO: 39,
  //       localName: '第一办公区',
  //       roomFuncType: 'work',
  //       lamp: 'all',
  //       airConditioner: 'all',
  //       device: [
  //         { type: 'lamp', status: 'all' },
  //         { type: 'airConditioner', status: 'part' },
  //         { type: 'curtain', status: 'close' },
  //       ],
  //     },
  //     {
  //       left: 2000,
  //       top: 400,
  //       width: 500,
  //       height: 400,
  //       Tdb: 25,
  //       RH: 26,
  //       CO2: 2000,
  //       PM2d5: 28,
  //       HCHO: 39,
  //       localName: '收发室',
  //       roomFuncType: 'letter',
  //       lamp: 'close',
  //       curtain: 'all',
  //       device: [
  //         { type: 'lamp', status: 'close' },
  //         { type: 'airConditioner', status: 'close' },
  //         { type: 'curtain', status: 'part' },
  //       ],
  //     },
  //     {
  //       left: 2500,
  //       top: 400,
  //       width: 500,
  //       height: 400,
  //       Tdb: 25,
  //       RH: 26,
  //       CO2: 28,
  //       PM2d5: 28,
  //       HCHO: 39,
  //       localName: '走廊',
  //       roomFuncType: 'walk',
  //       lamp: 'all',
  //       airConditioner: 'part',
  //       curtain: 'all',
  //       device: [
  //         { type: 'lamp', status: 'part' },
  //         { type: 'airConditioner', status: 'close' },
  //         { type: 'curtain', status: 'all' },
  //       ],
  //     },
  //     {
  //       left: 1500,
  //       top: 800,
  //       width: 500,
  //       height: 400,
  //       Tdb: 25,
  //       RH: 26,
  //       CO2: 2000,
  //       PM2d5: 28,
  //       HCHO: 39,
  //       localName: '第一办公区',
  //       roomFuncType: 'work',
  //       device: [{ type: 'curtain', status: 'all' }],
  //     },
  //     {
  //       left: 2000,
  //       top: 800,
  //       width: 500,
  //       height: 400,
  //       Tdb: 25,
  //       RH: 26,
  //       CO2: 2000,
  //       PM2d5: 28,
  //       HCHO: 39,
  //       localName: '收发室',
  //       roomFuncType: 'letter',
  //       device: [
  //         { type: 'lamp', status: 'all' },
  //         { type: 'airConditioner', status: 'all' },
  //         { type: 'curtain', status: 'all' },
  //       ],
  //     },
  //     {
  //       left: 2500,
  //       top: 800,
  //       width: 500,
  //       height: 400,
  //       Tdb: 25,
  //       RH: 26,
  //       CO2: 700,
  //       PM2d5: 28,
  //       HCHO: 39,
  //       localName: '走廊',
  //       roomFuncType: 'walk',
  //       lamp: 'part',
  //       airConditioner: 'part',
  //       curtain: 'all',
  //       device: [
  //         { type: 'lamp', status: 'all' },
  //         { type: 'airConditioner', status: 'all' },
  //         { type: 'curtain', status: 'all' },
  //       ],
  //     },
  //   ],

  'POST /api/environment/Building': (req: Request, res: Response) => {
    res.send({
      data: [
        { localName: '11#', id: '11111' },
        { localName: '22#', id: '22222' },
        { localName: '33#', id: '33333' },
        { localName: '44#', id: '444444' },
      ],
      success: true,
    });
  },
  'POST /api/environment/Floor': (req: Request, res: Response) => {
    res.send({
      data: [
        { localName: 'F1', id: 'ffff1' },
        { localName: 'F2', id: 'ffff2' },
        { localName: 'F3', id: 'ffff3' },
        { localName: 'F4', id: 'ffff4' },
        { localName: 'F5', id: 'ffff5' },
        { localName: 'F6', id: 'ffff6' },
        { localName: 'F7', id: 'ffff7' },
        { localName: 'F8', id: 'ffff8' },
      ],
      success: true,
    });
  },
};