// 问题来源
export enum Source {
  ai = 1,
  manual = 2,
}
export const sourceNameMap = {
  [Source.ai]: "AI检测",
  [Source.manual]: "人工上报",
}
// 问题来源下拉框选项
export const sourceOptions = [
  { label: sourceNameMap[Source.ai], value: Source.ai },
  { label: sourceNameMap[Source.manual], value: Source.manual }
]
// 表格数据-转换value为label
export const getNameBySource = (source: Source) => {
  return sourceNameMap[source] || '-'
}


// 问题状态
export enum IssueState {
  toAuth = 1,
  toDeal = 2,
  toReview = 3,
  toRetreat = 4,
  hasDone = 5,
}
export const issueStateNameMap = {
  [IssueState.toAuth]: '待审核',
  [IssueState.toDeal]: '待处理',
  [IssueState.toReview]: '待复核',
  [IssueState.toRetreat]: '已退回',
  [IssueState.hasDone]: '已处理',
}
// 问题状态下拉框选项
export const issueStateOptions = [
  { label: issueStateNameMap[IssueState.toAuth], value: IssueState.toAuth },
  { label: issueStateNameMap[IssueState.toDeal], value: IssueState.toDeal },
  { label: issueStateNameMap[IssueState.toReview], value: IssueState.toReview },
  { label: issueStateNameMap[IssueState.toRetreat], value: IssueState.toRetreat },
  { label: issueStateNameMap[IssueState.hasDone], value: IssueState.hasDone }
]
// 表格数据-转换value为label
export const getNameByState = (issueState: IssueState) => {
  return issueStateNameMap[issueState] || '-'
}

