const data = {
  messages:[
    { value:'system', name:'系统消息' },
    { value:'work', name:'工作消息' },
    { value:'exam', name:'考试通知' },
    { value:'approval', name:'审批通知' }
  ],
  // 申请状态
  statusExpense: [
    { value: 1, name: '待审核', color: '#f56c6c' },
    { value: 2, name: '审核中', color: '#f56c6c' },
    { value: 3, name: '已通过', color: '#3c9cff' },
    { value: 4, name: '未通过', color: '#999999' },
    { value: 5, name: '已取消', color: '#999999' }
  ],
  // 审核状态
  statusExpense2: [
    { value: 1, name: '未开始', color: '#f56c6c' },
    { value: 2, name: '待审核', color: '#f56c6c' },
    { value: 3, name: '已通过', color: '#3c9cff' },
    { value: 4, name: '未通过', color: '#999999' },
    { value: 5, name: '已取消', color: '#999999' }
  ],
  // 清洁任务
  task_hygienes: [
    { value: 1, name: '未开始', color: '#f56c6c' },
    { value: 2, name: '待完成', color: '#f56c6c' },
    { value: 3, name: '已完成', color: '#3c9cff' },
    { value: 4, name: '未完成', color: '#999999' },
    { value: 5, name: '审核中', color: '#3c9cff' },
    { value: 6, name: '未通过', color: '#999999' }
  ],
  //总账录入
  task_ledgers: [{
    value: 1,
    name: '未开始',
    color: '#f56c6c'
  }, {
    value: 2,
    name: '待完成',
    color: '#f56c6c'
  }, {
    value: 3,
    name: '已完成',
    color: '#3c9cff'
  }, {
    value: 4,
    name: '未完成',
    color: '#999999'
  }],
  // 升职申请
  promotion_status: [
    { value: 1, name: '待补充', color: '#f56c6c'},
    { value: 2, name: '待推荐', color: '#f56c6c' },
    { value: 3, name: '审核中', color: '#f56c6c' },
    { value: 4, name: '已通过', color: '#3c9cff' },
    { value: 5, name: '未通过', color: '#999999' }
  ],
  shore_task_status: [{
    value: 1,
    name: '未开始',
    color: '#f56c6c'
  }, {
    value: 2,
    name: '待完成',
    color: '#f56c6c'
  }, {
    value: 3,
    name: '已完成',
    color: '#3c9cff'
  }, {
    value: 4,
    name: '未完成',
    color: '#999999'
  }],
  job_text:[{
    
  }]
}
export default function (value, status, key) {
  if (!status) {
    return value
  }
  const item = data[status]?.find((item) => item.value === value)
  if (item && key) {
    return item[key] ?? value
  }
  return item ?? value
}