Commit b32b82e9 authored by jiangzijing's avatar jiangzijing

feat:工作台ui优化

parent d35c66c4
...@@ -69,7 +69,7 @@ const Tabs = (props: IProps) => { ...@@ -69,7 +69,7 @@ const Tabs = (props: IProps) => {
tabList, tabList,
defaultValue, defaultValue,
allowNullValue = false, allowNullValue = false,
tabPanelSx = { padding: "20px 0 0 0" }, tabPanelSx = { padding: "24px 0 0 0" },
} = props; } = props;
const [value, setValue] = useState( const [value, setValue] = useState(
defaultValue defaultValue
...@@ -88,14 +88,14 @@ const Tabs = (props: IProps) => { ...@@ -88,14 +88,14 @@ const Tabs = (props: IProps) => {
<Box style={{ display: "flex", alignItems: "center" }}> <Box style={{ display: "flex", alignItems: "center" }}>
{item.icon ? ( {item.icon ? (
<img <img
style={{ width: "14px", marginRight: "10px" }} style={{ width: "16px", marginRight: "8px" }}
src={value === item.value ? item.iconed : item.icon} src={value === item.value ? item.iconed : item.icon}
alt="" alt=""
/> />
) : ( ) : (
"" ""
)} )}
<Typography sx={{ fontSize: "14px", fontWeight: "400" }}> <Typography sx={{ fontSize: "14px", lineHeight: "22px", height: "22px", fontWeight: "400" }}>
{item.label} {item.label}
</Typography> </Typography>
</Box> </Box>
......
...@@ -29,9 +29,9 @@ const MenuLayout = observer(() => { ...@@ -29,9 +29,9 @@ const MenuLayout = observer(() => {
navigate("/home"); navigate("/home");
} }
const routerIcon = (id: string, isSelect: boolean)=>{ const routerIcon = (id: string, isSelect: boolean) => {
try { try {
const result = require(`../../assets/project/${id}${isSelect ? '_BLUE': ''}.svg`) const result = require(`../../assets/project/${id}${isSelect ? '_BLUE' : ''}.svg`)
return result || '' return result || ''
} catch (error) { } catch (error) {
console.log(error) console.log(error)
...@@ -42,7 +42,12 @@ const MenuLayout = observer(() => { ...@@ -42,7 +42,12 @@ const MenuLayout = observer(() => {
<Box className={style.container}> <Box className={style.container}>
<Box className={style.aside}> <Box className={style.aside}>
<CurrentProject /> <CurrentProject />
<List> <List
sx={{
paddingTop: 0,
paddingBottom: 0,
}}
>
{permissionStore.sidebarRouters.map((item, index) => { {permissionStore.sidebarRouters.map((item, index) => {
if (item.show) { if (item.show) {
return ( return (
...@@ -54,8 +59,8 @@ const MenuLayout = observer(() => { ...@@ -54,8 +59,8 @@ const MenuLayout = observer(() => {
})} })}
onClick={() => item.type === "page" && navigate(item.path)} onClick={() => item.type === "page" && navigate(item.path)}
> >
<img className={style.routerIcon} src={routerIcon(item.id || '', `/v3${item.path}` === pathname) || undefined} alt=''/> <img className={style.routerIcon} src={routerIcon(item.id || '', `/v3${item.path}` === pathname) || undefined} alt='' />
<span style={{verticalAlign: 'middle'}}>{item.name}</span> <span style={{ verticalAlign: 'middle' }}>{item.name}</span>
</li> </li>
); );
} }
......
...@@ -63,10 +63,9 @@ const ProjectWorkbench = observer(() => { ...@@ -63,10 +63,9 @@ const ProjectWorkbench = observer(() => {
}, [isPass]); }, [isPass]);
return ( return (
<div style={{ padding: 24 }}> <div style={{ padding:'28px 24px 24px' }}>
<div style={{ display: "flex", alignItems: "center" }}> <div style={{ display: "flex", alignItems: "center" }}>
<img src={projectImg} alt="项目logo" /> <span style={{ fontSize: "18px", lineHeight: "26px", fontWeight: "600", color: "#1E2633" }}>工作台</span>
<span style={{ marginLeft: 12 }}>工作台</span>
</div> </div>
<Box sx={{ width: "100%", typography: "body1" }}> <Box sx={{ width: "100%", typography: "body1" }}>
<Tabs <Tabs
......
.headerBox { /* .headerBox { */
margin-bottom: 20px; /* margin-bottom: 20px; */
} /* } */
.tabHeader { .tabHeader {
display: flex; display: flex;
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
border-top: 1px solid #F0F2F5; border-top: 1px solid #F0F2F5;
overflow: hidden; overflow: hidden;
overflow-y: auto; overflow-y: auto;
height: calc(100vh - 290px); height: calc(100vh - 325px);
} }
.tabBox { .tabBox {
padding: 15px 0px 16px 24px; padding: 16px 0px 16px 24px;
display: flex; display: flex;
align-items: center; align-items: center;
width: 100%; width: 100%;
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
.tabBoxInfo { .tabBoxInfo {
width: 24%; width: 24%;
min-width: 280px;
} }
.tabBoxDescInfo { .tabBoxDescInfo {
...@@ -43,13 +44,16 @@ ...@@ -43,13 +44,16 @@
.tabBoxTitle { .tabBoxTitle {
font-size: 14px; font-size: 14px;
line-height: 22px;
font-weight: 600; font-weight: 600;
color: #1E2633; color: #1E2633;
margin-bottom: 10px; margin-bottom: 8px;
} }
.tabBoxDesc { .tabBoxDesc {
font-size: 12px; font-size: 12px;
line-height: 20px;
white-space: nowrap;
font-weight: 400; font-weight: 400;
color: #8A9099; color: #8A9099;
} }
...@@ -65,12 +69,15 @@ ...@@ -65,12 +69,15 @@
display: flex; display: flex;
align-items: center; align-items: center;
width: 10%; width: 10%;
min-width: 105px;
white-space: nowrap;
} }
.tabBoxJobStatus { .tabBoxJobStatus {
display: flex; display: flex;
align-items: center; align-items: center;
width: 46%; width: 46%;
min-width: 180px;
} }
.tabBoxStatusText { .tabBoxStatusText {
......
...@@ -38,6 +38,7 @@ import { observer } from "mobx-react-lite"; ...@@ -38,6 +38,7 @@ 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 SearchInput from "@/components/BusinessComponents/SearchInput";
import moment from "moment";
import styles from "./index.module.css"; import styles from "./index.module.css";
...@@ -382,7 +383,7 @@ const ProjectMembers = observer(() => { ...@@ -382,7 +383,7 @@ const ProjectMembers = observer(() => {
className={styles.tabBoxDesc} className={styles.tabBoxDesc}
style={{ marginRight: "24px" }} style={{ marginRight: "24px" }}
> >
创建时间:{item.createTime} 创建时间:{moment(item.createTime).format("YYYY-MM-DD")}
</div> </div>
<div className={styles.tabBoxDesc}> <div className={styles.tabBoxDesc}>
创建人:{item.creator} 创建人:{item.creator}
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
.templateBlock { .templateBlock {
height: 194px; height: 194px;
background: #ffffff; background: #ffffff;
box-shadow: 0px 3px 10px 0px rgba(0,24,57,0.0400);
border-radius: 4px; border-radius: 4px;
border: 1px solid #ebedf0; border: 1px solid #ebedf0;
padding: 16px 20px; padding: 16px 20px;
......
...@@ -134,18 +134,18 @@ const AddProject = (props: IAddProjectProps) => { ...@@ -134,18 +134,18 @@ const AddProject = (props: IAddProjectProps) => {
const handleDescChange = (e: any) => { const handleDescChange = (e: any) => {
const desc = e.target.value; const desc = e.target.value;
setDesc(desc); setDesc(desc.slice(0,100));
if (desc.length > 100) { // if (desc.length > 100) {
setDescCheck({ // setDescCheck({
error: true, // error: true,
help: "格式不正确,必须在100字符以内", // help: "格式不正确,必须在100字符以内",
}); // });
} else { // } else {
setDescCheck({ // setDescCheck({
error: false, // error: false,
help: "", // help: "",
}); // });
} // }
}; };
const handleSubmit = () => { const handleSubmit = () => {
...@@ -211,7 +211,7 @@ const AddProject = (props: IAddProjectProps) => { ...@@ -211,7 +211,7 @@ const AddProject = (props: IAddProjectProps) => {
id="desc" id="desc"
label="项目描述" label="项目描述"
multiline multiline
rows={4} rows={5}
placeholder="请输入项目描述" placeholder="请输入项目描述"
onChange={handleDescChange} onChange={handleDescChange}
helperText={descCheck.help} helperText={descCheck.help}
......
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