/**
 * 房间类型对应icon
 */
export const mapIcon: any = {
  '公共区域': {
    'backgroundColor': '#DFE3ED',
    'icon': 'storeroom.svg',
    'selectIcon': 'storeroomselected.svg'
  },
  '卫生间': {
    // 'bg': 'bg_disable.png',
    'backgroundColor': '#fff',
    'selectIcon': 'toiletSelect.svg',
    'icon': 'toilet.svg'
  },
  '走廊': {
    'icon': 'passage.svg',
    // 'backgroundColor': '#DFE3ED',
    // 'bg': 'bg_disable.png',
    // 'backgroundColor': '#DFE3ED',
    'backgroundColor': '#fff',
    'selectIcon': 'passageselected.svg'
  },
  '母婴室': {
    'backgroundColor': '#fff',
    'icon': 'baby.svg',
    'selectIcon': 'babyselected.svg'
  },
  '电梯厅': {
    'icon': 'elevator.svg',
    'selectIcon': 'elevatoSelect.svg',
    'backgroundColor': '#DFE3ED',
    // 'bg': 'bg_disable.png'
  },
  '楼梯间': {
    'backgroundColor': '#DFE3ED',
    'icon': 'stairsx.svg',
    'selectIcon': 'stairsxselected.svg',
  },
  '打印': {
    'backgroundColor': '#DFE3ED',
    'icon': 'print.svg',
    'selectIcon': 'printselected.svg'
  },
  '休闲活动区': {
    'icon': 'coffee.svg',
    'backgroundColor': '#DFE3ED',
    'selectIcon': 'coffeeselected.svg',
  },
  '普通办公区': {
    'icon': 'dev.svg',
    'selectIcon': 'devselected.svg',
    'backgroundColor': '#DFE3ED',
    'circleColor': '#7FBEFA'
  },
  '办公室': {
    'backgroundColor': '#fff',
    'circleColor': '#7582B0',
    'icon': 'officeroom.svg',
    'selectIcon': 'officeroomselected.svg'
  },
  '会议室': {
    'backgroundColor': '#fff',
    'circleColor': '#F2918E',
    'icon': 'mroom.svg',
    'selectIcon': 'mroomSelect.svg'
  },
  '多功能厅': {
    'backgroundColor': '#fff',
    'circleColor': '#7582B0',
    'icon': 'vector.svg',
    'selectIcon': 'vectorSelect.svg'
  },
  '接待室': {
    'backgroundColor': '#fff',
    'circleColor': '#7582B0',
    'icon': 'jiedaiqu.svg',
    'selectIcon': 'jiedaiquSelect.svg'
  },
  // 999999
  '门厅': {
    'backgroundColor': '#DFE3ED',
    'circleColor': '#7582B0',
    'icon': 'jiedaiqu.svg',
    'selectIcon': 'jiedaiquSelect.svg'
  },
  '档案库': {
    'backgroundColor': '#fff',
    'circleColor': '#7582B0',
    'icon': 'chucang.svg',
    'selectIcon': 'chucangshiSelect.svg'
  },
  '更衣室': {
    'backgroundColor': '#fff',
    'circleColor': '#7582B0',
    'icon': 'gengyishi.svg',
    'selectIcon': 'gengyishiSelect.svg'
  },
  '厨房': {
    'backgroundColor': '#fff',
    'circleColor': '#7582B0',
    'icon': 'chufang.svg',
    'selectIcon': 'chufangSelect.svg'
  },
  '餐饮区': {
    'backgroundColor': '#DFE3ED',
    'circleColor': '#7582B0',
    'icon': 'canyin.svg',
    'selectIcon': 'canyinSelect.svg'
  },
  '设备间': {
    'backgroundColor': '#fff',
    'circleColor': '#7582B0',
    'icon': 'deviceroom.svg',
    'selectIcon': 'deviceroomselected.svg'
  },
  '健身房': {
    'backgroundColor': '#DFE3ED',
    'circleColor': '#7582B0',
    'icon': 'jianshenfang.svg',
    'selectIcon': 'jianshenfangSelect.svg'
  },
  '体育管': {
    'backgroundColor': '#DFE3ED',
    'circleColor': '#7582B0',
    'icon': 'tiyuguan.svg',
    'selectIcon': 'tiyuguanSelect.svg'
  },
  '游泳馆': {
    'backgroundColor': '#DFE3ED',
    'circleColor': '#7582B0',
    'icon': 'youyong.svg',
    'selectIcon': 'youyongSelect.svg'
  },
  '图书馆': {
    'backgroundColor': '#DFE3ED',
    'circleColor': '#7582B0',
    'icon': 'tushuguan.svg',
    'selectIcon': 'tushuguanSelect.svg'
  },
  '活动区': {
    'backgroundColor': '#DFE3ED',
    'circleColor': '#7582B0',
    'icon': 'huodongqu.svg',
    'selectIcon': 'huodongquSelect.svg'
  },
  '实验室': {
    'backgroundColor': '#fff',
    'circleColor': '#7582B0',
    'icon': 'shiyanqu.svg',
    'selectIcon': 'shiyanquSelect.svg'
  },
  '值班室': {
    'backgroundColor': '#fff',
    'circleColor': '#7582B0',
    'icon': 'zhibanshi.svg',
    'selectIcon': 'zhibanshiSelect.svg'
  },
  '收费室': {
    'backgroundColor': '#fff',
    'circleColor': '#7582B0',
    'icon': 'finance.svg',
    'selectIcon': 'financeselected.svg'
  },
  '护士站': {
    'backgroundColor': '#DFE3ED',
    'circleColor': '#7582B0',
    'icon': 'nurse.svg',
    'selectIcon': 'nurseSelect.svg'
  }
}

