config.data.ts 1.16 KB
import { BasicColumn } from '/@/components/Table';

import { FormSchema } from '/@/components/Table';
export const formSchema: FormSchema[] = [
  {
    field: 'organization',
    label: '',
    component: 'TreeSelect',
    componentProps: {
      placeholder: '请选择组织',
    },
  },
  {
    field: 'organization',
    label: '',
    component: 'Select',
    componentProps: {
      placeholder: '请选择设备配置',
    },
  },
  {
    field: 'device',
    label: '',
    component: 'Input',
    componentProps: {
      placeholder: '请输入设备名称',
    },
  },
  {
    field: 'status',
    label: '',
    component: 'RadioGroup',
    componentProps: {
      size: 'small',
      options: [
        { label: '全部', value: 'Apple' },
        { label: '离线', value: 'Pear' },
        { label: '在线', value: 'Orange' },
        { label: '报警', value: 'hhh' },
      ],
    },
  },
];

export const columns: BasicColumn[] = [
  {
    title: '名称',
    dataIndex: 'name',
    width: 100,
  },
  {
    title: '位置',
    dataIndex: 'deviceInfo.address',
    width: 100,
  },
  {
    title: '状态',
    dataIndex: 'deviceState',
    width: 100,
  },
];