|
|
@ -102,13 +102,23 @@ watch(()=>tableObjectHead.tableList,()=>{ |
|
|
|
const updateDateTableColumns = ()=>{ |
|
|
|
console.log('tableObjectHead',tableObjectHead) |
|
|
|
let dateColumns = [] |
|
|
|
tableObjectHead.tableList.forEach(item=>{ |
|
|
|
if(tableObjectHead.tableList.length>10){ |
|
|
|
tableObjectHead.tableList.forEach(item=>{ |
|
|
|
dateColumns.push({ |
|
|
|
width:120, |
|
|
|
field: item, |
|
|
|
label: item |
|
|
|
width:120, |
|
|
|
field: item, |
|
|
|
label: item |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
tableObjectHead.tableList.forEach(item=>{ |
|
|
|
dateColumns.push({ |
|
|
|
field: item, |
|
|
|
label: item |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
tableColumns.value = [...orginTableColumns.value,...dateColumns] |
|
|
|
console.log('tableColumns',tableColumns.value) |
|
|
|
} |
|
|
|