feat: 构架绿植租赁方案管理页面
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
fyy
2025-07-01 17:48:47 +08:00
parent 0a56fa2194
commit 33f2197ea8
8 changed files with 417 additions and 62 deletions

View File

@@ -6,13 +6,13 @@ 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 { Modal, Popconfirm, Space,Tag } from 'ant-design-vue';
import dayjs from 'dayjs';
import {
import {
useVbenVxeGrid,
vxeCheckboxChecked,
type VxeGridProps
type VxeGridProps
} from '#/adapter/vxe-table';
import {
@@ -102,7 +102,10 @@ async function handleDelete(row: Required<RentalPlanForm>) {
await rentalPlanRemove(row.id);
await tableApi.query();
}
async function handleView(row: Required<RentalPlanForm>) {
modalApi.setData({ id: row.id, readonly: true,ab:"wegqw" });
modalApi.open();
}
function handleMultiDelete() {
const rows = tableApi.grid.getCheckboxRecords();
const ids = rows.map((row: Required<RentalPlanForm>) => row.id);
@@ -122,6 +125,7 @@ function handleDownloadExcel() {
fieldMappingTime: formOptions.fieldMappingTime,
});
}
</script>
<template>
@@ -138,8 +142,8 @@ function handleDownloadExcel() {
<a-button
:disabled="!vxeCheckboxChecked(tableApi)"
danger
type="primary"
v-access:code="['property:rentalPlan:remove']"
type="primary"
v-access:code="['property:rentalPlan:remove']"
@click="handleMultiDelete">
{{ $t('pages.common.delete') }}
</a-button>
@@ -152,8 +156,14 @@ function handleDownloadExcel() {
</a-button>
</Space>
</template>
<template #state="{ row }">
<Tag v-if="row.state === 0" color="error">禁用</Tag>
<Tag v-else-if="row.state === 1" color="success">启用</Tag>
<Tag v-else color="default">未审核</Tag>
</template>
<template #action="{ row }">
<Space>
<ghost-button @click.stop="handleView(row)"> 查看 </ghost-button>
<ghost-button
v-access:code="['property:rentalPlan:edit']"
@click.stop="handleEdit(row)"