Files
admin-vben5/apps/web-antd/src/views/property/energyManagement/electricEnergy/elctricityCost/index.vue

78 lines
1.5 KiB
Vue
Raw Normal View History

2025-07-25 15:41:29 +08:00
<script setup lang="ts">
import { Page, type VbenFormProps } from '@vben/common-ui'
2025-07-27 16:55:48 +08:00
import {
useVbenVxeGrid,
type VxeGridProps
} from '#/adapter/vxe-table'
2025-07-27 16:55:48 +08:00
import {
paymentReviewList,
} from '#/api/property/costManagement/paymentReview'
import { columns, querySchema } from './data'
import FloorTree from "../components/floor-tree.vue"
2025-07-25 15:41:29 +08:00
2025-07-27 16:55:48 +08:00
const formOptions: VbenFormProps = {
commonConfig: {
labelWidth: 30,
componentProps: {
allowClear: true,
},
},
schema: querySchema(),
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
}
2025-07-27 16:55:48 +08:00
const gridOptions: VxeGridProps = {
checkboxConfig: {
highlight: true,
reserve: true,
},
columns,
height: 'auto',
keepSource: true,
pagerConfig: {},
proxyConfig: {
ajax: {
query: async ({ page }, formValues = {}) => {
return await paymentReviewList({
pageNum: page.currentPage,
pageSize: page.pageSize,
...formValues,
})
2025-07-27 16:55:48 +08:00
},
},
},
rowConfig: {
keyField: 'id',
},
id: 'property-paymentReview-index'
}
2025-07-27 16:55:48 +08:00
const [BasicTable, tableApi] = useVbenVxeGrid({
formOptions,
gridOptions,
});
2025-07-25 15:41:29 +08:00
</script>
<template>
<Page :auto-content-height="true">
<div class="flex h-full gap-[8px]">
<FloorTree></FloorTree>
<BasicTable class="flex-1 overflow-hidden" table-title="用电费用报表" />
2025-07-27 16:55:48 +08:00
</div>
</Page>
2025-07-25 15:41:29 +08:00
</template>
<style scoped lang="scss">
.box {
2025-07-27 16:55:48 +08:00
display: grid;
grid-template-columns: 1fr 3fr;
2025-07-25 15:41:29 +08:00
2025-07-27 16:55:48 +08:00
.right {
width: 100%;
overflow: hidden;
}
}
2025-07-25 15:41:29 +08:00
</style>