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