预约记录

This commit is contained in:
FLL 2025-07-11 17:07:29 +08:00
parent a718e57c3f
commit d6fdd2a2de
4 changed files with 19 additions and 43 deletions

View File

@ -1,13 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import type { Recordable } from '@vben/types';
import { ref } from 'vue';
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui'; import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
import { getVxePopupContainer } from '@vben/utils'; import { getVxePopupContainer } from '@vben/utils';
import { Modal, Popconfirm, Space } from 'ant-design-vue'; import { Modal, Popconfirm, Space } from 'ant-design-vue';
import dayjs from 'dayjs';
import { import {
useVbenVxeGrid, useVbenVxeGrid,
@ -16,12 +10,10 @@ import {
} from '#/adapter/vxe-table'; } from '#/adapter/vxe-table';
import { import {
inspectionPointExport,
inspectionPointList, inspectionPointList,
inspectionPointRemove, inspectionPointRemove,
} from '#/api/property/inspectionManagement/inspectionPoint'; } from '#/api/property/inspectionManagement/inspectionPoint';
import type { InspectionPointForm } from '#/api/property/inspectionManagement/inspectionPoint/model'; import type { InspectionPointForm } from '#/api/property/inspectionManagement/inspectionPoint/model';
import { commonDownloadExcel } from '#/utils/file/download';
import inspectionPointModal from './inspectionPoint-modal.vue'; import inspectionPointModal from './inspectionPoint-modal.vue';
import { columns, querySchema } from './data'; import { columns, querySchema } from './data';
@ -116,12 +108,6 @@ function handleMultiDelete() {
}, },
}); });
} }
function handleDownloadExcel() {
commonDownloadExcel(inspectionPointExport, '巡检点数据', tableApi.formApi.form.values, {
fieldMappingTime: formOptions.fieldMappingTime,
});
}
</script> </script>
<template> <template>
@ -129,12 +115,6 @@ function handleDownloadExcel() {
<BasicTable table-title="巡检点列表"> <BasicTable table-title="巡检点列表">
<template #toolbar-tools> <template #toolbar-tools>
<Space> <Space>
<a-button
v-access:code="['property:inspectionPoint:export']"
@click="handleDownloadExcel"
>
{{ $t('pages.common.export') }}
</a-button>
<a-button <a-button
:disabled="!vxeCheckboxChecked(tableApi)" :disabled="!vxeCheckboxChecked(tableApi)"
danger danger

View File

@ -6,7 +6,7 @@ export const querySchema: FormSchemaGetter = () => [
{ {
component: 'Input', component: 'Input',
fieldName: 'routeName', fieldName: 'routeName',
label: '路线名称', label: '巡检路线名称',
}, },
]; ];
@ -15,12 +15,16 @@ export const querySchema: FormSchemaGetter = () => [
export const columns: VxeGridProps['columns'] = [ export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 }, { type: 'checkbox', width: 60 },
{ {
title: '主键id', title: '巡检路线名称',
field: 'id', field: 'routeName',
}, },
{ {
title: '路线名称', title: '创建时间',
field: 'routeName', field: 'createTime',
},
{
title: '排序',
field: 'sort',
}, },
{ {
title: '备注', title: '备注',
@ -46,14 +50,20 @@ export const modalSchema: FormSchemaGetter = () => [
}, },
}, },
{ {
label: '路线名称', label: '巡检路线名称',
fieldName: 'routeName', fieldName: 'routeName',
component: 'Input', component: 'Input',
rules: 'required', rules: 'required',
}, },
{
label: '排序',
fieldName: 'sort',
component: 'Input',
rules: 'required',
},
{ {
label: '备注', label: '备注',
fieldName: 'remark', fieldName: 'remark',
component: 'Input', component: 'Textarea',
}, },
]; ];

View File

@ -16,19 +16,17 @@ import {
} from '#/adapter/vxe-table'; } from '#/adapter/vxe-table';
import { import {
inspectionRouteExport,
inspectionRouteList, inspectionRouteList,
inspectionRouteRemove, inspectionRouteRemove,
} from '#/api/property/inspectionManagement/inspectionRoute'; } from '#/api/property/inspectionManagement/inspectionRoute';
import type { InspectionRouteForm } from '#/api/property/inspectionManagement/inspectionRoute/model'; import type { InspectionRouteForm } from '#/api/property/inspectionManagement/inspectionRoute/model';
import { commonDownloadExcel } from '#/utils/file/download';
import inspectionRouteModal from './inspectionRoute-modal.vue'; import inspectionRouteModal from './inspectionRoute-modal.vue';
import { columns, querySchema } from './data'; import { columns, querySchema } from './data';
const formOptions: VbenFormProps = { const formOptions: VbenFormProps = {
commonConfig: { commonConfig: {
labelWidth: 80, labelWidth: 90,
componentProps: { componentProps: {
allowClear: true, allowClear: true,
}, },
@ -116,12 +114,6 @@ function handleMultiDelete() {
}, },
}); });
} }
function handleDownloadExcel() {
commonDownloadExcel(inspectionRouteExport, '巡检路线数据', tableApi.formApi.form.values, {
fieldMappingTime: formOptions.fieldMappingTime,
});
}
</script> </script>
<template> <template>
@ -129,12 +121,6 @@ function handleDownloadExcel() {
<BasicTable table-title="巡检路线列表"> <BasicTable table-title="巡检路线列表">
<template #toolbar-tools> <template #toolbar-tools>
<Space> <Space>
<a-button
v-access:code="['property:inspectionRoute:export']"
@click="handleDownloadExcel"
>
{{ $t('pages.common.export') }}
</a-button>
<a-button <a-button
:disabled="!vxeCheckboxChecked(tableApi)" :disabled="!vxeCheckboxChecked(tableApi)"
danger danger

View File

@ -23,7 +23,7 @@ const [BasicForm, formApi] = useVbenForm({
// //
formItemClass: 'col-span-2', formItemClass: 'col-span-2',
// label px // label px
labelWidth: 80, labelWidth: 100,
// //
componentProps: { componentProps: {
class: 'w-full', class: 'w-full',