Commit eea2f337 authored by jiangzijing's avatar jiangzijing

feat:交互优化

parent 93b21ec8
.FSBox { .FSBox {
width: 900px; width: 900px;
height: 650px;
position: relative; position: relative;
} }
......
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
margin: 6px 0; margin: 6px 0;
} }
.outputLiLeft { .outputLiLeft {
cursor: pointer;
display: flex; display: flex;
align-items: center; align-items: center;
color: rgba(19, 112, 255, 1); color: rgba(19, 112, 255, 1);
......
...@@ -116,16 +116,22 @@ const ProjectSubmitWork = observer(() => { ...@@ -116,16 +116,22 @@ const ProjectSubmitWork = observer(() => {
const getFolderPath = (path: string) => { const getFolderPath = (path: string) => {
const lastIndex = path.lastIndexOf("/"); const lastIndex = path.lastIndexOf("/");
if (lastIndex !== -1) { if (lastIndex !== -1) {
path = path.slice(0, lastIndex + 1); path = path.slice(0, lastIndex);
} }
return path; return path;
}; };
/** 返回事件 */ /** 返回事件 */
const onBack = useCallback(() => { const onBack = useCallback(() => {
navigate("/product/cadd/projectWorkbench", { const locationInfo: any = location?.state;
state: { type: "workbenchList" }, if(locationInfo.from==='projectOverview'){
}); navigate("/product/cadd/projectOverview");
}else{
navigate("/product/cadd/projectWorkbench", {
state: { type: "workbenchList" },
});
}
}, [navigate]); }, [navigate]);
const outputPathTransform = (path: string) => { const outputPathTransform = (path: string) => {
...@@ -200,9 +206,8 @@ const ProjectSubmitWork = observer(() => { ...@@ -200,9 +206,8 @@ const ProjectSubmitWork = observer(() => {
if (Array.isArray(res.data)) { if (Array.isArray(res.data)) {
res.data.forEach((item1) => { res.data.forEach((item1) => {
if (item1.name === item.path.slice(item.path.lastIndexOf("/") + 1)) { if (item1.name === item.path.slice(item.path.lastIndexOf("/") + 1)) {
randerOutputs[index].size = `${ randerOutputs[index].size = `${item1.size ? storageUnitFromB(Number(item1.size)) : "-"
item1.size ? storageUnitFromB(Number(item1.size)) : "-" }`;
}`;
setRanderOutputs([...randerOutputs]); setRanderOutputs([...randerOutputs]);
} }
}); });
...@@ -304,7 +309,7 @@ const ProjectSubmitWork = observer(() => { ...@@ -304,7 +309,7 @@ const ProjectSubmitWork = observer(() => {
const handleShowPopper = (e: any, title: string) => { const handleShowPopper = (e: any, title: string) => {
setPopperTitle(title); setPopperTitle(title);
setAnchorEl(anchorEl ? null : e.currentTarget); setAnchorEl(e.currentTarget);
}; };
const handleConfirm = () => { const handleConfirm = () => {
...@@ -364,7 +369,7 @@ const ProjectSubmitWork = observer(() => { ...@@ -364,7 +369,7 @@ const ProjectSubmitWork = observer(() => {
: "任务被删除后将无法恢复,确认继续吗?" : "任务被删除后将无法恢复,确认继续吗?"
) )
} }
// click={onStopJob} // click={onStopJob}
></MyButton> ></MyButton>
{/* </MyPopconfirm> */} {/* </MyPopconfirm> */}
</div> </div>
...@@ -392,13 +397,14 @@ const ProjectSubmitWork = observer(() => { ...@@ -392,13 +397,14 @@ const ProjectSubmitWork = observer(() => {
<div <div
className={styles.outputLiLeft} className={styles.outputLiLeft}
onClick={(e: any) => { onClick={(e: any) => {
handleShowPopper( // handleShowPopper(
e, // e,
"即将跳转至项目数据内该任务的结果目录,确认继续吗?" // "即将跳转至项目数据内该任务的结果目录,确认继续吗?"
); // );
setGoToProjectDataPath( // setGoToProjectDataPath(
getFolderPath(item.path) // getFolderPath(item.path)
); // );
goToProjectData(getFolderPath(item.path))
}} }}
> >
<img <img
...@@ -421,8 +427,8 @@ const ProjectSubmitWork = observer(() => { ...@@ -421,8 +427,8 @@ const ProjectSubmitWork = observer(() => {
)} )}
{(!workFlowJobInfo?.outputs || {(!workFlowJobInfo?.outputs ||
Object.keys(workFlowJobInfo?.outputs).length === 0) && ( Object.keys(workFlowJobInfo?.outputs).length === 0) && (
<div className={styles.notResults}>暂无结果文件</div> <div className={styles.notResults}>暂无结果文件</div>
)} )}
<div className={styles.title}>任务信息</div> <div className={styles.title}>任务信息</div>
<div className={styles.taskInfoLi}> <div className={styles.taskInfoLi}>
<div className={styles.taskInfoParams}>任务名称</div> <div className={styles.taskInfoParams}>任务名称</div>
...@@ -446,8 +452,16 @@ const ProjectSubmitWork = observer(() => { ...@@ -446,8 +452,16 @@ const ProjectSubmitWork = observer(() => {
[styles.taskInfoValue]: true, [styles.taskInfoValue]: true,
[styles.taskInfoValueClick]: true, [styles.taskInfoValueClick]: true,
})} })}
onClick={() => onClick={(e: any) => {
goToProjectData(workFlowJobInfo?.outputPath as string) handleShowPopper(
e,
"即将跳转至项目数据内该任务的输出路径,确认继续吗?"
);
setGoToProjectDataPath(
workFlowJobInfo?.outputPath as string
);
// goToProjectData(workFlowJobInfo?.outputPath as string)
}
} }
> >
{workFlowJobInfo?.outputPath {workFlowJobInfo?.outputPath
......
...@@ -50,7 +50,7 @@ const TaskCard = (props: TaskCardProps) => { ...@@ -50,7 +50,7 @@ const TaskCard = (props: TaskCardProps) => {
const goToProjectData = (path: string) => { const goToProjectData = (path: string) => {
const lastIndex = path.lastIndexOf("/"); const lastIndex = path.lastIndexOf("/");
if (lastIndex !== -1) { if (lastIndex !== -1) {
path = path.slice(0, lastIndex + 1); path = path.slice(0, lastIndex);
} }
path = path.slice(12); path = path.slice(12);
if (path) { if (path) {
...@@ -66,7 +66,7 @@ const TaskCard = (props: TaskCardProps) => { ...@@ -66,7 +66,7 @@ const TaskCard = (props: TaskCardProps) => {
// 跳转详情页 // 跳转详情页
const gotoDetail = (id: string) => { const gotoDetail = (id: string) => {
navigate(`/product/cadd/projectJobDetail`, { navigate(`/product/cadd/projectJobDetail`, {
state: { taskId: id }, state: { taskId: id, from: 'projectOverview' },
}); });
} }
// 渲染状态图标 // 渲染状态图标
......
...@@ -45,6 +45,8 @@ const ProjectOverview = observer(() => { ...@@ -45,6 +45,8 @@ const ProjectOverview = observer(() => {
}); });
useEffect(() => { useEffect(() => {
// 切项目时重置为初始7
setDay("7");
if (currentProjectStore.currentProjectInfo.id) { if (currentProjectStore.currentProjectInfo.id) {
getOverview({ getOverview({
id: currentProjectStore.currentProjectInfo.id as string, id: currentProjectStore.currentProjectInfo.id as string,
......
...@@ -39,12 +39,9 @@ const ProjectSetting = observer(() => { ...@@ -39,12 +39,9 @@ const ProjectSetting = observer(() => {
if (currentProjectStore.currentProjectInfo.name) { if (currentProjectStore.currentProjectInfo.name) {
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 }}>
{currentProjectStore.currentProjectInfo.name}
</span>
</div> </div>
<Box sx={{ width: "100%", typography: "body1" }}> <Box sx={{ width: "100%", typography: "body1" }}>
<Tabs tabList={tabList} /> <Tabs tabList={tabList} />
......
...@@ -60,9 +60,10 @@ ...@@ -60,9 +60,10 @@
.tabBoxTime { .tabBoxTime {
font-size: 12px; font-size: 12px;
line-height: 20px;
font-weight: 400; font-weight: 400;
color: #565C66; color: #565C66;
margin-left: 4px; margin-left: 8px;
} }
.tabBoxMiddle { .tabBoxMiddle {
...@@ -82,9 +83,10 @@ ...@@ -82,9 +83,10 @@
.tabBoxStatusText { .tabBoxStatusText {
font-size: 12px; font-size: 12px;
line-height: 20px;
font-weight: 400; font-weight: 400;
color: #1E2633; color: #1E2633;
margin: 0px 16px 0px 6px; margin: 0px 16px 0px 8px;
white-space: nowrap; white-space: nowrap;
} }
......
...@@ -281,7 +281,7 @@ const ProjectMembers = observer(() => { ...@@ -281,7 +281,7 @@ const ProjectMembers = observer(() => {
const rowClick = useCallback( const rowClick = useCallback(
(id: string) => { (id: string) => {
navigate(`/product/cadd/projectJobDetail`, { navigate(`/product/cadd/projectJobDetail`, {
state: { taskId: id }, state: { taskId: id, from: 'workbenchList' },
}); });
}, },
[navigate] [navigate]
...@@ -427,7 +427,7 @@ const ProjectMembers = observer(() => { ...@@ -427,7 +427,7 @@ const ProjectMembers = observer(() => {
/> />
</Box> </Box>
<div <div
style={{ color: renderTextColor(item.state) }} style={{ color: renderTextColor(item.state), margin: '0px' }}
className={styles.tabBoxStatusText} className={styles.tabBoxStatusText}
> >
{item.completeNum + "/" + item.totalNum} {item.completeNum + "/" + item.totalNum}
......
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