diff --git a/src/api/ai/model/apiKey/index.ts b/src/api/ai/model/apiKey/index.ts
new file mode 100644
index 00000000..47e415e4
--- /dev/null
+++ b/src/api/ai/model/apiKey/index.ts
@@ -0,0 +1,39 @@
+import request from '@/config/axios'
+
+// AI API 密钥 VO
+export interface ApiKeyVO {
+ id: number // 编号
+ name: string // 名称
+ apiKey: string // 密钥
+ platform: string // 平台
+ url: string // 自定义 API 地址
+ status: number // 状态
+}
+
+// AI API 密钥 API
+export const ApiKeyApi = {
+ // 查询AI API 密钥分页
+ getApiKeyPage: async (params: any) => {
+ return await request.get({ url: `/ai/api-key/page`, params })
+ },
+
+ // 查询AI API 密钥详情
+ getApiKey: async (id: number) => {
+ return await request.get({ url: `/ai/api-key/get?id=` + id })
+ },
+
+ // 新增AI API 密钥
+ createApiKey: async (data: ApiKeyVO) => {
+ return await request.post({ url: `/ai/api-key/create`, data })
+ },
+
+ // 修改AI API 密钥
+ updateApiKey: async (data: ApiKeyVO) => {
+ return await request.put({ url: `/ai/api-key/update`, data })
+ },
+
+ // 删除AI API 密钥
+ deleteApiKey: async (id: number) => {
+ return await request.delete({ url: `/ai/api-key/delete?id=` + id })
+ }
+}
diff --git a/src/permission.ts b/src/permission.ts
index d538303b..b04bc3c1 100644
--- a/src/permission.ts
+++ b/src/permission.ts
@@ -83,7 +83,7 @@ router.beforeEach(async (to, from, next) => {
const redirectPath = from.query.redirect || to.path
// 修复跳转时不带参数的问题
const redirect = decodeURIComponent(redirectPath as string)
- const { basePath, paramsObject: query } = parseURL(redirect)
+ const { paramsObject: query } = parseURL(redirect)
const nextData = to.path === redirect ? { ...to, replace: true } : { path: redirect, query }
next(nextData)
} else {
diff --git a/src/utils/dict.ts b/src/utils/dict.ts
index 631a40b0..ab6e2923 100644
--- a/src/utils/dict.ts
+++ b/src/utils/dict.ts
@@ -1,8 +1,8 @@
/**
* 数据字典工具类
*/
-import {useDictStoreWithOut} from '@/store/modules/dict'
-import {ElementPlusInfoType} from '@/types/elementPlus'
+import { useDictStoreWithOut } from '@/store/modules/dict'
+import { ElementPlusInfoType } from '@/types/elementPlus'
const dictStore = useDictStoreWithOut()
@@ -209,5 +209,8 @@ export enum DICT_TYPE {
// ========== ERP - 企业资源计划模块 ==========
ERP_AUDIT_STATUS = 'erp_audit_status', // ERP 审批状态
- ERP_STOCK_RECORD_BIZ_TYPE = 'erp_stock_record_biz_type' // 库存明细的业务类型
+ ERP_STOCK_RECORD_BIZ_TYPE = 'erp_stock_record_biz_type', // 库存明细的业务类型
+
+ // ========== AI - 人工智能模块 ==========
+ AI_PLATFORM = 'ai_platform' // AI 平台
}
diff --git a/src/views/ai/model/apiKey/ApiKeyForm.vue b/src/views/ai/model/apiKey/ApiKeyForm.vue
new file mode 100644
index 00000000..2f9ba580
--- /dev/null
+++ b/src/views/ai/model/apiKey/ApiKeyForm.vue
@@ -0,0 +1,132 @@
+
+
+
+
diff --git a/src/views/ai/model/apiKey/index.vue b/src/views/ai/model/apiKey/index.vue
new file mode 100644
index 00000000..fcafc463
--- /dev/null
+++ b/src/views/ai/model/apiKey/index.vue
@@ -0,0 +1,181 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+ 新增
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+