staff.data.ts 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. import { getDepListData } from '/@/api/common/api';
  2. import { BasicColumn } from '/@/components/Table';
  3. import { FormSchema } from '/@/components/Table';
  4. export const columns: BasicColumn[] = [
  5. {
  6. title: '登录名称',
  7. dataIndex: 'username',
  8. width: 100,
  9. align: 'center',
  10. },
  11. {
  12. title: '用户名称',
  13. dataIndex: 'realname',
  14. width: 100,
  15. },
  16. {
  17. title: '部门',
  18. dataIndex: 'departName',
  19. width: 100,
  20. },
  21. {
  22. title: '用户状态',
  23. dataIndex: 'status',
  24. width: 100,
  25. },
  26. {
  27. title: '创建时间',
  28. dataIndex: 'createTime',
  29. width: 100,
  30. },
  31. ];
  32. export const searchFormSchema: FormSchema[] = [
  33. {
  34. field: 'username',
  35. label: '登录名称',
  36. component: 'Input',
  37. colProps: { sm: 24 },
  38. },
  39. {
  40. field: 'phone',
  41. label: '手机号码',
  42. component: 'Input',
  43. colProps: { sm: 24 },
  44. },
  45. {
  46. field: 'status',
  47. label: '用户状态',
  48. component: 'Select',
  49. colProps: { sm: 24 },
  50. componentProps: {
  51. options: [
  52. {
  53. label: '所有',
  54. value: '',
  55. },
  56. {
  57. label: '正常',
  58. value: '1',
  59. },
  60. {
  61. label: '冻结',
  62. value: '2',
  63. },
  64. ],
  65. },
  66. },
  67. {
  68. field: 'datetime',
  69. label: '创建时间',
  70. component: 'RangePicker',
  71. colProps: { sm: 24 },
  72. componentProps: {
  73. format: 'YYYY-MM-DD',
  74. valueType: 'Date',
  75. },
  76. },
  77. ];
  78. export const formSchema: FormSchema[] = [
  79. {
  80. field: 'id',
  81. label: 'ID',
  82. component: 'Input',
  83. show: false,
  84. },
  85. {
  86. field: 'id',
  87. label: 'ID',
  88. component: 'Input',
  89. colSlot: 'title1',
  90. },
  91. {
  92. field: 'realname',
  93. label: '用户名称',
  94. component: 'Input',
  95. required: true,
  96. colProps: {
  97. lg: 12,
  98. sm: 24,
  99. },
  100. },
  101. {
  102. field: 'selecteddeparts',
  103. label: '归属部门',
  104. component: 'ApiSelect',
  105. componentProps: {
  106. api: getDepListData,
  107. resultField: 'result',
  108. labelField: 'departName',
  109. valueField: 'id',
  110. mode: 'tags',
  111. },
  112. required: true,
  113. colProps: {
  114. lg: 12,
  115. sm: 24,
  116. },
  117. },
  118. {
  119. field: 'username',
  120. label: '登录账号',
  121. component: 'Input',
  122. required: true,
  123. colProps: {
  124. lg: 12,
  125. sm: 24,
  126. },
  127. },
  128. {
  129. field: 'password',
  130. label: '登录密码',
  131. component: 'Input',
  132. required: true,
  133. colProps: {
  134. lg: 12,
  135. sm: 24,
  136. },
  137. },
  138. {
  139. field: 'status',
  140. label: '用户状态',
  141. component: 'Switch',
  142. required: true,
  143. componentProps: {
  144. checkedValue: 1,
  145. unCheckedValue: 2,
  146. },
  147. defaultValue: 1,
  148. },
  149. {
  150. field: 'selectedroles',
  151. label: '角色',
  152. component: 'JSelectRole',
  153. required: true,
  154. slot: 'jSelectPosition',
  155. },
  156. {
  157. field: 'id',
  158. label: 'ID',
  159. component: 'Input',
  160. colSlot: 'title2',
  161. },
  162. {
  163. field: 'trainingPrograms',
  164. label: '培训项目',
  165. component: 'ApiSelect',
  166. colSlot: 'trainingPrograms',
  167. required: true,
  168. },
  169. {
  170. field: 'backgroundImg',
  171. label: '背景图',
  172. component: 'JImageUpload',
  173. componentProps: {
  174. tipText: '单张图片,支持格式:.jpg .png .svg .gif ,单个文件不能超过5MB',
  175. },
  176. colSlot: 'backgroundImg',
  177. required: true,
  178. },
  179. {
  180. field: 'certificateInnocence',
  181. label: '无犯罪记录',
  182. component: 'JImageUpload',
  183. componentProps: {
  184. tipText: '单张图片,支持格式:.jpg .png .svg .gif ,单个文件不能超过5MB',
  185. },
  186. colSlot: 'certificateInnocence',
  187. colProps: { xl: 12, sm: 24 },
  188. required: true,
  189. },
  190. {
  191. field: 'healthy',
  192. label: '健康证',
  193. component: 'JImageUpload',
  194. colProps: { xl: 12, sm: 24 },
  195. colSlot: 'healthy',
  196. componentProps: {
  197. tipText: '单张图片,支持格式:.jpg .png .svg .gif ,单个文件不能超过5MB',
  198. },
  199. required: true,
  200. },
  201. {
  202. field: 'teachingPhilosophy',
  203. label: '教学理念',
  204. component: 'InputTextArea',
  205. colSlot: 'teachingPhilosophy',
  206. },
  207. {
  208. field: 'excelMsg',
  209. label: '擅长描述',
  210. component: 'InputTextArea',
  211. colSlot: 'excelMsg',
  212. },
  213. {
  214. field: 'honor',
  215. label: '荣誉认证',
  216. component: 'JImageUpload',
  217. componentProps: {
  218. tipText: '多张图片,支持格式:.jpg .png .svg .gif ,单个文件不能超过5MB',
  219. },
  220. colSlot: 'honor',
  221. },
  222. ];