Commit fd3b985a authored by 熊成伟's avatar 熊成伟

debug

parent bc5d57c3
Pipeline #15662 passed with stages
in 1 minute and 1 second
......@@ -11,7 +11,7 @@ const Index = (props) => {
<div className="todo-tag pos-aline">
{props.name}
</div>
<p>{data.BT}</p>
<p style={{flex: 1}}>{data.BT}</p>
</div>
<span>
<img
......@@ -30,11 +30,11 @@ const Index = (props) => {
<p className="pos-aline"><img alt="" src="/img/time.png" className="footer-mes-img"/>更新时间:{data.JZRQ}</p>
<p className="pos-aline footer-mes-sec"><img alt="" src="/img/time-2.png" className="footer-mes-img"/>发起时间:{data.SWRQ}</p>
</div>
{props.data && props.data.JJCD !=='无' && (
{props.data && props.data.JJCD !=='无' && props.data.JJCD ==='紧急' && (
<img
alt=""
className="todo-footer-img"
src={props.data && props.data.JJCD ==='紧急' ? '/img/serious.png' : '/img/urgency.png'}
src={'/img/serious.png'}
/>
)}
......
......@@ -35,11 +35,18 @@ const Index = (props) => {
<p className="pos-aline"><img alt="" src="/img/time.png" className="footer-mes-img"/>更新时间:{data.RECEIVEDATE ? moment(data.RECEIVEDATE).format("YYYY-MM-DD HH:mm:ss") : ''}</p>
<p className="pos-aline footer-mes-sec"><img alt="" src="/img/time-2.png" className="footer-mes-img"/>发起时间:{data.SENDTIME ? moment(data.SENDTIME).format("YYYY-MM-DD HH:mm:ss") : ''}</p>
</div>
{data && data.JJCD !=='无' && data.JJCD ==='紧急' && (
<img
alt=""
className="todo-footer-img"
src={props.data && props.data.read ? '/img/serious.png' : '/img/urgency.png'}
src={'/img/serious.png'}
/>
)}
{/*<img*/}
{/*alt=""*/}
{/*className="todo-footer-img"*/}
{/*src={props.data && props.data.read ? '/img/serious.png' : '/img/urgency.png'}*/}
{/*/>*/}
</div>
</div>
);
......
......@@ -11,6 +11,7 @@
margin-bottom: 1px;
}
.todo-tag{
text-align: center;
line-height: 18px;
height: 18px;
font-size: 9px;
......
......@@ -201,33 +201,33 @@ const Process = (props) => {
}
});
}
const handleScroll = () => {
const basic = document.getElementById("event-basic").offsetTop;
const adjunct = document.getElementById("event-adjunct").offsetTop;
const flow = document.getElementById("event-flow").offsetTop;
const option = document.getElementById("event-option").offsetTop;
const top = document.documentElement.scrollTop || document.body.scrollTop;
let clientHeight = document.documentElement.clientHeight || document.body.clientHeight;
let scrollHeight = document.documentElement.scrollHeight || document.body.scrollHeight;
if (top >= basic && top < adjunct) {
setCurrent('basic')
}else if (top >= adjunct - basic && top < flow) {
setCurrent('adjunct')
}else if (top >= flow - basic && top < option) {
setCurrent('flow')
}else if (top >= option - basic) {
setCurrent('option')
}
if (top + clientHeight === scrollHeight) {
setCurrent('option')
}
};
useEffect(() => {
window.addEventListener('scroll', handleScroll, true);
return () => window.removeEventListener('scroll', handleScroll, true);
}, []);
// const handleScroll = () => {
// const basic = document.getElementById("event-basic").offsetTop;
// const adjunct = document.getElementById("event-adjunct").offsetTop;
// const flow = document.getElementById("event-flow").offsetTop;
// const option = document.getElementById("event-option").offsetTop;
// const top = document.documentElement.scrollTop || document.body.scrollTop;
// let clientHeight = document.documentElement.clientHeight || document.body.clientHeight;
// let scrollHeight = document.documentElement.scrollHeight || document.body.scrollHeight;
// if (top >= basic && top < adjunct) {
// setCurrent('basic')
// }else if (top >= adjunct - basic && top < flow) {
// setCurrent('adjunct')
// }else if (top >= flow - basic && top < option) {
// setCurrent('flow')
// }else if (top >= option - basic) {
// setCurrent('option')
// }
// if (top + clientHeight === scrollHeight) {
// setCurrent('option')
// }
// };
// useEffect(() => {
// window.addEventListener('scroll', handleScroll, true);
// return () => window.removeEventListener('scroll', handleScroll, true);
// }, []);
const resultLoading = basicLoading && adjunctLoading && flowLoading;
return (
......
......@@ -87,13 +87,18 @@ const Notice = (props) => {
getData(false, [])
}, [searchWord, tab]);
const [tabData, setTabData] = useState([])
const [tabData, setTabData] = useState([]);
useEffect(() => {
const menu = JSON.parse(localStorage.getItem("menu"));
const index = menu.findIndex(item => item.id === type);
const menuG = menu[index].children.map(item => ({title: item.nodeName, sub: item.id}))
const menuG = menu[index].children.map(item => ({title: item.nodeName, sub: item.id}));
if (menuG.length > 0) {
setTab(menuG[0].sub)
}else {
setStart(false);
setLoading(false)
}
setTabData(menuG);
setTab(menu[0].id)
}, []);
return (
<Document title="通知">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment