Browse Source

(+)人资权限管理

master
ww664853070 1 year ago
parent
commit
ddc45ccde2
  1. 98
      api/app/lib/controllers/role/index.js
  2. 99
      api/app/lib/controllers/userRole/index.js
  3. 40
      api/app/lib/models/role.js
  4. 38
      api/app/lib/models/user_role.js
  5. 19
      api/app/lib/routes/role/index.js
  6. 14
      api/app/lib/routes/userRole/index.js
  7. 5
      web/client/src/sections/humanAffairs/actions/index.js
  8. 82
      web/client/src/sections/humanAffairs/actions/role.js
  9. 250
      web/client/src/sections/humanAffairs/containers/employeeAuth.jsx
  10. 79
      web/client/src/sections/humanAffairs/containers/employeeAuthModal.jsx
  11. 114
      web/client/src/sections/humanAffairs/containers/employeeAuthUserModal.jsx
  12. 125
      web/client/src/sections/humanAffairs/style.less
  13. 10
      web/client/src/utils/webapi.js

98
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,
}

99
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,
}

40
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;
};

38
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;
};

19
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);
};

14
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);
};

5
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
}

82
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: '角色绑定用户' },
});
}

250
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 = (
<ButtonGroup
size="small"
theme="borderless"
>
<Button>编辑</Button>
<Button>删除</Button>
</ButtonGroup>
);
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: (
<div style={style}>
<span>{i.name}</span>
<ButtonGroup
size="small"
theme="borderless"
>
<Button>删除</Button>
</ButtonGroup>
</div>
),
value: i.id,
key: i.id + new Date(),
name: i.name
})
})
}
roleLists.push({
label: (
<div style={style}>
<span>{e.name}</span>
<ButtonGroup
size="small"
theme="borderless"
>
<Button onClick={() => { showModal(e, '编辑角色') }}>编辑</Button>
<Popconfirm
title="是否确定删除?"
onConfirm={() => { deletRole(e.id) }}
>
<Button>删除</Button>
</Popconfirm>
</ButtonGroup>
</div>
),
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 (
<>
<div style={{ padding: '0px 12px' }}>
@ -22,18 +186,92 @@ const EmployeeAuth = (props) => {
<div style={{ marginLeft: 6, fontSize: 12, color: '#969799', fontFamily: "DINExp", }}>EMPLOYEE AUTHORITY</div>
</div>
</div>
<Empty />
<div className='authorityBox'>
<div className='authorityTit'>
<h2><b></b>管理员设置</h2>
<span>平台管理员由项企统一认证平台授权拥有对本系统所有功能进行设置和管理</span>
</div>
<div className='authorityAdminList'>
<div >
<span>人力资源部</span>
<h2>姜珍</h2>
<h4>角色说明拥有全平台的权限</h4>
</div>
<div >
<span>人力资源部</span>
<h2>郭菲</h2>
<h4>角色说明拥有全平台的权限</h4>
</div>
</div>
<div className='authorityTit'>
<h2><b></b>角色授权</h2>
</div>
<div className='roleAuthori'>
<Row>
<Col span={4}>
<div>
<Button theme='solid' style={{ marginLeft: 15, background: '#0099FF' }} onClick={() => { showModal(null, '新增角色') }}>新建角色</Button>
<Button theme='solid' onClick={showUserMolad} style={{ marginLeft: 15, background: '#0099FF' }}>添加修改用户绑定</Button>
</div>
<Tree
treeData={roleLists}
style={{ marginTop: 20 }}
/>
</Col>
<Col span={19} style={{ float: 'right' }}>
<div className='dataRange'>
<h2>数据范围:</h2>
<RadioGroup onChange={dataRangeChange} value={dataRange} style={{ float: 'left', marginTop: 17, }}>
<Radio value={1}>本部门</Radio>
<Radio value={2}>全公司</Radio>
</RadioGroup>
</div>
<div className='dataRange'>
<h2>权限范围:</h2>
<Checkbox style={{ float: 'left', marginTop: 17, }} >全部权限</Checkbox>
</div>
{plainOptions.map(e => {
return <div className='codeList'>
<Checkbox style={{ borderBottom: '1px solid #f2f2f2', padding: '10px 10px' }} key={e.id}>{e.name}</Checkbox>
{e.child.map(i => {
return <div>
<Checkbox value={i.id} style={{ borderBottom: '1px solid #f2f2f2', padding: '10px 10px' }} key={i.id} onChange={onCheckAllChange}>{i.name}</Checkbox>
<CheckboxGroup style={{ width: '100%', borderBottom: '1px solid #f2f2f2', padding: '10px 10px' }} direction='horizontal'>
{
i.child.map(s => (<Checkbox key={s.id} value={s.id} >{s.name}</Checkbox>))
}
</CheckboxGroup>
</div>
})}
</div>
})}
</Col>
</Row>
</div>
</div>
</div>
</div>
{
visible ? <EmployeeAuthModal eidtTit={eidtTit} visible={visible} handleCancel={handleCancel} getRoleList={getRoleList} eidtRole={eidtRole} /> : ''
}
{
visibleUser ? <EmployeeAuthUserModal userRoleList={userRoleList} visibleUser={visibleUser} handleCancelUser={handleCancelUser} getRoleList={getRoleList} roleList={roleList} /> : ''
}
</>
)
}
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
};
}

