safety.data.ts 743 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import { FormSchema } from '/@/components/Table';
  2. import { safetyDeviceList } from './safety.api';
  3. import dayjs from 'dayjs';
  4. export const chartsColumns = (deviceType) => {
  5. if (deviceType === '') {
  6. return [];
  7. }
  8. };
  9. export const formConfig = {
  10. labelAlign: 'left',
  11. showAdvancedButton: false,
  12. showResetButton: false,
  13. baseColProps: {
  14. // offset: 0.5,
  15. xs: 24,
  16. sm: 24,
  17. md: 24,
  18. lg: 9,
  19. xl: 7,
  20. xxl: 4,
  21. },
  22. schemas: [
  23. {
  24. label: '设备类型',
  25. field: 'DataType',
  26. component: 'ApiSelect',
  27. componentProps: {
  28. api: safetyDeviceList.bind(null, { devicetype: 'safetymonitor', code: 'DataType' }),
  29. labelField: 'name',
  30. valueField: 'code',
  31. },
  32. },
  33. ],
  34. };