From a700a399925e2acb7234ab2c96ce83d628c95f97 Mon Sep 17 00:00:00 2001 From: xiangheng <11675084@qq.com> Date: Mon, 17 Jun 2024 21:29:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=E7=94=9F?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/.vscode/settings.json | 1 + .../tpl_utils/templates/gocode/route.go.tpl | 4 +- .../templates/uniapp/details.vue.tpl | 8 +- .../tpl_utils/templates/uniapp/edit.vue.tpl | 38 ++- .../tpl_utils/templates/uniapp/index.vue.tpl | 27 ++- .../tpl_utils/templates/uniapp/pages.json.tpl | 6 +- server/admin/system/admin/service.go | 13 +- server/admin/system/role/perm_service.go | 2 +- server/admin/system/role/service.go | 4 +- x_admin_app/.hbuilderx/launch.json | 2 +- x_admin_app/components/x-picker/x-picker.vue | 45 ++-- x_admin_app/pages.json | 7 +- x_admin_app/pages/monitor_project/details.vue | 174 +++++++------- x_admin_app/pages/monitor_project/edit.vue | 220 ++++++++++-------- x_admin_app/pages/monitor_project/index.vue | 32 ++- x_admin_app/pages/monitor_project/search.vue | 4 +- x_admin_app/stores/user.ts | 6 +- x_admin_app/utils/perms.ts | 8 +- 18 files changed, 329 insertions(+), 272 deletions(-) diff --git a/server/.vscode/settings.json b/server/.vscode/settings.json index 05a5c9f..5de25b5 100644 --- a/server/.vscode/settings.json +++ b/server/.vscode/settings.json @@ -1,5 +1,6 @@ { "cSpell.words": [ + "dcloudio", "excelize", "fontsize", "freetype", diff --git a/server/admin/generator/tpl_utils/templates/gocode/route.go.tpl b/server/admin/generator/tpl_utils/templates/gocode/route.go.tpl index 86e0a9d..8b0b249 100644 --- a/server/admin/generator/tpl_utils/templates/gocode/route.go.tpl +++ b/server/admin/generator/tpl_utils/templates/gocode/route.go.tpl @@ -25,9 +25,9 @@ admin:{{{.ModuleName }}}:detail admin:{{{.ModuleName }}}:ExportFile admin:{{{.ModuleName }}}:ImportFile -// 列表 +// 列表-先添加菜单获取菜单id INSERT INTO x_system_auth_menu (pid, menu_type, menu_name, paths, component, is_cache, is_show, is_disable, create_time, update_time) VALUES (0, 'C', '{{{ .FunctionName }}}', '/{{{ .ModuleName }}}/index', '{{{ .ModuleName }}}/index', 0, 1, 0, now(), now()); -按钮 +按钮-替换pid参数为菜单id INSERT INTO x_system_auth_menu (pid, menu_type, menu_name, perms,is_cache, is_show, is_disable, create_time, update_time) VALUES (0, 'A', '{{{ .FunctionName }}}添加','admin:{{{ .ModuleName }}}:add', 0, 1, 0, now(), now()); INSERT INTO x_system_auth_menu (pid, menu_type, menu_name, perms,is_cache, is_show, is_disable, create_time, update_time) VALUES (0, 'A', '{{{ .FunctionName }}}编辑','admin:{{{ .ModuleName }}}:edit', 0, 1, 0, now(), now()); INSERT INTO x_system_auth_menu (pid, menu_type, menu_name, perms,is_cache, is_show, is_disable, create_time, update_time) VALUES (0, 'A', '{{{ .FunctionName }}}删除','admin:{{{ .ModuleName }}}:del', 0, 1, 0, now(), now()); diff --git a/server/admin/generator/tpl_utils/templates/uniapp/details.vue.tpl b/server/admin/generator/tpl_utils/templates/uniapp/details.vue.tpl index b890743..e9ebbf8 100644 --- a/server/admin/generator/tpl_utils/templates/uniapp/details.vue.tpl +++ b/server/admin/generator/tpl_utils/templates/uniapp/details.vue.tpl @@ -1,11 +1,5 @@