data.ts 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. import dayjs from 'dayjs';
  2. import { DescItem } from '/@/components/Description';
  3. import { BasicColumn, FormSchema } from '/@/components/Table';
  4. export const BasicTab = [
  5. {
  6. key: '0',
  7. label: '全部',
  8. value: 128,
  9. hasValue: true,
  10. hasBracket: true,
  11. },
  12. {
  13. key: '1',
  14. label: '关注',
  15. value: 18,
  16. hasValue: true,
  17. prefixColor: '#33CCFF',
  18. hasBracket: true,
  19. },
  20. {
  21. key: '2',
  22. label: '新患者',
  23. value: 18,
  24. hasValue: true,
  25. prefixColor: '#F7B500',
  26. hasBracket: true,
  27. },
  28. {
  29. key: '3',
  30. label: '透中患者',
  31. value: 18,
  32. hasValue: true,
  33. prefixColor: '#D3D8DD',
  34. hasBracket: true,
  35. },
  36. {
  37. key: '4',
  38. label: '非透中患者',
  39. value: 12,
  40. hasValue: true,
  41. prefixColor: '#1BC1B3',
  42. hasBracket: true,
  43. },
  44. ];
  45. export const BasicTabActive = BasicTab[0].key;
  46. export const checkColumns: BasicColumn[] = [
  47. {
  48. title: '姓名',
  49. dataIndex: 'name',
  50. },
  51. {
  52. title: '信息',
  53. dataIndex: 'gender',
  54. },
  55. {
  56. title: '查房时间',
  57. dataIndex: 'patrolTime',
  58. },
  59. {
  60. title: '最新查房内容',
  61. dataIndex: 'content',
  62. },
  63. {
  64. title: '记录人',
  65. dataIndex: 'updatorName',
  66. },
  67. ];
  68. export const columns: BasicColumn[] = [
  69. {
  70. title: '查房时间',
  71. dataIndex: 'patrolTime',
  72. },
  73. {
  74. title: '查房内容',
  75. dataIndex: 'content',
  76. },
  77. ];
  78. // 表单新增编辑
  79. export const dataFormSchema: FormSchema[] = [
  80. {
  81. label: '查房时间',
  82. field: 'patrolTime',
  83. required: true,
  84. component: 'DatePicker',
  85. componentProps: ({ formModel }) => {
  86. return {
  87. placeholder: '请输入查房时间',
  88. getPopupContainer: () => document.body,
  89. valueFormat: 'YYYY-MM-DD HH:mm:ss',
  90. showTime: true,
  91. disabledDate: current => {
  92. return current < dayjs(formModel.accessSetUpTime).subtract(1, 'day').endOf('day');
  93. },
  94. };
  95. },
  96. },
  97. {
  98. label: '记录',
  99. field: 'content',
  100. required: true,
  101. component: 'InputTextArea',
  102. componentProps: {
  103. placeholder: '请输入查房内容',
  104. },
  105. },
  106. ];
  107. // 表单详情查看
  108. export const viewSchema: DescItem[] = [
  109. {
  110. label: '查房时间',
  111. field: 'patrolTime',
  112. },
  113. {
  114. label: '查房内容',
  115. field: 'content',
  116. },
  117. ];
  118. // 历史记录查看
  119. export const data: DescItem[] = [
  120. {
  121. label: '查房时间',
  122. field: 'patrolTime',
  123. },
  124. {
  125. label: '查房内容',
  126. field: 'content',
  127. },
  128. ];