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) => {
height: "32px",
fontSize: "14px",
paddingRight: "8px",
"&.Mui-focused .MuiOutlinedInput-notchedOutline": {
borderWidth: "1px",
},
"& .MuiOutlinedInput-notchedOutline": {
borderColor: '#DDE1E6',
},
......
.box {
height: calc(100vh - 57px);
overflow: overlay;
}
.topFixed {
position: sticky;
top: 0;
......@@ -5,6 +10,10 @@
background-color: #fff;
}
.topFixedShadow {
box-shadow: 0 5px 4px -4px rgb(0, 0, 0, 0.12);
}
.basicInformation {
display: flex;
justify-content: space-between;
......@@ -125,4 +134,4 @@
justify-content: center;
align-items: center;
height: calc(100vh - 100px);
}
}
\ No newline at end of file
......@@ -2,6 +2,7 @@ import React, { useState, useEffect } from "react";
import { observer } from "mobx-react-lite";
import _ from "lodash";
import moment from "moment";
import classNames from "classnames";
import useMyRequest from "@/hooks/useMyRequest";
import { getOverviewInfo, getTaskOverview } from "@/api/project_api";
......@@ -27,6 +28,16 @@ const ProjectOverview = observer(() => {
const [size, setSize] = useState(999);
// 选择近7天or近15天or近30天
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, {
onSuccess: (result: any) => {
......@@ -100,8 +111,13 @@ const ProjectOverview = observer(() => {
);
} else {
return (
<>
<div className={style.topFixed}>
<div className={style.box} onScroll={onscroll}>
<div
className={classNames({
[style.topFixed]: true,
[style.topFixedShadow]: !isTop,
})}
>
<div className={style.basicInformation}>
<div>
<div className={style.titleBox}>
......@@ -227,7 +243,7 @@ const ProjectOverview = observer(() => {
);
})}
</div>
</>
</div>
);
}
} else {
......
......@@ -11,7 +11,7 @@
}
.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 {
......
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