Commit 5cf52638 authored by chenshouchao's avatar chenshouchao

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

parents cce400c0 e6b5cda5
...@@ -51,7 +51,7 @@ const SearchInput = (props: SearchInputProps) => { ...@@ -51,7 +51,7 @@ const SearchInput = (props: SearchInputProps) => {
size={size} size={size}
placeholder={placeholder} placeholder={placeholder}
fullWidth={fullWidth} fullWidth={fullWidth}
endAdornment={<SearchIcon style={{ color: "#999" }} />} endAdornment={<SearchIcon style={{ color: "#8A9099", fontSize: "22px" }} />}
{...other} {...other}
/> />
</ThemeProvider> </ThemeProvider>
......
...@@ -28,6 +28,7 @@ import SeeDataset from "./SeeDataset"; ...@@ -28,6 +28,7 @@ import SeeDataset from "./SeeDataset";
import { getDataFind, getDataFileSearch } from "@/api/project_api"; import { getDataFind, getDataFileSearch } from "@/api/project_api";
import MyInput from "@/components/mui/MyInput"; import MyInput from "@/components/mui/MyInput";
import MyButton from "@/components/mui/MyButton"; import MyButton from "@/components/mui/MyButton";
import SearchInput from "@/components/BusinessComponents/SearchInput";
const ProjectData = observer(() => { const ProjectData = observer(() => {
const isPass = usePass(); const isPass = usePass();
...@@ -534,31 +535,12 @@ const ProjectData = observer(() => { ...@@ -534,31 +535,12 @@ const ProjectData = observer(() => {
projectId={projectId as string} projectId={projectId as string}
></AddFolder> ></AddFolder>
</div> </div>
<MyInput <SearchInput
sx={{
width: "340px",
}}
value={keyWord} value={keyWord}
required
size="small"
// size="medium"
placeholder="输入关键词搜索"
onChange={handleKeyWordChange} onChange={handleKeyWordChange}
onKeyUp={handleKeyWordChangeKeyUp} onKeyUp={handleKeyWordChangeKeyUp}
InputProps={{ sx={{ width: 340 }}
endAdornment: (
<SearchIcon
className={style.searchIcon}
style={{
color: "rgba(153, 153, 153, 1)",
fontSize: "22px",
position: "relative",
left: "4px",
}}
/> />
),
}}
></MyInput>
</div> </div>
<div className={style.projectDataPathAndTabs}> <div className={style.projectDataPathAndTabs}>
<div className={style.projectDataPath}>{showPath}</div> <div className={style.projectDataPath}>{showPath}</div>
......
...@@ -34,6 +34,7 @@ import { ...@@ -34,6 +34,7 @@ import {
getFiletokenAccordingToId, getFiletokenAccordingToId,
} from "@/views/Project/project"; } from "@/views/Project/project";
import MyButton from "@/components/mui/MyButton"; import MyButton from "@/components/mui/MyButton";
import MyInput from "@/components/mui/MyInput";
type zoneIdOption = { type zoneIdOption = {
id: string; id: string;
...@@ -311,8 +312,8 @@ const BaseInfo = observer(() => { ...@@ -311,8 +312,8 @@ const BaseInfo = observer(() => {
size="small" size="small"
sx={{ sx={{
width: "560px", width: "560px",
'& .MuiOutlinedInput-root':{ '& .MuiOutlinedInput-root': {
height:'36px' height: '36px'
} }
}} }}
/> />
...@@ -368,6 +369,14 @@ const BaseInfo = observer(() => { ...@@ -368,6 +369,14 @@ const BaseInfo = observer(() => {
</div> </div>
<div className={style.projectInfoListLi}> <div className={style.projectInfoListLi}>
<div className={style.projectInfoListLiLabel}>项目预算</div> <div className={style.projectInfoListLiLabel}>项目预算</div>
{/* <MyInput
sx={{
width: "560px",
'& .MuiOutlinedInput-root': {
height: '36px'
}
}}
/> */}
<TextField <TextField
required required
error={budgetCheck.error} error={budgetCheck.error}
...@@ -381,8 +390,8 @@ const BaseInfo = observer(() => { ...@@ -381,8 +390,8 @@ const BaseInfo = observer(() => {
size="small" size="small"
sx={{ sx={{
width: "560px", width: "560px",
'& .MuiOutlinedInput-root':{ '& .MuiOutlinedInput-root': {
height:'36px' height: '36px'
} }
}} }}
InputProps={{ InputProps={{
......
...@@ -23,6 +23,7 @@ import AddMember from "./components/AddMember"; ...@@ -23,6 +23,7 @@ import AddMember from "./components/AddMember";
import { IDialogInfo } from "./interface"; import { IDialogInfo } from "./interface";
import { useStores } from "@/store"; import { useStores } from "@/store";
import MyButton from "@/components/mui/MyButton"; import MyButton from "@/components/mui/MyButton";
import SearchInput from "@/components/BusinessComponents/SearchInput";
import styles from "./index.module.css"; import styles from "./index.module.css";
...@@ -141,20 +142,20 @@ const ProjectMembers = observer(() => { ...@@ -141,20 +142,20 @@ const ProjectMembers = observer(() => {
projectRole: row?.projectRole || "", projectRole: row?.projectRole || "",
}); });
}; };
// 回车搜索
const handleKeyWordChangeKeyUp = (e: any) => {
if (e.keyCode === 13) {
setProjectMember(e.target.value);
}
}
return ( return (
<> <>
<Box className={styles.headerBox}> <Box className={styles.headerBox}>
<OutlinedInput <SearchInput
onChange={(e: any) => { onKeyUp={handleKeyWordChangeKeyUp}
_.debounce(() => {
setProjectMember(e.target.value);
}, 200)();
}}
placeholder="搜索项目成员" placeholder="搜索项目成员"
size="small" sx={{ width: 340 }}
sx={{ width: 340, height: 32 }}
endAdornment={<SearchIcon style={{ color: "#8A9099" }} />}
/> />
{currentProjectStore?.currentProjectInfo?.projectRole === "OWNER" ? ( {currentProjectStore?.currentProjectInfo?.projectRole === "OWNER" ? (
<MyButton <MyButton
......
...@@ -39,6 +39,7 @@ import { toJS } from "mobx"; ...@@ -39,6 +39,7 @@ import { toJS } from "mobx";
import { observer } from "mobx-react-lite"; import { observer } from "mobx-react-lite";
import usePass from "@/hooks/usePass"; import usePass from "@/hooks/usePass";
import MyProgress from "@/components/mui/MyProgress"; import MyProgress from "@/components/mui/MyProgress";
import SearchInput from "@/components/BusinessComponents/SearchInput";
import styles from "./index.module.css"; import styles from "./index.module.css";
...@@ -100,6 +101,13 @@ const ProjectMembers = observer(() => { ...@@ -100,6 +101,13 @@ const ProjectMembers = observer(() => {
}, 60000); }, 60000);
}, },
}); });
useEffect(() => {
return () => {
clearTimeout(timer as number)
}
}, [])
const navigate = useNavigate() const navigate = useNavigate()
// 删除作业 // 删除作业
...@@ -273,23 +281,23 @@ const ProjectMembers = observer(() => { ...@@ -273,23 +281,23 @@ const ProjectMembers = observer(() => {
[navigate], [navigate],
); );
// 回车搜索
const handleKeyWordChangeKeyUp = (e: any) => {
if (e.keyCode === 13) {
setJobName(e.target.value);
}
}
return ( return (
<Box className={styles.headerBox}> <Box className={styles.headerBox}>
<Box className={styles.tabHeader}> <Box className={styles.tabHeader}>
<Box sx={{ display: 'flex' }}> <Box sx={{ display: 'flex' }}>
<OutlinedInput <SearchInput
onChange={(e: any) => { onKeyUp={handleKeyWordChangeKeyUp}
searchChange(e.target.value) sx={{ width: 340 }}
}}
value={jobName}
placeholder="输入关键词搜索"
size="small"
sx={{ width: 340, height: 32 }}
endAdornment={<SearchIcon style={{ color: "#8A9099" }} />}
/> />
<Box className={styles.tabHeaderSelect}> <Box className={styles.tabHeaderSelect}>
<TextField <TextField
select select
...@@ -367,7 +375,7 @@ const ProjectMembers = observer(() => { ...@@ -367,7 +375,7 @@ const ProjectMembers = observer(() => {
<img alt="" src={renderStatusIcon(item.state)} /> <img alt="" src={renderStatusIcon(item.state)} />
<div className={styles.tabBoxStatusText}>{renderStatusText(item.state)}</div> <div className={styles.tabBoxStatusText}>{renderStatusText(item.state)}</div>
<Box sx={{ width: '100%' }}> <Box sx={{ width: '100%' }}>
<MyProgress color={renderProgressColor(item.data)} value={(item.completeNum / item.totalNum) * 100} <MyProgress color={renderProgressColor(item.state)} value={(item.completeNum / item.totalNum) * 100}
sx={{ sx={{
marginRight: '16px', marginRight: '16px',
}} }}
......
...@@ -8,13 +8,12 @@ ...@@ -8,13 +8,12 @@
*/ */
import { memo, useEffect, useState } from "react"; import { memo, useEffect, useState } from "react";
import { Box, Typography } from "@mui/material"; import { Box, Typography } from "@mui/material";
import OutlinedInput from "@mui/material/OutlinedInput";
import SearchIcon from "@mui/icons-material/Search";
import { toJS } from "mobx"; import { toJS } from "mobx";
import { observer } from "mobx-react-lite"; import { observer } from "mobx-react-lite";
import Add from "@mui/icons-material/Add"; import Add from "@mui/icons-material/Add";
import MyButton from "@/components/mui/MyButton"; import MyButton from "@/components/mui/MyButton";
import SearchInput from "@/components/BusinessComponents/SearchInput";
import useMyRequest from "@/hooks/useMyRequest"; import useMyRequest from "@/hooks/useMyRequest";
import TemplateBox from "./components/templateBox"; import TemplateBox from "./components/templateBox";
import SimpleDialog from "./components/simpleDialog"; import SimpleDialog from "./components/simpleDialog";
...@@ -93,10 +92,6 @@ const ProjectMembers = observer(() => { ...@@ -93,10 +92,6 @@ const ProjectMembers = observer(() => {
setShowAddTemplate(true); setShowAddTemplate(true);
}; };
const searchChange = (data: any) => {
setTemplateName(data.length > 30 ? data.slice(0, 30) : data);
};
useEffect(() => { useEffect(() => {
setTimeout(() => { setTimeout(() => {
getTemplateInfo({ getTemplateInfo({
...@@ -106,20 +101,20 @@ const ProjectMembers = observer(() => { ...@@ -106,20 +101,20 @@ const ProjectMembers = observer(() => {
}, 300); }, 300);
}, [templateName, getTemplateInfo, projectIdData]); }, [templateName, getTemplateInfo, projectIdData]);
// 回车搜索
const handleKeyWordChangeKeyUp = (e: any) => {
if (e.keyCode === 13) {
setTemplateName(e.target.value);
}
}
return ( return (
<Box className={styles.headerBox}> <Box className={styles.headerBox}>
<Box className={styles.tabBox}> <Box className={styles.tabBox}>
<OutlinedInput <SearchInput
onChange={(e: any) => { onKeyUp={handleKeyWordChangeKeyUp}
searchChange(e.target.value); sx={{ width: 340 }}
}}
value={templateName}
placeholder="输入关键词搜索"
size="small"
sx={{ width: 340, height: 32 }}
endAdornment={<SearchIcon style={{ color: "#8A9099" }} />}
/> />
{templateList.length > 0 && {templateList.length > 0 &&
isPass("PROJECT_WORKBENCH_FLOES_ADD", "MANAGER") && ( isPass("PROJECT_WORKBENCH_FLOES_ADD", "MANAGER") && (
<MyButton <MyButton
......
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