/**
 * 房间类型
 */
export const getSpaceType = function(type: any) {
  let typeName = '公共区域'
  if (type === '100' || type === '1A0' || type === '0' || type === '443' || type === '453') {
    typeName = '公共区域'
  } else if (type === '111') {
    typeName = '卫生间'
  } else if (type === '113') {
    typeName = '母婴室'
  } else if (type === '120') {
    typeName = '走廊'
  } else if (type === '130') {
    typeName = '电梯厅'
  } else if (type === '140') {
    typeName = '楼梯间'
  } else if (type === '170' || type === '600' || type === '223' || type === '930') {
    typeName = '休闲活动区'
  } else if (type === '300' || type === '313' || type === '314' || type === '315' || type === '330') {
    typeName = '普通办公区'
  } else if (type === '312' || type === '311' || type === '310') {
    typeName = '办公室'
  } else if (type === '310' || type === '321' || type === '322' || type === '320') {
    typeName = '会议室'
  } else if (type === '490' || type === '323' || type === '931') {
    typeName = '多功能厅'
  } else if (type === '331') {
    typeName = '接待室'
  } else if (type === '160') {
    typeName = '门厅'
  } else if (type === '333' || type === '250' || type === '253') {
    typeName = '档案库'
  } else if (type === '112') {
    typeName = '更衣室'
  } else if (type === '220' || type === '221') {
    typeName = '餐饮区'
  } else if (type === '430' || type === '410' || type === '400'
    || type === '4B0' || type === '441' || type === '442'
    || type === '451' || type === '452' || type === '461' || type === '462'
    || type === '471' || type === '472' || type === '733' || type === '440' || type === '450') {
    typeName = '厨房'
  } else if (type === '252' || type === '246' || type === '1B5'
    || type === '234' || type === '231' || type === '230'
    || type === '233' || type === '232' || type === '234'
    || type === '235' || type === '236' || type === '237'
    || type === '241' || type === '242' || type === '244'
    || type === '245' || type === '251' || type === '254'
    || type === '211' || type === '212' || type === '222') {
    typeName = '设备间'
  } else if (type === '690') {
    typeName = '健身房'
  } else if (type === '932' || type === '934' || type === '933' || type === '6A0') {
    typeName = '体育管'
  } else if (type === '935') {
    typeName = '图书馆'
  } else if (type === '936' || type === '937' || type === '938' || type === '915') {
    typeName = '活动区'
  } else if (type === '921' || type === '922' || type === '923'
    || type === '920' || type === '926' || type === '924'
    || type === '925' || type === '926') {
    typeName = '实验室'
  } else if (type === '243' || type === '332') {
    typeName = '值班室'
  } else if (type === '334') {
    typeName = '收费室'
  } else if (type === '335') {
    typeName = '护士站'
  } else {
    typeName = '公共区域'
  }
  return typeName
}

/**
 *
 *  获取会议室加班类型
 * @param type
 */
export const getWorkType = function(type: string) {
  let typeName: any = '其它'
  if (type === '312' || type === '311' || type === '310') {
    typeName = '个人'
  } else if (type === '320' || type === '321' || type === '322' || type === '323') {
    typeName = '会议室'
    // type === '300' || type === '313'  ||  type === '314' || type === '315' ||type === '330'
  } else if (type === '313' || type === '314' || type === '315') {
    typeName = '开放'
  } else {
    // typeName = '其它'
    typeName = '开放'
  }
  return typeName
}



