new_file.js 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. export const formRules = () => {
  2. return [{
  3. field: 'deadWeight',
  4. label: '1、气瓶自重',
  5. placeholder: '气瓶自重',
  6. type: 'numinput',
  7. colWidth: 12,
  8. unit: 'kg',
  9. rules: [{
  10. required: true,
  11. message: '请输入气瓶自重',
  12. trigger: 'blur'
  13. }]
  14. }, {
  15. field: 'color',
  16. label: '2、颜色',
  17. placeholder: '颜色',
  18. type: 'input',
  19. colWidth: 12,
  20. unit: '',
  21. rules: [{
  22. required: true,
  23. message: '请输入颜色',
  24. trigger: 'blur'
  25. }]
  26. }, {
  27. field: 'pipePressure',
  28. label: '3、充装管道压力',
  29. placeholder: '充装管道压力',
  30. type: 'numinput',
  31. colWidth: 12,
  32. unit: 'MPa',
  33. rules: [{
  34. required: true,
  35. message: '请输入充装管道压力',
  36. trigger: 'blur'
  37. }]
  38. }, {
  39. field: 'fillWeight',
  40. label: '4、充装重量',
  41. placeholder: '充装重量',
  42. type: 'numinput',
  43. colWidth: 12,
  44. unit: 'kg',
  45. rules: [{
  46. required: true,
  47. message: '请输入充装重量',
  48. trigger: 'blur'
  49. }]
  50. }, {
  51. field: 'repeatWeight',
  52. label: '5、复称重量',
  53. placeholder: '复称重量',
  54. type: 'numinput',
  55. colWidth: 12,
  56. unit: 'kg',
  57. rules: [{
  58. required: true,
  59. message: '请输入复称重量',
  60. trigger: 'blur'
  61. }]
  62. }, {
  63. field: 'corrosion',
  64. label: '6、是否腐蚀',
  65. type: 'radio',
  66. colWidth: 12,
  67. rules: [{
  68. required: true,
  69. message: '请选择是否腐蚀',
  70. trigger: 'change'
  71. }],
  72. options: [{
  73. label: '无',
  74. value: 0,
  75. },
  76. {
  77. label: '有',
  78. value: 1,
  79. }
  80. ]
  81. }, {
  82. field: 'crackle',
  83. label: '7、是否有裂纹',
  84. type: 'radio',
  85. colWidth: 12,
  86. rules: [{
  87. required: true,
  88. message: '请选择是否有裂纹',
  89. trigger: 'change'
  90. }],
  91. options: [{
  92. label: '无',
  93. value: 0,
  94. },
  95. {
  96. label: '有',
  97. value: 1,
  98. }
  99. ]
  100. }, {
  101. field: 'deform',
  102. label: '8、是否变形',
  103. type: 'radio',
  104. colWidth: 12,
  105. rules: [{
  106. required: true,
  107. message: '请选择是否变形',
  108. trigger: 'change'
  109. }],
  110. options: [{
  111. label: '无',
  112. value: 0,
  113. },
  114. {
  115. label: '有',
  116. value: 1,
  117. }
  118. ]
  119. }, {
  120. field: 'damage',
  121. label: '9、是否有损伤',
  122. type: 'radio',
  123. colWidth: 12,
  124. rules: [{
  125. required: true,
  126. message: '请选择是否有损伤',
  127. trigger: 'change'
  128. }],
  129. options: [{
  130. label: '无',
  131. value: 0,
  132. },
  133. {
  134. label: '有',
  135. value: 1,
  136. }
  137. ]
  138. }, {
  139. field: 'safeAnnex',
  140. label: '10、安全附件完好',
  141. type: 'radio',
  142. colWidth: 12,
  143. rules: [{
  144. required: true,
  145. message: '请选择安全附件完好状态',
  146. trigger: 'change'
  147. }],
  148. options: [{
  149. label: '完好',
  150. value: 0,
  151. },
  152. {
  153. label: '缺失',
  154. value: 1,
  155. }
  156. ]
  157. }, {
  158. field: 'gasPressure',
  159. label: '11、余压正常(或抽真空)',
  160. type: 'radio',
  161. colWidth: 12,
  162. rules: [{
  163. required: true,
  164. message: '请选择余压状态',
  165. trigger: 'change'
  166. }],
  167. options: [{
  168. label: '正常',
  169. value: 0,
  170. },
  171. {
  172. label: '不正常',
  173. value: 1,
  174. }
  175. ]
  176. }, {
  177. field: 'bodyDeform',
  178. label: '12、瓶体有无变形',
  179. type: 'radio',
  180. colWidth: 12,
  181. rules: [{
  182. required: true,
  183. message: '请选择瓶体有无变形',
  184. trigger: 'change'
  185. }],
  186. options: [{
  187. label: '无',
  188. value: 0,
  189. },
  190. {
  191. label: '有',
  192. value: 1,
  193. }
  194. ]
  195. }, {
  196. field: 'fillingLeak',
  197. label: '13、充装过程有无泄漏',
  198. type: 'radio',
  199. colWidth: 12,
  200. rules: [{
  201. required: true,
  202. message: '请选择充装过程有无泄漏',
  203. trigger: 'change'
  204. }],
  205. options: [{
  206. label: '无',
  207. value: 0,
  208. },
  209. {
  210. label: '有',
  211. value: 1,
  212. }
  213. ]
  214. }, {
  215. field: 'bodyTemperature',
  216. label: '14、瓶体温度正常',
  217. type: 'radio',
  218. colWidth: 12,
  219. rules: [{
  220. required: true,
  221. message: '请选择瓶体温度正常状态',
  222. trigger: 'change'
  223. }],
  224. options: [{
  225. label: '正常',
  226. value: 0,
  227. },
  228. {
  229. label: '不正常',
  230. value: 1,
  231. }
  232. ]
  233. }, {
  234. field: 'filledLeak',
  235. label: '15、充装后有无泄漏',
  236. type: 'radio',
  237. colWidth: 12,
  238. rules: [{
  239. required: true,
  240. message: '请选择充装后有无泄漏',
  241. trigger: 'change'
  242. }],
  243. options: [{
  244. label: '无',
  245. value: 0,
  246. },
  247. {
  248. label: '有',
  249. value: 1,
  250. }
  251. ]
  252. }, {
  253. field: 'warnSign',
  254. label: '16、警示标志完好',
  255. type: 'radio',
  256. colWidth: 12,
  257. rules: [{
  258. required: true,
  259. message: '请选择警示标志完好状态',
  260. trigger: 'change'
  261. }],
  262. options: [{
  263. label: '完好',
  264. value: 0,
  265. },
  266. {
  267. label: '缺失',
  268. value: 1,
  269. }
  270. ]
  271. }, {
  272. field: 'fillLabel',
  273. label: '17、充装标签完好',
  274. type: 'radio',
  275. colWidth: 12,
  276. rules: [{
  277. required: true,
  278. message: '请选择充装标签完好状态',
  279. trigger: 'change'
  280. }],
  281. options: [{
  282. label: '完好',
  283. value: 0,
  284. },
  285. {
  286. label: '缺失',
  287. value: 1,
  288. }
  289. ]
  290. }, {
  291. field: 'seal',
  292. label: '18、封口完好',
  293. type: 'radio',
  294. colWidth: 12,
  295. rules: [{
  296. required: true,
  297. message: '请选择封口完好状态',
  298. trigger: 'change'
  299. }],
  300. options: [{
  301. label: '完好',
  302. value: 0,
  303. },
  304. {
  305. label: '缺失',
  306. value: 1,
  307. }
  308. ]
  309. }, ]
  310. }