From 0b747d8b0397fbe5e01918aa9d9b833bd0a052c4 Mon Sep 17 00:00:00 2001 From: user Date: Fri, 28 Mar 2025 23:12:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E5=92=8C=E5=BA=93=E5=AD=98=E6=93=8D=E4=BD=9C=E7=9A=84=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在字典和库存的创建、更新和删除操作中,添加了更详细的提示信息,包括操作的字典或库存名称。同时,调整了提示信息的显示类型,以更好地反映操作结果。 --- src/main/webapp/app/entities/dict/dict-edit.component.ts | 2 +- src/main/webapp/app/entities/dict/dict.component.ts | 2 +- src/main/webapp/app/entities/stock/stock-edit.component.ts | 2 +- src/main/webapp/app/shared/alert/alert.service.ts | 1 + src/main/webapp/i18n/zh-cn/dict.json | 6 +++--- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/webapp/app/entities/dict/dict-edit.component.ts b/src/main/webapp/app/entities/dict/dict-edit.component.ts index 6361691..d288431 100644 --- a/src/main/webapp/app/entities/dict/dict-edit.component.ts +++ b/src/main/webapp/app/entities/dict/dict-edit.component.ts @@ -141,7 +141,7 @@ export default defineComponent({ alertService.showInfo($t('jewpmsApp.dict.updated', { param: dict.value.name })); } else { await axios.post('api/dicts', dict.value); - alertService.showSuccess($t('jewpmsApp.dict.created')); + alertService.showSuccess($t('jewpmsApp.dict.created', { param: dict.value.name })); } previousState(); } catch (e) { diff --git a/src/main/webapp/app/entities/dict/dict.component.ts b/src/main/webapp/app/entities/dict/dict.component.ts index 339eb69..c2b09d8 100644 --- a/src/main/webapp/app/entities/dict/dict.component.ts +++ b/src/main/webapp/app/entities/dict/dict.component.ts @@ -242,7 +242,7 @@ export default defineComponent({ const deleteDict = async () => { try { await axios.delete(`api/dicts/${removeRow.value.id}`); - alertService.showInfo($t('jewpmsApp.dict.deleted')); + alertService.showWarn($t('jewpmsApp.dict.deleted', { param: removeRow.value.name })); removeRow.value.id = null; queryMethod(); showDelete.value = false; diff --git a/src/main/webapp/app/entities/stock/stock-edit.component.ts b/src/main/webapp/app/entities/stock/stock-edit.component.ts index 96e7ac4..4dc1360 100644 --- a/src/main/webapp/app/entities/stock/stock-edit.component.ts +++ b/src/main/webapp/app/entities/stock/stock-edit.component.ts @@ -93,7 +93,7 @@ export default defineComponent({ try { if (stock.value.id) { await axios.put(`api/stocks/${stock.value.id}`, stock.value); - alertService.showSuccess($t('jewpmsApp.stock.updated', { param: stock.value.name })); + alertService.showInfo($t('jewpmsApp.stock.updated', { param: stock.value.name })); } else { await axios.post('api/stocks', stock.value); alertService.showSuccess($t('jewpmsApp.stock.created', { param: stock.value.name })); diff --git a/src/main/webapp/app/shared/alert/alert.service.ts b/src/main/webapp/app/shared/alert/alert.service.ts index 875f704..6068dad 100644 --- a/src/main/webapp/app/shared/alert/alert.service.ts +++ b/src/main/webapp/app/shared/alert/alert.service.ts @@ -32,6 +32,7 @@ export default class AlertService { status: 'info', duration: toastOptions?.delay || 5000, title: toastOptions?.title || 'Info', + iconStatus: 'vxe-icon-info-circle-fill text-primary', }); } diff --git a/src/main/webapp/i18n/zh-cn/dict.json b/src/main/webapp/i18n/zh-cn/dict.json index 4f98d70..59b9438 100644 --- a/src/main/webapp/i18n/zh-cn/dict.json +++ b/src/main/webapp/i18n/zh-cn/dict.json @@ -8,9 +8,9 @@ "editLabel": "编辑数据字典", "notFound": "没有找到数据字典" }, - "created": "创建成功", - "updated": "更新成功", - "deleted": "删除成功", + "created": "创建成功,字典信息 { param }", + "updated": "更新成功,字典信息 { param }", + "deleted": "删除成功,字典信息 { param }", "delete": { "question": "你确定要删除数据字典 { param } 吗?" },