BaseShipArchive.data.ts 4.3 KB

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