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