加隐藏列

This commit is contained in:
mll
2026-02-10 22:17:26 +08:00
parent bcac3326a3
commit 7a496e6407
2 changed files with 9 additions and 4 deletions

View File

@@ -128,6 +128,7 @@ const tableInfo = ref<any>({})
const timerObj = ref<any>({})
const numberRange = ref<string[]>([])
const dateRange=ref<string[]>([])
const hideColumns=ref<string[]>([])
const dateTimeRange=ref<string[]>([])
const timeRange=ref<string[]>([])
const amountFieds=ref<any>({})
@@ -178,6 +179,7 @@ const initTable = async () => {
const isPage = reportVo.dataConfig?.includes('page')
const isPermi = reportVo.dataConfig?.includes('authTrue')
const isHideExport = reportVo.tableConfig?.includes('hideExport')
hideColumns.value=[]
tableInfo.value = { ...reportVo, isPage, isHeight, isPermi, isHideExport }
tableOption.value = {
selection: !isHideExport,
@@ -260,9 +262,11 @@ const initTable = async () => {
if(item.isDimension=='Y'){
dimensionFields.value[config.prop]=config
hideFeilds.value[config.prop]=item.isHideDimension
}
if(item.isHideCol == 'Y') {
config.hide = true
hideColumns.value.push( config.prop )
}
if (item.queryMode == 'RANGE') config.searchRange = true
if (['Integer', 'BigInt', 'BigDecimal'].includes(item.fieldType)) config.type = 'number'
else if (item.fieldType == 'Date') {
@@ -478,7 +482,7 @@ const searchChange = (params?, done?) => {
}
Object.keys(tableOption.value.column).forEach(key=>{
let item=tableOption.value.column[key]
item.hide=hides.includes(item.prop)
item.hide=hides.includes(item.prop)||hideColumns.value.includes(item.prop)
})
if (done) done()
})