Commit 9f717e01 authored by chenshouchao's avatar chenshouchao

Merge branch 'feat-20220801' of http://120.77.149.83/root/bkunyun into feat-20220801

parents 3c435492 32ea9991
...@@ -38,6 +38,9 @@ const SearchInput = (props: SearchInputProps) => { ...@@ -38,6 +38,9 @@ const SearchInput = (props: SearchInputProps) => {
height: "32px", height: "32px",
fontSize: "14px", fontSize: "14px",
paddingRight: "8px", paddingRight: "8px",
"&.Mui-focused .MuiOutlinedInput-notchedOutline": {
borderWidth: "1px",
},
"& .MuiOutlinedInput-notchedOutline": { "& .MuiOutlinedInput-notchedOutline": {
borderColor: '#DDE1E6', borderColor: '#DDE1E6',
}, },
......
.box {
height: calc(100vh - 57px);
overflow: overlay;
}
.topFixed { .topFixed {
position: sticky; position: sticky;
top: 0; top: 0;
...@@ -5,6 +10,10 @@ ...@@ -5,6 +10,10 @@
background-color: #fff; background-color: #fff;
} }
.topFixedShadow {
box-shadow: 0 5px 4px -4px rgb(0, 0, 0, 0.12);
}
.basicInformation { .basicInformation {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
......
...@@ -2,6 +2,7 @@ import React, { useState, useEffect } from "react"; ...@@ -2,6 +2,7 @@ import React, { useState, useEffect } from "react";
import { observer } from "mobx-react-lite"; import { observer } from "mobx-react-lite";
import _ from "lodash"; import _ from "lodash";
import moment from "moment"; import moment from "moment";
import classNames from "classnames";
import useMyRequest from "@/hooks/useMyRequest"; import useMyRequest from "@/hooks/useMyRequest";
import { getOverviewInfo, getTaskOverview } from "@/api/project_api"; import { getOverviewInfo, getTaskOverview } from "@/api/project_api";
...@@ -27,6 +28,16 @@ const ProjectOverview = observer(() => { ...@@ -27,6 +28,16 @@ const ProjectOverview = observer(() => {
const [size, setSize] = useState(999); const [size, setSize] = useState(999);
// 选择近7天or近15天or近30天 // 选择近7天or近15天or近30天
const [day, setDay] = useState("7"); const [day, setDay] = useState("7");
// 滚轮是否到顶,判断是否显示阴影
const [isTop, setIsTop] = useState(true)
// 滚动滚轮时监听是否到顶
const onscroll = (e: any) => {
if (e.target.scrollTop <= 0) {
setIsTop(true)
} else {
setIsTop(false)
}
}
// 获取概览基本信息 // 获取概览基本信息
const { run: getOverview, loading } = useMyRequest(getOverviewInfo, { const { run: getOverview, loading } = useMyRequest(getOverviewInfo, {
onSuccess: (result: any) => { onSuccess: (result: any) => {
...@@ -100,8 +111,13 @@ const ProjectOverview = observer(() => { ...@@ -100,8 +111,13 @@ const ProjectOverview = observer(() => {
); );
} else { } else {
return ( return (
<> <div className={style.box} onScroll={onscroll}>
<div className={style.topFixed}> <div
className={classNames({
[style.topFixed]: true,
[style.topFixedShadow]: !isTop,
})}
>
<div className={style.basicInformation}> <div className={style.basicInformation}>
<div> <div>
<div className={style.titleBox}> <div className={style.titleBox}>
...@@ -227,7 +243,7 @@ const ProjectOverview = observer(() => { ...@@ -227,7 +243,7 @@ const ProjectOverview = observer(() => {
); );
})} })}
</div> </div>
</> </div>
); );
} }
} else { } else {
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
} }
.headerBoxShadow { .headerBoxShadow {
box-shadow: 0 5px 4px -4px rgb(0, 0, 0, 0.15); box-shadow: 0 5px 4px -4px rgb(0, 0, 0, 0.12);
} }
.templateBox { .templateBox {
......
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