🎨 移除多余模块

This commit is contained in:
2026-04-08 12:19:24 +08:00
parent 22bb5fdc94
commit 7599146f24
192 changed files with 623 additions and 13983 deletions

View File

@@ -1,8 +1,8 @@
package example
package common
import (
"context"
"github.com/flipped-aurora/gin-vue-admin/server/model/example"
commonModel "github.com/flipped-aurora/gin-vue-admin/server/model/common"
"github.com/flipped-aurora/gin-vue-admin/server/service/system"
"github.com/pkg/errors"
"gorm.io/gorm"
@@ -22,7 +22,7 @@ func (i *initExaFileMysql) MigrateTable(ctx context.Context) (context.Context, e
if !ok {
return ctx, system.ErrMissingDBContext
}
return ctx, db.AutoMigrate(&example.ExaFileUploadAndDownload{})
return ctx, db.AutoMigrate(&commonModel.ExaFileUploadAndDownload{})
}
func (i *initExaFileMysql) TableCreated(ctx context.Context) bool {
@@ -30,11 +30,11 @@ func (i *initExaFileMysql) TableCreated(ctx context.Context) bool {
if !ok {
return false
}
return db.Migrator().HasTable(&example.ExaFileUploadAndDownload{})
return db.Migrator().HasTable(&commonModel.ExaFileUploadAndDownload{})
}
func (i *initExaFileMysql) InitializerName() string {
return example.ExaFileUploadAndDownload{}.TableName()
return commonModel.ExaFileUploadAndDownload{}.TableName()
}
func (i *initExaFileMysql) InitializeData(ctx context.Context) (context.Context, error) {
@@ -42,12 +42,12 @@ func (i *initExaFileMysql) InitializeData(ctx context.Context) (context.Context,
if !ok {
return ctx, system.ErrMissingDBContext
}
entities := []example.ExaFileUploadAndDownload{
entities := []commonModel.ExaFileUploadAndDownload{
{Name: "10.png", Url: "https://qmplusimg.henrongyi.top/gvalogo.png", Tag: "png", Key: "158787308910.png"},
{Name: "logo.png", Url: "https://qmplusimg.henrongyi.top/1576554439myAvatar.png", Tag: "png", Key: "1587973709logo.png"},
}
if err := db.Create(&entities).Error; err != nil {
return ctx, errors.Wrap(err, example.ExaFileUploadAndDownload{}.TableName()+"表数据初始化失败!")
return ctx, errors.Wrap(err, commonModel.ExaFileUploadAndDownload{}.TableName()+"表数据初始化失败!")
}
return ctx, nil
}
@@ -57,7 +57,7 @@ func (i *initExaFileMysql) DataInserted(ctx context.Context) bool {
if !ok {
return false
}
lookup := example.ExaFileUploadAndDownload{Name: "logo.png", Key: "1587973709logo.png"}
lookup := commonModel.ExaFileUploadAndDownload{Name: "logo.png", Key: "1587973709logo.png"}
if errors.Is(db.First(&lookup, &lookup).Error, gorm.ErrRecordNotFound) {
return false
}

View File

@@ -116,60 +116,12 @@ func (i *initApi) InitializeData(ctx context.Context) (context.Context, error) {
{ApiGroup: "系统服务", Method: "POST", Path: "/system/getSystemConfig", Description: "获取配置文件内容"},
{ApiGroup: "系统服务", Method: "POST", Path: "/system/setSystemConfig", Description: "设置配置文件内容"},
{ApiGroup: "skills", Method: "GET", Path: "/skills/getTools", Description: "获取技能工具列表"},
{ApiGroup: "skills", Method: "POST", Path: "/skills/getSkillList", Description: "获取技能列表"},
{ApiGroup: "skills", Method: "POST", Path: "/skills/getSkillDetail", Description: "获取技能详情"},
{ApiGroup: "skills", Method: "POST", Path: "/skills/saveSkill", Description: "保存技能定义"},
{ApiGroup: "skills", Method: "POST", Path: "/skills/deleteSkill", Description: "删除技能"},
{ApiGroup: "skills", Method: "POST", Path: "/skills/createScript", Description: "创建技能脚本"},
{ApiGroup: "skills", Method: "POST", Path: "/skills/getScript", Description: "读取技能脚本"},
{ApiGroup: "skills", Method: "POST", Path: "/skills/saveScript", Description: "保存技能脚本"},
{ApiGroup: "skills", Method: "POST", Path: "/skills/createResource", Description: "创建技能资源"},
{ApiGroup: "skills", Method: "POST", Path: "/skills/getResource", Description: "读取技能资源"},
{ApiGroup: "skills", Method: "POST", Path: "/skills/saveResource", Description: "保存技能资源"},
{ApiGroup: "skills", Method: "POST", Path: "/skills/createReference", Description: "创建技能参考"},
{ApiGroup: "skills", Method: "POST", Path: "/skills/getReference", Description: "读取技能参考"},
{ApiGroup: "skills", Method: "POST", Path: "/skills/saveReference", Description: "保存技能参考"},
{ApiGroup: "skills", Method: "POST", Path: "/skills/createTemplate", Description: "创建技能模板"},
{ApiGroup: "skills", Method: "POST", Path: "/skills/getTemplate", Description: "读取技能模板"},
{ApiGroup: "skills", Method: "POST", Path: "/skills/saveTemplate", Description: "保存技能模板"},
{ApiGroup: "skills", Method: "POST", Path: "/skills/getGlobalConstraint", Description: "读取全局约束"},
{ApiGroup: "skills", Method: "POST", Path: "/skills/saveGlobalConstraint", Description: "保存全局约束"},
{ApiGroup: "skills", Method: "POST", Path: "/skills/packageSkill", Description: "打包技能"},
{ApiGroup: "客户", Method: "PUT", Path: "/customer/customer", Description: "更新客户"},
{ApiGroup: "客户", Method: "POST", Path: "/customer/customer", Description: "创建客户"},
{ApiGroup: "客户", Method: "DELETE", Path: "/customer/customer", Description: "删除客户"},
{ApiGroup: "客户", Method: "GET", Path: "/customer/customer", Description: "获取单一客户"},
{ApiGroup: "客户", Method: "GET", Path: "/customer/customerList", Description: "获取客户列表"},
{ApiGroup: "代码生成器", Method: "GET", Path: "/autoCode/getDB", Description: "获取所有数据库"},
{ApiGroup: "代码生成器", Method: "GET", Path: "/autoCode/getTables", Description: "获取数据库表"},
{ApiGroup: "代码生成器", Method: "POST", Path: "/autoCode/createTemp", Description: "自动化代码"},
{ApiGroup: "代码生成器", Method: "POST", Path: "/autoCode/preview", Description: "预览自动化代码"},
{ApiGroup: "代码生成器", Method: "GET", Path: "/autoCode/getColumn", Description: "获取所选table的所有字段"},
{ApiGroup: "代码生成器", Method: "POST", Path: "/autoCode/mcp", Description: "自动生成 MCP Tool 模板"},
{ApiGroup: "代码生成器", Method: "POST", Path: "/autoCode/mcpStatus", Description: "获取 MCP 独立服务状态"},
{ApiGroup: "代码生成器", Method: "POST", Path: "/autoCode/mcpStart", Description: "启动 MCP 独立服务"},
{ApiGroup: "代码生成器", Method: "POST", Path: "/autoCode/mcpStop", Description: "停用 MCP 独立服务"},
{ApiGroup: "代码生成器", Method: "POST", Path: "/autoCode/mcpTest", Description: "MCP Tool 管理"},
{ApiGroup: "代码生成器", Method: "POST", Path: "/autoCode/mcpList", Description: "获取 MCP ToolList"},
{ApiGroup: "代码生成器", Method: "POST", Path: "/autoCode/saveAIWorkflowSession", Description: "保存AI需求工作流会话"},
{ApiGroup: "代码生成器", Method: "POST", Path: "/autoCode/getAIWorkflowSessionList", Description: "获取AI需求工作流会话列表"},
{ApiGroup: "代码生成器", Method: "POST", Path: "/autoCode/getAIWorkflowSessionDetail", Description: "获取AI需求工作流会话详情"},
{ApiGroup: "代码生成器", Method: "POST", Path: "/autoCode/deleteAIWorkflowSession", Description: "删除AI需求工作流会话"},
{ApiGroup: "代码生成器", Method: "POST", Path: "/autoCode/dumpAIWorkflowMarkdown", Description: "AI需求工作流Markdown落盘"},
{ApiGroup: "模板配置", Method: "POST", Path: "/autoCode/createPackage", Description: "配置模板"},
{ApiGroup: "模板配置", Method: "GET", Path: "/autoCode/getTemplates", Description: "获取模板文件"},
{ApiGroup: "模板配置", Method: "POST", Path: "/autoCode/getPackage", Description: "获取所有模板"},
{ApiGroup: "模板配置", Method: "POST", Path: "/autoCode/delPackage", Description: "删除模板"},
{ApiGroup: "代码生成器历史", Method: "POST", Path: "/autoCode/getMeta", Description: "获取meta信息"},
{ApiGroup: "代码生成器历史", Method: "POST", Path: "/autoCode/rollback", Description: "回滚自动生成代码"},
{ApiGroup: "代码生成器历史", Method: "POST", Path: "/autoCode/getSysHistory", Description: "查询回滚记录"},
{ApiGroup: "代码生成器历史", Method: "POST", Path: "/autoCode/delSysHistory", Description: "删除回滚记录"},
{ApiGroup: "代码生成器历史", Method: "POST", Path: "/autoCode/addFunc", Description: "增加模板方法"},
{ApiGroup: "MCP管理", Method: "GET", Path: "/mcp/status", Description: "获取 MCP 独立服务状态"},
{ApiGroup: "MCP管理", Method: "POST", Path: "/mcp/start", Description: "启动 MCP 独立服务"},
{ApiGroup: "MCP管理", Method: "POST", Path: "/mcp/stop", Description: "停用 MCP 独立服务"},
{ApiGroup: "MCP管理", Method: "GET", Path: "/mcp/tools", Description: "获取 MCP 工具列表"},
{ApiGroup: "MCP管理", Method: "POST", Path: "/mcp/test", Description: "调试 MCP 工具"},
{ApiGroup: "MCP管理", Method: "POST", Path: "/mcp/createTool", Description: "生成 MCP Tool 模板"},
{ApiGroup: "系统字典详情", Method: "PUT", Path: "/sysDictionaryDetail/updateSysDictionaryDetail", Description: "更新字典内容"},
{ApiGroup: "系统字典详情", Method: "POST", Path: "/sysDictionaryDetail/createSysDictionaryDetail", Description: "新增字典内容"},

View File

@@ -48,8 +48,6 @@ func (i *initApiIgnore) InitializeData(ctx context.Context) (context.Context, er
{Method: "GET", Path: "/uploads/file/*filepath"},
{Method: "GET", Path: "/health"},
{Method: "HEAD", Path: "/uploads/file/*filepath"},
{Method: "POST", Path: "/autoCode/llmAuto"},
{Method: "POST", Path: "/autoCode/llmAutoSSE"},
{Method: "POST", Path: "/system/reloadSystem"},
{Method: "POST", Path: "/base/login"},
{Method: "POST", Path: "/base/captcha"},

View File

@@ -118,58 +118,12 @@ func (i *initCasbin) InitializeData(ctx context.Context) (context.Context, error
{Ptype: "p", V0: "888", V1: "/system/setSystemConfig", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/system/getServerInfo", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/skills/getTools", V2: "GET"},
{Ptype: "p", V0: "888", V1: "/skills/getSkillList", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/skills/getSkillDetail", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/skills/saveSkill", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/skills/deleteSkill", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/skills/createScript", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/skills/getScript", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/skills/saveScript", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/skills/createResource", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/skills/getResource", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/skills/saveResource", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/skills/createReference", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/skills/getReference", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/skills/saveReference", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/skills/createTemplate", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/skills/getTemplate", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/skills/saveTemplate", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/skills/getGlobalConstraint", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/skills/saveGlobalConstraint", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/skills/packageSkill", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/customer/customer", V2: "GET"},
{Ptype: "p", V0: "888", V1: "/customer/customer", V2: "PUT"},
{Ptype: "p", V0: "888", V1: "/customer/customer", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/customer/customer", V2: "DELETE"},
{Ptype: "p", V0: "888", V1: "/customer/customerList", V2: "GET"},
{Ptype: "p", V0: "888", V1: "/autoCode/getDB", V2: "GET"},
{Ptype: "p", V0: "888", V1: "/autoCode/getMeta", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/autoCode/preview", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/autoCode/getTables", V2: "GET"},
{Ptype: "p", V0: "888", V1: "/autoCode/getColumn", V2: "GET"},
{Ptype: "p", V0: "888", V1: "/autoCode/rollback", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/autoCode/createTemp", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/autoCode/delSysHistory", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/autoCode/getSysHistory", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/autoCode/createPackage", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/autoCode/getTemplates", V2: "GET"},
{Ptype: "p", V0: "888", V1: "/autoCode/getPackage", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/autoCode/delPackage", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/autoCode/addFunc", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/autoCode/mcp", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/autoCode/mcpStatus", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/autoCode/mcpStart", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/autoCode/mcpStop", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/autoCode/mcpTest", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/autoCode/mcpList", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/autoCode/saveAIWorkflowSession", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/autoCode/getAIWorkflowSessionList", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/autoCode/getAIWorkflowSessionDetail", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/autoCode/deleteAIWorkflowSession", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/autoCode/dumpAIWorkflowMarkdown", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/mcp/status", V2: "GET"},
{Ptype: "p", V0: "888", V1: "/mcp/start", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/mcp/stop", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/mcp/tools", V2: "GET"},
{Ptype: "p", V0: "888", V1: "/mcp/test", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/mcp/createTool", V2: "POST"},
{Ptype: "p", V0: "888", V1: "/sysDictionaryDetail/findSysDictionaryDetail", V2: "GET"},
{Ptype: "p", V0: "888", V1: "/sysDictionaryDetail/updateSysDictionaryDetail", V2: "PUT"},
@@ -280,11 +234,6 @@ func (i *initCasbin) InitializeData(ctx context.Context) (context.Context, error
{Ptype: "p", V0: "8881", V1: "/jwt/jsonInBlacklist", V2: "POST"},
{Ptype: "p", V0: "8881", V1: "/system/getSystemConfig", V2: "POST"},
{Ptype: "p", V0: "8881", V1: "/system/setSystemConfig", V2: "POST"},
{Ptype: "p", V0: "8881", V1: "/customer/customer", V2: "POST"},
{Ptype: "p", V0: "8881", V1: "/customer/customer", V2: "PUT"},
{Ptype: "p", V0: "8881", V1: "/customer/customer", V2: "DELETE"},
{Ptype: "p", V0: "8881", V1: "/customer/customer", V2: "GET"},
{Ptype: "p", V0: "8881", V1: "/customer/customerList", V2: "GET"},
{Ptype: "p", V0: "8881", V1: "/user/getUserInfo", V2: "GET"},
{Ptype: "p", V0: "9528", V1: "/user/admin_register", V2: "POST"},
@@ -324,20 +273,12 @@ func (i *initCasbin) InitializeData(ctx context.Context) (context.Context, error
{Ptype: "p", V0: "9528", V1: "/jwt/jsonInBlacklist", V2: "POST"},
{Ptype: "p", V0: "9528", V1: "/system/getSystemConfig", V2: "POST"},
{Ptype: "p", V0: "9528", V1: "/system/setSystemConfig", V2: "POST"},
{Ptype: "p", V0: "9528", V1: "/customer/customer", V2: "PUT"},
{Ptype: "p", V0: "9528", V1: "/customer/customer", V2: "GET"},
{Ptype: "p", V0: "9528", V1: "/customer/customer", V2: "POST"},
{Ptype: "p", V0: "9528", V1: "/customer/customer", V2: "DELETE"},
{Ptype: "p", V0: "9528", V1: "/customer/customerList", V2: "GET"},
{Ptype: "p", V0: "9528", V1: "/autoCode/createTemp", V2: "POST"},
{Ptype: "p", V0: "9528", V1: "/autoCode/mcpStatus", V2: "POST"},
{Ptype: "p", V0: "9528", V1: "/autoCode/mcpStart", V2: "POST"},
{Ptype: "p", V0: "9528", V1: "/autoCode/mcpStop", V2: "POST"},
{Ptype: "p", V0: "9528", V1: "/autoCode/saveAIWorkflowSession", V2: "POST"},
{Ptype: "p", V0: "9528", V1: "/autoCode/getAIWorkflowSessionList", V2: "POST"},
{Ptype: "p", V0: "9528", V1: "/autoCode/getAIWorkflowSessionDetail", V2: "POST"},
{Ptype: "p", V0: "9528", V1: "/autoCode/deleteAIWorkflowSession", V2: "POST"},
{Ptype: "p", V0: "9528", V1: "/autoCode/dumpAIWorkflowMarkdown", V2: "POST"},
{Ptype: "p", V0: "9528", V1: "/mcp/status", V2: "GET"},
{Ptype: "p", V0: "9528", V1: "/mcp/start", V2: "POST"},
{Ptype: "p", V0: "9528", V1: "/mcp/stop", V2: "POST"},
{Ptype: "p", V0: "9528", V1: "/mcp/tools", V2: "GET"},
{Ptype: "p", V0: "9528", V1: "/mcp/test", V2: "POST"},
{Ptype: "p", V0: "9528", V1: "/mcp/createTool", V2: "POST"},
{Ptype: "p", V0: "9528", V1: "/user/getUserInfo", V2: "GET"},
}
if err := db.Create(&entities).Error; err != nil {

View File

@@ -58,7 +58,6 @@ func (i *initMenu) InitializeData(ctx context.Context) (next context.Context, er
{MenuLevel: 0, Hidden: false, ParentId: 0, Path: "admin", Name: "superAdmin", Component: "view/superAdmin/index.vue", Sort: 3, Meta: Meta{Title: "超级管理员", Icon: "user"}},
{MenuLevel: 0, Hidden: true, ParentId: 0, Path: "person", Name: "person", Component: "view/person/person.vue", Sort: 4, Meta: Meta{Title: "个人信息", Icon: "message"}},
{MenuLevel: 0, Hidden: false, ParentId: 0, Path: "common", Name: "common", Component: "view/routerHolder.vue", Sort: 6, Meta: Meta{Title: "公共能力", Icon: "folder-opened"}},
{MenuLevel: 0, Hidden: false, ParentId: 0, Path: "example", Name: "example", Component: "view/example/index.vue", Sort: 7, Meta: Meta{Title: "示例文件", Icon: "management"}},
{MenuLevel: 0, Hidden: false, ParentId: 0, Path: "systemTools", Name: "systemTools", Component: "view/systemTools/index.vue", Sort: 5, Meta: Meta{Title: "编程辅助", Icon: "tools"}},
{MenuLevel: 0, Hidden: false, ParentId: 0, Path: "https://www.gin-vue-admin.com", Name: "https://www.gin-vue-admin.com", Component: "/", Sort: 0, Meta: Meta{Title: "官方网站", Icon: "customer-gva"}},
{MenuLevel: 0, Hidden: false, ParentId: 0, Path: "state", Name: "state", Component: "view/system/state.vue", Sort: 8, Meta: Meta{Title: "服务器状态", Icon: "cloudy"}},
@@ -93,23 +92,13 @@ func (i *initMenu) InitializeData(ctx context.Context) (next context.Context, er
// common子菜单
{MenuLevel: 1, Hidden: false, ParentId: menuNameMap["common"], Path: "upload", Name: "upload", Component: "view/example/upload/upload.vue", Sort: 1, Meta: Meta{Title: "媒体库(上传下载)", Icon: "upload"}},
// example子菜单
{MenuLevel: 1, Hidden: false, ParentId: menuNameMap["example"], Path: "breakpoint", Name: "breakpoint", Component: "view/example/breakpoint/breakpoint.vue", Sort: 6, Meta: Meta{Title: "断点续传", Icon: "upload-filled"}},
{MenuLevel: 1, Hidden: false, ParentId: menuNameMap["example"], Path: "customer", Name: "customer", Component: "view/example/customer/customer.vue", Sort: 7, Meta: Meta{Title: "客户列表(资源示例)", Icon: "avatar"}},
{MenuLevel: 1, Hidden: false, ParentId: menuNameMap["common"], Path: "breakpoint", Name: "breakpoint", Component: "view/example/breakpoint/breakpoint.vue", Sort: 2, Meta: Meta{Title: "断点续传", Icon: "upload-filled"}},
// systemTools子菜单
{MenuLevel: 1, Hidden: false, ParentId: menuNameMap["systemTools"], Path: "autoPkg", Name: "autoPkg", Component: "view/systemTools/autoPkg/autoPkg.vue", Sort: 0, Meta: Meta{Title: "模板配置", Icon: "folder"}},
{MenuLevel: 1, Hidden: false, ParentId: menuNameMap["systemTools"], Path: "autoCode", Name: "autoCode", Component: "view/systemTools/autoCode/index.vue", Sort: 1, Meta: Meta{Title: "代码生成器", Icon: "cpu", KeepAlive: true}},
{MenuLevel: 1, Hidden: false, ParentId: menuNameMap["systemTools"], Path: "autoCodeAdmin", Name: "autoCodeAdmin", Component: "view/systemTools/autoCodeAdmin/index.vue", Sort: 2, Meta: Meta{Title: "自动化代码管理", Icon: "magic-stick"}},
{MenuLevel: 1, Hidden: false, ParentId: menuNameMap["systemTools"], Path: "formCreate", Name: "formCreate", Component: "view/systemTools/formCreate/index.vue", Sort: 3, Meta: Meta{Title: "表单生成器", Icon: "magic-stick", KeepAlive: true}},
{MenuLevel: 1, Hidden: false, ParentId: menuNameMap["systemTools"], Path: "aiWorkflow", Name: "aiWorkflow", Component: "view/systemTools/aiWrokflow/index.vue", Sort: 4, Meta: Meta{Title: "AI需求工作流", Icon: "magic-stick", KeepAlive: true}},
{MenuLevel: 1, Hidden: true, ParentId: menuNameMap["systemTools"], Path: "autoCodeEdit/:id", Name: "autoCodeEdit", Component: "view/systemTools/autoCode/index.vue", Sort: 0, Meta: Meta{Title: "自动化代码-${id}", Icon: "magic-stick"}},
{MenuLevel: 1, Hidden: false, ParentId: menuNameMap["systemTools"], Path: "exportTemplate", Name: "exportTemplate", Component: "view/systemTools/exportTemplate/exportTemplate.vue", Sort: 5, Meta: Meta{Title: "导出模板", Icon: "reading"}},
{MenuLevel: 1, Hidden: false, ParentId: menuNameMap["systemTools"], Path: "mcpTest", Name: "mcpTest", Component: "view/systemTools/autoCode/mcpTest.vue", Sort: 6, Meta: Meta{Title: "Mcp Tools管理", Icon: "partly-cloudy"}},
{MenuLevel: 1, Hidden: false, ParentId: menuNameMap["systemTools"], Path: "mcpTool", Name: "mcpTool", Component: "view/systemTools/autoCode/mcp.vue", Sort: 7, Meta: Meta{Title: "Mcp Tools模板", Icon: "magnet"}},
{MenuLevel: 1, Hidden: false, ParentId: menuNameMap["systemTools"], Path: "skills", Name: "skills", Component: "view/systemTools/skills/index.vue", Sort: 8, Meta: Meta{Title: "Skills管理", Icon: "document"}},
{MenuLevel: 1, Hidden: false, ParentId: menuNameMap["systemTools"], Path: "picture", Name: "picture", Component: "view/systemTools/autoCode/picture.vue", Sort: 9, Meta: Meta{Title: "AI页面绘制", Icon: "picture-filled"}},
{MenuLevel: 1, Hidden: false, ParentId: menuNameMap["systemTools"], Path: "formCreate", Name: "formCreate", Component: "view/systemTools/formCreate/index.vue", Sort: 1, Meta: Meta{Title: "表单生成器", Icon: "magic-stick", KeepAlive: true}},
{MenuLevel: 1, Hidden: false, ParentId: menuNameMap["systemTools"], Path: "exportTemplate", Name: "exportTemplate", Component: "view/systemTools/exportTemplate/exportTemplate.vue", Sort: 2, Meta: Meta{Title: "导出模板", Icon: "reading"}},
{MenuLevel: 1, Hidden: false, ParentId: menuNameMap["systemTools"], Path: "mcpTest", Name: "mcpTest", Component: "view/systemTools/mcpTest/index.vue", Sort: 3, Meta: Meta{Title: "MCP Tools管理", Icon: "partly-cloudy"}},
{MenuLevel: 1, Hidden: false, ParentId: menuNameMap["systemTools"], Path: "mcpTool", Name: "mcpTool", Component: "view/systemTools/mcpTool/index.vue", Sort: 4, Meta: Meta{Title: "MCP Tools模板", Icon: "magnet"}},
}
// 创建子菜单
@@ -128,7 +117,7 @@ func (i *initMenu) DataInserted(ctx context.Context) bool {
if !ok {
return false
}
if errors.Is(db.Where("path = ?", "autoPkg").First(&SysBaseMenu{}).Error, gorm.ErrRecordNotFound) { // 判断是否存在数据
if errors.Is(db.Where("path = ?", "upload").First(&SysBaseMenu{}).Error, gorm.ErrRecordNotFound) { // 判断是否存在数据
return false
}
return true