refactor: ♻️ 字典调整按需加载,api、store和枚举文件命名优化

This commit is contained in:
Ray.Hao
2025-03-24 08:17:31 +08:00
parent 6204deb7cb
commit 3c9cf67961
84 changed files with 989 additions and 1108 deletions

View File

@@ -129,7 +129,7 @@ defineOptions({
inherititems: false,
});
import DictAPI, { DictPageQuery, DictPageVO, DictForm } from "@/api/system/dict";
import DictAPI, { DictPageQuery, DictPageVO, DictForm } from "@/api/system/dict.api";
import router from "@/router";
@@ -221,7 +221,7 @@ function handleSubmitClick() {
})
.finally(() => (loading.value = false));
} else {
DictAPI.add(formData)
DictAPI.create(formData)
.then(() => {
ElMessage.success("新增成功");
handleCloseDialog();
@@ -270,17 +270,12 @@ function handleDelete(id?: number) {
);
}
// 打开字典数据
// 打开字典
function handleOpenDictData(row: DictPageVO) {
router.push({
path: "/system/dict-data",
path: "/system/dict-item",
query: { dictCode: row.dictCode, title: "【" + row.name + "】字典数据" },
});
/* router.push({
name: "DictData",
params: { dictCode: row.dictCode, title: "【" + row.name + "】字典数据" },
}); */
}
onMounted(() => {