import { ref } from '@vue/reactivity'

export const yesOrNo = [
  { code: '1', name: '是' },
  { code: '2', name: '否' },
  { code: '-', name: '-' },
]
export const haveOrNot = [
  { code: '1', name: '无' },
  { code: '2', name: '有' },
  { code: '-', name: '-' },
]
export const searchMethods = [
  { code: 'alpha', name: '拼音' },
  { code: 'code', name: '编码' },
  { code: 'name', name: '名称' },
]
export const autopsies = [
  { code: '1', name: '是' },
  { code: '2', name: '否' },
  { code: '', name: '-' },
]
export function initShowDel() {
  return ref([
    false,
    false,
    false,
    false,
    false,
    false,
    false,
    false,
    false,
    false,
    false,
    false,
    false,
    false,
    false,
    false,
    false,
    false,
    false,
    false,
    false,
    false,
    false,
    false,
    false,
    false,
    false,
  ])
}
export function filterDismissStatus(val) {
  switch (val) {
    case '1':
      return '治愈'
    case '2':
      return '好转'
    case '3':
      return '未愈'
    case '4':
      return '死亡'
    case '9':
      return '其他'
    default:
      return ''
  }
}
export function clone(obj) {
  const ret = {}
  for (let k in obj) {
    ret[k] = obj[k]
  }
  return ret
}
