import { validatePhoneNumber, validateManagers, validateIdCard } from '@/utils/formRule'

const sexOptions = [
  {
    label: '男',
    value: 1
  },
  {
    label: '女',
    value: 2
  },
]

const projectStatusOptions = [
  {
    label: '未开始',
    value: 0
  },
  {
    label: '进行中',
    value: 2
  },
  {
    label: '已完成',
    value: 1
  },
]

const productStautsOptions = [
  {
    label: '上架',
    value: 0
  },
  {
    label: '下架',
    value: 1
  },
]

const deliveryStautsOptions = [
  {
    label: '未配送',
    value: 1
  },
  {
    label: '部分配送',
    value: 2
  },
  {
    label: '配送完成',
    value: 3
  },
]
export const taskAuditStautsOptions = [
  {
    label: '未审核',
    value: 0
  },
  {
    label: '通过',
    value: 1
  },
  {
    label: '不通过',
    value: -1
  },
]

const taskStatusObj = {
  0: '未分配',
  100: '评估/未预约',
  101: '评估/未评估',
  102: '评估/未配置',
  103: '评估/已评估',
  104: '评估/未评价',
  105: '评估结束',
  200: '改造/未分配',
  201: '改造/未预约',
  202: '改造/未确认产品清单',
  203: '改造/未改造',
  204: '改造/改造完成',
  205: '改造/未评价',
  206: '改造结束',
  500: '改造结束',
  300: '售后/未预约',
  302: '售后/未售后',
  303: '售后/未评价',
  304: '售后结束',
}

export const taskTypeOptions = [
  {
    label: '评估',
    value: 100
  },
  {
    label: '改造',
    value: 200
  },
  {
    label: '售后',
    value: 300
  },
]

export function optionsFilter(value, options = [], valueKey = 'value', returnKey = 'label') {
  const item = options.find(it => it[valueKey] === value)
  return item[returnKey]
}
export function getBirth(birth) {
  const reg = /^(\d{4})(\d{2})(\d{2})/
  const r = reg.exec(birth)
  return `${r[1]}-${r[2]}-${r[3]}`
}

export const project = [
  {
    formType: 'input',
    label: '项目名称',
    prop: 'item_name',
    required: true
  },
  {
    formType: 'select',
    label: '项目属性',
    prop: 'type_id',
    tabelProp: 'type_name',
    labelKey: 'name',
    valueKey: 'id',
    options: [],
    required: true
  },
  {
    formType: 'picker',
    pickerType: 'date',
    label: '项目开始时间',
    prop: 'begin_time',
    filter: (time) => time.split(' ')[0],
    required: true
  },
  {
    formType: 'picker',
    pickerType: 'date',
    label: '项目结束时间',
    prop: 'end_time',
    filter: (time) => time.split(' ')[0],
    required: true
  },
  {
    formType: 'address',
    label: '项目实施区域',
    multiple: true,
    level: 3,
    prop: 'areas',
    tabelProp: 'areas_name',
    filter: (areas) => areas.join(' / '),
    required: true
  },
  {
    label: '项目资方',
    prop: 'sponsors',
    required: true
  },
  {
    formType: 'multiple',
    label: '项目监管',
    prop: 'supervisors',
    tabelProp: 'supervisors_name',
    filter: (name) => name.join('/'),
    limit: 3,
    options: [
      {
        type: 'address',
        prop: 'addressArr',
        level: 3,
        defaultValue: []
      },
      {
        type: 'select',
        prop: 'supervisor_account_id',
        valueKey: 'id',
        labelKey: 'nick_name',
        options: [],
        defaultValue: ''
      },
    ],
    // defaultValue: []
  },
  {
    label: '项目团队',
    prop: 'team_name',
    required: true
  },
  {
    formType: 'select',
    multiple: true,
    label: '项目负责人',
    prop: 'managers',
    tabelProp: 'managers_name',
    labelKey: 'nick_name',
    valueKey: 'id',
    // required: true,
    options: [],
    rule: [{ required: true, trigger: 'change', validator: validateManagers }],
    defaultValue: []
  },
  {
    label: '项目主要联系人',
    prop: 'item_concat_person',
    required: true
  },
  {
    label: '联系方式',
    prop: 'item_concat_person_phone',
    rule: [{ required: true, trigger: 'blur', validator: validatePhoneNumber }]
  },
  {
    label: '改造户数',
    prop: 'reform_nums'
  },
  {
    label: '改造金额',
    prop: 'reform_money'
  },
  {
    label: '项目状态',
    prop: 'status',
    filter: (status) => optionsFilter(status, projectStatusOptions)
  },
]

