From 51c9af63b7cd842a388808912c8e68540142d97f Mon Sep 17 00:00:00 2001 From: duan Date: Fri, 5 Aug 2022 18:41:29 +0800 Subject: [PATCH] =?UTF-8?q?feat(src/views/user):=20=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E6=95=B0=E6=8D=AE=E6=8E=A5=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/user/user.js | 62 ++++++-- src/components/UserForm/index.vue | 6 +- src/router/modules/reagent.js | 15 +- src/styles/sidebar.scss | 6 +- src/views/reagent/database/index.vue | 187 ++++++++++++++++++++++- src/views/user/index.vue | 156 +++++++++++++++---- src/views/user/role/index.vue | 221 ++++++++++++++++++++------- 7 files changed, 549 insertions(+), 104 deletions(-) diff --git a/src/api/user/user.js b/src/api/user/user.js index bbbe791..b7ad691 100644 --- a/src/api/user/user.js +++ b/src/api/user/user.js @@ -34,15 +34,6 @@ export function user_power(data) { }) } -// /api/power/user_power -export function get_module_list(data) { - return request({ - url: '/api/power/get_module_list', - method: 'post', - data - }) -} - // /api/user/update export function update(data) { return request({ @@ -70,6 +61,59 @@ export function get_role_list(data) { }) } +// /api/power/get_module_list +export function get_module_list(data) { + return request({ + url: '/api/power/get_module_list', + method: 'post', + data + }) +} + +// /api/power/add_update_role +export function add_update_role(data) { + return request({ + url: '/api/power/add_update_role', + method: 'post', + data + }) +} + +// /api/power/get_role_module +export function get_role_module(data) { + return request({ + url: '/api/power/get_role_module', + method: 'post', + data + }) +} + +// /api/power/get_user_power_list +export function get_user_power_list(data) { + return request({ + url: '/api/power/get_user_power_list', + method: 'post', + data + }) +} + +// /api/power/add_user_power +export function add_user_power(data) { + return request({ + url: '/api/power/add_user_power', + method: 'post', + data + }) +} + +// /api/power/get_role_name_list +export function get_role_name_list(data) { + return request({ + url: '/api/power/get_role_name_list', + method: 'post', + data + }) +} // export function getInfo(token) { // return request({ // url: '/vue-admin-template/user/info', diff --git a/src/components/UserForm/index.vue b/src/components/UserForm/index.vue index 7643eb1..924ef01 100644 --- a/src/components/UserForm/index.vue +++ b/src/components/UserForm/index.vue @@ -45,9 +45,9 @@ diff --git a/src/router/modules/reagent.js b/src/router/modules/reagent.js index 0b39a2e..822d39e 100644 --- a/src/router/modules/reagent.js +++ b/src/router/modules/reagent.js @@ -157,13 +157,20 @@ const reagentRouter = [ { path: '/reagent/database', component: Layout, - meta: { classification: 'reagent' }, + redirect: '/reagent/database/msds', + meta: { title: '化学品数据库', icon: '化学品数据库', classification: 'reagent' }, children: [ { - path: 'index', - name: 'Database', + path: 'msds', + name: 'MSDS', + component: () => import('@/views/reagent/database/index'), + meta: { title: 'MSDS数据库', classification: 'reagent' } + }, + { + path: 'dangerous', + name: 'Dangerous', component: () => import('@/views/reagent/database/index'), - meta: { title: '化学品数据库', icon: '化学品数据库', classification: 'reagent' } + meta: { title: '危化品数据库', classification: 'reagent' } } ] }, diff --git a/src/styles/sidebar.scss b/src/styles/sidebar.scss index 229123f..32ae341 100644 --- a/src/styles/sidebar.scss +++ b/src/styles/sidebar.scss @@ -78,16 +78,16 @@ } .is-active>.el-submenu__title { - color: $subMenuActiveText !important; + //color: $subMenuActiveText !important; } & .nest-menu .el-submenu>.el-submenu__title, & .el-submenu .el-menu-item { min-width: $sideBarWidth !important; - background-color: $subMenuBg !important; + background-color: $subMenuActiveText !important; &:hover { - background-color: $subMenuHover !important; + background-color: $menuHover !important; } } } diff --git a/src/views/reagent/database/index.vue b/src/views/reagent/database/index.vue index c104dec..0e6c235 100644 --- a/src/views/reagent/database/index.vue +++ b/src/views/reagent/database/index.vue @@ -1,13 +1,194 @@ - diff --git a/src/views/user/index.vue b/src/views/user/index.vue index 8a8b46e..2a96a5b 100644 --- a/src/views/user/index.vue +++ b/src/views/user/index.vue @@ -7,9 +7,9 @@ @@ -125,23 +125,53 @@ title="分配用户权限" :visible.sync="roleDialogVisible" width="30%" + @close="handleClose" > - - - 全选 + + + 全选 +
+ + {{ item.module_name }} + + + + 全选 +
+ + {{ item.module_name }} + + + + 全选 +
+ + {{ item.module_name }} + + + + 全选
- - {{ city }} + + {{ item.module_name }} + + + + 全选 +
+ + {{ item.module_name }} - 标准品管理 - 耗材管理 - 仪器管理
取 消 - 确 定 + 确 定
@@ -150,13 +180,25 @@