Commit 53d8e36f authored by wuyongsheng's avatar wuyongsheng

feat: 任务详情需求变更优化

parent 1eb0507b
...@@ -130,6 +130,13 @@ ...@@ -130,6 +130,13 @@
word-break: break-all; word-break: break-all;
flex: 1; flex: 1;
justify-content: flex-end; justify-content: flex-end;
overflow: hidden;
word-wrap: break-word;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
} }
.taskInfoValueClick { .taskInfoValueClick {
cursor: pointer; cursor: pointer;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com * @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-21 20:03:56 * @Date: 2022-06-21 20:03:56
* @LastEditors: 吴永生 15770852798@163.com * @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-09-05 17:33:58 * @LastEditTime: 2022-09-06 10:54:40
* @FilePath: /bkunyun/src/views/Project/ProjectSubmitWork/index.tsx * @FilePath: /bkunyun/src/views/Project/ProjectSubmitWork/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -47,6 +47,8 @@ import { ...@@ -47,6 +47,8 @@ import {
getDatasetPath, getDatasetPath,
getSameBatch, getSameBatch,
} from "./utils"; } from "./utils";
import MyTooltip from "@/components/mui/MyTooltip";
import styles from "./index.module.css"; import styles from "./index.module.css";
...@@ -75,11 +77,11 @@ const ProjectSubmitWork = observer(() => { ...@@ -75,11 +77,11 @@ const ProjectSubmitWork = observer(() => {
const productId = toJS(currentProjectStore.currentProductInfo.id); const productId = toJS(currentProjectStore.currentProductInfo.id);
const [workFlowJobInfo, setWorkFlowJobInfo] = useState<ITaskInfo>(); const [workFlowJobInfo, setWorkFlowJobInfo] = useState<ITaskInfo>();
const [patchInfo, setPatchInfo] = useState<any>(); const [patchInfo, setPatchInfo] = useState<any>();
const [overviewInfo, setOverviewInfo] = useState<any>();
const [overviewActive, setOverviewActive] = useState(true); const [overviewActive, setOverviewActive] = useState(true);
/** 选中的node Id */ /** 选中的node Id */
const [activeFlowIndex, setActiveFlowIndex] = useState<string>(""); const [activeFlowIndex, setActiveFlowIndex] = useState<string>("");
/** 选中的flow Title */
const [selectNodeTitle, setSelectNodeTitle] = useState('参数')
// const [showOptions, setShowOptions] = useState<boolean>(false); // const [showOptions, setShowOptions] = useState<boolean>(false);
const [randerOutputs1, setRanderOutputs] = useState<Array<any>>([]); const [randerOutputs1, setRanderOutputs] = useState<Array<any>>([]);
const locationInfo: any = useLocation()?.state; const locationInfo: any = useLocation()?.state;
...@@ -355,32 +357,26 @@ const ProjectSubmitWork = observer(() => { ...@@ -355,32 +357,26 @@ const ProjectSubmitWork = observer(() => {
const selectedParameter = useCallback( const selectedParameter = useCallback(
(list: any) => { (list: any) => {
let result: any = []; let result: any = [];
if(patchInfo?.id === activeFlowIndex ) {
setSelectNodeTitle(list[0].title || '')
result = list[0].parameters
} else {
list?.length && list?.length &&
list?.forEach((item: any) => { list?.forEach((item: any) => {
if (item.id === activeFlowIndex) { if (item.id === activeFlowIndex) {
console.log(1111) setOverviewInfo(item)
setSelectNodeTitle(item?.title || '')
result = item.parameters; result = item.parameters;
} }
}); });
}
return result; return result;
}, },
[activeFlowIndex, patchInfo] [activeFlowIndex]
); );
const randerParameters = useMemo(() => { const randerParameters = useMemo(() => {
if (patchInfo?.children?.length) { if(patchInfo?.id === activeFlowIndex ) {
return selectedParameter(patchInfo?.children); setOverviewInfo(patchInfo)
return patchInfo?.parameters
} else { } else {
return selectedParameter(patchInfo?.parameters); return selectedParameter(patchInfo?.children);
} }
}, [activeFlowIndex, patchInfo, selectedParameter]);
}, [patchInfo, selectedParameter]);
const handleParams = () => { const handleParams = () => {
setOverviewActive(false); setOverviewActive(false);
...@@ -648,7 +644,7 @@ const ProjectSubmitWork = observer(() => { ...@@ -648,7 +644,7 @@ const ProjectSubmitWork = observer(() => {
)} )}
{activeFlowIndex && ( {activeFlowIndex && (
<div className={styles.suanziInfo}> <div className={styles.suanziInfo}>
<div className={styles.title}>{patchInfo?.title}</div> <MyTooltip><div className={styles.title}>{overviewInfo?.title}</div></MyTooltip>
<div className={styles.tabs}> <div className={styles.tabs}>
<div <div
className={classNames({ className={classNames({
...@@ -667,7 +663,7 @@ const ProjectSubmitWork = observer(() => { ...@@ -667,7 +663,7 @@ const ProjectSubmitWork = observer(() => {
// onClick={() => setOverviewActive(false)} // onClick={() => setOverviewActive(false)}
onClick={() => handleParams()} onClick={() => handleParams()}
> >
{selectNodeTitle} 参数
</div> </div>
</div> </div>
{overviewActive && ( {overviewActive && (
...@@ -680,40 +676,40 @@ const ProjectSubmitWork = observer(() => { ...@@ -680,40 +676,40 @@ const ProjectSubmitWork = observer(() => {
[styles.taskInfoValueShowAll]: true, [styles.taskInfoValueShowAll]: true,
})} })}
> >
{patchInfo?.description} {overviewInfo?.description}
</div> </div>
</div> </div>
<div className={styles.taskInfoLi}> <div className={styles.taskInfoLi}>
<div className={styles.taskInfoParams}>算子版本</div> <div className={styles.taskInfoParams}>算子版本</div>
<div className={styles.taskInfoValue}> <div className={styles.taskInfoValue}>
{patchInfo?.version || "-"} {overviewInfo?.version || "-"}
</div> </div>
</div> </div>
<div className={styles.taskInfoLi}> <div className={styles.taskInfoLi}>
<div className={styles.taskInfoParams}>算子状态</div> <div className={styles.taskInfoParams}>算子状态</div>
<div className={styles.taskInfoValue}> <div className={styles.taskInfoValue}>
{patchInfo?.status === "Done" && ( {overviewInfo?.status === "Done" && (
<img <img
className={styles.taskInfoValueIcon} className={styles.taskInfoValueIcon}
src={jobSue} src={jobSue}
alt="" alt=""
/> />
)} )}
{patchInfo?.status === "Running" && ( {overviewInfo?.status === "Running" && (
<img <img
className={styles.taskInfoValueIcon} className={styles.taskInfoValueIcon}
src={jobRun} src={jobRun}
alt="" alt=""
/> />
)} )}
{patchInfo?.status === "Failed" && ( {overviewInfo?.status === "Failed" && (
<img <img
className={styles.taskInfoValueIcon} className={styles.taskInfoValueIcon}
src={jobFail} src={jobFail}
alt="" alt=""
/> />
)} )}
{statusMap[patchInfo?.status as IStatus]} {statusMap[overviewInfo?.status as IStatus]}
</div> </div>
</div> </div>
</div> </div>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com * @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-05-31 10:18:13 * @Date: 2022-05-31 10:18:13
* @LastEditors: 吴永生 15770852798@163.com * @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-09-02 14:45:04 * @LastEditTime: 2022-09-06 10:17:18
* @FilePath: /bkunyun/src/views/Project/ProjectSetting/index.tsx * @FilePath: /bkunyun/src/views/Project/ProjectSetting/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -41,6 +41,7 @@ import MyProgress from "@/components/mui/MyProgress"; ...@@ -41,6 +41,7 @@ import MyProgress from "@/components/mui/MyProgress";
import SearchInput from "@/components/BusinessComponents/SearchInput"; import SearchInput from "@/components/BusinessComponents/SearchInput";
import MyCircularProgress from "@/components/mui/MyCircularProgress"; import MyCircularProgress from "@/components/mui/MyCircularProgress";
import moment from "moment"; import moment from "moment";
import MyTooltip from "@/components/mui/MyTooltip";
import styles from "./index.module.css"; import styles from "./index.module.css";
...@@ -400,7 +401,7 @@ const ProjectMembers = observer(() => { ...@@ -400,7 +401,7 @@ const ProjectMembers = observer(() => {
onClick={() => rowClick(item.id)} onClick={() => rowClick(item.id)}
> >
<Box className={styles.tabBoxInfo}> <Box className={styles.tabBoxInfo}>
<div className={styles.tabBoxTitle}>{item.name}</div> <MyTooltip title={item.name}><div className={styles.tabBoxTitle}>{item.name}</div></MyTooltip>
<Box className={styles.tabBoxDescInfo}> <Box className={styles.tabBoxDescInfo}>
<div <div
className={styles.tabBoxDesc} className={styles.tabBoxDesc}
......
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