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

Loading…
Cancel
Save