cUserInfo.data.ts 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. import { BasicColumn } from '/@/components/Table';
  2. import { FormSchema } from '/@/components/Table';
  3. import { rules } from '/@/utils/helper/validator';
  4. import { render } from '/@/utils/common/renderUtils';
  5. import { getWeekMonthQuarterYear } from '/@/utils';
  6. import { getUserDeparts } from '/@/views/system/depart/depart.api';
  7. //列表数据
  8. export const columns: BasicColumn[] = [
  9. {
  10. title: '用户昵称',
  11. align: 'center',
  12. dataIndex: 'username',
  13. },
  14. {
  15. title: '头像',
  16. align: 'center',
  17. dataIndex: 'avatar',
  18. slots: { customRender: 'img' },
  19. },
  20. {
  21. title: '手机号码',
  22. align: 'center',
  23. dataIndex: 'phone',
  24. },
  25. {
  26. title: '是否实名',
  27. align: 'center',
  28. dataIndex: 'realNameStatus',
  29. customRender: ({ record }) => {
  30. return record.realNameStatus == 1 ? '已实名' : '未实名';
  31. },
  32. },
  33. {
  34. title: '家庭成员数(包括自己)',
  35. align: 'center',
  36. dataIndex: 'familyNum',
  37. },
  38. {
  39. title: '创建时间',
  40. align: 'center',
  41. dataIndex: 'createTime',
  42. },
  43. ];
  44. //查询数据
  45. export const searchFormSchema: FormSchema[] = [
  46. {
  47. label: '用户昵称',
  48. field: 'merchantName',
  49. component: 'Input',
  50. colProps: { span: 6 },
  51. },
  52. {
  53. label: '是否实名',
  54. field: 'accountStatus',
  55. component: 'Select',
  56. colProps: { span: 6 },
  57. componentProps: {
  58. options: [
  59. { label: '所有', value: null },
  60. { label: '未实名', value: 0 },
  61. { label: '已实名', value: 1 },
  62. ],
  63. },
  64. },
  65. ];
  66. //表单数据
  67. export const formSchema: FormSchema[] = [
  68. {
  69. label: 'title1',
  70. field: 'orgCode',
  71. colSlot: 'title1',
  72. component: 'Input',
  73. },
  74. {
  75. label: '用户ID',
  76. field: 'id',
  77. component: 'Input',
  78. required: true,
  79. componentProps: {
  80. readonly: true,
  81. },
  82. },
  83. {
  84. label: '微信OpenID',
  85. field: 'openid',
  86. component: 'Input',
  87. required: true,
  88. componentProps: {
  89. readonly: true,
  90. },
  91. },
  92. {
  93. label: '用户昵称',
  94. field: 'realname',
  95. component: 'Input',
  96. required: true,
  97. componentProps: {
  98. readonly: true,
  99. },
  100. },
  101. {
  102. label: '头像',
  103. field: 'avatar',
  104. component: 'Input',
  105. slot: 'avatar',
  106. componentProps: {
  107. readonly: true,
  108. },
  109. },
  110. {
  111. label: '手机号码',
  112. field: 'id',
  113. component: 'Input',
  114. required: true,
  115. componentProps: {
  116. readonly: true,
  117. },
  118. },
  119. {
  120. label: '创建时间',
  121. field: 'id',
  122. component: 'Input',
  123. required: true,
  124. },
  125. {
  126. label: '魔板',
  127. field: 'familyMembersList',
  128. component: 'Input',
  129. colSlot: 'moban',
  130. },
  131. // TODO 主键隐藏字段,目前写死为ID
  132. {
  133. label: '',
  134. field: 'id',
  135. component: 'Input',
  136. show: false,
  137. },
  138. ];
  139. /**
  140. * 流程表单调用这个方法获取formSchema
  141. * @param param
  142. */
  143. export function getBpmFormSchema(_formData): FormSchema[] {
  144. // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
  145. return formSchema;
  146. }