BaseShipArchive.data.ts 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  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. //列表数据
  7. export const columns: BasicColumn[] = [
  8. {
  9. title: '唯一编号(IMO)',
  10. align:"center",
  11. dataIndex: 'imo'
  12. },
  13. {
  14. title: '船名称(ship name)',
  15. align:"center",
  16. dataIndex: 'shipName'
  17. },
  18. {
  19. title: 'hull number',
  20. align:"center",
  21. dataIndex: 'hullNumber'
  22. },
  23. {
  24. title: '船类型(ship type)',
  25. align:"center",
  26. dataIndex: 'shipType',
  27. },
  28. {
  29. title: '船厂(ship factory)',
  30. align:"center",
  31. dataIndex: 'shipFactory'
  32. },
  33. {
  34. title: '造船日期(ship date)',
  35. align:"center",
  36. dataIndex: 'shipDate'
  37. },
  38. {
  39. title: '关联客户(relate customer)',
  40. align:"center",
  41. dataIndex: 'relateCustomer'
  42. },
  43. ];
  44. //查询数据
  45. export const searchFormSchema: FormSchema[] = [
  46. {
  47. label: "唯一编号(IMO)",
  48. field: 'imo',
  49. component: 'Input',
  50. //colProps: {span: 6},
  51. },
  52. {
  53. label: "船名称(ship name)",
  54. field: 'shipName',
  55. component: 'Input',
  56. //colProps: {span: 6},
  57. },
  58. {
  59. label: '关联客户(relate customer)',
  60. field: 'relateCustomer',
  61. component: 'Input',
  62. },
  63. {
  64. label: "hull number",
  65. field: 'hullNumber',
  66. component: 'Input',
  67. //colProps: {span: 6},
  68. },
  69. {
  70. label: "船厂(ship factory)",
  71. field: 'shipFactory',
  72. component: 'JSelectMultiple',
  73. componentProps:{
  74. dictCode:"ship_factory"
  75. },
  76. //colProps: {span: 6},
  77. },
  78. {
  79. label: "造船日期(ship date)",
  80. field: "shipDate",
  81. component: 'RangePicker',
  82. componentProps: {
  83. valueType: 'Date',
  84. showTime:true
  85. },
  86. //colProps: {span: 6},
  87. },
  88. {
  89. label: "船类型(ship type)",
  90. field: 'shipType',
  91. component: 'JSelectMultiple',
  92. componentProps:{
  93. dictCode:"ship_type"
  94. },
  95. //colProps: {span: 6},
  96. },
  97. {
  98. label: "状态(status)",
  99. field: 'status',
  100. component: 'JSelectMultiple',
  101. componentProps:{
  102. dictCode:"valid_status"
  103. },
  104. //colProps: {span: 6},
  105. },
  106. ];
  107. //表单数据
  108. export const formSchema: FormSchema[] = [
  109. {
  110. label: '唯一编号(IMO)',
  111. field: 'imo',
  112. component: 'Input',
  113. // required: true,
  114. },
  115. {
  116. label: '船名称(ship name)',
  117. field: 'shipName',
  118. component: 'Input',
  119. required: true,
  120. },
  121. {
  122. label: 'hull number',
  123. field: 'hullNumber',
  124. component: 'Input',
  125. },
  126. {
  127. label: '船类型(ship type)',
  128. field: 'shipType',
  129. component: 'JDictSelectTag',
  130. componentProps:{
  131. dictCode:"ship_type"
  132. },
  133. },
  134. {
  135. label: '船厂(ship factory)',
  136. field: 'shipFactory',
  137. component: 'JDictSelectTag',
  138. componentProps:{
  139. dictCode:"ship_factory"
  140. },
  141. },
  142. {
  143. label: '造船日期(ship date)',
  144. field: 'shipDate',
  145. component: 'DatePicker',
  146. componentProps: {
  147. showTime: true,
  148. valueFormat: 'YYYY-MM-DD HH:mm:ss'
  149. },
  150. },
  151. {
  152. label: '状态(status)',
  153. field: 'status',
  154. component: 'JDictSelectTag',
  155. componentProps:{
  156. dictCode:"valid_status"
  157. },
  158. },
  159. // TODO 主键隐藏字段,目前写死为ID
  160. {
  161. label: '',
  162. field: 'id',
  163. component: 'Input',
  164. show: false
  165. },
  166. ];
  167. // 高级查询数据
  168. export const superQuerySchema = {
  169. status: {title: '状态(1-启用,0-停用)',order: 0,view: 'number', type: 'number',dictCode: '',},
  170. imo: {title: '唯一编号',order: 2,view: 'text', type: 'string',},
  171. shipName: {title: '船名称',order: 3,view: 'text', type: 'string',},
  172. hullNumber: {title: 'hull number',order: 4,view: 'text', type: 'string',},
  173. shipType: {title: '船类型',order: 5,view: 'list', type: 'string',dictCode: '',},
  174. shipFactory: {title: '船厂',order: 6,view: 'list', type: 'string',dictCode: '',},
  175. shipDate: {title: '造船日期',order: 7,view: 'datetime', type: 'string',},
  176. notes: {title: '备注',order: 8,view: 'text', type: 'string',},
  177. };
  178. /**
  179. * 流程表单调用这个方法获取formSchema
  180. * @param param
  181. */
  182. export function getBpmFormSchema(_formData): FormSchema[]{
  183. // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
  184. return formSchema;
  185. }