export const team = [
  {
    label: '团队名称',
    prop: 'team_name'
  },
  {
    label: '姓名',
    prop: 'name'
  },
  {
    label: '联系方式',
    prop: 'phone'
  },
  {
    label: '备注',
    prop: 'notes'
  },
  {
    formType: 'select',
    label: '角色',
    formProp: 'role_id',
    labelKey: 'role_name',
    valueKey: 'id',
    prop: 'role_name',
    required: true
  },
  {
    label: '联系方式',
    prop: ''
  },
  {
    formType: 'input',
    label: '账号',
    formLabel: '登录账号',
    prop: 'account_name',
    required: true,
    disabled: true
  },
  {
    label: '备注',
    prop: ''
  },
  // 表单
  {
    formType: 'select',
    label: '人员',
    prop: 'from_id',
    labelKey: 'name',
    valueKey: 'id',
    required: true
  },
  {
    formType: 'input',
    label: '账号名称',
    prop: 'nick_name',
    required: true,
    disabled: true
  },
  {
    formType: 'input',
    label: '登录密码',
    prop: 'password',
    required: true,
    hidden: true,
    disabled: true
  },
  {
    formType: 'select',
    label: '账号状态',
    options: [
      {
        label: '启用',
        value: 0
      },
      {
        label: '禁用',
        value: 1
      },
    ],
    prop: 'status',
    formHidden: true,
    defaultValue: 0
  },
]

export const plan = [
  {
    label: '阶段',
    formProp: 'type',
    formHidden: true,
    prop: 'name',
  },
  {
    label: '计划开始时间',
    prop: 'begin_time',
    formType: 'picker',
    pickerType: 'date',
  },
  {
    label: '计划结束时间',
    prop: 'end_time',
    formType: 'picker',
    pickerType: 'date',
  },
  {
    label: '预计人数(人)',
    prop: 'estimated_persons',
  },
  {
    label: '预计天数(天)',
    prop: 'estimated_days',
  },
  {
    label: '备注',
    prop: 'notes',
  },
]

export const customer = [
  {
    label: '序号',
    prop: 'id',
  },
  {
    label: '所属项目',
    prop: 'item_name',
    formHidden: true
  },
  {
    label: '区域',
    prop: 'addressArr',
    tabelProp: 'addressNames',
    formType: 'address',
    filter: (address) => address.join('/'),
    level: 3,
    required: true
  },
  {
    label: '姓名',
    prop: 'customer_name',
    required: true
  },
  {
    label: '性别',
    prop: 'sex',
    formType: 'select',
    options: sexOptions,
    filter: (sex) => {
      return optionsFilter(sex, sexOptions)
    },
    required: true
  },
  {
    label: '身份证号',
    prop: 'id_card',
    rule: [{ required: true, trigger: 'change', validator: validateIdCard }]
  },
  {
    label: '联系方式',
    prop: 'customer_phone',
    rule: [{ required: true, trigger: 'blur', validator: validatePhoneNumber }]
  },
  {
    label: '改造地址',
    prop: 'reformAddressArr',
    tabelProp: 'reformAddressNames',
    formType: 'address',
    filter: (address) => address.join('/'),
    level: 4,
    required: true,
    children: [
      {
        label: '省',
        prop: 'reform_province_name'
      },
      {
        label: '市',
        prop: 'reform_city_name'
      },
      {
        label: '区/县',
        prop: 'reform_area_name'
      },
      {
        label: '街道/乡/镇',
        prop: 'reform_street_name'
      },
      {
        label: '社区',
        prop: 'reform_committee_name'
      },
      {
        label: '详细地址',
        prop: 'reform_address'
      },
    ]
  },
  {
    label: '改造详细地址',
    prop: 'reform_address',
    tabelHidden: true,
    required: true
  },
  {
    label: '家庭类型',
    prop: 'family_type_id',
    tabelProp: 'family_type_name',
    valueKey: 'family_type_id',
    labelKey: 'name',
    formType: 'select',
    required: true
  },
  {
    label: '备注',
    prop: 'notes',
  }
]

