fix: 还原意外覆盖代码
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
fyy 2025-07-18 14:57:58 +08:00
parent 1798de7d52
commit 8c606397df

View File

@ -16,7 +16,7 @@ import {
} from '#/api/property/costManagement/costItemSetting'; } from '#/api/property/costManagement/costItemSetting';
import type { CostItemSettingForm } from '#/api/property/costManagement/costItemSetting/model'; import type { CostItemSettingForm } from '#/api/property/costManagement/costItemSetting/model';
import carChargeModal from './carCharge-modal.vue'; import costItemSettingModal from './costItemSetting-modal.vue';
import { columns, querySchema } from './data'; import { columns, querySchema } from './data';
const formOptions: VbenFormProps = { const formOptions: VbenFormProps = {
@ -48,7 +48,7 @@ const gridOptions: VxeGridProps = {
proxyConfig: { proxyConfig: {
ajax: { ajax: {
query: async ({ page }, formValues = {}) => { query: async ({ page }, formValues = {}) => {
return await carChargeList({ return await costItemSettingList({
pageNum: page.currentPage, pageNum: page.currentPage,
pageSize: page.pageSize, pageSize: page.pageSize,
...formValues, ...formValues,
@ -60,7 +60,7 @@ const gridOptions: VxeGridProps = {
keyField: 'id', keyField: 'id',
}, },
// //
id: 'property-carCharge-index' id: 'property-costItemSetting-index'
}; };
const [BasicTable, tableApi] = useVbenVxeGrid({ const [BasicTable, tableApi] = useVbenVxeGrid({
@ -68,8 +68,8 @@ const [BasicTable, tableApi] = useVbenVxeGrid({
gridOptions, gridOptions,
}); });
const [CarChargeModal, modalApi] = useVbenModal({ const [CostItemSettingModal, modalApi] = useVbenModal({
connectedComponent: carChargeModal, connectedComponent: costItemSettingModal,
}); });
function handleAdd() { function handleAdd() {
@ -77,25 +77,25 @@ function handleAdd() {
modalApi.open(); modalApi.open();
} }
async function handleEdit(row: Required<CarChargeForm>) { async function handleEdit(row: Required<CostItemSettingForm>) {
modalApi.setData({ id: row.id }); modalApi.setData({ id: row.id });
modalApi.open(); modalApi.open();
} }
async function handleDelete(row: Required<CarChargeForm>) { async function handleDelete(row: Required<CostItemSettingForm>) {
await carChargeRemove(row.id); await costItemSettingRemove(row.id);
await tableApi.query(); await tableApi.query();
} }
function handleMultiDelete() { function handleMultiDelete() {
const rows = tableApi.grid.getCheckboxRecords(); const rows = tableApi.grid.getCheckboxRecords();
const ids = rows.map((row: Required<CarChargeForm>) => row.id); const ids = rows.map((row: Required<CostItemSettingForm>) => row.id);
Modal.confirm({ Modal.confirm({
title: '提示', title: '提示',
okType: 'danger', okType: 'danger',
content: `确认删除选中的${ids.length}条记录吗?`, content: `确认删除选中的${ids.length}条记录吗?`,
onOk: async () => { onOk: async () => {
await carChargeRemove(ids); await costItemSettingRemove(ids);
await tableApi.query(); await tableApi.query();
}, },
}); });
@ -104,7 +104,7 @@ function handleMultiDelete() {
<template> <template>
<Page :auto-content-height="true"> <Page :auto-content-height="true">
<BasicTable table-title="费用-车辆收费列表"> <BasicTable table-title="费用项设置列表">
<template #toolbar-tools> <template #toolbar-tools>
<Space> <Space>
<a-button <a-button
@ -117,7 +117,7 @@ function handleMultiDelete() {
</a-button> </a-button>
<a-button <a-button
type="primary" type="primary"
v-access:code="['property:carCharge:add']" v-access:code="['property:costItemSetting:add']"
@click="handleAdd" @click="handleAdd"
> >
{{ $t('pages.common.add') }} {{ $t('pages.common.add') }}
@ -127,7 +127,7 @@ function handleMultiDelete() {
<template #action="{ row }"> <template #action="{ row }">
<Space> <Space>
<ghost-button <ghost-button
v-access:code="['property:carCharge:edit']" v-access:code="['property:costItemSetting:edit']"
@click.stop="handleEdit(row)" @click.stop="handleEdit(row)"
> >
{{ $t('pages.common.edit') }} {{ $t('pages.common.edit') }}
@ -140,7 +140,7 @@ function handleMultiDelete() {
> >
<ghost-button <ghost-button
danger danger
v-access:code="['property:carCharge:remove']" v-access:code="['property:costItemSetting:remove']"
@click.stop="" @click.stop=""
> >
{{ $t('pages.common.delete') }} {{ $t('pages.common.delete') }}
@ -149,6 +149,6 @@ function handleMultiDelete() {
</Space> </Space>
</template> </template>
</BasicTable> </BasicTable>
<CarChargeModal @reload="tableApi.query()" /> <CostItemSettingModal @reload="tableApi.query()" />
</Page> </Page>
</template> </template>