Commit 92d05051 authored by chenshouchao's avatar chenshouchao

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

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