export const delivery = [
  {
    prop: 'total_nums',
    label: '需配送产品数量',
  },
  {
    prop: 'delivered_nums',
    label: '已配送产品数量',
  },
  {
    prop: 'delivery_status',
    label: '配送状态',
    options: deliveryStautsOptions,
    filter: (status) => {
      return optionsFilter(status, deliveryStautsOptions)
    }
  },
]

export const deliveryDetail = [
  {
    prop: 'location_name',
    label: '安装位置'
  },
  {
    prop: 'total_price',
    label: '合计'
  },
  {
    prop: 'total_nums',
    label: '安装数量'
  },
]

export const productTypes = [
  {
    prop: 'name',
    label: '分类名称',
    required: true
  },
  {
    prop: 'operater_info.name',
    label: '添加人',
  },
  {
    prop: 'create_time',
    label: '添加时间',
  },
]

export const product = [
  {
    label: '序号',
    prop: 'id',
  },
  {
    formType: 'input',
    label: '产品名称',
    prop: 'product_name',
    required: true
  },
  {
    formType: 'select',
    label: '产品分类',
    prop: 'type_id',
    tabelProp: 'type_name',
    labelKey: 'name',
    valueKey: 'id',
    required: true
  },
  {
    type: 'image',
    label: '产品示意图',
    prop: 'product_img',
    width: '120px',
    required: true
  },
  {
    formType: 'input',
    label: '单位',
    prop: 'unit_name',
    required: true
  },
  {
    formType: 'input',
    label: '单价(元)',
    prop: 'price',
    required: true
  },
  {
    formType: 'input',
    label: '品牌',
    prop: 'brand_name',
    required: true
  },
  {
    formType: 'input',
    label: '型号',
    prop: 'model',
    required: true
  },
  {
    formType: 'input',
    label: '规格参数',
    prop: 'specifications',
    span: 24,
    defaultValue: [],
    required: true
  },
  {
    formType: 'input',
    label: '功能',
    prop: 'description',
    width: '140px',
    required: true
  },
  {
    formType: 'input',
    label: '备注',
    prop: 'note',
    required: true
  },
  {
    formType: 'input',
    label: '改造前',
    prop: 'reform_before',
    inputType: 'textarea',
    width: '160px',
    span: 16,
    required: true
  },
  {
    formType: 'input',
    label: '改造中',
    prop: 'reform_on',
    inputType: 'textarea',
    width: '160px',
    span: 16,
    // required: true
  },
  {
    formType: 'input',
    label: '改造后',
    prop: 'reform_after',
    inputType: 'textarea',
    width: '160px',
    span: 16,
    required: true
  },
  {
    formType: 'input',
    label: '使用量',
    prop: 'total_used',
    required: true
  },
  {
    formType: 'select',
    label: '产品状态',
    prop: 'status',
    options: productStautsOptions,
    filter: (status) => {
      return optionsFilter(status, productStautsOptions)
    },
    defaultValue: 0,
    required: true
  },
  {
    formType: 'input',
    label: '正常使用',
    prop: 'normal_use',
    // required: true
  },
  {
    formType: 'input',
    label: '使用异常',
    prop: 'abnormal_use',
    // required: true
  },
  {
    formType: 'input',
    label: '产品名称(项目)',
    prop: 'item_product_name',
    required: true
  },
  {
    formType: 'input',
    inputType: 'number',
    label: '上限数量',
    prop: 'max_nums',
    placeholder: '输入-1不上限',
    required: true
  },
]

export const productSpecification = [
  {
    type: 'image',
    label: '产品示意图',
    prop: 'product_img',
    width: '120px',
    required: true
  },
  {
    formType: 'input',
    inputType: 'number',
    label: '单价',
    prop: 'price',
    required: true
  },
  {
    formType: 'input',
    label: '型号',
    prop: 'model',
    required: true
  },
  {
    formType: 'input',
    label: '规格参数',
    prop: 'specifications',
    required: true
  },
  {
    formType: 'input',
    label: '功能',
    width: '140px',
    prop: 'description',
    required: true
  },
  {
    formType: 'input',
    label: '备注',
    prop: 'note'
  },
]

export const checkProduct = [
  {
    label: '数量',
    prop: 'used_nums'
  },
  {
    label: '小记',
    prop: 'totalPrice'
  },
]

