华西海圻ELN前端工程
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.2 KiB

  1. //判断是否显示其他输入框
  2. export const isShowOther = (v = [], col) => {
  3. if (col && !col.otherCode) {
  4. return false
  5. }
  6. // 确保v是数组类型,以避免类型错误
  7. const arr = Array.isArray(v) ? v : [v]
  8. const otherArr = ['其他', '遮光', 'CA-QC Dilution-', '拒绝', '部分接受', "污染"]
  9. return arr.some((item) => otherArr.includes(item))
  10. }
  11. //radioAndOther判断是否显示其他输入框
  12. export const isShowOtherByRadioAndOther = (v = '', col) => {
  13. if (col && !col.otherCode) {
  14. return false
  15. }
  16. const otherArr = ['其他', '异常', '不一致']
  17. return otherArr.includes(v)
  18. }
  19. //checkboxTree判断是否显示其他输入框
  20. export const isShowOtherByCheckboxTree = (v = "") => {
  21. const otherArr = ['其他', '样品信息', '样品', '部分接受', '给药 ',
  22. '样本采集',
  23. '日常观察 ',
  24. '皮肤评分',
  25. '眼刺激评分',
  26. '麻醉 ',
  27. '交配确认',
  28. 'PND检测',
  29. '神经行为功能评测',
  30. '血糖测定',
  31. '遥测数据采集',
  32. '呼吸检测',
  33. '血压测定',
  34. '心电检测',
  35. '体温测定',
  36. '毒代 TK',
  37. '药代 PK'
  38. , '细胞因子']
  39. return otherArr.includes(v)
  40. }