columns.js 2.59 KB
Newer Older
1
function getcolumns(id) {
TZW's avatar
TZW committed
2 3 4 5 6 7 8 9
  return {
    columns: [
      {
        title: '标准编号',
        dataIndex: 'standardNo',
        key: 'standardNo',
        formItemProps: {
          rules: [
10
            {
TZW's avatar
TZW committed
11 12
              required: false,
              message: '此项为必填项',
13
            },
TZW's avatar
TZW committed
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
          ],
        },
        hideInForm: true,
      },
      {
        title: '点检类型',
        dataIndex: 'checkTypeName',
        key: 'checkType',
        valueType: 'select',
        options: [
          {
            label: '制造点检',
            value: 1,
          },
          {
            label: '设备点检',
            value: 2,
          },
        ],
        fieldProps: {
          dropdownMatchSelectWidth: 100,
        },
      },
      {
        title: '设备型号',
        dataIndex: 'equipmentModelName',
        key: 'equipmentModelId',
TZW's avatar
TZW committed
41
        hideInSearch: true,
TZW's avatar
TZW committed
42 43
        formItemProps: {
          rules: [
44
            {
TZW's avatar
TZW committed
45 46
              required: true,
              message: '此项为必填项',
47
            },
TZW's avatar
TZW committed
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
          ],
        },
        valueType: 'select',
        mode: 'radio',
        options: {
          path: '/check/umEquipmentCheckStandard/queryModelByType',
          linkParams: {
            checkType: '',
          },
          extraParams: { id },
        },
        fieldProps: {
          placeholder: '请选择',
          showSearch: true,
        },
      },
TZW's avatar
TZW committed
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
      {
        title: '设备型号',
        dataIndex: 'equipmentModelName',
        key: 'equipmentModelId',
        hideInForm: true,
        hideInTable: true,
        formItemProps: {
          rules: [
            {
              required: true,
              message: '此项为必填项',
            },
          ],
        },
        valueType: 'select',
        mode: 'radio',
        options: {
          path: '/asset/equipmentModel/query/selection',
        },
        fieldProps: {
          placeholder: '请选择',
          showSearch: true,
        },
      },
TZW's avatar
TZW committed
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
      {
        title: '备注',
        dataIndex: 'remark',
        key: 'remark',
        valueType: 'textarea',
        colProps: {
          span: 24,
        },
        hideInSearch: true,
        hideInDescriptions: true,
      },
    ],
    pathconfig: {
      enableadd: true,
      enableedit: true,
      enabledelete: true,
      enabledetail: false,
      add: '/check/umEquipmentCheckStandard/save',
      edit: '/check/umEquipmentCheckStandard/save',
      list: '/check/umEquipmentCheckStandard/queryList',
      delete: '/check/umEquipmentCheckStandard/deleteById',
      detail: '',
    },
  };
112 113
}
export default getcolumns;