export const taskStatistic = [
  {
    label: '街道名',
    prop: 'reform_street_name'
  },
  {
    label: '户数',
    prop: 'total_nums'
  },
  {
    label: '评估',
    children: [
      {
        label: '预约',
        children: [
          {
            label: '未预约',
            prop: 'assess.appointments.no'
          },
          {
            label: '预约完成',
            prop: 'assess.appointments.yes'
          },
        ]
      },
      {
        label: '评估',
        children: [
          {
            label: '未评估',
            prop: 'assess.assess.no'
          },
          {
            label: '评估完成',
            prop: 'assess.assess.yes'
          },
        ]
      }
    ]
  },
  {
    label: '改造',
    children: [
      {
        label: '预约',
        children: [
          {
            label: '未预约',
            prop: 'reform.appointments.no'
          },
          {
            label: '预约完成',
            prop: 'reform.appointments.yes'
          },
        ]
      },
      {
        label: '改造',
        children: [
          {
            label: '未改造',
            prop: 'reform.reform.no'
          },
          {
            label: '改造完成',
            prop: 'reform.reform.yes'
          },
        ]
      }
    ]
  },
  {
    label: '售后',
    children: [
      {
        label: '回访',
        children: [
          {
            label: '未回访',
            prop: 'after_sale.visit.no'
          },
          {
            label: '回访完成',
            prop: 'after_sale.visit.yes'
          },
        ]
      },
      {
        label: '售后',
        children: [
          {
            label: '待售后',
            prop: 'after_sale.after_sale.no'
          },
          {
            label: '售后完成',
            prop: 'after_sale.after_sale.yes'
          },
        ]
      }
    ]
  },
]

export const taskStatusField = {
  label: '任务状态',
  prop: 'task_status',
  filter: (status) => {
    return taskStatusObj[status]
  }
}

export const taskAudit = [
  {
    label: '审核状态',
    prop: 'audit_status',
    filter: (status) => optionsFilter(status || 0, taskAuditStautsOptions)
  },
  {
    label: '政府评价',
    prop: 'audit_idea'
  }
]

export const document = [
  {
    formType: 'input',
    label: '项目名称',
    prop: 'item_name',
    required: true
  },
  {
    label: '项目属性',
    prop: 'item_type_name',
  },
  {
    label: '项目负责人',
    prop: 'item_managers',
    filter: (manager) => manager.map(item => item.name).join(', ')
  },
]

export const performance = [
  {
    label: '姓名',
    prop: 'member_account_name',
  },
  {
    label: '角色',
    prop: 'role_name',
  },
  {
    label: '评估(加分项)',
    children: [
      {
        label: '数量',
        prop: 'assess_num'
      },
      {
        label: '客户满意度',
        prop: 'assess_satisfaction'
      },
      {
        label: '评估平均金额',
        prop: 'assess_average_amount'
      },
    ]
  },
  {
    label: '改造(加分项)',
    children: [
      {
        label: '数量',
        prop: 'reform_num'
      },
      {
        label: '客户满意度',
        prop: 'reform_satisfaction'
      },
    ]
  },
  {
    label: '售后(减分项)',
    children: [
      {
        label: '数量',
        prop: 'after_sale_num'
      },
      {
        label: '客户满意度',
        prop: 'after_sale_satisfaction'
      },
    ]
  },
]

export const statistic = [
  {
    label: '项目基本情况',
    children: [
      {
        label: '项目名称',
        prop: 'item_name'
      },
      {
        label: '项目属性',
        prop: 'type_name'
      },
      {
        label: '项目负责人',
        prop: 'managers',
        filter: (arr) => arr.join(', ')
      },
      {
        label: '项目周期',
        children: [
          {
            label: '开始时间',
            prop: 'begin_time'
          },
          {
            label: '结束时间',
            prop: 'end_time'
          }
        ]
      },
      {
        label: '项目实施区域',
        prop: 'areas',
        filter: (arr) => arr.join(', ')
      },
    ]
  },
  {
    label: '基本信息',
    children: [
      {
        label: '姓名',
        prop: 'customer_name'
      },
      {
        label: '性别',
        prop: 'sex',
        filter: (sex) => optionsFilter(sex, sexOptions)
      },
      {
        label: '出生日期',
        prop: 'birth',
        filter: getBirth
      },
      {
        label: '联系电话',
        prop: 'customer_phone'
      },
      {
        label: '身份证号码',
        prop: 'id_card',
      },
      {
        label: '居住地址',
        prop: 'address',
      },
      {
        label: '居住状态',
        prop: 'report.jzzt'
      },
      {
        label: '照护情况',
        prop: 'report.zhqk'
      },
      {
        label: '健康状态(疾病数量)',
        prop: 'report.jkzt',
      },
      {
        label: '肢体障碍情况',
        prop: 'report.ztzaqk',
      },
      {
        label: '电梯使用情况',
        prop: 'report.dianti',
      },
      {
        label: '改造建议',
        prop: 'report.gaizaojy',
      },
    ]
  },
]

