Commit 92d05051 authored by chenshouchao's avatar chenshouchao

feat: 提交任务页跳转到工作台的tab处理

parent eb127e3e
...@@ -13,8 +13,7 @@ ...@@ -13,8 +13,7 @@
.content { .content {
flex: 1; flex: 1;
height: calc(100vh - 57px); height: calc(100vh - 57px);
overflow: hidden; overflow: scroll;
/* ??????????? */
} }
.list { .list {
/* background-color: red; */ /* background-color: red; */
......
...@@ -112,6 +112,10 @@ ...@@ -112,6 +112,10 @@
position: relative; position: relative;
align-items: center; align-items: center;
} }
.taskInfoValueClick {
cursor: pointer;
color: rgba(19, 112, 255, 1);
}
.taskInfoDownload { .taskInfoDownload {
color: rgba(19, 112, 255, 1); color: rgba(19, 112, 255, 1);
cursor: pointer; cursor: pointer;
...@@ -170,7 +174,7 @@ ...@@ -170,7 +174,7 @@
color: rgba(19, 112, 255, 1); color: rgba(19, 112, 255, 1);
} }
.fullScreenBox{ .fullScreenBox {
position: absolute; position: absolute;
background-color: #fff; background-color: #fff;
cursor: pointer; cursor: pointer;
...@@ -179,6 +183,6 @@ ...@@ -179,6 +183,6 @@
bottom: 24px; bottom: 24px;
padding: 8px; padding: 8px;
} }
.fullScreenBox:hover{ .fullScreenBox:hover {
opacity: 0.6; opacity: 0.6;
} }
...@@ -364,7 +364,10 @@ const ProjectSubmitWork = observer(() => { ...@@ -364,7 +364,10 @@ const ProjectSubmitWork = observer(() => {
<div className={styles.taskInfoLi}> <div className={styles.taskInfoLi}>
<div className={styles.taskInfoParams}>输出路径</div> <div className={styles.taskInfoParams}>输出路径</div>
<div <div
className={styles.taskInfoValue} className={classNames({
[styles.taskInfoValue]: true,
[styles.taskInfoValueClick]: true,
})}
onClick={() => onClick={() =>
goToProjectData(workFlowJobInfo?.outputPath as string) goToProjectData(workFlowJobInfo?.outputPath as string)
} }
......
...@@ -24,6 +24,7 @@ import { templateConfigJson } from "./mock"; ...@@ -24,6 +24,7 @@ import { templateConfigJson } from "./mock";
import { useMessage } from "@/components/MySnackbar"; import { useMessage } from "@/components/MySnackbar";
import { toJS } from "mobx"; import { toJS } from "mobx";
import { useStores } from "@/store"; import { useStores } from "@/store";
import moment from "moment";
import MyPopconfirm from "@/components/mui/MyPopconfirm"; import MyPopconfirm from "@/components/mui/MyPopconfirm";
const ProjectSubmitWork = () => { const ProjectSubmitWork = () => {
...@@ -37,8 +38,10 @@ const ProjectSubmitWork = () => { ...@@ -37,8 +38,10 @@ const ProjectSubmitWork = () => {
let configFormRef: any = React.createRef(); let configFormRef: any = React.createRef();
// 前往工作台 // 前往工作台
const goToWorkbench = () => { const goToWorkbench = (toWorkbenchList = false) => {
navigate("/product/cadd/projectWorkbench"); navigate("/product/cadd/projectWorkbench", {
state: { from: toWorkbenchList ? "submitWork" : "" },
});
}; };
// 返回 // 返回
...@@ -65,7 +68,7 @@ const ProjectSubmitWork = () => { ...@@ -65,7 +68,7 @@ const ProjectSubmitWork = () => {
const { run: submitWorkFlowRun } = useMyRequest(submitWorkFlow, { const { run: submitWorkFlowRun } = useMyRequest(submitWorkFlow, {
onSuccess: (res) => { onSuccess: (res) => {
Message.success("提交成功"); Message.success("提交成功");
goToWorkbench(); goToWorkbench(true);
}, },
}); });
...@@ -204,7 +207,11 @@ const ProjectSubmitWork = () => { ...@@ -204,7 +207,11 @@ const ProjectSubmitWork = () => {
<div className={styles.swTemplateUpdateTimeBox}> <div className={styles.swTemplateUpdateTimeBox}>
<span className={styles.swHeaderLable}>更新时间:</span> <span className={styles.swHeaderLable}>更新时间:</span>
<span className={styles.swHeaderValue}> <span className={styles.swHeaderValue}>
{templateConfigInfo?.updateTime} {templateConfigInfo?.updateTime
? moment(templateConfigInfo?.updateTime).format(
"YYYY-MM-DD HH:mm:ss"
)
: "-"}
</span> </span>
</div> </div>
<div className={styles.swHeaderGoback}></div> <div className={styles.swHeaderGoback}></div>
......
...@@ -44,7 +44,7 @@ const ProjectWorkbench = observer(() => { ...@@ -44,7 +44,7 @@ const ProjectWorkbench = observer(() => {
const locationInfo: any = location?.state; const locationInfo: any = location?.state;
const from = locationInfo?.from; const from = locationInfo?.from;
// 如果是从详情页来的,tab展示为任务列表 // 如果是从详情页来的,tab展示为任务列表
if (from === "detail") { if (from === "detail" || from === "submitWork") {
tabsRef?.current?.setActiveTab("workbenchList"); tabsRef?.current?.setActiveTab("workbenchList");
} }
}, [location, tabsRef]); }, [location, tabsRef]);
......
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