export const tableHeader = (selectEquiType) => { switch (+selectEquiType) { case 3: return [ { label: '型号', prop: 'modelType', width: '150' }, { label: '规格', prop: 'specification', width: '150' }, { label: '牌号', prop: 'brandNum', width: '50' } ]; case 8: return [ { label: '型号', prop: 'modelType', width: '150' }, { label: '规格', prop: 'specification', width: '150' }, { label: '牌号', prop: 'brandNum', width: '50' } ]; case 4: return [ { label: '型号', prop: 'modelType', width: '150' }, { label: '规格', prop: 'specification', width: '150' }, { label: '牌号', prop: 'brandNum', width: '50' } ]; case 9: return [ { label: '型号', prop: 'modelType', width: '150' }, { label: '规格', prop: 'specification', width: '150' }, { label: '牌号', prop: 'brandNum', width: '50' } ]; case 5: //'周转车' return [ { label: '型号', prop: 'modelType', width: '150' }, { label: '规格', prop: 'specification', width: '150' }, { label: '牌号', prop: 'brandNum', width: '50' }, { label: '材质', prop: 'texture', formatter(row) { if (!row?.extendField) return ''; const extendField = JSON.parse(row.extendField); return extendField.texture; } }, { label: '长宽高', prop: '', formatter(row) { if (!row?.extendField) return ''; const extendField = JSON.parse(row.extendField); return `${extendField.length || '-'}*${extendField.width || '-'}*${ extendField.high || '-' }`; } } ]; case 2: //'舟皿' return [ { label: '型号', prop: 'modelType', width: '150' }, { label: '规格', prop: 'specification', width: '150' }, { label: '牌号', prop: 'brandNum', width: '50' }, { label: '长宽高', prop: '', formatter(row) { if (!row?.extendField) return ''; const extendField = JSON.parse(row.extendField); return `${extendField.length || '-'}*${extendField.width || '-'}*${ extendField.high || '-' }`; } } ]; case 1: //'设备' return [ { label: '型号', prop: 'modelType', width: '150' }, { label: '规格', prop: 'specification', width: '150' }, { label: '牌号', prop: 'brandNum', width: '50' } ]; case 6: //'模具' return [ { label: '型号', prop: 'modelType', width: '150' }, { label: '规格', prop: 'specification', width: '150' } // { label: '牌号', prop: 'brandNum', width: '50' }, // { // label: '收缩系数', // prop: '', // formatter(row) { // if (!row?.extendField) return ''; // const extendField = JSON.parse(row.extendField); // return extendField.shrinkageCoefficient; // } // } ]; case 7: //'备品备件' return [ { label: '型号', prop: 'modelType', width: '150' }, { label: '规格', prop: 'specification', width: '150' }, { label: '牌号', prop: 'brandNum', width: '50' } ]; default: return [ { label: '型号', prop: 'modelType', width: '150' }, { label: '规格', prop: 'specification', width: '150' }, { label: '牌号', prop: 'brandNum', width: '50' } ]; } return []; };