columns.js 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. export default function useColumns() {
  2. const TableColumns = [
  3. {
  4. item: {
  5. key: "authorizedProductsCode",
  6. title: "授权产品 编码",
  7. width: 160,
  8. },
  9. attr: {}
  10. },
  11. {
  12. item: { key: "dealerName", title: "经销商名称", width: 200 },
  13. attr: {}
  14. },
  15. {
  16. item: {
  17. key: "authorizedAreaCode",
  18. title: "授权区域/医院 编码",
  19. hidden: false,
  20. },
  21. attr: {}
  22. },
  23. {
  24. item: { key: "authorizedAreaName", title: "授权区域/医院 名称", width: 200 },
  25. attr: {}
  26. },
  27. {
  28. item: { key: "authorizedProductsName", title: "授权产品 名称", width: 200 },
  29. attr: {}
  30. },
  31. {
  32. item: { key: "status", title: "状态", width: 80 },
  33. attr: {
  34. is: "el-dict-tag",
  35. dictName: "documents_status", // 字典名
  36. }
  37. },
  38. {
  39. item: { key: "createPerson", title: "创建人", width: 120 },
  40. attr: {}
  41. },
  42. {
  43. item: { key: "createTime", title: "创建时间", width: 160 },
  44. attr: {}
  45. },
  46. {
  47. item: { key: "updatePerson", title: "最后修改人", width: 120 },
  48. attr: {}
  49. },
  50. {
  51. item: { key: "updateTime", title: "最后修改时间", width: 160 },
  52. attr: {}
  53. },
  54. {
  55. item: {
  56. key: "id",
  57. title: "主键id----该值不显示",
  58. hidden: false,
  59. },
  60. attr: {}
  61. },
  62. {
  63. item: {
  64. key: "startTime",
  65. title: "开始时间",
  66. hidden: false,
  67. },
  68. attr: {}
  69. },
  70. {
  71. item: {
  72. key: "endTime",
  73. title: "结束时间",
  74. hidden: false,
  75. },
  76. attr: {}
  77. },
  78. {
  79. item: {
  80. key: "issueTime",
  81. title: "授权书开具时间",
  82. hidden: false,
  83. },
  84. attr: {}
  85. },
  86. ].map(({ item, attr }) => ({
  87. attr,
  88. item: {
  89. ...item,
  90. sortabled: true,
  91. fixedabled: true,
  92. filterabled: true,
  93. hiddenabled: true,
  94. },
  95. }));
  96. const SearchColumns = [
  97. {
  98. item: { key: "dealerName", title: "经销商名称", },
  99. attr: {
  100. is: "el-input",
  101. clearable: true,
  102. }
  103. },
  104. {
  105. item: { key: "authorizedAreaName", title: "授权区域/医院", },
  106. attr: {
  107. is: "el-input",
  108. clearable: true,
  109. }
  110. },
  111. {
  112. item: { key: "authorizedProductsName", title: "授权产品", },
  113. attr: {
  114. is: "el-input",
  115. clearable: true,
  116. }
  117. },
  118. // 单据状态0=自由态,1=审批中,2=已审核,3=已驳回
  119. {
  120. item: { key: "status", title: "状态", },
  121. attr: {
  122. is: "el-select",
  123. dictName: "documents_status",
  124. clearable: true,
  125. },
  126. },
  127. {
  128. item: {
  129. key: "privilegedTime",
  130. title: "授权时间",
  131. span: 12,
  132. },
  133. attr: {
  134. clearable: true,
  135. is: "el-date-wrapper",
  136. },
  137. },
  138. // {
  139. // title: "授权时间",
  140. // key: "startTime",
  141. // type: "Date",
  142. // config: {
  143. // placeholder: '开始时间'
  144. // }
  145. // },
  146. // {
  147. // title: "至",
  148. // key: "endTime",
  149. // type: "Date",
  150. // config: {
  151. // placeholder: '结束时间'
  152. // }
  153. // },
  154. ]
  155. return { TableColumns, SearchColumns }
  156. }