constants.ts 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * <<
  3. * Davinci
  4. * ==
  5. * Copyright (C) 2016 - 2017 EDP
  6. * ==
  7. * Licensed under the Apache License, Version 2.0 (the "License");
  8. * you may not use this file except in compliance with the License.
  9. * You may obtain a copy of the License at
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing, software
  14. * distributed under the License is distributed on an "AS IS" BASIS,
  15. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. * See the License for the specific language governing permissions and
  17. * limitations under the License.
  18. * >>
  19. */
  20. import { FormItemProps } from 'antd/lib/form'
  21. import { SchedulePeriodUnit } from './types'
  22. import { getDefaultContent } from 'app/components/RichText'
  23. export const DefaultSchedulePeriodExpression: {
  24. [key in SchedulePeriodUnit]: string
  25. } = {
  26. // Every 10 minutes
  27. Minute: '0 */10 * * * ?',
  28. // At second :00 of minute :00 of every hour
  29. Hour: '0 0 * * * ?',
  30. // At 00:00:00am every day
  31. Day: '0 0 0 * * ?',
  32. // At 00:00:00am, on every Monday, every month
  33. Week: '0 0 0 ? * 1',
  34. // At 00:00:00am, on the 1st day, every month
  35. Month: '0 0 0 1 * ?',
  36. // At 00:00:00am, on the 1st day, in January
  37. Year: '0 0 0 1 1 ?'
  38. }
  39. export const DefaultMailImageWidth = 1920
  40. export const DefaultEmailContent = getDefaultContent(
  41. '这封邮件来自数智隧道聚合管理平台数据管理系统的定时任务'
  42. )
  43. export const FormItemStyle: Partial<FormItemProps> = {
  44. labelCol: { xl: 8, lg: 10, md: 14, sm: 8 },
  45. wrapperCol: { xl: 14, lg: 12, md: 10, sm: 14 }
  46. }
  47. export const LongFormItemStyle: Partial<FormItemProps> = {
  48. labelCol: { xl: 4, lg: 5, md: 7, sm: 4 },
  49. wrapperCol: { xl: 19, lg: 18, md: 17, sm: 19 }
  50. }