feat: 项目和License管理模块删除功能修复

This commit is contained in:
caiyuchao
2025-07-04 14:18:26 +08:00
parent 843ec65541
commit 5de519d413
4 changed files with 8 additions and 6 deletions

View File

@@ -434,7 +434,7 @@ export function useGridColumns(
showOverflow: false, showOverflow: false,
cellRender: { cellRender: {
attrs: { attrs: {
nameField: 'id', nameField: 'sn',
nameTitle: 'License', nameTitle: 'License',
onClick: onActionClick, onClick: onActionClick,
}, },

View File

@@ -47,13 +47,14 @@ function onEdit(row: LicenseApi.License) {
/** 删除License */ /** 删除License */
async function onDelete(row: LicenseApi.License) { async function onDelete(row: LicenseApi.License) {
const hideLoading = message.loading({ const hideLoading = message.loading({
content: $t('ui.actionMessage.deleting', [row.id]), content: $t('ui.actionMessage.deleting', [row.sn]),
duration: 0, duration: 0,
key: 'action_process_msg', key: 'action_process_msg',
}); });
try { try {
await deleteLicense(row.id as number); await deleteLicense(row.id as number);
message.success($t('ui.actionMessage.deleteSuccess', [row.id])); hideLoading();
message.success($t('ui.actionMessage.deleteSuccess', [row.sn]));
onRefresh(); onRefresh();
} catch { } catch {
hideLoading(); hideLoading();

View File

@@ -493,7 +493,7 @@ export function useGridColumns(
showOverflow: false, showOverflow: false,
cellRender: { cellRender: {
attrs: { attrs: {
nameField: 'id', nameField: 'name',
nameTitle: $t('project.project'), nameTitle: $t('project.project'),
onClick: onActionClick, onClick: onActionClick,
}, },

View File

@@ -47,13 +47,14 @@ function onEdit(row: ProjectApi.Project) {
/** 删除项目 */ /** 删除项目 */
async function onDelete(row: ProjectApi.Project) { async function onDelete(row: ProjectApi.Project) {
const hideLoading = message.loading({ const hideLoading = message.loading({
content: $t('ui.actionMessage.deleting', [row.id]), content: $t('ui.actionMessage.deleting', [row.name]),
duration: 0, duration: 0,
key: 'action_process_msg', key: 'action_process_msg',
}); });
try { try {
await deleteProject(row.id as number); await deleteProject(row.id as number);
message.success($t('ui.actionMessage.deleteSuccess', [row.id])); hideLoading();
message.success($t('ui.actionMessage.deleteSuccess', [row.name]));
onRefresh(); onRefresh();
} catch { } catch {
hideLoading(); hideLoading();