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