on-site confirm
parent
2f83305b6f
commit
9a0d0ed891
|
|
@ -18,7 +18,7 @@ import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
|||
import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm";
|
||||
import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper";
|
||||
import { NS_SAFETY_EVAL_BUSINESS } from "~/enumerate/namespace";
|
||||
import { PROGRESS_STATUS_MAP } from "~/enumerate/constant";
|
||||
import { PROGRESS_STATUS_MAP, NODE_LABELS } from "~/enumerate/constant";
|
||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { tools } from "@cqsjjb/jjb-common-lib";
|
||||
import "./index.less";
|
||||
|
|
@ -89,18 +89,15 @@ const ProjectProgress = (props) => {
|
|||
const renderProgressDots = (nodes) => {
|
||||
if (!nodes || nodes.length === 0) return <span className="pp-progress-empty">暂无进度</span>;
|
||||
const total = nodes.length;
|
||||
const done = nodes.filter((n) => n.statusCode === 3).length;
|
||||
const done = nodes.filter((n) => n.state === 1).length;
|
||||
return (
|
||||
<div>
|
||||
<div className="pp-progress-dots">
|
||||
{nodes.map((node, idx) => {
|
||||
const dotClass =
|
||||
node.statusCode === 3 ? "pp-progress-dot-done" :
|
||||
node.statusCode === 2 ? "pp-progress-dot-doing" :
|
||||
node.statusCode === 4 ? "pp-progress-dot-error" :
|
||||
"pp-progress-dot-wait";
|
||||
const dotClass = node.state === 1 ? "pp-progress-dot-done" : "pp-progress-dot-wait";
|
||||
const name = NODE_LABELS[node.type] || node.type;
|
||||
return (
|
||||
<Tooltip key={node.nodeCode || idx} title={`${node.nodeName}: ${node.statusName}`}>
|
||||
<Tooltip key={node.type || idx} title={`${name}: ${node.state === 1 ? "已完成" : "未完成"}`}>
|
||||
<span className={`pp-progress-dot ${dotClass}`} />
|
||||
</Tooltip>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue