columns.js 2.77 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
function getcolumns(id) {
    return {
        "columns": [
            {
                "title": "标准编号",
                "dataIndex": "standardNo",
                "key": "standardNo",
                "formItemProps": {
                    "rules": [
                        {
                            "required": false,
                            "message": "此项为必填项"
                        }
                    ]
                },
                "hideInForm": true
            },
            {
                "title": "点检类型",
                "dataIndex": "checkTypeName",
                "key": "checkType",
                "valueType": "select",
                "options": [
                    {
                        "label": "制造点检",
                        "value": 1
                    },
                    {
                        "label": "设备点检",
                        "value": 2
                    }
左玲玲's avatar
左玲玲 committed
32 33
                ],
                fieldProps: {
左玲玲's avatar
左玲玲 committed
34 35
                    dropdownMatchSelectWidth: 100
                }
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
            },
            {
                "title": "设备型号",
                "dataIndex": "equipmentModelName",
                "key": "equipmentModelId",
                "formItemProps": {
                    "rules": [
                        {
                            "required": true,
                            "message": "此项为必填项"
                        }
                    ]
                },
                "valueType": "select",
                "mode": "radio",
                "options": {
                    "path": "/check/umEquipmentCheckStandard/queryModelByType",
                    "linkParams": {
                        "checkType": "",
                    },
                    "extraParams": { id }
左玲玲's avatar
左玲玲 committed
57 58 59 60 61
                },
                fieldProps: {
                    placeholder: '请选择',
                    showSearch: true,
                },
62 63 64 65 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": "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": ""
        }
    };
}
export default getcolumns;