维度搜索
This commit is contained in:
@@ -67,8 +67,34 @@
|
|||||||
:column="scope.column"
|
:column="scope.column"
|
||||||
></InputTimeRange>
|
></InputTimeRange>
|
||||||
</template>
|
</template>
|
||||||
|
groupbylisy
|
||||||
|
<template #[`groupbylisy-search`]>
|
||||||
|
<el-checkbox-group style="flex-direction:row" v-model="tableSearch.groupbylisy"
|
||||||
|
placeholder="请选择内容">
|
||||||
|
<el-checkbox v-for="(item,key) in dimensionFields"
|
||||||
|
:key="key"
|
||||||
|
:value="key"
|
||||||
|
:label="item.label"></el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</template>
|
||||||
<template #header>
|
<template #header>
|
||||||
|
<div style="display:flex;margin-left:20px">
|
||||||
|
<el-checkbox-group v-model="tableSearch['Group by']"
|
||||||
|
placeholder="请选择内容">
|
||||||
|
<el-checkbox v-for="(item,key) in dimensionFields"
|
||||||
|
:key="key"
|
||||||
|
:value="key"
|
||||||
|
:label="item.label"></el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
<el-button
|
||||||
|
style="margin-left:20px"
|
||||||
|
type="primary"
|
||||||
|
:loading="loading"
|
||||||
|
@click="searchDimension"
|
||||||
|
>
|
||||||
|
维度搜索
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</avue-crud>
|
</avue-crud>
|
||||||
</div>
|
</div>
|
||||||
@@ -108,7 +134,9 @@ const isInit = ref(false)
|
|||||||
|
|
||||||
const tableOption = ref<any>({})
|
const tableOption = ref<any>({})
|
||||||
const tableData = ref<any>([])
|
const tableData = ref<any>([])
|
||||||
const tableSearch = ref({})
|
const tableSearch = ref({
|
||||||
|
'Group by':[]
|
||||||
|
})
|
||||||
const tablePage = ref<any>({ currentPage: 1, pageSize: 100, total: 0 })
|
const tablePage = ref<any>({ currentPage: 1, pageSize: 100, total: 0 })
|
||||||
const tableSelect = ref<any>([])
|
const tableSelect = ref<any>([])
|
||||||
const tableSort = ref({ column: '', order: '' })
|
const tableSort = ref({ column: '', order: '' })
|
||||||
@@ -121,7 +149,7 @@ const timeRange=ref<string[]>([])
|
|||||||
const amountFieds=ref<any>({})
|
const amountFieds=ref<any>({})
|
||||||
const amountObj=ref<any>({})
|
const amountObj=ref<any>({})
|
||||||
const crudRef = ref()
|
const crudRef = ref()
|
||||||
|
const dimensionFields=ref<any>({})
|
||||||
const exportLoading = ref(false)
|
const exportLoading = ref(false)
|
||||||
const permissions =
|
const permissions =
|
||||||
wsCache.get(CACHE_KEY.USER).lideeYunjipermissions?.[route.meta.menuDataId as string] || false
|
wsCache.get(CACHE_KEY.USER).lideeYunjipermissions?.[route.meta.menuDataId as string] || false
|
||||||
@@ -195,6 +223,10 @@ const initTable = async () => {
|
|||||||
index==0?amountFieds.value.fistField=config.prop:''
|
index==0?amountFieds.value.fistField=config.prop:''
|
||||||
amountFieds.value[item.isAmount]=config
|
amountFieds.value[item.isAmount]=config
|
||||||
}
|
}
|
||||||
|
if(item.isDimension=='Y'){
|
||||||
|
dimensionFields.value[config.prop]=config
|
||||||
|
}
|
||||||
|
|
||||||
if (item.queryMode == 'RANGE') config.searchRange = true
|
if (item.queryMode == 'RANGE') config.searchRange = true
|
||||||
if (['Integer', 'BigInt', 'BigDecimal'].includes(item.fieldType)) config.type = 'number'
|
if (['Integer', 'BigInt', 'BigDecimal'].includes(item.fieldType)) config.type = 'number'
|
||||||
else if (item.fieldType == 'Date') {
|
else if (item.fieldType == 'Date') {
|
||||||
@@ -229,11 +261,26 @@ const initTable = async () => {
|
|||||||
if (item.queryMode == 'NE') config.searchLabel = `${config.label} !=`
|
if (item.queryMode == 'NE') config.searchLabel = `${config.label} !=`
|
||||||
tableOption.value.column[item.fieldCode] = config
|
tableOption.value.column[item.fieldCode] = config
|
||||||
})
|
})
|
||||||
|
//if(!!Object.keys(dimensionFields.value).length){
|
||||||
|
// tableOption.value.column['groupbylisy'] = {
|
||||||
|
// hide:true,
|
||||||
|
// prop: 'groupbylisy',
|
||||||
|
// label: '维度',
|
||||||
|
// type: 'input',
|
||||||
|
// overHidden: true,
|
||||||
|
// isExport: false,
|
||||||
|
// sortable: false,
|
||||||
|
// search: true
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
isInit.value = true
|
isInit.value = true
|
||||||
searchChange()
|
searchChange()
|
||||||
initTableLayout()
|
initTableLayout()
|
||||||
}
|
}
|
||||||
|
const searchDimension=()=>{
|
||||||
|
searchChange()
|
||||||
|
}
|
||||||
const initTableLayout = () => {
|
const initTableLayout = () => {
|
||||||
if (tableOption.value.height != 'auto' && tableOption.value.height !== undefined) return
|
if (tableOption.value.height != 'auto' && tableOption.value.height !== undefined) return
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user