From e21ee557bc58542ac91f9964542c00346e61998a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BC=BA?= <1206709430@qq.com> Date: Sun, 14 Mar 2021 12:30:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF-=E6=A1=86=E6=9E=B6=E6=95=B4?= =?UTF-8?q?=E7=90=86=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commands/{initialization.py => init.py} | 40 +++++--- .../scripts/permission/permission_menu.sql | 18 ++-- dvadmin-backend/apps/vadmin/urls.py | 2 +- dvadmin-ui/src/api/{ => vadmin}/login.js | 2 +- dvadmin-ui/src/api/{ => vadmin}/menu.js | 0 .../src/api/{ => vadmin}/monitor/cache.js | 0 .../src/api/{ => vadmin}/monitor/job.js | 0 .../src/api/{ => vadmin}/monitor/jobLog.js | 0 .../api/{ => vadmin}/monitor/logininfor.js | 0 .../src/api/{ => vadmin}/monitor/online.js | 0 .../src/api/{ => vadmin}/monitor/operlog.js | 0 .../src/api/{ => vadmin}/monitor/server.js | 0 .../src/api/{ => vadmin}/permission/dept.js | 0 .../src/api/{ => vadmin}/permission/menu.js | 0 .../src/api/{ => vadmin}/permission/msg.js | 0 .../src/api/{ => vadmin}/permission/post.js | 0 .../src/api/{ => vadmin}/permission/role.js | 0 .../src/api/{ => vadmin}/permission/user.js | 0 .../src/api/{ => vadmin}/system/config.js | 0 .../src/api/{ => vadmin}/system/dict/data.js | 0 .../src/api/{ => vadmin}/system/dict/type.js | 0 .../src/api/{ => vadmin}/system/message.js | 0 .../src/api/{ => vadmin}/system/notice.js | 0 .../src/api/{ => vadmin}/system/savefile.js | 0 dvadmin-ui/src/api/{ => vadmin}/tool/gen.js | 0 dvadmin-ui/src/main.js | 4 +- dvadmin-ui/src/router/index.js | 32 +----- dvadmin-ui/src/store/modules/permission.js | 2 +- dvadmin-ui/src/store/modules/user.js | 2 +- dvadmin-ui/src/views/index_v1.vue | 98 ------------------- dvadmin-ui/src/views/login.vue | 2 +- .../{ => vadmin}/monitor/cache/index.vue | 2 +- .../{ => vadmin}/monitor/druid/index.vue | 0 .../views/{ => vadmin}/monitor/job/index.vue | 2 +- .../views/{ => vadmin}/monitor/job/log.vue | 2 +- .../{ => vadmin}/monitor/logininfor/index.vue | 2 +- .../{ => vadmin}/monitor/online/index.vue | 2 +- .../{ => vadmin}/monitor/operlog/index.vue | 2 +- .../{ => vadmin}/monitor/server/index.vue | 4 +- .../{ => vadmin}/permission/dept/index.vue | 2 +- .../{ => vadmin}/permission/menu/index.vue | 2 +- .../{ => vadmin}/permission/post/index.vue | 2 +- .../{ => vadmin}/permission/role/index.vue | 6 +- .../{ => vadmin}/permission/user/index.vue | 4 +- .../permission/user/profile/index.vue | 2 +- .../permission/user/profile/resetPwd.vue | 2 +- .../permission/user/profile/userAvatar.vue | 2 +- .../permission/user/profile/userInfo.vue | 2 +- .../{ => vadmin}/system/config/index.vue | 2 +- .../views/{ => vadmin}/system/dict/data.vue | 4 +- .../views/{ => vadmin}/system/dict/index.vue | 2 +- .../{ => vadmin}/system/message/Mymessage.vue | 2 +- .../{ => vadmin}/system/message/index.vue | 2 +- .../{ => vadmin}/system/notice/index.vue | 2 +- .../{ => vadmin}/system/savefile/index.vue | 2 +- .../tool/build/CodeTypeDialog.vue | 0 .../{ => vadmin}/tool/build/DraggableItem.vue | 0 .../{ => vadmin}/tool/build/IconsDialog.vue | 0 .../{ => vadmin}/tool/build/RightPanel.vue | 0 .../tool/build/TreeNodeDialog.vue | 0 .../views/{ => vadmin}/tool/build/index.vue | 0 .../{ => vadmin}/tool/gen/basicInfoForm.vue | 0 .../views/{ => vadmin}/tool/gen/editTable.vue | 6 +- .../{ => vadmin}/tool/gen/genInfoForm.vue | 0 .../{ => vadmin}/tool/gen/importTable.vue | 2 +- .../src/views/{ => vadmin}/tool/gen/index.vue | 2 +- .../views/{ => vadmin}/tool/swagger/index.vue | 0 67 files changed, 80 insertions(+), 188 deletions(-) rename dvadmin-backend/apps/vadmin/permission/management/commands/{initialization.py => init.py} (56%) rename dvadmin-ui/src/api/{ => vadmin}/login.js (94%) rename dvadmin-ui/src/api/{ => vadmin}/menu.js (100%) rename dvadmin-ui/src/api/{ => vadmin}/monitor/cache.js (100%) rename dvadmin-ui/src/api/{ => vadmin}/monitor/job.js (100%) rename dvadmin-ui/src/api/{ => vadmin}/monitor/jobLog.js (100%) rename dvadmin-ui/src/api/{ => vadmin}/monitor/logininfor.js (100%) rename dvadmin-ui/src/api/{ => vadmin}/monitor/online.js (100%) rename dvadmin-ui/src/api/{ => vadmin}/monitor/operlog.js (100%) rename dvadmin-ui/src/api/{ => vadmin}/monitor/server.js (100%) rename dvadmin-ui/src/api/{ => vadmin}/permission/dept.js (100%) rename dvadmin-ui/src/api/{ => vadmin}/permission/menu.js (100%) rename dvadmin-ui/src/api/{ => vadmin}/permission/msg.js (100%) rename dvadmin-ui/src/api/{ => vadmin}/permission/post.js (100%) rename dvadmin-ui/src/api/{ => vadmin}/permission/role.js (100%) rename dvadmin-ui/src/api/{ => vadmin}/permission/user.js (100%) rename dvadmin-ui/src/api/{ => vadmin}/system/config.js (100%) rename dvadmin-ui/src/api/{ => vadmin}/system/dict/data.js (100%) rename dvadmin-ui/src/api/{ => vadmin}/system/dict/type.js (100%) rename dvadmin-ui/src/api/{ => vadmin}/system/message.js (100%) rename dvadmin-ui/src/api/{ => vadmin}/system/notice.js (100%) rename dvadmin-ui/src/api/{ => vadmin}/system/savefile.js (100%) rename dvadmin-ui/src/api/{ => vadmin}/tool/gen.js (100%) delete mode 100755 dvadmin-ui/src/views/index_v1.vue rename dvadmin-ui/src/views/{ => vadmin}/monitor/cache/index.vue (98%) rename dvadmin-ui/src/views/{ => vadmin}/monitor/druid/index.vue (100%) rename dvadmin-ui/src/views/{ => vadmin}/monitor/job/index.vue (99%) rename dvadmin-ui/src/views/{ => vadmin}/monitor/job/log.vue (99%) rename dvadmin-ui/src/views/{ => vadmin}/monitor/logininfor/index.vue (99%) rename dvadmin-ui/src/views/{ => vadmin}/monitor/online/index.vue (98%) rename dvadmin-ui/src/views/{ => vadmin}/monitor/operlog/index.vue (99%) rename dvadmin-ui/src/views/{ => vadmin}/monitor/server/index.vue (99%) rename dvadmin-ui/src/views/{ => vadmin}/permission/dept/index.vue (99%) rename dvadmin-ui/src/views/{ => vadmin}/permission/menu/index.vue (99%) rename dvadmin-ui/src/views/{ => vadmin}/permission/post/index.vue (99%) rename dvadmin-ui/src/views/{ => vadmin}/permission/role/index.vue (99%) rename dvadmin-ui/src/views/{ => vadmin}/permission/user/index.vue (99%) rename dvadmin-ui/src/views/{ => vadmin}/permission/user/profile/index.vue (97%) rename dvadmin-ui/src/views/{ => vadmin}/permission/user/profile/resetPwd.vue (97%) rename dvadmin-ui/src/views/{ => vadmin}/permission/user/profile/userAvatar.vue (98%) rename dvadmin-ui/src/views/{ => vadmin}/permission/user/profile/userInfo.vue (97%) rename dvadmin-ui/src/views/{ => vadmin}/system/config/index.vue (99%) rename dvadmin-ui/src/views/{ => vadmin}/system/dict/data.vue (99%) rename dvadmin-ui/src/views/{ => vadmin}/system/dict/index.vue (99%) rename dvadmin-ui/src/views/{ => vadmin}/system/message/Mymessage.vue (98%) rename dvadmin-ui/src/views/{ => vadmin}/system/message/index.vue (99%) rename dvadmin-ui/src/views/{ => vadmin}/system/notice/index.vue (99%) rename dvadmin-ui/src/views/{ => vadmin}/system/savefile/index.vue (99%) rename dvadmin-ui/src/views/{ => vadmin}/tool/build/CodeTypeDialog.vue (100%) rename dvadmin-ui/src/views/{ => vadmin}/tool/build/DraggableItem.vue (100%) rename dvadmin-ui/src/views/{ => vadmin}/tool/build/IconsDialog.vue (100%) rename dvadmin-ui/src/views/{ => vadmin}/tool/build/RightPanel.vue (100%) rename dvadmin-ui/src/views/{ => vadmin}/tool/build/TreeNodeDialog.vue (100%) rename dvadmin-ui/src/views/{ => vadmin}/tool/build/index.vue (100%) rename dvadmin-ui/src/views/{ => vadmin}/tool/gen/basicInfoForm.vue (100%) rename dvadmin-ui/src/views/{ => vadmin}/tool/gen/editTable.vue (97%) rename dvadmin-ui/src/views/{ => vadmin}/tool/gen/genInfoForm.vue (100%) rename dvadmin-ui/src/views/{ => vadmin}/tool/gen/importTable.vue (98%) rename dvadmin-ui/src/views/{ => vadmin}/tool/gen/index.vue (99%) rename dvadmin-ui/src/views/{ => vadmin}/tool/swagger/index.vue (100%) diff --git a/dvadmin-backend/apps/vadmin/permission/management/commands/initialization.py b/dvadmin-backend/apps/vadmin/permission/management/commands/init.py similarity index 56% rename from dvadmin-backend/apps/vadmin/permission/management/commands/initialization.py rename to dvadmin-backend/apps/vadmin/permission/management/commands/init.py index 3f64ac2..1166066 100644 --- a/dvadmin-backend/apps/vadmin/permission/management/commands/initialization.py +++ b/dvadmin-backend/apps/vadmin/permission/management/commands/init.py @@ -45,7 +45,8 @@ class Command(BaseCommand): for sql in sql_list: try: cursor.execute(sql) - except : pass + except: + pass connection.commit() return True @@ -63,15 +64,30 @@ class Command(BaseCommand): else: logger.info(f'已取消[{table_name}]初始化') + def add_arguments(self, parser): + parser.add_argument('init_name', nargs='+', type=str) + def handle(self, *args, **options): - self.init(os.path.join('system', 'system_dictdata.sql'), '字典管理', 'system_dictdata') - self.init(os.path.join('system', 'system_dictdetails.sql'), '字典详情', 'system_dictdetails') - self.init(os.path.join('system', 'system_configsettings.sql'), '参数设置', 'system_configsettings') - self.init(os.path.join('permission', 'permission_post.sql'), '岗位管理', 'permission_post') - self.init(os.path.join('permission', 'permission_dept.sql'), '部门管理', 'permission_dept') - self.init(os.path.join('permission', 'permission_menu.sql'), '菜单管理', 'permission_menu') - self.init(os.path.join('permission', 'permission_role.sql'), '角色管理', - ','.join(['permission_role', 'permission_role_dept', 'permission_role_menu'])) - self.init(os.path.join('permission', 'permission_userprofile.sql'), '用户管理', ','.join( - ['permission_userprofile_groups', 'permission_userprofile', 'permission_userprofile_role', - 'permission_userprofile_post'])) + init_dict = { + 'system_dictdata': [os.path.join('system', 'system_dictdata.sql'), '字典管理', 'system_dictdata'], + 'system_dictdetails': [os.path.join('system', 'system_dictdetails.sql'), '字典详情', 'system_dictdetails'], + 'system_configsettings': [os.path.join('system', 'system_configsettings.sql'), '参数设置', + 'system_configsettings'], + 'permission_post': [os.path.join('permission', 'permission_post.sql'), '岗位管理', 'permission_post'], + 'permission_dept': [os.path.join('permission', 'permission_dept.sql'), '部门管理', 'permission_dept'], + 'permission_menu': [os.path.join('permission', 'permission_menu.sql'), '菜单管理', 'permission_menu'], + 'permission_role': [os.path.join('permission', 'permission_role.sql'), '角色管理', + ','.join(['permission_role', 'permission_role_dept', 'permission_role_menu'])], + 'permission_userprofile': [os.path.join('permission', 'permission_userprofile.sql'), '用户管理', ','.join( + ['permission_userprofile_groups', 'permission_userprofile', 'permission_userprofile_role', + 'permission_userprofile_post'])] + } + init_name = options.get('init_name') + if init_name: + for ele in init_name: + if ele in init_dict: + self.init(*init_dict[ele]) + + else: + for ele in init_dict.values(): + self.init(*ele) diff --git a/dvadmin-backend/apps/vadmin/scripts/permission/permission_menu.sql b/dvadmin-backend/apps/vadmin/scripts/permission/permission_menu.sql index 3f5be67..5550928 100644 --- a/dvadmin-backend/apps/vadmin/scripts/permission/permission_menu.sql +++ b/dvadmin-backend/apps/vadmin/scripts/permission/permission_menu.sql @@ -34,15 +34,15 @@ -- ---------------------------- INSERT INTO `permission_menu` VALUES (1, '', 'admin', '2021-02-27 07:50:00.410101', '2021-02-27 07:41:28.660364', '0', 'system', '系统管理', 1, '1', '/system', '', '', 'GET', NULL, '1', '1', '1', 1, NULL); INSERT INTO `permission_menu` VALUES (2, '', 'admin', '2021-02-27 07:51:14.500722', '2021-02-27 07:51:14.500768', '0', 'peoples', '权限管理', 2, '1', '/permission', '', '', 'GET', NULL, '1', '1', '1', 1, NULL); -INSERT INTO `permission_menu` VALUES (3, '', 'admin', '2021-02-27 08:20:40.164651', '2021-02-27 07:54:38.630670', '1', 'dict', '字典管理', 1, '1', '/system/dict', 'system/dict/index', '/admin/system/dict/type', 'GET', 'system:dict:type:get', '1', '1', '1', 1, 1); -INSERT INTO `permission_menu` VALUES (4, '', 'admin', '2021-02-27 08:24:03.776515', '2021-02-27 08:06:51.019173', '1', 'edit', '参数管理', 2, '1', '/system/config', 'system/config/index', '/admin/system/config/', 'GET', 'system:config:get', '1', '1', '1', 1, 1); -INSERT INTO `permission_menu` VALUES (5, '', 'admin', '2021-02-27 08:26:56.407590', '2021-02-27 08:25:37.339270', '1', 'post', '岗位管理', 1, '1', '/permission/post', 'permission/post/index', '/admin/permission/post', 'GET', 'permission:post:get', '1', '1', '1', 1, 2); -INSERT INTO `permission_menu` VALUES (6, '', 'admin', '2021-02-27 08:26:48.454509', '2021-02-27 08:26:48.454553', '1', 'tree', '部门管理', 2, '1', '/permission/dept', 'permission/dept/index', '/admin/permission/dept', 'GET', 'permission:dept:get', '1', '1', '1', 1, 2); -INSERT INTO `permission_menu` VALUES (7, '', 'admin', '2021-02-27 08:28:20.411115', '2021-02-27 08:28:20.411164', '1', 'tree-table', '菜单管理', 3, '1', '/permission/menu', 'permission/menu/index', '/admin/permission/menus', 'GET', 'permission:menus:get', '1', '1', '1', 1, 2); -INSERT INTO `permission_menu` VALUES (8, '', 'admin', '2021-02-27 08:29:30.153322', '2021-02-27 08:29:30.153361', '1', 'peoples', '角色管理', 4, '1', '/permission/role', 'permission/role/index', '/admin/permission/role', 'GET', 'permission:role:get', '1', '1', '1', 1, 2); -INSERT INTO `permission_menu` VALUES (9, '', 'admin', '2021-02-27 08:30:14.030845', '2021-02-27 08:30:14.030888', '1', 'user', '用户管理', 5, '1', '/permission/user', 'permission/user/index', '/admin/permission/user', 'GET', 'permission:user:get', '1', '1', '1', 1, 2); +INSERT INTO `permission_menu` VALUES (3, '', 'admin', '2021-02-27 08:20:40.164651', '2021-02-27 07:54:38.630670', '1', 'dict', '字典管理', 1, '1', '/system/dict', 'vadmin/system/dict/index', '/admin/system/dict/type', 'GET', 'system:dict:type:get', '1', '1', '1', 1, 1); +INSERT INTO `permission_menu` VALUES (4, '', 'admin', '2021-02-27 08:24:03.776515', '2021-02-27 08:06:51.019173', '1', 'edit', '参数管理', 2, '1', '/system/config', 'vadmin/system/config/index', '/admin/system/config/', 'GET', 'system:config:get', '1', '1', '1', 1, 1); +INSERT INTO `permission_menu` VALUES (5, '', 'admin', '2021-02-27 08:26:56.407590', '2021-02-27 08:25:37.339270', '1', 'post', '岗位管理', 1, '1', '/permission/post', 'vadmin/permission/post/index', '/admin/permission/post', 'GET', 'permission:post:get', '1', '1', '1', 1, 2); +INSERT INTO `permission_menu` VALUES (6, '', 'admin', '2021-02-27 08:26:48.454509', '2021-02-27 08:26:48.454553', '1', 'tree', '部门管理', 2, '1', '/permission/dept', 'vadmin/permission/dept/index', '/admin/permission/dept', 'GET', 'permission:dept:get', '1', '1', '1', 1, 2); +INSERT INTO `permission_menu` VALUES (7, '', 'admin', '2021-02-27 08:28:20.411115', '2021-02-27 08:28:20.411164', '1', 'tree-table', '菜单管理', 3, '1', '/permission/menu', 'vadmin/permission/menu/index', '/admin/permission/menus', 'GET', 'permission:menus:get', '1', '1', '1', 1, 2); +INSERT INTO `permission_menu` VALUES (8, '', 'admin', '2021-02-27 08:29:30.153322', '2021-02-27 08:29:30.153361', '1', 'peoples', '角色管理', 4, '1', '/permission/role', 'vadmin/permission/role/index', '/admin/permission/role', 'GET', 'permission:role:get', '1', '1', '1', 1, 2); +INSERT INTO `permission_menu` VALUES (9, '', 'admin', '2021-02-27 08:30:14.030845', '2021-02-27 08:30:14.030888', '1', 'user', '用户管理', 5, '1', '/permission/user', 'vadmin/permission/user/index', '/admin/permission/user', 'GET', 'permission:user:get', '1', '1', '1', 1, 2); INSERT INTO `permission_menu` VALUES (10, '', 'admin', '2021-02-27 08:37:24.948235', '2021-02-27 08:36:04.824117', '0', 'guide', 'dvAdmin官网', 9, '0', 'https://django-vue-admin.com', '', NULL, 'GET', NULL, '1', '1', '1', 1, NULL); -INSERT INTO `permission_menu` VALUES (11, '', 'admin', '2021-02-27 16:19:21.529666', '2021-02-27 16:17:36.685174', '1', 'job', '文件管理', 3, '1', '/system/savefile', 'system/savefile/index', '/admin/system/savefile', 'GET', 'system:savefile:get', '1', '1', '1', 1, 1); +INSERT INTO `permission_menu` VALUES (11, '', 'admin', '2021-02-27 16:19:21.529666', '2021-02-27 16:17:36.685174', '1', 'job', '文件管理', 3, '1', '/system/savefile', 'vadmin/system/savefile/index', '/admin/system/savefile', 'GET', 'system:savefile:get', '1', '1', '1', 1, 1); INSERT INTO `permission_menu` VALUES (13, '', 'admin', '2021-03-03 14:41:08.227821', '2021-03-03 14:18:52.530449', '2', NULL, '用户新增', 1, '1', NULL, NULL, '/admin/permission/user/', 'POST', 'permission:user:post', '1', '1', '1', 1, 9); INSERT INTO `permission_menu` VALUES (14, '', 'admin', '2021-03-03 14:43:34.207938', '2021-03-03 14:43:34.208093', '2', NULL, '用户修改', 2, '1', NULL, NULL, '/admin/permission/user/{id}/', 'PUT', 'permission:user:{id}:put', '1', '1', '1', 1, 9); INSERT INTO `permission_menu` VALUES (15, '', 'admin', '2021-03-03 14:44:58.006289', '2021-03-03 14:44:58.006338', '2', NULL, '用户删除', 3, '1', '', NULL, '/admin/permission/user/{id}/', 'DELETE', 'permission:user:{id}:delete', '1', '1', '1', 1, 9); @@ -77,7 +77,7 @@ INSERT INTO `permission_menu` VALUES (43, '', 'admin', '2021-03-03 15:22:48.4926 INSERT INTO `permission_menu` VALUES (44, '', 'admin', '2021-03-03 15:23:58.219105', '2021-03-03 15:23:58.219155', '2', NULL, '文件删除', 2, '1', NULL, NULL, '/admin/system/savefile/{id}/', 'DELETE', 'system:savefile:{id}:delete', '1', '1', '1', 1, 11); INSERT INTO `permission_menu` VALUES (45, '', 'admin', '2021-03-03 15:25:15.224971', '2021-03-03 15:25:15.225018', '2', NULL, '清理废弃文件', 3, '1', NULL, NULL, '/admin/system/clearsavefile/', 'POST', 'system:clearsavefile:post', '1', '1', '1', 1, 11); INSERT INTO `permission_menu` VALUES (46, '', 'admin', '2021-03-03 15:28:30.061632', '2021-03-03 15:27:19.945663', '2', NULL, '文件下载', 4, '1', NULL, NULL, NULL, 'GET', 'system:clearsavefile:download:post', '1', '1', '1', 1, 11); -INSERT INTO `permission_menu` VALUES (47, '', 'admin', '2021-03-07 14:35:34.237127', '2021-03-07 14:32:06.754815', '1', 'message', '通知公告', 4, '1', 'system/message', 'system/message/index', '/admin/system/message/', 'GET', 'system:message:get', '1', '1', '1', 1, 1); +INSERT INTO `permission_menu` VALUES (47, '', 'admin', '2021-03-07 14:35:34.237127', '2021-03-07 14:32:06.754815', '1', 'message', '通知公告', 4, '1', 'system/message', 'vadmin/system/message/index', '/admin/system/message/', 'GET', 'system:message:get', '1', '1', '1', 1, 1); INSERT INTO `permission_menu` VALUES (48, '', 'admin', '2021-03-07 14:35:06.718432', '2021-03-07 14:35:06.718463', '2', NULL, '发布公告', 1, '1', NULL, NULL, '/admin/system/message/', 'POST', 'system:message:post', '1', '1', '1', 1, 47); INSERT INTO `permission_menu` VALUES (49, '', 'admin', '2021-03-08 13:04:32.158707', '2021-03-07 14:36:47.675837', '2', NULL, '修改公告', 2, '1', NULL, NULL, '/admin/system/message/{id}/', 'PUT', 'system:message:{id}:put', '1', '1', '1', 1, 47); INSERT INTO `permission_menu` VALUES (50, '', 'admin', '2021-03-08 13:04:58.206693', '2021-03-07 14:37:52.130567', '2', NULL, '删除公告', 3, '1', NULL, NULL, '/admin/permission/menu/{id}/', 'DELETE', 'permission:menu:{id}:delete', '1', '1', '1', 1, 47); diff --git a/dvadmin-backend/apps/vadmin/urls.py b/dvadmin-backend/apps/vadmin/urls.py index 341e6fb..36b2dce 100644 --- a/dvadmin-backend/apps/vadmin/urls.py +++ b/dvadmin-backend/apps/vadmin/urls.py @@ -35,7 +35,7 @@ class CaptchaRefresh(APIView): new_key = CaptchaStore.pick() to_json_response = { "key": new_key, - "image_url": captcha_image_url(new_key), + "image_url": str(captcha_image_url(new_key)).lstrip('/'), "audio_url": captcha_audio_url(new_key) if ca_settings.CAPTCHA_FLITE_PATH else None, } return SuccessResponse(to_json_response) diff --git a/dvadmin-ui/src/api/login.js b/dvadmin-ui/src/api/vadmin/login.js similarity index 94% rename from dvadmin-ui/src/api/login.js rename to dvadmin-ui/src/api/vadmin/login.js index 4e66b2d..2b05380 100755 --- a/dvadmin-ui/src/api/login.js +++ b/dvadmin-ui/src/api/vadmin/login.js @@ -34,7 +34,7 @@ export function logout() { // 获取验证码 export function getCodeImg() { return request({ - url: '/captcha/refresh/', + url: '/admin/captcha/refresh/', method: 'get' }) } diff --git a/dvadmin-ui/src/api/menu.js b/dvadmin-ui/src/api/vadmin/menu.js similarity index 100% rename from dvadmin-ui/src/api/menu.js rename to dvadmin-ui/src/api/vadmin/menu.js diff --git a/dvadmin-ui/src/api/monitor/cache.js b/dvadmin-ui/src/api/vadmin/monitor/cache.js similarity index 100% rename from dvadmin-ui/src/api/monitor/cache.js rename to dvadmin-ui/src/api/vadmin/monitor/cache.js diff --git a/dvadmin-ui/src/api/monitor/job.js b/dvadmin-ui/src/api/vadmin/monitor/job.js similarity index 100% rename from dvadmin-ui/src/api/monitor/job.js rename to dvadmin-ui/src/api/vadmin/monitor/job.js diff --git a/dvadmin-ui/src/api/monitor/jobLog.js b/dvadmin-ui/src/api/vadmin/monitor/jobLog.js similarity index 100% rename from dvadmin-ui/src/api/monitor/jobLog.js rename to dvadmin-ui/src/api/vadmin/monitor/jobLog.js diff --git a/dvadmin-ui/src/api/monitor/logininfor.js b/dvadmin-ui/src/api/vadmin/monitor/logininfor.js similarity index 100% rename from dvadmin-ui/src/api/monitor/logininfor.js rename to dvadmin-ui/src/api/vadmin/monitor/logininfor.js diff --git a/dvadmin-ui/src/api/monitor/online.js b/dvadmin-ui/src/api/vadmin/monitor/online.js similarity index 100% rename from dvadmin-ui/src/api/monitor/online.js rename to dvadmin-ui/src/api/vadmin/monitor/online.js diff --git a/dvadmin-ui/src/api/monitor/operlog.js b/dvadmin-ui/src/api/vadmin/monitor/operlog.js similarity index 100% rename from dvadmin-ui/src/api/monitor/operlog.js rename to dvadmin-ui/src/api/vadmin/monitor/operlog.js diff --git a/dvadmin-ui/src/api/monitor/server.js b/dvadmin-ui/src/api/vadmin/monitor/server.js similarity index 100% rename from dvadmin-ui/src/api/monitor/server.js rename to dvadmin-ui/src/api/vadmin/monitor/server.js diff --git a/dvadmin-ui/src/api/permission/dept.js b/dvadmin-ui/src/api/vadmin/permission/dept.js similarity index 100% rename from dvadmin-ui/src/api/permission/dept.js rename to dvadmin-ui/src/api/vadmin/permission/dept.js diff --git a/dvadmin-ui/src/api/permission/menu.js b/dvadmin-ui/src/api/vadmin/permission/menu.js similarity index 100% rename from dvadmin-ui/src/api/permission/menu.js rename to dvadmin-ui/src/api/vadmin/permission/menu.js diff --git a/dvadmin-ui/src/api/permission/msg.js b/dvadmin-ui/src/api/vadmin/permission/msg.js similarity index 100% rename from dvadmin-ui/src/api/permission/msg.js rename to dvadmin-ui/src/api/vadmin/permission/msg.js diff --git a/dvadmin-ui/src/api/permission/post.js b/dvadmin-ui/src/api/vadmin/permission/post.js similarity index 100% rename from dvadmin-ui/src/api/permission/post.js rename to dvadmin-ui/src/api/vadmin/permission/post.js diff --git a/dvadmin-ui/src/api/permission/role.js b/dvadmin-ui/src/api/vadmin/permission/role.js similarity index 100% rename from dvadmin-ui/src/api/permission/role.js rename to dvadmin-ui/src/api/vadmin/permission/role.js diff --git a/dvadmin-ui/src/api/permission/user.js b/dvadmin-ui/src/api/vadmin/permission/user.js similarity index 100% rename from dvadmin-ui/src/api/permission/user.js rename to dvadmin-ui/src/api/vadmin/permission/user.js diff --git a/dvadmin-ui/src/api/system/config.js b/dvadmin-ui/src/api/vadmin/system/config.js similarity index 100% rename from dvadmin-ui/src/api/system/config.js rename to dvadmin-ui/src/api/vadmin/system/config.js diff --git a/dvadmin-ui/src/api/system/dict/data.js b/dvadmin-ui/src/api/vadmin/system/dict/data.js similarity index 100% rename from dvadmin-ui/src/api/system/dict/data.js rename to dvadmin-ui/src/api/vadmin/system/dict/data.js diff --git a/dvadmin-ui/src/api/system/dict/type.js b/dvadmin-ui/src/api/vadmin/system/dict/type.js similarity index 100% rename from dvadmin-ui/src/api/system/dict/type.js rename to dvadmin-ui/src/api/vadmin/system/dict/type.js diff --git a/dvadmin-ui/src/api/system/message.js b/dvadmin-ui/src/api/vadmin/system/message.js similarity index 100% rename from dvadmin-ui/src/api/system/message.js rename to dvadmin-ui/src/api/vadmin/system/message.js diff --git a/dvadmin-ui/src/api/system/notice.js b/dvadmin-ui/src/api/vadmin/system/notice.js similarity index 100% rename from dvadmin-ui/src/api/system/notice.js rename to dvadmin-ui/src/api/vadmin/system/notice.js diff --git a/dvadmin-ui/src/api/system/savefile.js b/dvadmin-ui/src/api/vadmin/system/savefile.js similarity index 100% rename from dvadmin-ui/src/api/system/savefile.js rename to dvadmin-ui/src/api/vadmin/system/savefile.js diff --git a/dvadmin-ui/src/api/tool/gen.js b/dvadmin-ui/src/api/vadmin/tool/gen.js similarity index 100% rename from dvadmin-ui/src/api/tool/gen.js rename to dvadmin-ui/src/api/vadmin/tool/gen.js diff --git a/dvadmin-ui/src/main.js b/dvadmin-ui/src/main.js index 9e7542a..8f90052 100755 --- a/dvadmin-ui/src/main.js +++ b/dvadmin-ui/src/main.js @@ -14,8 +14,8 @@ import permission from './directive/permission' import './assets/icons' // icon import './permission' // permission control -import { getDicts } from "@/api/system/dict/data"; -import { getConfigKey } from "@/api/system/config"; +import { getDicts } from "@/api/vadmin/system/dict/data"; +import { getConfigKey } from "@/api/vadmin/system/config"; import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, download, handleTree } from "@/utils/ruoyi"; import Pagination from "@/components/Pagination"; // 自定义表格工具扩展 diff --git a/dvadmin-ui/src/router/index.js b/dvadmin-ui/src/router/index.js index ae6bd27..e13fbab 100755 --- a/dvadmin-ui/src/router/index.js +++ b/dvadmin-ui/src/router/index.js @@ -74,13 +74,13 @@ export const constantRoutes = [ children: [ { path: 'profile', - component: (resolve) => require(['@/views/permission/user/profile/index'], resolve), + component: (resolve) => require(['@/views/vadmin/permission/user/profile/index'], resolve), name: 'Profile', meta: { title: '个人中心', icon: 'user' } }, { path: 'msg', - component: (resolve) => require(['@/views/system/message/Mymessage'], resolve), + component: (resolve) => require(['@/views/vadmin/system/message/Mymessage'], resolve), name: 'msg', meta: { title: '消息通知', icon: 'user' } } @@ -93,37 +93,11 @@ export const constantRoutes = [ children: [ { path: 'type/data/:dictId(\\d+)', - component: (resolve) => require(['@/views/system/dict/data'], resolve), + component: (resolve) => require(['@/views/vadmin/system/dict/data'], resolve), name: 'Data', meta: { title: '字典数据', icon: '' } } ] - }, - { - path: '/job', - component: Layout, - hidden: true, - children: [ - { - path: 'log', - component: (resolve) => require(['@/views/monitor/job/log'], resolve), - name: 'JobLog', - meta: { title: '调度日志' } - } - ] - }, - { - path: '/gen', - component: Layout, - hidden: true, - children: [ - { - path: 'edit/:tableId(\\d+)', - component: (resolve) => require(['@/views/tool/gen/editTable'], resolve), - name: 'GenEdit', - meta: { title: '修改生成配置' } - } - ] } ] diff --git a/dvadmin-ui/src/store/modules/permission.js b/dvadmin-ui/src/store/modules/permission.js index fdc446b..3e77598 100755 --- a/dvadmin-ui/src/store/modules/permission.js +++ b/dvadmin-ui/src/store/modules/permission.js @@ -1,5 +1,5 @@ import { constantRoutes } from '@/router' -import { getRouters } from '@/api/menu' +import { getRouters } from '@/api/vadmin/menu' import Layout from '@/layout/index' import ParentView from '@/components/ParentView'; import { handleTree } from "@/utils/ruoyi"; diff --git a/dvadmin-ui/src/store/modules/user.js b/dvadmin-ui/src/store/modules/user.js index 68598b9..895a689 100755 --- a/dvadmin-ui/src/store/modules/user.js +++ b/dvadmin-ui/src/store/modules/user.js @@ -1,4 +1,4 @@ -import {getInfo, login, logout} from '@/api/login' +import {getInfo, login, logout} from '@/api/vadmin/login' import {getToken, removeToken, setToken} from '@/utils/auth' const user = { diff --git a/dvadmin-ui/src/views/index_v1.vue b/dvadmin-ui/src/views/index_v1.vue deleted file mode 100755 index d2d2ec6..0000000 --- a/dvadmin-ui/src/views/index_v1.vue +++ /dev/null @@ -1,98 +0,0 @@ - - - - - diff --git a/dvadmin-ui/src/views/login.vue b/dvadmin-ui/src/views/login.vue index c6488ab..6993e40 100755 --- a/dvadmin-ui/src/views/login.vue +++ b/dvadmin-ui/src/views/login.vue @@ -54,7 +54,7 @@ \ No newline at end of file + diff --git a/dvadmin-ui/src/views/permission/dept/index.vue b/dvadmin-ui/src/views/vadmin/permission/dept/index.vue similarity index 99% rename from dvadmin-ui/src/views/permission/dept/index.vue rename to dvadmin-ui/src/views/vadmin/permission/dept/index.vue index 5c44e90..7be94aa 100755 --- a/dvadmin-ui/src/views/permission/dept/index.vue +++ b/dvadmin-ui/src/views/vadmin/permission/dept/index.vue @@ -149,7 +149,7 @@