From 39246c9483ecf3a2d6f530d9da910c06e7e2efe4 Mon Sep 17 00:00:00 2001 From: ouhaolan Date: Fri, 6 Mar 2026 15:45:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A0=87=E5=87=86=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 2 +- index.html | 4 +- src/api/ydoyun/tagconfig/index.ts | 92 + src/layout/components/Logo/src/Logo.vue | 18 +- src/locales/zh-CN.ts | 2 +- src/router/index.ts | 5 +- src/views/Login/Login.vue | 452 ++++- src/views/Login/components/LoginForm.vue | 369 ++-- src/views/ydoyun/tagconfig/TagForm.vue | 192 ++ src/views/ydoyun/tagconfig/index.vue | 2229 ++++++++++++++++++++++ 10 files changed, 3108 insertions(+), 257 deletions(-) create mode 100644 src/api/ydoyun/tagconfig/index.ts create mode 100644 src/views/ydoyun/tagconfig/TagForm.vue create mode 100644 src/views/ydoyun/tagconfig/index.vue diff --git a/.env b/.env index c6890d4..522e241 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ # 标题 -VITE_APP_TITLE=衣朵云管理系统 +VITE_APP_TITLE=Ai 决策通 # 项目本地运行端口号 VITE_PORT=80 diff --git a/index.html b/index.html index f7ad996..fdc37ca 100644 --- a/index.html +++ b/index.html @@ -7,11 +7,11 @@ %VITE_APP_TITLE% diff --git a/src/api/ydoyun/tagconfig/index.ts b/src/api/ydoyun/tagconfig/index.ts new file mode 100644 index 0000000..1e78719 --- /dev/null +++ b/src/api/ydoyun/tagconfig/index.ts @@ -0,0 +1,92 @@ +import request from '@/config/axios' + +/** 标签同步配置 */ +export interface TagConfig { + id?: number + databaseId?: number + cronExpression?: string + /** 是否开启自动同步 */ + autoSync?: boolean + lastSyncTime?: string + nextSyncTime?: string + /** 剔除大类(多选,逗号分隔) */ + productCategoryIds?: string + /** 剔除仓库(多选,逗号分隔) */ + syncWarehouseIds?: string +} + +/** 标准标签 */ +export interface Tag { + id?: number + name?: string + type?: string + expression?: string + color?: string + sqlScript?: string + /** 已拼接参数的SQL(执行时直接使用,不展示) */ + sqlScriptResolved?: string + useParams?: boolean + params?: string + /** 参数值 JSON,如 {"参数1":"28","参数2":"90"} */ + paramValues?: string +} + +/** 标签同步历史 */ +export interface TagSyncHistory { + id?: number + tagConfigId?: number + syncType?: string + syncTime?: string + syncStatus?: string + recordCount?: number + errorMessage?: string +} + +/** 统一保存请求(配置+标签) */ +export interface TagConfigSaveAllReq { + config?: TagConfig | null + tags?: Tag[] +} + +export const TagConfigApi = { + getTagConfigPage: (params: any) => + request.get({ url: '/ydoyun/tag-config/page', params }), + getTagConfig: (id: number) => + request.get({ url: '/ydoyun/tag-config/get?id=' + id }), + getTagConfigByDatabaseId: (databaseId: number) => + request.get({ url: '/ydoyun/tag-config/get-by-database?databaseId=' + databaseId }), + getTagConfigByTenant: () => + request.get({ url: '/ydoyun/tag-config/get-by-tenant' }), + saveAll: (data: TagConfigSaveAllReq) => + request.post({ url: '/ydoyun/tag-config/save', data }), + createTagConfig: (data: TagConfig) => + request.post({ url: '/ydoyun/tag-config/create', data }), + updateTagConfig: (data: TagConfig) => + request.put({ url: '/ydoyun/tag-config/update', data }), + deleteTagConfig: (id: number) => + request.delete({ url: '/ydoyun/tag-config/delete?id=' + id }), + manualSync: (tagConfigId: number) => + request.post({ url: '/ydoyun/tag-config/manual-sync?tagConfigId=' + tagConfigId }), +} + +export const TagApi = { + getTagPage: (params: any) => + request.get({ url: '/ydoyun/tag/page', params }), + getTag: (id: number) => + request.get({ url: '/ydoyun/tag/get?id=' + id }), + getTagListByType: (type?: string) => + request.get({ url: '/ydoyun/tag/list-by-type', params: { type } }), + createTag: (data: Tag) => + request.post({ url: '/ydoyun/tag/create', data }), + updateTag: (data: Tag) => + request.put({ url: '/ydoyun/tag/update', data }), + deleteTag: (id: number) => + request.delete({ url: '/ydoyun/tag/delete?id=' + id }), +} + +export const TagSyncHistoryApi = { + getTagSyncHistoryPage: (params: any) => + request.get({ url: '/ydoyun/tag-sync-history/page', params }), + getTagSyncHistory: (id: number) => + request.get({ url: '/ydoyun/tag-sync-history/get?id=' + id }), +} diff --git a/src/layout/components/Logo/src/Logo.vue b/src/layout/components/Logo/src/Logo.vue index d241130..4dcfa5d 100644 --- a/src/layout/components/Logo/src/Logo.vue +++ b/src/layout/components/Logo/src/Logo.vue @@ -66,10 +66,13 @@ watch( ]" to="/" > - + + + +
-
-
- -
- - {{ underlineToHump(appStore.getTitle) }} +