export const statisticExport = [
  {
    label: '项目基本情况',
    children: [
      {
        label: '项目名称',
        prop: 'item_name'
      },
      {
        label: '项目属性',
        prop: 'type_name'
      },
      {
        label: '项目负责人',
        prop: 'managers',
        filter: (arr) => arr.join(', ')
      },
      {
        label: '项目周期',
        children: [
          {
            label: '开始时间',
            prop: 'begin_time'
          },
          {
            label: '结束时间',
            prop: 'end_time'
          }
        ]
      },
      {
        label: '项目实施区域',
        prop: 'areas',
        filter: (arr) => arr.join(', ')
      },
    ]
  },
  {
    label: '基本信息',
    children: [
      {
        label: '姓名',
        prop: 'customer_name'
      },
      {
        label: '性别',
        prop: 'sex',
        filter: (sex) => optionsFilter(sex, sexOptions)
      },
      {
        label: '出生日期',
        prop: 'birth',
        filter: getBirth
      },
      {
        label: '联系电话',
        prop: 'customer_phone'
      },
      {
        label: '身份证号码',
        prop: 'id_card',
      },
      {
        label: '居住地址',
        prop: 'address',
      },
      // {
      //   label: '居住状态',
      //   prop: 'report.jzzt'
      // },
      // {
      //   label: '照护情况',
      //   prop: 'report.zhqk'
      // },
      // {
      //   label: '健康状态(疾病数量)',
      //   prop: 'report.jkzt',
      // },
      // {
      //   label: '肢体障碍情况',
      //   prop: 'report.ztzaqk',
      // },
      // {
      //   label: '电梯使用情况',
      //   prop: 'report.dianti',
      // },
      // {
      //   label: '改造建议',
      //   prop: 'report.gaizaojy',
      // },
    ]
  },
]

