From ddc45ccde2ec7c7b289fc1f97c0dd6ed88a698dc Mon Sep 17 00:00:00 2001 From: ww664853070 Date: Thu, 6 Jul 2023 17:02:40 +0800 Subject: [PATCH] =?UTF-8?q?(+)=E4=BA=BA=E8=B5=84=E6=9D=83=E9=99=90?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/role/index.js | 98 +++++++ api/app/lib/controllers/userRole/index.js | 99 +++++++ api/app/lib/models/role.js | 40 +++ api/app/lib/models/user_role.js | 38 +++ api/app/lib/routes/role/index.js | 19 ++ api/app/lib/routes/userRole/index.js | 14 + .../sections/humanAffairs/actions/index.js | 5 +- .../src/sections/humanAffairs/actions/role.js | 82 ++++++ .../humanAffairs/containers/employeeAuth.jsx | 250 +++++++++++++++++- .../containers/employeeAuthModal.jsx | 79 ++++++ .../containers/employeeAuthUserModal.jsx | 114 ++++++++ .../src/sections/humanAffairs/style.less | 125 +++++++++ web/client/src/utils/webapi.js | 10 +- 13 files changed, 965 insertions(+), 8 deletions(-) create mode 100644 api/app/lib/controllers/role/index.js create mode 100644 api/app/lib/controllers/userRole/index.js create mode 100644 api/app/lib/models/role.js create mode 100644 api/app/lib/models/user_role.js create mode 100644 api/app/lib/routes/role/index.js create mode 100644 api/app/lib/routes/userRole/index.js create mode 100644 web/client/src/sections/humanAffairs/actions/role.js create mode 100644 web/client/src/sections/humanAffairs/containers/employeeAuthModal.jsx create mode 100644 web/client/src/sections/humanAffairs/containers/employeeAuthUserModal.jsx diff --git a/api/app/lib/controllers/role/index.js b/api/app/lib/controllers/role/index.js new file mode 100644 index 0000000..d3de073 --- /dev/null +++ b/api/app/lib/controllers/role/index.js @@ -0,0 +1,98 @@ +'use strict'; +const moment = require('moment') +const fs = require('fs'); + +async function get(ctx) { + try { + const { models } = ctx.fs.dc; + let roleList = await models.Role.findAndCountAll({ + where: { delete: true }, + order: [['id', 'desc']], + }); + ctx.status = 200 + ctx.body = roleList; + } catch (error) { + ctx.fs.logger.error(`path:${ctx.path},error:${error}`) + ctx.status = 400; + ctx.body = { name: 'FindError', message: '查询角色数据失败' } + } +} + +async function add(ctx) { + try { + const { models } = ctx.fs.dc; + const { name } = ctx.request.body + + const role = await models.Role.findOne({ + where: { name } + }) + + if (role && !role.delete) { + throw '当前角色已存在' + } + + let storageData = { name } + await models.Role.create(storageData) + ctx.status = 204; + } catch (error) { + ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); + ctx.status = 400; + ctx.body = { + message: typeof error == 'string' ? error : undefined + } + } +} + +async function edit(ctx) { + try { + const { models } = ctx.fs.dc; + // const { pepUserId, provinces, cities, businessLines } = ctx.request.body + const { id, name } = ctx.request.body + + const role = await models.Role.findOne({ + where: { id } + }) + + if (!role) { + throw '当前角色不存在' + } + let storageData = { name } + await models.Role.update(storageData, { + where: { id } + }) + ctx.status = 204; + } catch (error) { + ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); + ctx.status = 400; + ctx.body = { + message: typeof error == 'string' ? error : undefined + } + } +} + +async function del(ctx) { + try { + const { models } = ctx.fs.dc; + const { id } = ctx.query + + await models.Role.update({ + delete: false}, + {where: {id } + }) + ctx.status = 204; + } catch (error) { + ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); + ctx.status = 400; + ctx.body = { + message: typeof error == 'string' ? error : undefined + } + } +} + + +module.exports = { + get, + add, + edit, + del, +} \ No newline at end of file diff --git a/api/app/lib/controllers/userRole/index.js b/api/app/lib/controllers/userRole/index.js new file mode 100644 index 0000000..682980d --- /dev/null +++ b/api/app/lib/controllers/userRole/index.js @@ -0,0 +1,99 @@ +'use strict'; +const moment = require('moment') +const fs = require('fs'); + +async function get(ctx) { + try { + const { models } = ctx.fs.dc; + let userRoleList = await models.UserRole.findAndCountAll({ + order: [['id', 'desc']] + }); + ctx.status = 200 + ctx.body = userRoleList; + } catch (error) { + ctx.fs.logger.error(`path:${ctx.path},error:${error}`) + ctx.status = 400; + ctx.body = { name: 'FindError', message: '查询用户信息失败' } + } +} + +async function add(ctx) { + try { + const { models } = ctx.fs.dc; + const { userId, roleId } = ctx.request.body + await models.UserRole.destroy({ + where: { roleId: roleId } + }) + + let storageData = userId.map(e => { + return { + roleId: roleId, + userId: e + } + }) + await models.UserRole.bulkCreate(storageData); + ctx.status = 204; + } catch (error) { + ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); + ctx.status = 400; + ctx.body = { + message: typeof error == 'string' ? error : undefined + } + } +} + +async function edit(ctx) { + try { + const { models } = ctx.fs.dc; + // const { pepUserId, provinces, cities, businessLines } = ctx.request.body + const { id, name } = ctx.request.body + + const role = await models.Role.findOne({ + where: { id } + }) + + if (!role) { + throw '当前角色不存在' + } + let storageData = { name } + await models.Role.update(storageData, { + where: { id } + }) + ctx.status = 204; + } catch (error) { + ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); + ctx.status = 400; + ctx.body = { + message: typeof error == 'string' ? error : undefined + } + } +} + +async function del(ctx) { + try { + const { models } = ctx.fs.dc; + const { id } = ctx.request.body + + await models.SalesDistribution.update({ + delete: false + }, + { + where: { id } + }) + ctx.status = 204; + } catch (error) { + ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); + ctx.status = 400; + ctx.body = { + message: typeof error == 'string' ? error : undefined + } + } +} + + +module.exports = { + get, + add, + edit, + del, +} \ No newline at end of file diff --git a/api/app/lib/models/role.js b/api/app/lib/models/role.js new file mode 100644 index 0000000..49b9e77 --- /dev/null +++ b/api/app/lib/models/role.js @@ -0,0 +1,40 @@ +/* eslint-disable*/ +'use strict'; + +module.exports = dc => { + const DataTypes = dc.ORM; + const sequelize = dc.orm; + const Role = sequelize.define("role", { + id: { + type: DataTypes.INTEGER, + allowNull: false, + defaultValue: null, + comment: null, + primaryKey: true, + field: "id", + autoIncrement: true + }, + name: { + type: DataTypes.STRING, + allowNull: false, + defaultValue: null, + comment: null, + field: "name", + }, + delete: { + type: DataTypes.BOOLEAN, + allowNull: false, + defaultValue: true, + comment: null, + field: "delete", + }, + }, { + tableName: "role", + comment: "", + indexes: [] + }); + dc.models.Role = Role; + + return Role; + +}; \ No newline at end of file diff --git a/api/app/lib/models/user_role.js b/api/app/lib/models/user_role.js new file mode 100644 index 0000000..30237ca --- /dev/null +++ b/api/app/lib/models/user_role.js @@ -0,0 +1,38 @@ +/* eslint-disable*/ +'use strict'; + +module.exports = dc => { + const DataTypes = dc.ORM; + const sequelize = dc.orm; + const UserRole = sequelize.define("user_role", { + id: { + type: DataTypes.INTEGER, + allowNull: false, + defaultValue: null, + comment: null, + primaryKey: true, + field: "id", + autoIncrement: true + }, + roleId: { + type: DataTypes.INTEGER, + allowNull: false, + defaultValue: null, + comment: null, + field: "role_id", + }, + userId: { + type: DataTypes.INTEGER, + allowNull: false, + defaultValue: true, + comment: null, + field: "user_id", + }, + }, { + tableName: "user_role", + comment: "", + indexes: [] + }); + dc.models.UserRole = UserRole; + return UserRole; +}; \ No newline at end of file diff --git a/api/app/lib/routes/role/index.js b/api/app/lib/routes/role/index.js new file mode 100644 index 0000000..5fa0f3a --- /dev/null +++ b/api/app/lib/routes/role/index.js @@ -0,0 +1,19 @@ +'use strict'; + +const role = require('../../controllers/role'); + +module.exports = function (app, router, opts) { + + app.fs.api.logAttr['GET/role/list'] = { content: '查询角色列表', visible: true }; + router.get('/role/list', role.get); + + app.fs.api.logAttr['POST/role/add'] = { content: '添加角色', visible: true }; + router.post('/role/add', role.add); + + app.fs.api.logAttr['PUT/role/edit'] = { content: '编辑角色', visible: true }; + router.put('/role/edit', role.edit); + + app.fs.api.logAttr['DEL/role/del'] = { content: '删除角色', visible: true }; + router.del('/role/del', role.del); + +}; \ No newline at end of file diff --git a/api/app/lib/routes/userRole/index.js b/api/app/lib/routes/userRole/index.js new file mode 100644 index 0000000..98bf549 --- /dev/null +++ b/api/app/lib/routes/userRole/index.js @@ -0,0 +1,14 @@ +'use strict'; + +const userRole = require('../../controllers/userRole'); + +module.exports = function (app, router, opts) { + + app.fs.api.logAttr['GET/roleUser/list'] = { content: '角色用户列表', visible: true }; + router.get('/roleUser/list', userRole.get); + + app.fs.api.logAttr['POST/roleUser/add'] = { content: '角色添加用户成功', visible: true }; + router.post('/roleUser/add', userRole.add); + + +}; \ No newline at end of file diff --git a/web/client/src/sections/humanAffairs/actions/index.js b/web/client/src/sections/humanAffairs/actions/index.js index b1869a8..c4051b4 100644 --- a/web/client/src/sections/humanAffairs/actions/index.js +++ b/web/client/src/sections/humanAffairs/actions/index.js @@ -8,6 +8,8 @@ import * as personalTrainRecord from './personalTrainRecord' import * as resourceRepository from './resourceRepository' import * as employeeCommunication from './employeeCommunication' import * as employeeAssessment from './employeeAssessment' +import * as role from './role' + export default { ...personnelFiles, @@ -17,5 +19,6 @@ export default { ...personalTrainRecord, ...resourceRepository, ...employeeCommunication, - ...employeeAssessment + ...employeeAssessment, + ...role } \ No newline at end of file diff --git a/web/client/src/sections/humanAffairs/actions/role.js b/web/client/src/sections/humanAffairs/actions/role.js new file mode 100644 index 0000000..3697ac4 --- /dev/null +++ b/web/client/src/sections/humanAffairs/actions/role.js @@ -0,0 +1,82 @@ +'use strict'; + +import { ApiTable, basicAction } from '$utils' + +export function getRoleList(query) {//查询 + return (dispatch) => basicAction({ + type: "get", + dispatch: dispatch, + actionType: "GET_ROLE_LIST", + query: query, + url: `${ApiTable.getRoleList}`, + msg: { option: "查询角色列表" }, + reducer: { name: "roleList", params: { noClear: true } }, + }); +} +export function addRole(data) { + return dispatch => basicAction({ + type: 'post', + dispatch: dispatch, + actionType: 'ADD_ROLE', + url: ApiTable.addRole, + data: data, + msg: { option: '添加角色' }, + }); +} + +export function editRole(data) {//更新 + let msg = '' + if (data) { + msg = data.msg + } + return (dispatch) => + basicAction({ + type: "put", + dispatch: dispatch, + data, + actionType: "PUT_ROLE", + url: `${ApiTable.editRole}`, + msg: { option: msg }, //更新 + reducer: {}, + }); +} + +export function delRole(data) {//删除 + let msg = '' + if (data) { + msg = data.msg + } + return (dispatch) => + basicAction({ + type: "del", + query: data, + dispatch: dispatch, + actionType: "DEL_ROLE", + url: `${ApiTable.delRole}`, + msg: { option: msg }, //删除 + reducer: {}, + }); +} + +export function getUserRoleList(query) {//查询 + return (dispatch) => basicAction({ + type: "get", + dispatch: dispatch, + actionType: "GET_USER_ROLE_LIST", + query: query, + url: `${ApiTable.getUserRoleList}`, + msg: { option: "查询角色用户列表" }, + reducer: { name: "userRoleList", params: { noClear: true } }, + }); +} + +export function addUserRole(data) { + return dispatch => basicAction({ + type: 'post', + dispatch: dispatch, + actionType: 'ADD_USER_ROLE', + url: ApiTable.addUserRole, + data: data, + msg: { option: '角色绑定用户' }, + }); +} diff --git a/web/client/src/sections/humanAffairs/containers/employeeAuth.jsx b/web/client/src/sections/humanAffairs/containers/employeeAuth.jsx index 9749141..8908205 100644 --- a/web/client/src/sections/humanAffairs/containers/employeeAuth.jsx +++ b/web/client/src/sections/humanAffairs/containers/employeeAuth.jsx @@ -1,11 +1,175 @@ -import React, { useEffect, useState } from 'react'; +import React, { useEffect, useState, useRef } from 'react'; import { connect } from 'react-redux'; -import Empty from '../components/empty'; +import { Col, Row, Button, Tree, ButtonGroup, RadioGroup, Radio, Checkbox, CheckboxGroup, Popconfirm, Modal, Form, useFormApi } from '@douyinfe/semi-ui'; +import EmployeeAuthModal from './employeeAuthModal' +import EmployeeAuthUserModal from './employeeAuthUserModal' import '../style.less' const EmployeeAuth = (props) => { - const { dispatch, actions } = props - + const form = useRef(); + const { dispatch, actions, roleList, userRoleList } = props + const [dataRange, setDataRange] = useState(1); + const [checkedList, setCheckedList] = useState([]); + const [indeterminate, setIndeterminate] = useState(true); + const [checkAll, setCheckall] = useState(false); + const [visible, setVisible] = useState(false); + const [eidtRole, setEidtRole] = useState(null); + const [eidtTit, setEidtTit] = useState(null); + const [visibleUser, setVisibleUser] = useState(false); + const getRoleList = () => { + dispatch(actions.humanAffairs.getRoleList()) + dispatch(actions.humanAffairs.getUserRoleList()) + } + useEffect(() => { + getRoleList() + }, []) + let hrUser = JSON.parse(sessionStorage.getItem('hrUser')) + console.log(hrUser, '登录返回'); + console.log(roleList, '角色列表'); + console.log(userRoleList, '用户角色关联'); + const button = ( + + + + + ); + const style = { + display: 'flex', + justifyContent: 'space-between', + alignItems: 'center' + }; + let roleAndUser = [] + roleList && roleList.rows.forEach(e => { + let children = [] + userRoleList && userRoleList.rows.forEach(i => { + if (e.id == i.roleId) { + let user = hrUser.userListArr.find(s => s.id == i.userId) + children.push(user) + } + }) + roleAndUser.push({ + id: e.id, + name: e.name, + children: children + }) + }) + console.log(roleAndUser, 'zuihoushuju '); + let roleLists = [] + if (roleAndUser.length) { + roleAndUser.forEach(e => { + let children = [] + if (e.children) { + e.children.forEach(i => { + children.push({ + label: ( +
+ {i.name} + + + +
+ ), + value: i.id, + key: i.id + new Date(), + name: i.name + }) + }) + } + roleLists.push({ + label: ( +
+ {e.name} + + + { deletRole(e.id) }} + > + + + +
+ ), + value: e.id, + key: e.id, + children: children, + name: e.name + }) + }) + } + const dataRangeChange = (e) => { + setDataRange(e.target.value); + }; + const plainOptions = [ + { + id: 1, + name: '绩效考核', + child: [ + { id: 1, name: '基本动作', child: [{ id: 1, name: '查看' }, { id: 2, name: '添加' }, { id: 3, name: '编辑' }, { id: 4, name: '删除' }] }, + { id: 2, name: '员工考核', child: [{ id: 5, name: '查看' }, { id: 6, name: '添加' }, { id: 7, name: '编辑' }, { id: 8, name: '删除' }] }, + { id: 1, name: '中层考核', child: [{ id: 1, name: '查看' }, { id: 2, name: '添加' }, { id: 3, name: '编辑' }, { id: 4, name: '删除' }] }, + { id: 2, name: '高管考核', child: [{ id: 5, name: '查看' }, { id: 6, name: '添加' }, { id: 7, name: '编辑' }, { id: 8, name: '删除' }] }, + { id: 1, name: '员工绩效', child: [{ id: 1, name: '查看' }, { id: 2, name: '添加' }, { id: 3, name: '编辑' }, { id: 4, name: '删除' }] }, + ] + }, + { + id: 2, + name: '模块2', + child: [ + { id: 1, name: '模块2子模块1', child: [{ id: 1, name: '查看' }, { id: 2, name: '添加' }, { id: 3, name: '编辑' }, { id: 4, name: '删除' }] }, + { id: 2, name: '模块2子模块2', child: [{ id: 1, name: '查看' }, { id: 2, name: '添加' }, { id: 3, name: '编辑' }, { id: 4, name: '删除' }] } + ] + }, + { + id: 3, + name: '模块3', + child: [ + { id: 1, name: '模块3子模块1', child: [{ id: 1, name: '查看' }, { id: 2, name: '添加' }, { id: 3, name: '编辑' }, { id: 4, name: '导入' }] }, + { id: 2, name: '模块3子模块2', child: [{ id: 1, name: '查看' }, { id: 2, name: '添加' }, { id: 3, name: '编辑' }, { id: 4, name: '导出' }] } + ] + }, + ]; + const onCheckAllChange = (e) => { + setCheckedList(e.target.checked ? plainOptions : []); + setIndeterminate(false); + setCheckall(e.target.checked); + }; + const onChange = (checkedList) => { + setCheckedList(checkedList); + setIndeterminate(!!checkedList.length && checkedList.length < plainOptions.length); + setCheckall(checkedList.length === plainOptions.length); + }; + const handleCancel = () => { + setVisible(false); + }; + const showModal = (eidtRole, tit) => { + setEidtRole(eidtRole) + setEidtTit(tit) + setVisible(true); + }; + const deletRole = (id) => { + let data = { id } + dispatch(actions.humanAffairs.delRole(data)).then(e => { + if (e.success) { + getRoleList() + } + }) + } + const showUserMolad = () => { + setVisibleUser(true); + } + const handleCancelUser = () => { + setVisibleUser(false); + }; return ( <>
@@ -22,18 +186,92 @@ const EmployeeAuth = (props) => {
EMPLOYEE AUTHORITY
- + + +
+
+

管理员设置

+ 平台管理员由项企统一认证平台授权,拥有对本系统所有功能进行设置和管理。 +
+
+
+ 人力资源部 +

姜珍

+

角色说明:拥有全平台的权限

+
+
+ 人力资源部 +

郭菲

+

角色说明:拥有全平台的权限

+
+
+
+

角色授权

+
+
+ + +
+ + +
+ + + +
+

数据范围:

+ + 本部门 + 全公司 + +
+
+

权限范围:

+ 全部权限 +
+ {plainOptions.map(e => { + return
+ {e.name} + {e.child.map(i => { + return
+ {i.name} + + { + i.child.map(s => ({s.name})) + } + +
+ })} + +
+ })} + + +
+
+
+ { + visible ? : '' + } + { + visibleUser ? : '' + } ) } function mapStateToProps(state) { - const { auth, global } = state; + const { auth, global, roleList, userRoleList } = state; return { user: auth.user, actions: global.actions, + roleList: roleList.data, + userRoleList: userRoleList.data }; } diff --git a/web/client/src/sections/humanAffairs/containers/employeeAuthModal.jsx b/web/client/src/sections/humanAffairs/containers/employeeAuthModal.jsx new file mode 100644 index 0000000..b328422 --- /dev/null +++ b/web/client/src/sections/humanAffairs/containers/employeeAuthModal.jsx @@ -0,0 +1,79 @@ +import React, { useEffect, useState, useRef } from 'react'; +import { connect } from 'react-redux'; +import { Col, Row, Modal, Form } from '@douyinfe/semi-ui'; +import '../style.less' + +const EmployeeAuthModal = (props) => { + const form = useRef(); + const { dispatch, actions, handleCancel, eidtTit, visible, getRoleList, eidtRole } = props + + const handleOk = () => { + form.current.validate() + .then((values) => { + if (eidtRole == null) { + dispatch(actions.humanAffairs.addRole(values)).then(e => { + if (e.success) { + getRoleList() + handleCancel() + } + }) + } else { + values.id = eidtRole.id + dispatch(actions.humanAffairs.editRole(values)).then(e => { + if (e.success) { + getRoleList() + handleCancel() + } + }) + } + }) + .catch((errors) => { + console.log(errors); + }); + }; + let message = '该项为必填项'; + return ( + <> + +
(form.current = formApi)} + labelPosition={'left'} + labelAlign={'right'} + labelCol={{ span: 6 }} + wrapperCol={{ span: 18 }} + > + + + + + +
+
+ + ) +} + +function mapStateToProps(state) { + const { auth, global, roleList } = state; + return { + user: auth.user, + actions: global.actions, + roleList: roleList.data, + }; +} + +export default connect(mapStateToProps)(EmployeeAuthModal); diff --git a/web/client/src/sections/humanAffairs/containers/employeeAuthUserModal.jsx b/web/client/src/sections/humanAffairs/containers/employeeAuthUserModal.jsx new file mode 100644 index 0000000..a0843f9 --- /dev/null +++ b/web/client/src/sections/humanAffairs/containers/employeeAuthUserModal.jsx @@ -0,0 +1,114 @@ +import React, { useEffect, useState, useRef } from 'react'; +import { connect } from 'react-redux'; +import { Col, Row, Modal, Form } from '@douyinfe/semi-ui'; +import '../style.less' + +const employeeAuthUserModal = (props) => { + const form = useRef(); + const { dispatch, actions, handleCancelUser, visibleUser, getRoleList, roleList,userRoleList } = props + const [userValue, setUserValue] = useState([]); + + const handleOk = () => { + form.current.validate() + .then((values) => { + dispatch(actions.humanAffairs.addUserRole(values)).then(e => { + if (e.success) { + getRoleList() + handleCancelUser() + } + }) + }) + .catch((errors) => { + console.log(errors); + }); + }; + let message = '该项为必填项'; + let hrUser = JSON.parse(sessionStorage.getItem('hrUser')) + const seleRole = (value)=>{ + let userValue = [] + userRoleList&&userRoleList.rows&&userRoleList.rows.forEach(e=> { + if(e.roleId == value){ + userValue.push(e.userId) + } + }) + form.current.setValue('userId',userValue) + } + return ( + <> + +
(form.current = formApi)} + labelPosition={'left'} + labelAlign={'right'} + labelCol={{ span: 6 }} + wrapperCol={{ span: 18 }} + > + + + {/* */} + + { + roleList && roleList.rows.map(e => { + return ( + {e.name} + ) + }) + } + + + { + hrUser.userListArr.map(e => { + return ( + {e.name} + ) + }) + } + + + +
+
+ + ) +} + +function mapStateToProps(state) { + const { auth, global, roleList } = state; + return { + user: auth.user, + actions: global.actions, + roleList: roleList.data, + }; +} + +export default connect(mapStateToProps)(employeeAuthUserModal); diff --git a/web/client/src/sections/humanAffairs/style.less b/web/client/src/sections/humanAffairs/style.less index 3a5389b..2338fec 100644 --- a/web/client/src/sections/humanAffairs/style.less +++ b/web/client/src/sections/humanAffairs/style.less @@ -57,8 +57,133 @@ font-size: 14px; } } + // .semi-input-wrapper { // margin-bottom: 20px; // } } +} + +.authorityBox { + width: 100%; + + .authorityTit { + width: 100%; + margin-top: 30px; + + h2 { + width: 100%; + height: 32px; + line-height: 32px; + font-size: 22px; + color: #333; + margin-bottom: 8px; + + b { + display: block; + float: left; + width: 5px; + height: 32px; + background: #80B3FF; + margin-right: 15px; + } + } + + span { + display: block; + width: 100%; + font-size: 16px; + color: #333; + } + } + + .authorityAdminList { + overflow: hidden; + width: 100%; + margin-top: 20px; + + div { + width: 275px; + height: 150px; + float: left; + background: #F2F2F2; + margin-right: 20px; + overflow: hidden; + } + + span { + display: inline-block; + background: #0099FF; + color: #fff; + font-size: 14px; + padding: 3px 7px; + border-radius: 3px; + margin-top: 10px; + margin-left: 10px; + } + + h2 { + width: 100%; + font-size: 22px; + margin-left: 40px; + margin-bottom: 10px; + color: #333; + } + + h3 { + width: 100%; + font-size: 22px; + margin-left: 20px; + margin-top: 10px; + color: #333; + margin-bottom: 15px; + } + + h4 { + width: 100%; + font-size: 16px; + margin-left: 20px; + margin-top: 30px; + font-weight: normal; + color: #333; + } + } + + .roleAuthori { + width: 100%; + + .semi-checkbox-checked .semi-checkbox-inner-display { + background: #0099FF; + box-shadow: none; + } + + .semi-radio .semi-radio-inner-checked .semi-radio-inner-display { + border: 1px solid #0099FF; + background: #0099FF; + } + + .dataRange { + width: 100%; + overflow: hidden; + + h2 { + float: left; + font-size: 22px; + color: #333; + margin-right: 15px; + margin-top: 10px; + margin-bottom: 10px; + } + + } + .codeList{ + width: 100%; + border-left: 1px solid #F2F2F2; + } + .codeList:first-of-type{ + border-top: 1px solid #F2F2F2; + } + } + + } \ No newline at end of file diff --git a/web/client/src/utils/webapi.js b/web/client/src/utils/webapi.js index 3995a99..d71d1fe 100644 --- a/web/client/src/utils/webapi.js +++ b/web/client/src/utils/webapi.js @@ -64,7 +64,15 @@ export const ApiTable = { getEmployeeCommunicate: 'employee/communicate/list', //考核 - getemployeeAssessmentList: 'employessAssessment/list/{type}' + getemployeeAssessmentList: 'employessAssessment/list/{type}', + + //权限 + getRoleList:'role/list', + addRole:'role/add', + editRole:'role/edit', + delRole:'role/del', + getUserRoleList:'roleUser/list', + addUserRole:'roleUser/add', }; export const RouteTable = {