sys-job.js 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. export const tableOption = {
  2. border: true,
  3. card: true,
  4. index: true,
  5. indexLabel: '序号',
  6. stripe: true,
  7. menu: true,
  8. menuAlign: 'center',
  9. filterBtn: false,
  10. menuWidth: 300,
  11. align: 'center',
  12. viewBtn: false,
  13. editBtn: false,
  14. delBtn: false,
  15. addBtn: false,
  16. dialogWidth: '85%',
  17. labelWidth: 130,
  18. dialogHeight: '78%',
  19. column: [
  20. {
  21. label: 'jobId',
  22. prop: 'jobId',
  23. hide: true,
  24. addDisplay: false,
  25. editDisplay: false,
  26. rules:
  27. [{
  28. required: true,
  29. message: '请输入任务类型',
  30. trigger: 'blur'
  31. }]
  32. },
  33. {
  34. label: '任务名称',
  35. prop: 'jobName',
  36. search: true,
  37. placeholder: '任务名称',
  38. rules: [{
  39. required: true,
  40. message: '请输入任务名称',
  41. trigger: 'blur'
  42. }],
  43. editDisabled: true
  44. },
  45. {
  46. label: '任务组名',
  47. prop: 'jobGroup',
  48. search: true,
  49. rules:
  50. [{
  51. required: true,
  52. message: '请输入任务组名',
  53. trigger: 'blur'
  54. }],
  55. editDisabled: true
  56. },
  57. {
  58. label: '任务状态',
  59. prop: 'jobStatus',
  60. type: 'select',
  61. dicUrl: '/admin/dict/type/job_status',
  62. addDisplay: false,
  63. search: true,
  64. slot: true
  65. },
  66. {
  67. label: '执行状态',
  68. prop: 'jobExecuteStatus',
  69. type: 'select',
  70. dicUrl: '/admin/dict/type/job_execute_status',
  71. addDisplay: false,
  72. search: true,
  73. slot: true
  74. },
  75. {
  76. label: '创建者',
  77. prop: 'createBy',
  78. hide: true,
  79. addDisplay: false,
  80. editDisplay: false
  81. },
  82. {
  83. label: '创建时间',
  84. prop: 'createTime',
  85. type: 'datetime',
  86. hide: true,
  87. format: 'yyyy-MM-dd HH:mm:ss',
  88. valueFormat: 'yyyy-MM-dd HH:mm:ss',
  89. width: 120,
  90. addDisplay: false,
  91. editDisplay: false
  92. },
  93. {
  94. label: '更新者',
  95. prop: 'updateBy',
  96. hide: true,
  97. addDisplay: false,
  98. editDisplay: false
  99. },
  100. {
  101. label: '更新时间',
  102. prop: 'updateTime',
  103. type: 'datetime',
  104. hide: true,
  105. format: 'yyyy-MM-dd HH:mm:ss',
  106. valueFormat: 'yyyy-MM-dd HH:mm:ss',
  107. width: 160,
  108. addDisplay: false,
  109. editDisplay: false
  110. },
  111. {
  112. label: '首次执行时间',
  113. prop: 'startTime',
  114. type: 'datetime',
  115. format: 'yyyy-MM-dd HH:mm:ss',
  116. valueFormat: 'yyyy-MM-dd HH:mm:ss',
  117. width: 160,
  118. addDisplay: false,
  119. editDisabled: true
  120. }, {
  121. label: '上次执行时间',
  122. prop: 'previousTime',
  123. type: 'datetime',
  124. format: 'yyyy-MM-dd HH:mm:ss',
  125. valueFormat: 'yyyy-MM-dd HH:mm:ss',
  126. width: 160,
  127. addDisplay: false,
  128. editDisabled: true
  129. }, {
  130. label: '下次执行时间',
  131. prop: 'nextTime',
  132. type: 'datetime',
  133. format: 'yyyy-MM-dd HH:mm:ss',
  134. valueFormat: 'yyyy-MM-dd HH:mm:ss',
  135. width: 160,
  136. addDisplay: false,
  137. editDisabled: true
  138. },
  139. {
  140. label: '组内顺序',
  141. prop: 'jobOrder',
  142. hide: true,
  143. addDisplay: false,
  144. editDisplay: false,
  145. type: 'silder',
  146. step: 1,
  147. min: 1,
  148. max: 9,
  149. showStops: true
  150. },
  151. {
  152. label: '类型',
  153. prop: 'jobType',
  154. type: 'select',
  155. dicUrl: '/admin/dict/type/job_type',
  156. width: 100,
  157. rules:
  158. [{
  159. required: true,
  160. message: '请输入任务类型',
  161. trigger: 'blur'
  162. }]
  163. },
  164. {
  165. label: '执行路径',
  166. prop: 'executePath',
  167. overHidden: true
  168. },
  169. {
  170. label: '执行文件',
  171. prop: 'className',
  172. overHidden: true
  173. },
  174. {
  175. label: '执行方法',
  176. prop: 'methodName',
  177. overHidden: true,
  178. width: 120
  179. },
  180. {
  181. label: '执行参数值',
  182. prop: 'methodParamsValue',
  183. width: 100,
  184. overHidden: true
  185. },
  186. {
  187. label: 'cron表达式',
  188. prop: 'cronExpression',
  189. width: 100,
  190. formslot: true,
  191. rules:
  192. [{
  193. required: true,
  194. max: 200,
  195. message: '请输入2cron表达式',
  196. trigger: 'change'
  197. }]
  198. },
  199. {
  200. label: '错失执行策略',
  201. prop: 'misfirePolicy',
  202. type: 'select',
  203. dicUrl: '/admin/dict/type/misfire_policy',
  204. width: 120,
  205. rules:
  206. [{
  207. required: true,
  208. message: '请输入任务错失执行策略',
  209. trigger: 'blur'
  210. }]
  211. },
  212. {
  213. label: '租户',
  214. prop: 'tenantId',
  215. hide: true,
  216. addDisplay: false,
  217. editDisplay: false
  218. },
  219. {
  220. label: '备注信息',
  221. prop: 'remark',
  222. type: 'textarea',
  223. span: 20,
  224. overHidden: true,
  225. rules:
  226. [{
  227. max: 500,
  228. message: '备注信息不得超过500',
  229. trigger: 'blur'
  230. }]
  231. }
  232. ]
  233. }
  234. export const tableLogOption = {
  235. border: true,
  236. index: false,
  237. menu: false,
  238. page: true,
  239. indexLabel: '序号',
  240. stripe: true,
  241. filterBtn: false,
  242. editBtn: false,
  243. delBtn: false,
  244. addBtn: false,
  245. columnBtn: false,
  246. column: [
  247. {
  248. label: 'id',
  249. prop: 'jobLogId',
  250. hide: true
  251. },
  252. {
  253. label: '任务id',
  254. prop: 'jobId',
  255. hide: true
  256. },
  257. {
  258. label: '任务名称',
  259. prop: 'jobName'
  260. },
  261. {
  262. label: '任务组名',
  263. prop: 'jobGroup'
  264. },
  265. {
  266. label: '状态',
  267. prop: 'jobLogStatus',
  268. type: 'select',
  269. dicUrl: '/admin/dict/type/job_execute_status',
  270. slot: true
  271. },
  272. {
  273. label: '组内顺序',
  274. prop: 'jobOrder',
  275. hide: true
  276. },
  277. {
  278. label: '类型',
  279. prop: 'jobType',
  280. type: 'select',
  281. dicUrl: '/admin/dict/type/job_type',
  282. width: 100
  283. },
  284. {
  285. label: '执行路径',
  286. prop: 'executePath',
  287. overHidden: true
  288. },
  289. {
  290. label: '执行文件',
  291. prop: 'className',
  292. overHidden: true
  293. },
  294. {
  295. label: '执行方法',
  296. prop: 'methodName',
  297. overHidden: true,
  298. width: 120
  299. },
  300. {
  301. label: '执行参数值',
  302. prop: 'methodParamsValue',
  303. width: 100,
  304. overHidden: true
  305. },
  306. {
  307. label: 'cron表达式',
  308. prop: 'cronExpression',
  309. width: 100,
  310. overHidden: true
  311. },
  312. {
  313. label: '状态描述',
  314. prop: 'jobMessage'
  315. },
  316. {
  317. label: '执行时间(ms)',
  318. prop: 'executeTime',
  319. width: 120
  320. },
  321. {
  322. label: '异常信息',
  323. prop: 'exceptionInfo',
  324. overHidden: true
  325. },
  326. {
  327. label: '开始时间',
  328. prop: 'createTime',
  329. type: 'datetime',
  330. format: 'yyyy-MM-dd HH:mm:ss',
  331. valueFormat: 'yyyy-MM-dd HH:mm:ss',
  332. width: 160
  333. }
  334. ]
  335. }