refactor: 重命名 API 文件并更新引用路径
- 重命名 13 个 API 文件,去掉 -api 后缀 * src/api/auth-api.ts auth.ts * src/api/codegen-api.ts codegen.ts * src/api/file-api.ts file.ts * src/api/system/*.ts (9个文件) - 批量更新 50+ 处 API 引用路径 - 修复 websocket 和枚举导入路径 - 确保零编码问题(使用 UTF-8 编码)
This commit is contained in:
@@ -141,7 +141,7 @@ defineOptions({
|
||||
inheritAttrs: false,
|
||||
});
|
||||
|
||||
import ConfigAPI, { ConfigPageVO, ConfigForm, ConfigPageQuery } from "@/api/system/config-api";
|
||||
import ConfigAPI, { ConfigPageVO, ConfigForm, ConfigPageQuery } from "@/api/system/config";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { useDebounceFn } from "@vueuse/core";
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ defineOptions({
|
||||
inheritAttrs: false,
|
||||
});
|
||||
|
||||
import DeptAPI, { DeptVO, DeptForm, DeptQuery } from "@/api/system/dept-api";
|
||||
import DeptAPI, { DeptVO, DeptForm, DeptQuery } from "@/api/system/dept";
|
||||
|
||||
const queryFormRef = ref();
|
||||
const deptFormRef = ref();
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { TagProps } from "element-plus";
|
||||
import DictAPI, { DictItemPageQuery, DictItemPageVO, DictItemForm } from "@/api/system/dict-api";
|
||||
import DictAPI, { DictItemPageQuery, DictItemPageVO, DictItemForm } from "@/api/system/dict";
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ defineOptions({
|
||||
inherititems: false,
|
||||
});
|
||||
|
||||
import DictAPI, { DictPageQuery, DictPageVO, DictForm } from "@/api/system/dict-api";
|
||||
import DictAPI, { DictPageQuery, DictPageVO, DictForm } from "@/api/system/dict";
|
||||
|
||||
import router from "@/router";
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ defineOptions({
|
||||
inheritAttrs: false,
|
||||
});
|
||||
|
||||
import LogAPI, { LogPageVO, LogPageQuery } from "@/api/system/log-api";
|
||||
import LogAPI, { LogPageVO, LogPageQuery } from "@/api/system/log";
|
||||
|
||||
const queryFormRef = ref();
|
||||
|
||||
|
||||
@@ -340,7 +340,7 @@
|
||||
import { useAppStore } from "@/store/modules/app-store";
|
||||
import { DeviceEnum } from "@/enums/settings/device-enum";
|
||||
|
||||
import MenuAPI, { MenuQuery, MenuForm, MenuVO } from "@/api/system/menu-api";
|
||||
import MenuAPI, { MenuQuery, MenuForm, MenuVO } from "@/api/system/menu";
|
||||
import { MenuTypeEnum } from "@/enums/system/menu-enum";
|
||||
|
||||
defineOptions({
|
||||
|
||||
@@ -265,8 +265,8 @@ import NoticeAPI, {
|
||||
NoticeForm,
|
||||
NoticePageQuery,
|
||||
NoticeDetailVO,
|
||||
} from "@/api/system/notice-api";
|
||||
import UserAPI from "@/api/system/user-api";
|
||||
} from "@/api/system/notice";
|
||||
import UserAPI from "@/api/system/user";
|
||||
|
||||
const queryFormRef = ref();
|
||||
const dataFormRef = ref();
|
||||
|
||||
@@ -215,8 +215,8 @@
|
||||
import { useAppStore } from "@/store/modules/app-store";
|
||||
import { DeviceEnum } from "@/enums/settings/device-enum";
|
||||
|
||||
import RoleAPI, { RolePageVO, RoleForm, RolePageQuery } from "@/api/system/role-api";
|
||||
import MenuAPI from "@/api/system/menu-api";
|
||||
import RoleAPI, { RolePageVO, RoleForm, RolePageQuery } from "@/api/system/role";
|
||||
import MenuAPI from "@/api/system/menu";
|
||||
|
||||
defineOptions({
|
||||
name: "Role",
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import DeptAPI from "@/api/system/dept-api";
|
||||
import DeptAPI from "@/api/system/dept";
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: [String, Number],
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ElMessage, type UploadUserFile } from "element-plus";
|
||||
import UserAPI from "@/api/system/user-api";
|
||||
import UserAPI from "@/api/system/user";
|
||||
import { ApiCodeEnum } from "@/enums/api/code-enum";
|
||||
|
||||
const emit = defineEmits(["import-success"]);
|
||||
|
||||
@@ -253,15 +253,15 @@ import { useDebounceFn } from "@vueuse/core";
|
||||
import { ElMessage, ElMessageBox, type FormInstance } from "element-plus";
|
||||
|
||||
// ==================== 3. 类型定义 ====================
|
||||
import type { UserForm, UserPageQuery, UserPageVO } from "@/api/system/user-api";
|
||||
import type { UserForm, UserPageQuery, UserPageVO } from "@/api/system/user";
|
||||
|
||||
// ==================== 3.5 工具函数 ====================
|
||||
import { downloadFile } from "@/utils";
|
||||
import { VALIDATORS } from "@/constants";
|
||||
// ==================== 4. API 服务 ====================
|
||||
import UserAPI from "@/api/system/user-api";
|
||||
import DeptAPI from "@/api/system/dept-api";
|
||||
import RoleAPI from "@/api/system/role-api";
|
||||
import UserAPI from "@/api/system/user";
|
||||
import DeptAPI from "@/api/system/dept";
|
||||
import RoleAPI from "@/api/system/role";
|
||||
|
||||
// ==================== 5. Store ====================
|
||||
import { useUserStore, useAppStore } from "@/store";
|
||||
|
||||
Reference in New Issue
Block a user