去掉选列数量提示 调整search行高 查询移到内部 动态表头优化 报表条数改为,默认50
This commit is contained in:
@@ -15,7 +15,7 @@ defineProps({
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ElCard :class="[prefixCls, 'mb-15px']" shadow="never">
|
||||
<ElCard :class="[prefixCls]" shadow="never">
|
||||
<template v-if="title" #header>
|
||||
<div class="flex items-center">
|
||||
<span class="text-16px font-700">{{ title }}</span>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
class="low-reoprt"
|
||||
:class="[`low-report__${reportCode}`, { summary: tableOption.showSummary }]"
|
||||
>
|
||||
<div v-if="isSearch" style="margin-bottom:6px">查询:</div>
|
||||
|
||||
<avue-crud
|
||||
ref="crudRef"
|
||||
v-model:search="tableSearch"
|
||||
@@ -21,6 +21,9 @@
|
||||
@selection-change="selectionChange"
|
||||
@sort-change="sortChange"
|
||||
>
|
||||
<template #search>
|
||||
<div v-if="isSearch" style="margin-bottom:6px">查询:</div>
|
||||
</template>
|
||||
<!-- 自定义表格头部操作 -->
|
||||
<template #menu-left="{ size }">
|
||||
<ElButton
|
||||
@@ -69,14 +72,14 @@
|
||||
></InputTimeRange>
|
||||
</template>
|
||||
<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>
|
||||
<el-checkbox-group
|
||||
@change="searchDimension" v-model="tableSearch['Group by']"
|
||||
placeholder="请选择内容">
|
||||
<template v-for="(item,key) in dimensionFields">
|
||||
<el-checkbox
|
||||
v-if="tableSearch['Group by']&&tableSearch['Group by'].includes(key)||!tableSearch['Group by']?.length"
|
||||
v-if="1"
|
||||
:key="key"
|
||||
:value="key"
|
||||
:label="item.label"></el-checkbox>
|
||||
@@ -129,7 +132,7 @@ const tableData = ref<any>([])
|
||||
const tableSearch = ref({
|
||||
'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 tableSort = ref({ column: '', order: '' })
|
||||
const tableInfo = ref<any>({})
|
||||
@@ -213,12 +216,12 @@ const initTable = async () => {
|
||||
height: isHeight ? 'auto' : undefined,
|
||||
calcHeight: isHeight ? 10 : '',
|
||||
index: reportVo.tableConfig.includes('index'),
|
||||
indexLabel: '序号',
|
||||
indexWidth: 54,
|
||||
border: reportVo.tableConfig.includes('border'),
|
||||
stripe: reportVo.tableConfig.includes('stripe'),
|
||||
showSummary:false,
|
||||
|
||||
stripe:true,
|
||||
|
||||
column: {}
|
||||
}
|
||||
|
||||
@@ -611,7 +614,10 @@ const getTableData = async (isLoading = true) => {
|
||||
tableData.value = processedData
|
||||
Object.values(tableOption.value.column).forEach( item=>{
|
||||
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>
|
||||
|
||||
<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{
|
||||
&::after{
|
||||
content:'、'
|
||||
|
||||
@@ -49,7 +49,7 @@ export default defineComponent({
|
||||
name: 'Layout',
|
||||
setup() {
|
||||
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 ? (
|
||||
<div
|
||||
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>
|
||||
<section
|
||||
style="padding-bottom:0"
|
||||
: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)]'
|
||||
]"
|
||||
|
||||
Reference in New Issue
Block a user