Browse Source

fix 控制台滚动

dev
巴林闲侠 2 years ago
parent
commit
bd491cf9c3
  1. 2
      web/client/src/sections/control/containers/control.jsx
  2. 102
      web/client/src/sections/control/containers/userCenter.jsx

2
web/client/src/sections/control/containers/control.jsx

@ -715,7 +715,7 @@ const Control = (props) => {
</div>
</div>
{/* 统计概览 */}
<div id='overviewCalc' style={{ width: 'calc(100% - 200px)', position: 'relative' }}>
<div id='overviewCalc' style={{ width: 'calc(100%)', position: 'relative' }}>
<div style={{ display: 'inline-flex', marginTop: 16 }}>
{/* 项目 */}
{

102
web/client/src/sections/control/containers/userCenter.jsx

@ -7,76 +7,48 @@ import PerfectScrollbar from "perfect-scrollbar";
const { Meta } = Card;
const UserCenter = (props) => {
const { dispatch, actions, user, loading, socket } = props
useEffect(() => {
console.log('user',user);
// ACTION
// dispatch(actions.example.getMembers(user.orgId))
}, [])
useEffect(() => {
const { dispatch, actions, user, loading, socket } = props
// ACTION
// dispatch(actions.example.getMembers(user.orgId))
})
// websocket 使
// useEffect(() => {
// console.log(socket)
// if (socket) {
// socket.on('TEST', function (msg) {
// console.info(msg);
// });
// return () => {
// socket.off("TEST");
// }
// }
// }, [socket])
return (
<>
<div style={{ padding: '0px 40px' }}>
{/* 头部 */}
<div style={{ margin: '4px 0px 14px', display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', alignItems: 'center' }}>
<div style={{ color: '#4A4A4A', fontSize: 14 }}>
HI欢迎回来行业服务部
</div>
<div style={{ fontFamily: 'YouSheBiaoTiHei', fontSize: 20, color: '#005ABD', marginLeft: 4 }}>
刘昊然
</div>
</div>
</div>
{/* 主体 */}
<div style={{ background: '#FFFFFF', boxShadow: '0px 0px 12px 2px rgba(220,222,224,0.2)', borderRadius: 2, paddingTop: 20, paddingLeft: 24 }}>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', alignItems: 'center' }}>
<div style={{ width: 0, height: 20, borderLeft: '3px solid #005ABD', borderTop: '3px solid transparent', borderBottom: '3px solid transparent' }}></div>
<div style={{ fontFamily: "YouSheBiaoTiHei", fontSize: 24, color: '#101531', marginLeft: 8 }}>用户中心</div>
<div style={{ marginLeft: 6, fontSize: 12, color: '#969799', fontFamily: "DINExp", }}>USER CENTER</div>
</div>
</div>
<div style={{ marginTop: 42,marginLeft:70 }}>
<Avatar size="large" style={{ margin: 4,cursor:'default' }} color="light-blue" alt='User'>
{user.name.split('')[0]}
</Avatar>
</div>
</div>
{/* moment(row.createTime).format("YYYY-MM-DD HH:mm:ss") */}
return (
<>
<div style={{ padding: '0px 40px' }}>
{/* 头部 */}
<div style={{ margin: '4px 0px 14px', display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', alignItems: 'center' }}>
<div style={{ color: '#4A4A4A', fontSize: 14 }}>
HI欢迎回来行业服务部
</div>
<div style={{ fontFamily: 'YouSheBiaoTiHei', fontSize: 20, color: '#005ABD', marginLeft: 4 }}>
刘昊然
</div>
</div>
</div>
{/* 主体 */}
<div style={{ background: '#FFFFFF', boxShadow: '0px 0px 12px 2px rgba(220,222,224,0.2)', borderRadius: 2, paddingTop: 20, paddingLeft: 24 }}>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', alignItems: 'center' }}>
<div style={{ width: 0, height: 20, borderLeft: '3px solid #005ABD', borderTop: '3px solid transparent', borderBottom: '3px solid transparent' }}></div>
<div style={{ fontFamily: "YouSheBiaoTiHei", fontSize: 24, color: '#101531', marginLeft: 8 }}>用户中心</div>
<div style={{ marginLeft: 6, fontSize: 12, color: '#969799', fontFamily: "DINExp", }}>USER CENTER</div>
</div>
</div>
<div style={{ marginTop: 42, marginLeft: 70 }}>
<Avatar size="large" style={{ margin: 4, cursor: 'default' }} color="light-blue" alt='User'>
{user.name.split('')[0]}
</Avatar>
</div>
</div>
</>
)
{/* moment(row.createTime).format("YYYY-MM-DD HH:mm:ss") */}
</div>
</>
)
}
function mapStateToProps (state) {
const { auth, global, members, webSocket } = state;
return {
// loading: members.isRequesting,
user: auth.user,
// actions: global.actions,
// members: members.data,
// socket: webSocket.socket
};
const { auth, global, members, webSocket } = state;
return {
user: auth.user,
};
}
export default connect(mapStateToProps)(UserCenter);

Loading…
Cancel
Save