| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- export const tableHeader = (selectEquiType) => {
- switch (+selectEquiType) {
- case 3:
- return [
- { label: '型号', prop: 'modelType' },
- { label: '规格', prop: 'specification' },
- { label: '牌号', prop: 'brandNum' }
- ];
- case 8:
- return [
- { label: '型号', prop: 'modelType' },
- { label: '规格', prop: 'specification' },
- { label: '牌号', prop: 'brandNum' }
- ];
- case 4:
- return [
- { label: '型号', prop: 'modelType' },
- { label: '规格', prop: 'specification' },
- { label: '牌号', prop: 'brandNum' }
- ];
- case 9:
- return [
- { label: '型号', prop: 'modelType' },
- { label: '规格', prop: 'specification' },
- { label: '牌号', prop: 'brandNum' }
- ];
- case 5: //'周转车'
- return [
- { label: '型号', prop: 'modelType' },
- { label: '规格', prop: 'specification' },
- { label: '牌号', prop: 'brandNum' },
- {
- 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' },
- { label: '规格', prop: 'specification' },
- { label: '牌号', prop: 'brandNum' },
- {
- 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' },
- { label: '规格', prop: 'specification' },
- { label: '牌号', prop: 'brandNum' }
- ];
- case 6: //'模具'
- return [
- { label: '型号', prop: 'modelType' },
- { label: '规格', prop: 'specification' },
- { label: '牌号', prop: 'brandNum' },
- {
- label: '收缩系数',
- prop: '',
- formatter(row) {
- if (!row?.extendField) return '';
- const extendField = JSON.parse(row.extendField);
- return extendField.shrinkageCoefficient;
- }
- }
- ];
- case 7: //'备品备件'
- return [
- { label: '型号', prop: 'modelType' },
- { label: '规格', prop: 'specification' },
- { label: '牌号', prop: 'brandNum' }
- ];
- default:
- return [
- { label: '型号', prop: 'modelType' },
- { label: '规格', prop: 'specification' },
- { label: '牌号', prop: 'brandNum' }
- ];
- }
- return [];
- };
|