1
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
15683799673
2025-06-28 02:41:09 +08:00
parent 81a89bb4dc
commit acd63bc96e
23 changed files with 670 additions and 1046 deletions

View File

@@ -1,12 +1,20 @@
<script setup lang="ts">
import type { Recordable } from '@vben/types';
import { ref } from 'vue';
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
import { getVxePopupContainer } from '@vben/utils';
import { Modal, Popconfirm, Space } from 'ant-design-vue';
import {
import dayjs from 'dayjs';
import {
useVbenVxeGrid,
vxeCheckboxChecked,
type VxeGridProps
type VxeGridProps
} from '#/adapter/vxe-table';
import {
floorExport,
floorList,
@@ -14,6 +22,7 @@ import {
} from '#/api/property/floor';
import type { FloorForm } from '#/api/property/floor/model';
import { commonDownloadExcel } from '#/utils/file/download';
import floorModal from './floor-modal.vue';
import { columns, querySchema } from './data';
@@ -26,13 +35,28 @@ const formOptions: VbenFormProps = {
},
schema: querySchema(),
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
// 处理区间选择器RangePicker时间格式 将一个字段映射为两个字段 搜索/导出会用到
// 不需要直接删除
// fieldMappingTime: [
// [
// 'createTime',
// ['params[beginTime]', 'params[endTime]'],
// ['YYYY-MM-DD 00:00:00', 'YYYY-MM-DD 23:59:59'],
// ],
// ],
};
const gridOptions: VxeGridProps = {
checkboxConfig: {
// 高亮
highlight: true,
// 翻页时保留选中状态
reserve: true,
// 点击行选中
// trigger: 'row',
},
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
// columns: columns(),
columns,
height: 'auto',
keepSource: true,
@@ -51,6 +75,7 @@ const gridOptions: VxeGridProps = {
rowConfig: {
keyField: 'id',
},
// 表格全局唯一表示 保存列配置需要用到
id: 'property-floor-index'
};
@@ -93,7 +118,7 @@ function handleMultiDelete() {
}
function handleDownloadExcel() {
commonDownloadExcel(floorExport, '楼层管理数据', tableApi.formApi.form.values, {
commonDownloadExcel(floorExport, '楼层数据', tableApi.formApi.form.values, {
fieldMappingTime: formOptions.fieldMappingTime,
});
}
@@ -101,7 +126,7 @@ function handleDownloadExcel() {
<template>
<Page :auto-content-height="true">
<BasicTable table-title="楼层管理列表">
<BasicTable table-title="楼层列表">
<template #toolbar-tools>
<Space>
<a-button
@@ -113,8 +138,8 @@ function handleDownloadExcel() {
<a-button
:disabled="!vxeCheckboxChecked(tableApi)"
danger
type="primary"
v-access:code="['property:floor:remove']"
type="primary"
v-access:code="['property:floor:remove']"
@click="handleMultiDelete">
{{ $t('pages.common.delete') }}
</a-button>