wenlele 3 years ago
parent
commit
0c0026c7c4
  1. 239
      web/client/src/sections/control/containers/control.jsx
  2. 102
      web/client/src/sections/control/containers/userCenter.jsx

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

@ -103,6 +103,50 @@ const Control = (props) => {
})
}
concentration2()
const domProject = document.getElementById("news");
if (domProject) {
newScrollbar = new PerfectScrollbar("#news", {
suppressScrollX: true,
});
}
const domProject2 = document.getElementById("member");
if (domProject2) {
memberScrollbar = new PerfectScrollbar("#member", {
suppressScrollX: true,
});
}
const domProject3 = document.getElementById("equipment");
if (domProject3) {
equipmentScrollbar = new PerfectScrollbar("#equipment", {
suppressScrollX: true,
});
}
const domProject4 = document.getElementById("web");
if (domProject4) {
webScrollbar = new PerfectScrollbar("#web", {
suppressScrollX: true,
})
}
const domProject5 = document.getElementById("problems");
if (domProject5) {
problemsScrollbar = new PerfectScrollbar("#problems", {
suppressScrollX: true,
});
}
const domProject6 = document.getElementById("alarm");
if (domProject6) {
alarmScrollbar = new PerfectScrollbar("#alarm", {
suppressScrollY: true,
});
}
return () => {
}
@ -274,6 +318,25 @@ const Control = (props) => {
}
}
concentration3()
const domProject1 = document.getElementById("overviewCalc");
if (domProject1) {
overviewScrollbar = new PerfectScrollbar("#overviewCalc", {
suppressScrollY: true,
});
}
const pomsList = document.getElementById("pomsList");
if (pomsList) {
pomsListScrollbar = new PerfectScrollbar("#pomsList", {
suppressScrollX: true,
});
}
const domProject5 = document.getElementById("problems");
if (domProject5) {
problemsScrollbar = new PerfectScrollbar("#problems", {
suppressScrollX: true,
});
}
}, [pepProjectId, exhibition.current])
useEffect(() => {
@ -345,9 +408,9 @@ const Control = (props) => {
const domProject = document.getElementById("news");
if (domProject) {
newScrollbar = new PerfectScrollbar("#news", {
suppressScrollX: true,
});
// newScrollbar = new PerfectScrollbar("#news", {
// suppressScrollX: true,
// });
if (domProject && newScrollbar) {
newScrollbar.update();
}
@ -355,19 +418,19 @@ const Control = (props) => {
const pomsList = document.getElementById("pomsList");
if (pomsList) {
pomsListScrollbar = new PerfectScrollbar("#pomsList", {
suppressScrollX: true,
});
// pomsListScrollbar = new PerfectScrollbar("#pomsList", {
// suppressScrollX: true,
// });
if (pomsList && pomsListScrollbar) {
pomsListScrollbar.update();
}
}
const domProject1 = document.getElementById("overview");
const domProject1 = document.getElementById("overviewCalc");
if (domProject1) {
overviewScrollbar = new PerfectScrollbar("#overview", {
suppressScrollY: true,
});
// overviewScrollbar = new PerfectScrollbar("#overviewCalc", {
// suppressScrollY: true,
// });
if (domProject1 && overviewScrollbar) {
overviewScrollbar.update();
}
@ -375,9 +438,9 @@ const Control = (props) => {
const domProject2 = document.getElementById("member");
if (domProject2) {
memberScrollbar = new PerfectScrollbar("#member", {
suppressScrollX: true,
});
// memberScrollbar = new PerfectScrollbar("#member", {
// suppressScrollX: true,
// });
if (domProject2 && memberScrollbar) {
memberScrollbar.update();
}
@ -385,9 +448,9 @@ const Control = (props) => {
const domProject3 = document.getElementById("equipment");
if (domProject3) {
equipmentScrollbar = new PerfectScrollbar("#equipment", {
suppressScrollX: true,
});
// equipmentScrollbar = new PerfectScrollbar("#equipment", {
// suppressScrollX: true,
// });
if (domProject3 && equipmentScrollbar) {
equipmentScrollbar.update();
}
@ -395,9 +458,9 @@ const Control = (props) => {
const domProject4 = document.getElementById("web");
if (domProject4) {
webScrollbar = new PerfectScrollbar("#web", {
suppressScrollX: true,
})
// webScrollbar = new PerfectScrollbar("#web", {
// suppressScrollX: true,
// })
if (domProject4 && webScrollbar) {
webScrollbar.update();
}
@ -405,9 +468,9 @@ const Control = (props) => {
const domProject5 = document.getElementById("problems");
if (domProject5) {
problemsScrollbar = new PerfectScrollbar("#problems", {
suppressScrollX: true,
});
// problemsScrollbar = new PerfectScrollbar("#problems", {
// suppressScrollX: true,
// });
if (domProject5 && problemsScrollbar) {
problemsScrollbar.update();
}
@ -415,9 +478,9 @@ const Control = (props) => {
const domProject6 = document.getElementById("alarm");
if (domProject6) {
alarmScrollbar = new PerfectScrollbar("#alarm", {
suppressScrollY: true,
});
// alarmScrollbar = new PerfectScrollbar("#alarm", {
// suppressScrollY: true,
// });
if (domProject6 && alarmScrollbar) {
alarmScrollbar.update();
}
@ -637,7 +700,8 @@ const Control = (props) => {
{/* 统计概览 */}
{exhibition.current?.overall?.find(v => v.key == 'statistical') ? <>
{
exhibition.current?.overall?.find(v => v.key == 'statistical') ? <>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginTop: 25 }}>
<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>
@ -654,83 +718,92 @@ const Control = (props) => {
</div>
</div>
{/* 统计概览 */}
<div id='overview' style={{ position: 'relative' }}>
<div id='overviewCalc' style={{ width: 'calc(100%)', position: 'relative' }}>
<div style={{ display: 'inline-flex', marginTop: 16 }}>
{/* 项目 */}
{pepProjectId ? '' : <div id='pomsList' style={{ marginRight: 20, paddingRight: 24, position: 'relative', marginBottom: 30, width: 410, height: 221, border: '1px solid rgba(220,222,224,0.2)', boxShadow: '0px 2px 12px 1px #F2F3F5', borderRadius: 2 }}>
{pomsList?.map((v, index) => {
return <div key={'pomsList' + index} title={v.pepProjectName}
style={{
width: 400, cursor: 'pointer', lineHeight: '30px', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', fontSize: 14, color: '#969799',
background: projectId == v.pepProjectId ? 'linear-gradient(252deg, #F9FBFF 0%, rgb(185 202 236) 100%)' : "",
}}
onClick={() => setProjectId(v.pepProjectId)}>{v.pepProjectName}</div>
})}
</div>}
{
pepProjectId ?
'' :
<div id='pomsList' style={{
marginRight: 20, paddingRight: 24, position: 'relative', marginBottom: 30, width: 410, height: 221, border: '1px solid rgba(220,222,224,0.2)', boxShadow: '0px 2px 12px 1px #F2F3F5', borderRadius: 2
}}>
{pomsList?.map((v, index) => {
return <div key={'pomsList' + index} title={v.pepProjectName}
style={{
width: 400, cursor: 'pointer', lineHeight: '30px', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', fontSize: 14, color: '#969799',
background: projectId == v.pepProjectId ? 'linear-gradient(252deg, #F9FBFF 0%, rgb(185 202 236) 100%)' : "",
}}
onClick={() => setProjectId(v.pepProjectId)}>{v.pepProjectName}</div>
})}
</div>}
{/* 项目里程碑 */}
{exhibition.current?.statistical?.find(v => v.key == 'milestone') && projectId && projectData?.find(u => u.id == projectId)?.pepProjectName ?
<div style={{ marginBottom: 30, width: 466, height: 221, border: '1px solid rgba(220,222,224,0.2)', boxShadow: '0px 2px 12px 1px #F2F3F5', borderRadius: 2 }}>
<div style={{ margin: '20px 0px 20px 24px', color: '#4A4A4A', fontSize: 16, fontWeight: 'bold' }}>
项目里程碑
</div>
<div style={{ display: 'flex', marginBottom: 20, marginLeft: 24 }}>
<div style={{ display: 'flex' }}>
<div style={{ fontSize: 14, color: '#969799', marginRight: 4 }}>
立项时间
</div>
<div style={{ fontSize: 14, color: '#4A4A4A', width: 104 }} title='项企项目数据为空或未开发'>
暂无
</div>
{
exhibition.current?.statistical?.find(v => v.key == 'milestone') && projectId &&
projectData?.find(u => u.id == projectId)?.pepProjectName ?
<div style={{
marginBottom: 30, width: 466, height: 221, border: '1px solid rgba(220,222,224,0.2)', boxShadow: '0px 2px 12px 1px #F2F3F5', borderRadius: 2
}}>
<div style={{ margin: '20px 0px 20px 24px', color: '#4A4A4A', fontSize: 16, fontWeight: 'bold' }}>
项目里程碑
</div>
<div style={{ display: 'flex' }}>
<div style={{ fontSize: 14, color: '#969799', marginRight: 4 }}>
施工时间
<div style={{ display: 'flex', marginBottom: 20, marginLeft: 24 }}>
<div style={{ display: 'flex' }}>
<div style={{ fontSize: 14, color: '#969799', marginRight: 4 }}>
立项时间
</div>
<div style={{ fontSize: 14, color: '#4A4A4A', width: 104 }} title='项企项目数据为空或未开发'>
暂无
</div>
</div>
<div style={{ fontSize: 14, color: '#4A4A4A' }} title='项企项目数据为空或未开发'>
暂无
<div style={{ display: 'flex' }}>
<div style={{ fontSize: 14, color: '#969799', marginRight: 4 }}>
施工时间
</div>
<div style={{ fontSize: 14, color: '#4A4A4A' }} title='项企项目数据为空或未开发'>
暂无
</div>
</div>
</div>
</div>
<div style={{ display: 'flex', marginBottom: 24, marginLeft: 24 }}>
<div style={{ display: 'flex' }}>
<div style={{ fontSize: 14, color: '#969799', marginRight: 4 }}>
内验时间
<div style={{ display: 'flex', marginBottom: 24, marginLeft: 24 }}>
<div style={{ display: 'flex' }}>
<div style={{ fontSize: 14, color: '#969799', marginRight: 4 }}>
内验时间
</div>
<div style={{ fontSize: 14, color: '#4A4A4A', width: 104 }} title='项企项目数据为空或未开发'>
暂无
</div>
</div>
<div style={{ fontSize: 14, color: '#4A4A4A', width: 104 }} title='项企项目数据为空或未开发'>
暂无
<div style={{ display: 'flex' }}>
<div style={{ fontSize: 14, color: '#969799', marginRight: 4 }}>
外验时间
</div>
<div style={{ fontSize: 14, color: '#4A4A4A' }} title='项企项目数据为空或未开发'>
暂无
</div>
</div>
</div>
<div style={{ display: 'flex' }}>
<div style={{ display: 'flex', marginBottom: 17, marginLeft: 24 }}>
<div style={{ fontSize: 14, color: '#969799', marginRight: 4 }}>
外验时间
工程维保时间
</div>
<div style={{ fontSize: 14, color: '#4A4A4A' }} title='项企项目数据为空或未开发'>
暂无
</div>
</div>
</div>
<div style={{ display: 'flex', marginBottom: 17, marginLeft: 24 }}>
<div style={{ fontSize: 14, color: '#969799', marginRight: 4 }}>
工程维保时间
</div>
<div style={{ fontSize: 14, color: '#4A4A4A' }} title='项企项目数据为空或未开发'>
暂无
</div>
</div>
<div style={{ display: 'flex', background: 'linear-gradient(252deg, #F9FBFF 0%, #DBE7FF 100%)', height: 38, justifyContent: 'space-between' }}>
<div style={{ display: 'flex', marginLeft: 24, alignItems: 'center' }}>
<div style={{ fontSize: 14, color: '#646566', marginRight: 4 }}>
售后维修时间
</div>
<div style={{ fontSize: 14, color: '#4A4A4A' }} title='项企项目数据为空或未开发'>
暂无
<div style={{ display: 'flex', background: 'linear-gradient(252deg, #F9FBFF 0%, #DBE7FF 100%)', height: 38, justifyContent: 'space-between' }}>
<div style={{ display: 'flex', marginLeft: 24, alignItems: 'center' }}>
<div style={{ fontSize: 14, color: '#646566', marginRight: 4 }}>
售后维修时间
</div>
<div style={{ fontSize: 14, color: '#4A4A4A' }} title='项企项目数据为空或未开发'>
暂无
</div>
</div>
{/* <img src="/assets/images/console/onGoing.png" alt="进行中" /> */}
</div>
{/* <img src="/assets/images/console/onGoing.png" alt="进行中" /> */}
</div>
</div>
: ""}
: ""}
{/* 相关成员 */}
{exhibition.current?.statistical?.find(v => v.key == 'personnel') ?
<div style={{ width: 360, height: 221, marginLeft: 20, paddingLeft: 24, border: '1px solid rgba(220,222,224,0.2)', boxShadow: '0px 2px 12px 1px #F2F3F5', borderRadius: 2 }}>

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