export const custTypeMap = {
  '0': '个人',
  '1': '商户',
  '2': '企业',
}


export const gridPatternMap = {
  '1': '行政网格',
  '2': '自绘地图网格',
  '3': '自建名单网格',
}

export const rolesInfoArr = {
  'branchAdmin': {
    '1': {
      '1': {
        gridName: 'input',
        gridDutyType: 'select',
        opsDept: 'select'
      },
      '2': {
        gridName: 'input',
        gridDutyType: 'select',
        relateOutletName: 'select',
        relateUserName: 'input',
        parentGridName: 'input',
        opsDept: 'select'
      }
    },
    '2': {
      '1': {
        gridName: 'input',
        gridDutyType: 'select',
        relateUserName: 'input',
        opsDept: 'select'
      }
    },
    '3': {
      '1': {
        gridType: 'select',
        custType: 'select',
        virtualGridName: 'input',
        dutyType: 'select',
        relateUserName: 'input',
        opsDept: 'select'
      }
    }
  },
  'commonManager': {
    '1': {
      '1': {
        gridName: 'input',
        gridDutyType: 'select',
        opsDept: 'select'
      },
      '2': {
        gridName: 'input',
        gridDutyType: 'select',
        parentGridName: 'input',
        opsDept: 'select'
      }
    },
    '2': {
      '1': {
        gridDutyType: 'select',
        gridName: 'input',
        relateUserName: 'input',
        opsDept: 'select'
      }
    },
    '3': {
      '1': {
        gridType: 'select',
        custType: 'select',
        virtualGridName: 'input',
        dutyType: 'select',
        opsDept: 'select'
      }
    }
  },
  'headAdmin': {
    '1': {
      '1': {
        gridName: 'input',
        gridDutyType: 'select',
        relateBranchName: 'select',
        opsDept: 'select'
      },
      '2': {
        gridName: 'input',
        gridDutyType: 'select',
        relateBranchName: 'select',
        relateOutletName: 'select',
        relateUserName: 'input',
        parentGridName: 'input',
        opsDept: 'select'
      }
    },
    '2': {
      '1': {
        gridDutyType: 'select',
        gridName: 'input',
        relateUserName: 'input',
        opsDept: 'select'
      }
    },
    '3': {
      '1': {
        gridType: 'select',
        custType: 'select',
        virtualGridName: 'input',
        dutyType: 'select',
        relateUserName: 'input',
        opsDept: 'select'
      }
    }
  },
  'department': {
    '1': {
      '1': {
        gridName: 'input',
        gridDutyType: 'select',
        relateBranchName: 'select',
      },
      '2': {
        gridName: 'input',
        gridDutyType: 'select',
        relateBranchName: 'select',
        relateOutletName: 'select',
        relateUserName: 'input',
        parentGridName: 'input'
      }
    },
    '2': {
      '1': {
        gridDutyType: 'select',
        gridName: 'input',
        relateUserName: 'input',
      }
    },
    '3': {
      '1': {
        gridType: 'select',
        custType: 'select',
        virtualGridName: 'input',
        dutyType: 'select',
        relateUserName: 'input',
      }
    }
  },
  'admin': '超级管理员'
}

export const gridTypeOptions = [
  { label: '行政区划', value: '0' },
  { label: '菜场', value: '1', disabled: true },
  { label: '政府单位', value: '2', disabled: true },
  { label: '事业单位', value: '3', disabled: true },
  { label: '社区', value: '4', disabled: true },
  { label: '商圈', value: '5', disabled: true },
  { label: '企业', value: '6', disabled: true },
  { label: '市场园区', value: '7', disabled: true },
  { label: '教育', value: '8', disabled: true },
  { label: '其他', value: '9', disabled: true }
]

export const menuArr = function (nofirstFrid) {
  if (nofirstFrid) {
    return [
      {
        id: '2',
        label: '支行行政网格',
        children: [
          {
            id: '2-1',
            label: '列表视角',
          },
          {
            id: '2-2',
            label: '地图视角',
          }
        ]
      }
    ]
  }
  return [
    {
      id: '1',
      label: '总行行政网格',
      children: [
        {
          id: '1-1',
          label: '列表视角',
        },
        {
          id: '1-2',
          label: '地图视角',
        }
      ]
    },
    {
      id: '2',
      label: '支行行政网格',
      children: [
        {
          id: '2-1',
          label: '列表视角',
        },
        {
          id: '2-2',
          label: '地图视角',
        }
      ]
    }
  ]
}

export const gridDutyTypeMap = {
  '1': '责任网格',
  '2': '竞争网格',
}
