reactor:【system 系统管理】area、dept、dict、loginlog 进一步统一代码风格

This commit is contained in:
YunaiV
2025-09-06 09:39:09 +08:00
parent 84e32a0884
commit fcaa81ff3b
15 changed files with 135 additions and 175 deletions

View File

@@ -34,7 +34,7 @@ const [DataFormModal, dataFormModalApi] = useVbenModal({
});
/** 刷新表格 */
function onRefresh() {
function handleRefresh() {
gridApi.query();
}
@@ -61,9 +61,9 @@ async function handleDelete(row: SystemDictDataApi.DictData) {
duration: 0,
});
try {
await deleteDictData(row.id);
await deleteDictData(row.id!);
message.success($t('ui.actionMessage.deleteSuccess', [row.label]));
onRefresh();
handleRefresh();
} finally {
hideLoading();
}
@@ -80,7 +80,7 @@ async function handleDeleteBatch() {
await deleteDictDataList(checkedIds.value);
checkedIds.value = [];
message.success($t('ui.actionMessage.deleteSuccess'));
onRefresh();
handleRefresh();
} finally {
hideLoading();
}
@@ -135,7 +135,7 @@ watch(
() => props.dictType,
() => {
if (props.dictType) {
onRefresh();
handleRefresh();
}
},
);
@@ -143,7 +143,7 @@ watch(
<template>
<div class="flex h-full flex-col">
<DataFormModal @success="onRefresh" />
<DataFormModal @success="handleRefresh" />
<Grid table-title="字典数据列表">
<template #toolbar-tools>

View File

@@ -32,7 +32,7 @@ const [TypeFormModal, typeFormModalApi] = useVbenModal({
});
/** 刷新表格 */
function onRefresh() {
function handleRefresh() {
gridApi.query();
}
@@ -59,9 +59,9 @@ async function handleDelete(row: SystemDictTypeApi.DictType) {
duration: 0,
});
try {
await deleteDictType(row.id);
await deleteDictType(row.id!);
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
onRefresh();
handleRefresh();
} finally {
hideLoading();
}
@@ -78,7 +78,7 @@ async function handleDeleteBatch() {
await deleteDictTypeList(checkedIds.value);
checkedIds.value = [];
message.success($t('ui.actionMessage.deleteSuccess'));
onRefresh();
handleRefresh();
} finally {
hideLoading();
}
@@ -134,7 +134,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
<template>
<div class="h-full">
<TypeFormModal @success="onRefresh" />
<TypeFormModal @success="handleRefresh" />
<Grid table-title="字典类型列表">
<template #toolbar-tools>
<TableAction