gen.js 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. /*
  2. * Copyright (c) 2018-2025, lengleng All rights reserved.
  3. *
  4. * Redistribution and use in source and binary forms, with or without
  5. * modification, are permitted provided that the following conditions are met:
  6. *
  7. * Redistributions of source code must retain the above copyright notice,
  8. * this list of conditions and the following disclaimer.
  9. * Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. * Neither the name of the pig4cloud.com developer nor the names of its
  13. * contributors may be used to endorse or promote products derived from
  14. * this software without specific prior written permission.
  15. * Author: lengleng (wangiegie@gmail.com)
  16. */
  17. export const tableOption = {
  18. selection: true,
  19. rowKey: 'tableName',
  20. border: true,
  21. index: true,
  22. stripe: true,
  23. menuAlign: 'center',
  24. align: 'center',
  25. addBtn: false,
  26. editBtn: false,
  27. delBtn: false,
  28. searchMenuSpan: 6,
  29. column: [{
  30. label: '表名称',
  31. prop: 'tableName',
  32. align: 'center'
  33. }, {
  34. label: '表注释',
  35. prop: 'tableComment',
  36. align: 'center'
  37. }, {
  38. label: '表编码',
  39. prop: 'tableCollation',
  40. align: 'center'
  41. }, {
  42. label: '索引',
  43. prop: 'engine',
  44. align: 'center'
  45. }, {
  46. type: 'datetime',
  47. valueFormat: 'timestamp',
  48. format: 'yyyy-MM-dd hh:mm:ss',
  49. label: '创建时间',
  50. prop: 'createTime',
  51. align: 'center'
  52. }]
  53. }
  54. export const formOption = {
  55. submitText: '生成',
  56. column: [
  57. {
  58. label: '表名称',
  59. prop: 'tableName',
  60. disabled: true
  61. }, {
  62. label: '包名',
  63. prop: 'packageName',
  64. placeholder: '可为空,加载系统默认配置'
  65. }, {
  66. label: '作者',
  67. prop: 'author',
  68. placeholder: '可为空,加载系统默认配置'
  69. }, {
  70. label: '模块',
  71. prop: 'moduleName',
  72. placeholder: '可为空,加载系统默认配置'
  73. }, {
  74. label: '表前缀',
  75. prop: 'tablePrefix',
  76. placeholder: '可为空,加载系统默认配置'
  77. }, {
  78. label: '注释',
  79. prop: 'comments',
  80. placeholder: '可为空,加载表备注'
  81. },{
  82. label: '前端风格',
  83. prop: 'style',
  84. type: 'radio',
  85. slot: true,
  86. border:true,
  87. span: 24,
  88. dicUrl: '/admin/dict/type/style_type',
  89. }
  90. ]
  91. }
  92. export const formBatchOption = {
  93. submitText: '生成',
  94. column: [
  95. {
  96. label: '表名称',
  97. prop: 'tableName',
  98. disabled: true,
  99. minRows: 2,
  100. type: 'textarea',
  101. row: true,
  102. span: 24
  103. },
  104. {
  105. label: '包名',
  106. prop: 'packageName',
  107. placeholder: '可为空,加载系统默认配置'
  108. }, {
  109. label: '作者',
  110. prop: 'author',
  111. placeholder: '可为空,加载系统默认配置'
  112. }, {
  113. label: '模块',
  114. prop: 'moduleName',
  115. placeholder: '可为空,加载系统默认配置'
  116. }, {
  117. label: '注释',
  118. prop: 'comments',
  119. placeholder: '可为空,加载表备注'
  120. }
  121. ]
  122. }
  123. export const tableDsOption = {
  124. border: true,
  125. index: true,
  126. indexLabel: '序号',
  127. stripe: true,
  128. menuAlign: 'center',
  129. align: 'center',
  130. column: [
  131. {
  132. label: '主键',
  133. prop: 'id',
  134. hide: true,
  135. addDisplay: false,
  136. editDisplay: false
  137. },
  138. {
  139. label: '名称',
  140. prop: 'name',
  141. rules: [
  142. { required: true, message: '请输入名称', trigger: 'blur' },
  143. { max: 32, message: '长度在 32 个字符', trigger: 'blur' }
  144. ]
  145. },
  146. {
  147. label: 'jdbcUrl',
  148. prop: 'url',
  149. type: 'textarea',
  150. span: 24,
  151. row: true,
  152. minRows: 2,
  153. overHidden: true,
  154. rules: [
  155. { required: true, message: '请输入jdbcUrl', trigger: 'blur' }
  156. ]
  157. },
  158. {
  159. label: '用户名',
  160. prop: 'username',
  161. rules: [
  162. { required: true, message: '请输入用户名', trigger: 'blur' },
  163. { max: 32, message: '长度在 32 个字符', trigger: 'blur' }
  164. ]
  165. },
  166. {
  167. label: '密码',
  168. prop: 'password',
  169. rules: [
  170. { required: true, message: '请输入密码', trigger: 'blur' },
  171. { max: 32, message: '长度在 32 个字符', trigger: 'blur' }
  172. ]
  173. },
  174. {
  175. label: '创建时间',
  176. prop: 'createDate',
  177. addDisplay: false,
  178. editDisplay: false,
  179. overHidden: true
  180. },
  181. {
  182. label: '更新时间',
  183. prop: 'updateDate',
  184. overHidden: true,
  185. addDisplay: false,
  186. editDisplay: false
  187. }
  188. ]
  189. }