import store from '@/store'

/**
* 审查清单模块只有丽水市本级区域，角色：区域管理员，超级管理员，陈超、刘晓峰、施伟谊、吴巍、王茜、吴雨鑫、刘点笑，可以查看。
*/
const userInfo = store.userStore.userInfo || {}
const codes = userInfo.userRoleInfoList.map(i => i.code) // 当前用户角色
export const getIsShowReviewCheck = (onlyUser) => {
  const employeeCodes = import.meta.env.MODE === 'production' ? [
    'GE_dce116d65ffe48a3aee6c14c1c5a3031',
    'GE_573158a366554bdbb483f8f93d594bf7',
    'GE_fe1cd568b453456ead00f471ecddf6a2',
    'GE_fc1e28e29b5a4cf39c7b7c83278db6f4',
    'GE_a4c2c56ed3204600805e0f7b7dca9044',
    'GE_16580afcdf7d4d379fd3690ba47f3b58',
    'GE_9c901c85eaeb42abbb485b7aa4d4358f'
  ] : [
    'GE_051f5e34c0c4467b873cde517a21669b',
    'GE_6dc0e5a3513d41f684b6b01aeb94d887',
    'GE_39be254f6cb84ad0b30c9bd5bda657d7',
    'GE_809a061236b941d281446df6f14dc8f0',
    'GE_c3e4d8e8067b4fce91b28b570cffc67a',
    'GE_6168943503de45919c42d46e05b24fa1',
    'GE_e68c7af513474eaa959b7ce7141a4d9f'
  ]
  if (onlyUser) {
    return employeeCodes.includes(userInfo.employeeCode)
  }
  if (userInfo.regionCode === '330500' && (codes.includes('SUPER_ADMIN') || codes.includes('REGION_MANAGER') || employeeCodes.includes(userInfo.employeeCode))) {
    return true
  } else {
    return false
  }
}
