const data = {
  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'
  }],
  //清洁任务
  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'
  }],
  // 不卡申请
  workflow_check: [
    {
      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'
    }
  ],
  shore_task_status: [{
    value: 1,
    name: '未开始',
    color: '#f56c6c'
  }, {
    value: 2,
    name: '待完成',
    color: '#f56c6c'
  }, {
    value: 3,
    name: '已完成',
    color: '#3c9cff'
  }, {
    value: 4,
    name: '未完成',
    color: '#999999'
  }]
}
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
}