Commit 19af5d31 authored by 吴永生#A02208's avatar 吴永生#A02208

feat: 任务列表调整

parent da2aca10
...@@ -19,18 +19,21 @@ const MenuLayout = observer(() => { ...@@ -19,18 +19,21 @@ const MenuLayout = observer(() => {
<CurrentProject /> <CurrentProject />
<List className={style.list}> <List className={style.list}>
{permissionStore.sidebarRouters.map((item, index) => { {permissionStore.sidebarRouters.map((item, index) => {
return ( if (item.show) {
<li return (
key={"sidebar" + index} <li
className={classnames({ key={"sidebar" + index}
[style.listItem]: true, className={classnames({
[style.active]: item.path === pathname, [style.listItem]: true,
})} [style.active]: item.path === pathname,
onClick={() => item.type === "page" && navigate(item.path)} })}
> onClick={() => item.type === "page" && navigate(item.path)}
{item.name} >
</li> {item.name}
); </li>
);
}
return null;
})} })}
</List> </List>
</Box> </Box>
......
...@@ -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: 吴永生#A02208 yongsheng.wu@wholion.com * @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditTime: 2022-06-26 10:26:48 * @LastEditTime: 2022-06-28 11:22:47
* @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
*/ */
...@@ -33,10 +33,11 @@ const ProjectSubmitWork = () => { ...@@ -33,10 +33,11 @@ const ProjectSubmitWork = () => {
}); });
useEffect(() => { useEffect(() => {
const locationInfo: any = location?.state;
run({ run({
id: "b1044787-9618-4324-bc44-8d38e781aa44", id: locationInfo.taskId,
}); });
}, [run]); }, [location?.state, run]);
return ( return (
<div className={styles.swBox}> <div className={styles.swBox}>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com * @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-21 15:25:25 * @Date: 2022-06-21 15:25:25
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com * @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditTime: 2022-06-24 17:13:33 * @LastEditTime: 2022-06-27 20:50:36
* @FilePath: /bkunyun/src/views/Project/ProjectSubmitWork/WorkFlow/index.tsx * @FilePath: /bkunyun/src/views/Project/ProjectSubmitWork/WorkFlow/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
*/ */
......
...@@ -2,24 +2,25 @@ ...@@ -2,24 +2,25 @@
* @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: 吴永生#A02208 yongsheng.wu@wholion.com * @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditTime: 2022-06-07 21:39:30 * @LastEditTime: 2022-06-28 11:30:27
* @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
*/ */
import { memo, useEffect, useState } from "react"; import { memo, useCallback, useEffect, useState } from "react";
import _ from "lodash"; import _ from "lodash";
import { useStores } from "@/store"; import { useNavigate } from "react-router-dom";
import styles from "./index.module.css";
import { Box, Typography } from "@mui/material"; import { Box, Typography } from "@mui/material";
import OutlinedInput from "@mui/material/OutlinedInput"; import OutlinedInput from "@mui/material/OutlinedInput";
import SearchIcon from "@mui/icons-material/Search"; import SearchIcon from "@mui/icons-material/Search";
import useMyRequest from "@/hooks/useMyRequest";
import LinearProgress, { linearProgressClasses } from '@mui/material/LinearProgress'; import LinearProgress, { linearProgressClasses } from '@mui/material/LinearProgress';
import { TablePagination } from '@mui/material'; import { TablePagination } from '@mui/material';
import ActionsComponent from "../../../../components/Material.Ui/Table/ActionsComponent"
import TextField from '@mui/material/TextField'; import TextField from '@mui/material/TextField';
import MenuItem from '@mui/material/MenuItem'; import MenuItem from '@mui/material/MenuItem';
import SimpleDialog from "./components/simpleDialog" import SimpleDialog from "./components/simpleDialog"
import { useStores } from "@/store";
import useMyRequest from "@/hooks/useMyRequest";
import ActionsComponent from "../../../../components/Material.Ui/Table/ActionsComponent"
import runTime from '../../../../assets/project/runTime.svg' import runTime from '../../../../assets/project/runTime.svg'
import jobCost from '../../../../assets/project/jobCost.svg' import jobCost from '../../../../assets/project/jobCost.svg'
import jobSue from '../../../../assets/project/jobSue.svg' import jobSue from '../../../../assets/project/jobSue.svg'
...@@ -35,6 +36,9 @@ import { ...@@ -35,6 +36,9 @@ import {
cancelWorkflowJob cancelWorkflowJob
} from "@/api/workbench_api"; } from "@/api/workbench_api";
import styles from "./index.module.css";
const currencies = [ const currencies = [
{ {
value: 'ALL', value: 'ALL',
...@@ -78,6 +82,7 @@ const ProjectMembers = () => { ...@@ -78,6 +82,7 @@ const ProjectMembers = () => {
setCount(result.data.totalElements) setCount(result.data.totalElements)
}, },
}); });
const navigate = useNavigate()
// 删除作业 // 删除作业
const { run: delWorkflowJob } = useMyRequest(deleteWorkflowJob, { const { run: delWorkflowJob } = useMyRequest(deleteWorkflowJob, {
...@@ -223,6 +228,16 @@ const ProjectMembers = () => { ...@@ -223,6 +228,16 @@ const ProjectMembers = () => {
} }
} }
/** 点击每一行 */
const rowClick = useCallback(
(id: string) => {
navigate(`/product/cadd/projectJobDetail`, {
state: { taskId: id },
});
},
[navigate],
);
return ( return (
<Box className={styles.headerBox}> <Box className={styles.headerBox}>
...@@ -247,12 +262,12 @@ const ProjectMembers = () => { ...@@ -247,12 +262,12 @@ const ProjectMembers = () => {
size="small" size="small"
sx={{ sx={{
width: 180, height: 32, width: 180, height: 32,
['& .MuiOutlinedInput-root']: { '& .MuiOutlinedInput-root': {
height: '32px', height: '32px',
color: "#1E2633", color: "#1E2633",
fontSize: '14px' fontSize: '14px'
}, },
['& .MuiInputLabel-root']: { '& .MuiInputLabel-root': {
color: "#8A9099", color: "#8A9099",
fontSize: '14px' fontSize: '14px'
}, },
...@@ -282,7 +297,7 @@ const ProjectMembers = () => { ...@@ -282,7 +297,7 @@ const ProjectMembers = () => {
{ {
jobList.length > 0 && jobList.map((item: any, key) => { jobList.length > 0 && jobList.map((item: any, key) => {
return ( return (
<Box className={styles.tabBox}> <Box className={styles.tabBox} onClick={()=>rowClick(item.id)}>
<Box className={styles.tabBoxInfo}> <Box className={styles.tabBoxInfo}>
<div className={styles.tabBoxTitle}>{item.name}</div> <div className={styles.tabBoxTitle}>{item.name}</div>
<Box className={styles.tabBoxDescInfo}> <Box className={styles.tabBoxDescInfo}>
......
import { IEdge, ITask } from "../../ProjectSubmitWork/interface";
import ReactFlow, { import ReactFlow, {
Controls, Controls,
Background, Background,
...@@ -11,6 +10,11 @@ import ReactFlow, { ...@@ -11,6 +10,11 @@ import ReactFlow, {
} from "react-flow-renderer"; } from "react-flow-renderer";
import { useCallback, useEffect, useMemo, useState } from "react"; import { useCallback, useEffect, useMemo, useState } from "react";
import classNames from "classnames"; import classNames from "classnames";
import jobFail from "@/assets/project/jobFail.svg";
import jobRun from "@/assets/project/jobRun.svg";
import jobSue from "@/assets/project/jobSue.svg";
import { IEdge, ITask } from "../../ProjectSubmitWork/interface";
import { IBatchNode, ILine } from "./interface"; import { IBatchNode, ILine } from "./interface";
import styles from "./index.module.css"; import styles from "./index.module.css";
...@@ -85,6 +89,7 @@ const FlowNode = (props: any) => { ...@@ -85,6 +89,7 @@ const FlowNode = (props: any) => {
<div style={{ display: "flex", alignItems: "center" }}> <div style={{ display: "flex", alignItems: "center" }}>
{data?.label || ""} {data?.label || ""}
{data.isCheck && <span className={styles.successDot}></span>} {data.isCheck && <span className={styles.successDot}></span>}
<img style={{ marginLeft: "6px" }} src={jobRun} alt="" />
</div> </div>
{data?.dotStatus?.isOutput ? ( {data?.dotStatus?.isOutput ? (
<Handle <Handle
......
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