From e680e2927451fff88f5cdfeb20dcd1e361be2661 Mon Sep 17 00:00:00 2001 From: Leo_Ding <2405260743@qq.com> Date: Thu, 4 Dec 2025 15:06:08 +0800 Subject: [PATCH] =?UTF-8?q?=E9=95=9C=E5=83=8F=E6=8E=A5=E5=8F=A3=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.dev | 2 +- src/apis/index.ts | 10 + src/apis/modules/imgs.ts | 4 + src/apis/{ => modules}/login.ts | 0 src/views/admin/account/security/index.vue | 2 +- src/views/admin/home/index.vue | 22 +- src/views/admin/image/editDialog.vue | 79 ++++++ src/views/admin/image/index.vue | 314 +++++++++------------ src/views/admin/index.vue | 4 +- src/views/document/index.vue | 3 +- src/views/layout/index.vue | 3 +- src/views/login/component/account.vue | 2 +- tsconfig.json | 2 +- 13 files changed, 244 insertions(+), 203 deletions(-) create mode 100644 src/apis/index.ts create mode 100644 src/apis/modules/imgs.ts rename src/apis/{ => modules}/login.ts (100%) create mode 100644 src/views/admin/image/editDialog.vue diff --git a/.env.dev b/.env.dev index f057532..e1c6fd4 100644 --- a/.env.dev +++ b/.env.dev @@ -2,5 +2,5 @@ NODE_ENV=development # api -VITE_API_BASIC="http://10.10.1.27:8888" +VITE_API_BASIC="http://10.10.1.29:8888" diff --git a/src/apis/index.ts b/src/apis/index.ts new file mode 100644 index 0000000..772a185 --- /dev/null +++ b/src/apis/index.ts @@ -0,0 +1,10 @@ +const modules:any = import.meta.glob('./modules/*.ts', { eager: true }) + +const api:any = {} + +Object.keys(modules).forEach((key) => { + const name = key.slice(key.lastIndexOf('/') + 1, key.lastIndexOf('.')) + api[name] = { ...modules[key] } +}) + +export default api \ No newline at end of file diff --git a/src/apis/modules/imgs.ts b/src/apis/modules/imgs.ts new file mode 100644 index 0000000..95f9611 --- /dev/null +++ b/src/apis/modules/imgs.ts @@ -0,0 +1,4 @@ +import request from '@/utils/index' + +// 获取镜像列表 +export const fetchImageList = (params:any) => request.get('/v1/image/list', { params }) \ No newline at end of file diff --git a/src/apis/login.ts b/src/apis/modules/login.ts similarity index 100% rename from src/apis/login.ts rename to src/apis/modules/login.ts diff --git a/src/views/admin/account/security/index.vue b/src/views/admin/account/security/index.vue index d6415f7..065b27b 100644 --- a/src/views/admin/account/security/index.vue +++ b/src/views/admin/account/security/index.vue @@ -113,7 +113,7 @@ import { import { Modal, message } from 'ant-design-vue'; // 在 \ No newline at end of file diff --git a/src/views/admin/image/index.vue b/src/views/admin/image/index.vue index d83219f..ebd23ba 100644 --- a/src/views/admin/image/index.vue +++ b/src/views/admin/image/index.vue @@ -1,163 +1,3 @@ - + - - - diff --git a/src/views/admin/index.vue b/src/views/admin/index.vue index 2828526..ffe157a 100644 --- a/src/views/admin/index.vue +++ b/src/views/admin/index.vue @@ -77,7 +77,7 @@ const menuItems: MenuItem[] = [ const state = reactive({ mode: 'inline' as MenuMode, theme: 'light' as MenuTheme, - selectedKeys: ['/controlPanel/overview'], // 初始选中第一个 + selectedKeys: ['/layout/admin/home'], // 初始选中第一个 openKeys: ['/controlPanel/fee', '/controlPanel/account'], // 默认展开有子菜单的项 }); @@ -129,7 +129,7 @@ const changeTheme = (checked: boolean) => {