chore: 项目环境升级为 JDK25,Spring 4.1,项目重构为多模块

This commit is contained in:
2026-09-08 15:02:18 +08:00
parent d392436620
commit 81a0d81f11
168 changed files with 2785 additions and 1375 deletions

View File

@@ -0,0 +1,14 @@
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="color-scheme" content="light" />
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
<title>智造申报 Agent</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>

View File

@@ -0,0 +1,21 @@
{
"name": "@manuagent/web",
"private": true,
"version": "0.1.0",
"type": "module",
"scripts": {
"typecheck": "vue-tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.node.json",
"dev": "vite --host 127.0.0.1",
"build": "vite build"
},
"dependencies": {
"vue": "3.5.41",
"vue-router": "^4.6.3",
"element-plus": "2.14.5",
"@element-plus/icons-vue": "^2.3.2",
"markstream-vue": "2.0.6",
"@manuagent/common": "0.1.0",
"@manuagent/admin": "0.1.0",
"@manuagent/agent": "0.1.0"
}
}

View File

@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<rect width="32" height="32" rx="6" fill="#1769e8"/>
<path d="M7 9h7l2 2h9v12H7z" fill="none" stroke="#fff" stroke-width="2" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 223 B

View File

@@ -0,0 +1,35 @@
<script setup lang="ts">
import { computed, ref } from 'vue'
import { useRoute } from 'vue-router'
import { Box, Folder, MagicStick } from '@element-plus/icons-vue'
import { ProjectSidebar } from '@manuagent/agent'
const route = useRoute()
const sidebar = ref<InstanceType<typeof ProjectSidebar> | null>(null)
const isLogin = computed(() => route.path === '/login')
const projectRoute = computed(() => route.path.startsWith('/projects'))
</script>
<template>
<RouterView v-if="isLogin" />
<div v-else class="app-shell">
<nav class="rail" aria-label="主导航">
<div class="brand"><Folder /></div>
<RouterLink to="/projects" :class="{ active: projectRoute }" aria-label="项目">
<Folder /><span>项目</span>
</RouterLink>
<RouterLink to="/models" :class="{ active: route.path === '/models' }" aria-label="模型">
<Box /><span>模型</span>
</RouterLink>
<RouterLink to="/skills" :class="{ active: route.path === '/skills' }" aria-label="Skills">
<MagicStick /><span>Skills</span>
</RouterLink>
</nav>
<ProjectSidebar v-if="projectRoute" ref="sidebar" />
<main class="main-view"><RouterView @projects-changed="sidebar?.loadProjects()" /></main>
</div>
</template>

View File

@@ -0,0 +1,34 @@
import { createApp } from 'vue'
import {
ElButton,
ElDialog,
ElForm,
ElFormItem,
ElIcon,
ElInput,
ElInputNumber,
ElOption,
ElRadioButton,
ElRadioGroup,
ElSelect,
ElSwitch,
ElTabPane,
ElTabs,
ElUpload
} from 'element-plus'
import 'element-plus/dist/index.css'
import 'markstream-vue/index.css'
import '@manuagent/common/styles.css'
import { setUnauthorizedHandler } from '@manuagent/common'
import App from './App.vue'
import { router } from './router'
setUnauthorizedHandler(() => location.assign('/login'))
const app = createApp(App)
for (const component of [
ElButton, ElDialog, ElForm, ElFormItem, ElIcon, ElInput,
ElInputNumber, ElOption, ElRadioButton, ElRadioGroup, ElSelect,
ElSwitch, ElTabPane, ElTabs, ElUpload
]) app.component(component.name!, component)
app.use(router)
void router.isReady().then(() => app.mount('#app'))

View File

@@ -0,0 +1,11 @@
import { createRouter, createWebHistory } from 'vue-router'
import { agentRoutes } from '@manuagent/agent'
export const router = createRouter({
history: createWebHistory(),
routes: [
{ path: '/login', component: () => import('@manuagent/admin').then(module => module.LoginPage), props: { destination: '/projects' }, meta: { public: true } },
{ path: '/', redirect: '/projects' },
...agentRoutes
]
})

View File

@@ -0,0 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"include": [
"src/**/*.ts",
"src/**/*.vue"
]
}

View File

@@ -0,0 +1,11 @@
{
"compilerOptions": {
"composite": true,
"noEmit": true,
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "Bundler",
"allowImportingTsExtensions": true
},
"include": ["vite.config.ts"]
}

View File

@@ -0,0 +1,22 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
export default defineConfig({
plugins: [vue()],
resolve: { dedupe: ['vue', 'vue-router'] },
server: {
port: 15173,
proxy: {
'/api': 'http://127.0.0.1:8080'
}
},
build: {
target: 'es2022',
sourcemap: true,
rollupOptions: {
output: {
manualChunks: { vue: ['vue', 'vue-router'] }
}
}
}
})