/*
export const statisticExport = [
  {
    label: '项目基本情况',
    children: [
      {
        label: '项目名称',
        prop: 'item_name'
      },
      {
        label: '项目属性',
        prop: 'type_name'
      },
      {
        label: '项目负责人',
        prop: 'managers',
        filter: (arr) => arr.join(', ')
      },
      {
        label: '项目周期',
        children: [
          {
            label: '开始时间',
            prop: 'begin_time'
          },
          {
            label: '结束时间',
            prop: 'end_time'
          }
        ]
      },
      {
        label: '项目实施区域',
        prop: 'areas',
        filter: (arr) => arr.join(', ')
      },
      {
        label: '项目资方',
        prop: 'areas',
        filter: (arr) => arr.join(', ')
      },
      {
        label: '项目监管',
        prop: 'areas',
        filter: (arr) => arr.join(', ')
      },
      {
        label: '项目审核',
        prop: 'areas',
        filter: (arr) => arr.join(', ')
      },
      {
        label: '项目团队',
        prop: 'areas',
        filter: (arr) => arr.join(', ')
      },
      {
        label: '项目主要联系人',
        prop: 'areas',
        filter: (arr) => arr.join(', ')
      },
      {
        label: '联系方式',
        prop: 'areas',
        filter: (arr) => arr.join(', ')
      },
    ]
  },
  {
    label: '评估内容',
    children: [
      {
        label: '基本信息',
        children: [
          {
            label: '姓名',
            prop: 'customer_name'
          },
          {
            label: '性别',
            prop: 'sex',
            filter: (sex) => optionsFilter(sex, sexOptions)
          },
          {
            label: '出生日期',
            prop: 'birth',
            filter: getBirth
          },
          {
            label: '联系电话',
            prop: 'customer_phone'
          },
          {
            label: '身份证号码',
            prop: 'id_card',
          },
          {
            label: '居住地址',
            prop: 'address',
          },
          {
            label: '经济收入(元)',
            prop: 'address',
          },
          {
            label: '居住状态',
            prop: 'report.jzzt'
          },
          {
            label: '照护情况',
            prop: 'report.zhqk'
          },
          // {
          //   label: '健康状态(疾病数量)',
          //   prop: 'report.jkzt',
          // },
          // {
          //   label: '肢体障碍情况',
          //   prop: 'report.ztzaqk',
          // },
          // {
          //   label: '电梯使用情况',
          //   prop: 'report.dianti',
          // },
          // {
          //   label: '改造建议',
          //   prop: 'report.gaizaojy',
          // },
        ]
      },
      {
        label: '身体状态评估',
        children: [
          {
            label: '身高'
          },
          {
            label: '体重'
          },
          {
            label: '活力指数'
          },
          {
            label: '收缩压'
          },
          {
            label: '舒张压'
          },
          {
            label: '脉搏'
          },
          {
            label: '健康状况',
            children: [
              {
                label: '认知障碍'
              },
              {
                label: '知觉障碍'
              },
              {
                label: '循环系统疾病'
              },
              {
                label: '呼吸系统疾病'
              },
              {
                label: '消化系统疾病'
              },
              {
                label: '泌尿生殖系统疾病'
              },
              {
                label: '肌肉骨骼系统疾病'
              },
              {
                label: '内分泌及代谢性疾病'
              },
              {
                label: '神经系统疾病'
              },
              {
                label: '疾病数量'
              },
            ]
          },
          {
            label: '肢体障碍状况',
            children: [
              {
                label: '疾病影响'
              },
              {
                label: '外部创伤'
              },
              {
                label: '肢体障碍情况'
              },
            ]
          },
          {
            label: '行为动作数据测量',
            children: [
              {
                label: '臂长'
              },
              {
                label: '坐位举高'
              },
              {
                label: '正坐膝盖高度'
              },
              {
                label: '坐宽'
              },
              {
                label: '肘关节角度'
              },
              {
                label: '膝关节角度'
              },
              {
                label: '肩关节角度'
              },
              {
                label: '腿长'
              },
              {
                label: '站姿髋关节高度'
              },
              {
                label: '其他说明'
              },
            ]
          },
        ]
      },
      {
        label: '日常生活能力评估',
        children: [
          {
            label: '穿脱衣物（包括脱衣、穿衣、就寝、起床等）'
          },
          {
            label: '洗漱（包括洗脸，刷牙，刮胡子，梳头等）'
          },
          {
            label: '洗浴'
          },
          {
            label: '进食（指用餐具将食物由容器送到口中，咀嚼，吞咽等过程）'
          },
          {
            label: '大便控制'
          },
          {
            label: '小便控制'
          },
          {
            label: '如厕（包括去厕所，解开衣裤，擦净，冲水）'
          },
          {
            label: '床椅转移'
          },
          {
            label: '平地步行'
          },
          {
            label: '上下楼梯'
          },
          {
            label: '其他说明'
          },
        ]
      },
      {
        label: '日常行为能力评估',
        children: [
          {
            label: '视力（读报，根据能读出字体大小判断）'
          },
          {
            label: '听力'
          },
          {
            label: '手部活动能力'
          },
          {
            label: '近1年内发生过的意外状况（多选）'
          },
          {
            label: '其他说明'
          },
        ]
      },
      {
        label: '社会参与能力评估',
        children: [
          {
            label: '家务料理'
          },
          {
            label: '时间/空间定向'
          },
          {
            label: '人物定向'
          },
          {
            label: '社会交往能力'
          },
          {
            label: '其他说明'
          },
        ]
      },
      {
        label: '居家环境与安全评估',
        children: [
          {
            label: '房屋情况',
            children: [
              {
                label: '房屋户型'
              },
              {
                label: '电梯使用情况'
              },
              {
                label: '是否允许结构性改造'
              },
            ]
          },
          {
            label: '地面防滑系数',
            children: [
              {
                label: '卫生间'
              },
              {
                label: '厨房'
              },
              {
                label: '卧室'
              },
              {
                label: '客厅及阳台'
              },
            ]
          },
          {
            label: '插座安全',
            children: [
              {
                label: '插座安全',
              },
              {
                label: '插座',
              },
            ]
          },
          {
            label: '室内光照度数',
            children: [
              {
                label: '客厅',
              },
              {
                label: '卧室',
                children: [
                  {
                    label: '一般活动',
                  },
                  {
                    label: '书写、阅读',
                  },
                ]
              },
              {
                label: '厨房',
              },
              {
                label: '餐厅',
              },
              {
                label: '卫生间',
              },
              {
                label: '走道、楼梯间',
              },
              {
                label: '光照情况',
              },
            ]
          },
          {
            label: '其他说明'
          },
        ]
      },
    ]
  },
]
*/