79
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 (
<>
<Modal
title={eidtTit}
visible={visible}
onOk={handleOk}
onCancel={handleCancel}
closeOnEsc={true}
maskClosable={false}
>
<Form
getFormApi={(formApi) => (form.current = formApi)}
labelPosition={'left'}
labelAlign={'right'}
labelCol={{ span: 6 }}
wrapperCol={{ span: 18 }}
>
<Row>
<Col span={24}>
<Form.Input
field='name'
label="角色名称"
initValue={eidtRole?.name || ""}
rules={[
{ required: true, message },
]}
/>
</Col>
</Row>
</Form>
</Modal>
</>
)
}
function mapStateToProps(state) {
const { auth, global, roleList } = state;
return {
user: auth.user,
actions: global.actions,
roleList: roleList.data,
};
}
export default connect(mapStateToProps)(EmployeeAuthModal);

114
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 (
<>
<Modal
title='角色添加用户'
visible={visibleUser}
onOk={handleOk}
onCancel={handleCancelUser}
closeOnEsc={true}
maskClosable={false}
>
<Form
getFormApi={(formApi) => (form.current = formApi)}
labelPosition={'left'}
labelAlign={'right'}
labelCol={{ span: 6 }}
wrapperCol={{ span: 18 }}
>
<Row>
<Col span={24}>
{/* <Form.Input
field='name'
label="选择角色"
// initValue={eidtRole?.name || ""}
rules={[
{ required: true, message },
]}
/> */}
<Form.Select
field="roleId"
label='选择角色'
style={{ width: '100%' }}
onChange = {seleRole}
rules={[
{ required: true, message },
]}>
{
roleList && roleList.rows.map(e => {
return (
<Form.Select.Option value={e.id}>{e.name}</Form.Select.Option>
)
})
}
</Form.Select>
<Form.Select
filter
multiple
autoClearSearchValue={false}
field="userId"
label='选择用户'
style={{ width: '100%' }}
rules={[
{ required: true, message },
]}>
{
hrUser.userListArr.map(e => {
return (
<Form.Select.Option value={e.id}>{e.name}</Form.Select.Option>
)
})
}
</Form.Select>
</Col>
</Row>
</Form>
</Modal>
</>
)
}
function mapStateToProps(state) {
const { auth, global, roleList } = state;
return {
user: auth.user,
actions: global.actions,
roleList: roleList.data,
};
}
export default connect(mapStateToProps)(employeeAuthUserModal);

125
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;
}
}
}

10
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 = {

Loading…
Cancel
Save