去掉选列数量提示 调整search行高 查询移到内部 动态表头优化 报表条数改为,默认50
This commit is contained in:
@@ -15,7 +15,7 @@ defineProps({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<ElCard :class="[prefixCls, 'mb-15px']" shadow="never">
|
<ElCard :class="[prefixCls]" shadow="never">
|
||||||
<template v-if="title" #header>
|
<template v-if="title" #header>
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<span class="text-16px font-700">{{ title }}</span>
|
<span class="text-16px font-700">{{ title }}</span>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
class="low-reoprt"
|
class="low-reoprt"
|
||||||
:class="[`low-report__${reportCode}`, { summary: tableOption.showSummary }]"
|
:class="[`low-report__${reportCode}`, { summary: tableOption.showSummary }]"
|
||||||
>
|
>
|
||||||
<div v-if="isSearch" style="margin-bottom:6px">查询:</div>
|
|
||||||
<avue-crud
|
<avue-crud
|
||||||
ref="crudRef"
|
ref="crudRef"
|
||||||
v-model:search="tableSearch"
|
v-model:search="tableSearch"
|
||||||
@@ -21,6 +21,9 @@
|
|||||||
@selection-change="selectionChange"
|
@selection-change="selectionChange"
|
||||||
@sort-change="sortChange"
|
@sort-change="sortChange"
|
||||||
>
|
>
|
||||||
|
<template #search>
|
||||||
|
<div v-if="isSearch" style="margin-bottom:6px">查询:</div>
|
||||||
|
</template>
|
||||||
<!-- 自定义表格头部操作 -->
|
<!-- 自定义表格头部操作 -->
|
||||||
<template #menu-left="{ size }">
|
<template #menu-left="{ size }">
|
||||||
<ElButton
|
<ElButton
|
||||||
@@ -69,14 +72,14 @@
|
|||||||
></InputTimeRange>
|
></InputTimeRange>
|
||||||
</template>
|
</template>
|
||||||
<template #header v-if="Object.keys(dimensionFields)?.length">
|
<template #header v-if="Object.keys(dimensionFields)?.length">
|
||||||
<div style="display:flex;align-items:center;border-top:1px solid #eee;margin-bottom:10px;padding-top:10px;">
|
<div style="display:flex;align-items:center;border-top:1px solid #eee;margin-bottom:10px;padding-top:10px;">
|
||||||
<span style="margin-right:10px;">维度:</span>
|
<span style="margin-right:10px;">维度:</span>
|
||||||
<el-checkbox-group
|
<el-checkbox-group
|
||||||
@change="searchDimension" v-model="tableSearch['Group by']"
|
@change="searchDimension" v-model="tableSearch['Group by']"
|
||||||
placeholder="请选择内容">
|
placeholder="请选择内容">
|
||||||
<template v-for="(item,key) in dimensionFields">
|
<template v-for="(item,key) in dimensionFields">
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
v-if="tableSearch['Group by']&&tableSearch['Group by'].includes(key)||!tableSearch['Group by']?.length"
|
v-if="1"
|
||||||
:key="key"
|
:key="key"
|
||||||
:value="key"
|
:value="key"
|
||||||
:label="item.label"></el-checkbox>
|
:label="item.label"></el-checkbox>
|
||||||
@@ -129,7 +132,7 @@ const tableData = ref<any>([])
|
|||||||
const tableSearch = ref({
|
const tableSearch = ref({
|
||||||
'Group by':[]
|
'Group by':[]
|
||||||
})
|
})
|
||||||
const tablePage = ref<any>({ currentPage: 1, pageSize: 100, total: 0 })
|
const tablePage = ref<any>({ currentPage: 1, pageSize: 50, total: 0 })
|
||||||
const tableSelect = ref<any>([])
|
const tableSelect = ref<any>([])
|
||||||
const tableSort = ref({ column: '', order: '' })
|
const tableSort = ref({ column: '', order: '' })
|
||||||
const tableInfo = ref<any>({})
|
const tableInfo = ref<any>({})
|
||||||
@@ -213,12 +216,12 @@ const initTable = async () => {
|
|||||||
height: isHeight ? 'auto' : undefined,
|
height: isHeight ? 'auto' : undefined,
|
||||||
calcHeight: isHeight ? 10 : '',
|
calcHeight: isHeight ? 10 : '',
|
||||||
index: reportVo.tableConfig.includes('index'),
|
index: reportVo.tableConfig.includes('index'),
|
||||||
|
indexLabel: '序号',
|
||||||
|
indexWidth: 54,
|
||||||
border: reportVo.tableConfig.includes('border'),
|
border: reportVo.tableConfig.includes('border'),
|
||||||
stripe: reportVo.tableConfig.includes('stripe'),
|
stripe: reportVo.tableConfig.includes('stripe'),
|
||||||
showSummary:false,
|
showSummary:false,
|
||||||
|
|
||||||
stripe:true,
|
stripe:true,
|
||||||
|
|
||||||
column: {}
|
column: {}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -611,7 +614,10 @@ const getTableData = async (isLoading = true) => {
|
|||||||
tableData.value = processedData
|
tableData.value = processedData
|
||||||
Object.values(tableOption.value.column).forEach( item=>{
|
Object.values(tableOption.value.column).forEach( item=>{
|
||||||
item.hide=item.children?.every(child=>tableData.value[0]&&(tableData.value[0][child.prop]===undefined))
|
item.hide=item.children?.every(child=>tableData.value[0]&&(tableData.value[0][child.prop]===undefined))
|
||||||
item.hide? hideColumns.value.push(item.prop):''
|
const prH=hideColumns.value.indexOf(item.prop)
|
||||||
|
item.hide?(prH===-1?hideColumns.value.push(item.prop):''):(prH!==-1?hideColumns.value.splice(prH,1):'')
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@@ -741,6 +747,15 @@ defineExpose({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
:deep(.el-form-item--default){
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
:deep(.avue-crud__pagination){
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
:deep(.avue-crud__tip){
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
.amountBox{
|
.amountBox{
|
||||||
&::after{
|
&::after{
|
||||||
content:'、'
|
content:'、'
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ export default defineComponent({
|
|||||||
name: 'Layout',
|
name: 'Layout',
|
||||||
setup() {
|
setup() {
|
||||||
return () => (
|
return () => (
|
||||||
<section class={[prefixCls, `${prefixCls}__${layout.value}`, 'w-[100%] h-[100%] relative']}>
|
<section class={[prefixCls, `${prefixCls}__${layout.value}`, 'w-[100%] h-[100%] relative']} >
|
||||||
{mobile.value && !collapse.value ? (
|
{mobile.value && !collapse.value ? (
|
||||||
<div
|
<div
|
||||||
class="absolute left-0 top-0 z-99 h-full w-full bg-[var(--el-color-black)] opacity-30"
|
class="absolute left-0 top-0 z-99 h-full w-full bg-[var(--el-color-black)] opacity-30"
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ const formatComponentInstance = (component, route) => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<section
|
<section
|
||||||
|
style="padding-bottom:0"
|
||||||
:class="[
|
:class="[
|
||||||
'flex-1 p-[var(--app-content-padding)] w-[calc(100%-var(--app-content-padding)-var(--app-content-padding))] bg-[var(--app-content-bg-color)] dark:bg-[var(--el-bg-color)]'
|
'flex-1 p-[var(--app-content-padding)] w-[calc(100%-var(--app-content-padding)-var(--app-content-padding))] bg-[var(--app-content-bg-color)] dark:bg-[var(--el-bg-color)]'
|
||||||
]"
|
]"
|
||||||
|
|||||||
Reference in New Issue
Block a user