schoolOpen.data.ts 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. import { storeToRefs } from 'pinia';
  2. import { ZtTableColumnProps } from '/#/utils';
  3. import { BasicColumn, FormSchema } from '/@/components/Table';
  4. import { useShopInfoStore } from '/@/store/modules/shopInfo';
  5. const { deptList } = storeToRefs(useShopInfoStore());
  6. export const formSchema: FormSchema[] = [
  7. {
  8. field: 'tenantId',
  9. label: '营业名称',
  10. component: 'Select',
  11. required: true,
  12. labelWidth: 120,
  13. componentProps: {
  14. options: deptList,
  15. fieldNames: {
  16. label: 'departName',
  17. value: 'id',
  18. },
  19. },
  20. colProps: {
  21. span: 14,
  22. xs: 24,
  23. },
  24. },
  25. {
  26. field: 'title1',
  27. colSlot: 'title1',
  28. label: '',
  29. component: 'Input',
  30. labelWidth: 0,
  31. },
  32. {
  33. field: 'teachingDay',
  34. label: '教学日',
  35. component: 'Input',
  36. slot: 'ZtCustomTable1',
  37. defaultValue: [],
  38. required: true,
  39. labelWidth: 120,
  40. colProps: {
  41. span: 20,
  42. xs: 24,
  43. },
  44. },
  45. {
  46. field: 'noTeachingDay',
  47. label: '非教学日',
  48. component: 'Input',
  49. slot: 'ZtCustomTable2',
  50. defaultValue: [],
  51. required: true,
  52. labelWidth: 120,
  53. colProps: {
  54. span: 20,
  55. xs: 24,
  56. },
  57. },
  58. {
  59. field: 'title2',
  60. colSlot: 'title2',
  61. label: '',
  62. component: 'Input',
  63. labelWidth: 0,
  64. },
  65. {
  66. field: 'cover',
  67. label: '封面',
  68. component: 'JImageUpload',
  69. required: true,
  70. labelWidth: 120,
  71. colProps: {
  72. span: 14,
  73. xs: 24,
  74. },
  75. },
  76. {
  77. field: 'insurance',
  78. label: '配套保险',
  79. component: 'RadioGroup',
  80. componentProps: {
  81. options: [
  82. { label: '意外伤害险1', value: 0 },
  83. { label: '大额意外伤害险', value: 1 },
  84. ],
  85. },
  86. required: true,
  87. labelWidth: 120,
  88. colProps: {
  89. span: 14,
  90. xs: 24,
  91. },
  92. },
  93. {
  94. field: 'reminder',
  95. label: '使用须知',
  96. component: 'InputTextArea',
  97. required: true,
  98. labelWidth: 120,
  99. colProps: {
  100. span: 22,
  101. xs: 24,
  102. },
  103. },
  104. ];
  105. export const ScheduleArrangementColums: BasicColumn[] = [
  106. {
  107. title: '时间段',
  108. dataIndex: 'time',
  109. editComponent: 'TimeRangePicker',
  110. editRule: true,
  111. editComponentProps: {
  112. placeholder: ['开始时间', '结束时间'],
  113. size: 'middle',
  114. valueFormat: 'HH:mm',
  115. },
  116. width: 350,
  117. editRow: true,
  118. editable: true,
  119. },
  120. {
  121. title: '总票数',
  122. key: 'InputNumber',
  123. dataIndex: 'ticketNum',
  124. width: 250,
  125. editComponent: 'InputNumber',
  126. editRule: true,
  127. editComponentProps: {
  128. size: 'middle',
  129. },
  130. editRow: true,
  131. editable: true,
  132. },
  133. {
  134. key: 'op',
  135. dataIndex: 'operation',
  136. title: 'operation',
  137. fixed: 'right',
  138. },
  139. ];