From 367e3803c247ae2c01c16c5c91fd9438514ec694 Mon Sep 17 00:00:00 2001 From: pumelotea Date: Sat, 12 Mar 2022 19:49:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20add=20user=20=E3=80=81role=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/HbAdminUserCard.vue | 15 +- src/mock/routerData.js | 50 ++++-- src/views/base-list/index.vue | 4 +- src/views/card-list/index.vue | 13 ++ src/views/role/index.vue | 236 +++++++++++++++++++++++++++++ src/views/user/index.vue | 205 +++++++++++++++++++++++++ 6 files changed, 506 insertions(+), 17 deletions(-) create mode 100644 src/views/card-list/index.vue create mode 100644 src/views/role/index.vue create mode 100644 src/views/user/index.vue diff --git a/src/components/HbAdminUserCard.vue b/src/components/HbAdminUserCard.vue index b6315c6..e44302f 100644 --- a/src/components/HbAdminUserCard.vue +++ b/src/components/HbAdminUserCard.vue @@ -1,7 +1,7 @@ @@ -12,10 +12,13 @@ import {isMenuCollapsed} from "../global/config";
千阳 - - - - + + + + + + +
diff --git a/src/mock/routerData.js b/src/mock/routerData.js index bedb31f..6995192 100644 --- a/src/mock/routerData.js +++ b/src/mock/routerData.js @@ -9,15 +9,6 @@ const routerData = [ type: 'menu', children: [] }, - { - name: '权限', - path: '/permission', - view: '/permission/index.vue', - isRouter: true, - isKeepalive: true, - type: 'menu', - children: [] - }, { name: '错误页面', path: '/error', @@ -69,6 +60,47 @@ const routerData = [ icon:'ri-table-line', children: [] }, + { + name: '系统设置', + path: '/setting', + view: '', + isRouter: false, + isKeepalive: false, + icon:'ri-tools-line', + type: 'menu', + children: [ + { + name: '菜单设置', + path: '/menu', + view: '/permission/index.vue', + isRouter: true, + isKeepalive: false, + icon:'ri-menu-line', + type: 'menu', + children: [] + }, + { + name: '用户管理', + path: '/user', + view: '/user/index.vue', + isRouter: true, + isKeepalive: false, + icon:'ri-user-line', + type: 'menu', + children: [] + }, + { + name: '角色管理', + path: '/role', + view: '/role/index.vue', + isRouter: true, + isKeepalive: false, + icon:'ri-file-user-line', + type: 'menu', + children: [] + }, + ] + }, ] export default routerData diff --git a/src/views/base-list/index.vue b/src/views/base-list/index.vue index fee289e..ff8f114 100644 --- a/src/views/base-list/index.vue +++ b/src/views/base-list/index.vue @@ -8,7 +8,7 @@ import { } from "naive-ui"; import {h, onMounted, reactive, ref} from "vue"; import { - AddSharp, TrashSharp, RefreshSharp, SearchSharp,DocumentOutline,PencilSharp + AddSharp, TrashSharp, RefreshSharp, SearchSharp,DocumentOutline,PencilSharp,CreateOutline } from "@vicons/ionicons5" @@ -74,7 +74,7 @@ const columns = [ tertiary: true, size: "small", onClick: () => openDialog(row) - }, {default: () => "编辑", icon: () => h(PencilSharp)}), + }, {default: () => "编辑", icon: () => h(CreateOutline)}), h(NPopconfirm, { onPositiveClick: () => handlePositiveClick(row), onNegativeClick: () => handleNegativeClick(row), diff --git a/src/views/card-list/index.vue b/src/views/card-list/index.vue new file mode 100644 index 0000000..54b19c1 --- /dev/null +++ b/src/views/card-list/index.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/src/views/role/index.vue b/src/views/role/index.vue new file mode 100644 index 0000000..3bfadc3 --- /dev/null +++ b/src/views/role/index.vue @@ -0,0 +1,236 @@ + + + + + diff --git a/src/views/user/index.vue b/src/views/user/index.vue new file mode 100644 index 0000000..dd013b8 --- /dev/null +++ b/src/views/user/index.vue @@ -0,0 +1,205 @@ + + + + +